Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LANL1D model addition #379

Open
wants to merge 17 commits into
base: main
Choose a base branch
from
6 changes: 6 additions & 0 deletions nmma/em/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,11 @@
"vej_wind",
"KNtheta",
],
"LANL1D": [
"Ye_wind",
"log10_mej_dyn",
"vej_dyn",
],
}


Expand All @@ -108,6 +113,7 @@ def citation(self):
citation_dict = {
**dict.fromkeys(["LANLTP1", "LANLTP2", "LANLTS1", "LANLTS2"], ["https://arxiv.org/abs/2105.11543"]),
"Ka2017": ["https://arxiv.org/abs/1710.05463"],
**dict.fromkeys(["LANL1D"] , ["https://arxiv.org/abs/1905.05089"]),
**dict.fromkeys(
["Bu2019lm", "Bu2019lm_sparse"], ["https://arxiv.org/abs/2002.11355", "https://arxiv.org/abs/1906.04205"]
),
Expand Down
23 changes: 23 additions & 0 deletions nmma/em/model_parameters.py
Original file line number Diff line number Diff line change
Expand Up @@ -396,3 +396,26 @@ def LANLTS2(data):
data_out[key] = {**data_out[key], **data[key]}

return data_out, parameters

def LANL1D(data):

parameters = [
"Ye_wind",
"log10_mej_dyn",
"vej_dyn",
]

data_out = {}

magkeys = data.keys()
for jj, key in enumerate(magkeys):
knprops = get_knprops_from_LANLfilename(key)

# best to interpolate masses in log10
knprops["log10_mej_dyn"] = np.log10(knprops["mej_dyn"])
del knprops["mej_dyn"]

data_out[key] = knprops
data_out[key] = {**data_out[key], **data[key]}

return data_out, parameters
5 changes: 3 additions & 2 deletions nmma/em/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -1649,7 +1649,8 @@ def get_knprops_from_LANLfilename(filename):
md /= 100
elif md in [2]:
md /= 1000



# Record velocity
elif "v" == info[0]:
vd = float(info[1:]) / 100
Expand All @@ -1673,7 +1674,7 @@ def get_knprops_from_LANLfilename(filename):
knprops = {}
for prop in [
# "morphology",
# "Ye_wind",
"Ye_wind",
"mej_dyn",
"vej_dyn",
"mej_wind",
Expand Down
5 changes: 5 additions & 0 deletions priors/LANL1D.prior
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
log10_mej_dyn = Uniform(name='log10_mej_dyn', minimum=-3., maximum=-1.2, latex_label='$\\log_{10}M^{\\rm{dyn}}_{\\rm{ej}}$')
vej_dyn = Uniform(name='vej_dyn', minimum=0.05, maximum=0.40, latex_label='$V^{\\rm{dyn}}_{\\rm{ej}}$')
Ye_wind = Uniform(name='Ye_wind', minimum=0.05, maximum=0.50, latex_label='$Y_{\\rm{e}}$')
luminosity_distance = 40.7
timeshift = 0