Skip to content

Commit

Permalink
bug-fix for GRB so that the resolution constraint is applied regardle…
Browse files Browse the repository at this point in the history
…ss of jet type
  • Loading branch information
tsunhopang committed Oct 12, 2023
1 parent e4a3718 commit 6852b5c
Showing 1 changed file with 8 additions and 9 deletions.
17 changes: 8 additions & 9 deletions nmma/em/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 <model>.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
Expand Down Expand Up @@ -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"]
Expand Down

0 comments on commit 6852b5c

Please sign in to comment.