From 6852b5c626e4175c70b074632ecd93918e14a613 Mon Sep 17 00:00:00 2001 From: "Peter T. H. Pang" Date: Thu, 12 Oct 2023 08:54:49 +0200 Subject: [PATCH] bug-fix for GRB so that the resolution constraint is applied regardless of jet type --- nmma/em/model.py | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/nmma/em/model.py b/nmma/em/model.py index 6765870f..a8c45fd7 100644 --- a/nmma/em/model.py +++ b/nmma/em/model.py @@ -290,7 +290,7 @@ def __init__( f"Attempting to load {core_model_name}_tf.pkl. In the future, all model files will have the format .pkl, regardless of --interpolation-type." ) modelfile = os.path.join(self.svd_path, f"{core_model_name}_tf.pkl") - + if not local_only: _, model_filters = get_model( self.svd_path, f"{self.model}_tf", filters=filters @@ -510,14 +510,13 @@ def generate_lightcurve(self, sample_times, parameters): grb_param_dict["epsilon_B"] = 10 ** new_parameters["log10_epsilon_B"] grb_param_dict["z"] = z - if self.jetType == 0: - if "thetaWing" in new_parameters: - grb_param_dict["thetaWing"] = new_parameters["thetaWing"] - if ( - new_parameters["thetaWing"] / new_parameters["thetaCore"] - > self.resolution - ): - return np.zeros(len(sample_times)), {} + if "thetaWing" in new_parameters: + grb_param_dict["thetaWing"] = new_parameters["thetaWing"] + if ( + new_parameters["thetaWing"] / new_parameters["thetaCore"] + > self.resolution + ): + return np.zeros(len(sample_times)), {} if self.jetType == 1 or self.jetType == 4: grb_param_dict["b"] = new_parameters["b"]