From 31a6a8acdb71ca6ebf59edd1887faad6fe5d9252 Mon Sep 17 00:00:00 2001 From: mreuter01 <98431015+mreuter01@users.noreply.github.com> Date: Thu, 1 Aug 2024 10:32:24 -0600 Subject: [PATCH 01/17] Update model_parameters.py Adding first rendition of LANL1D function --- nmma/em/model_parameters.py | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/nmma/em/model_parameters.py b/nmma/em/model_parameters.py index 01cdfee0..6be5da32 100644 --- a/nmma/em/model_parameters.py +++ b/nmma/em/model_parameters.py @@ -396,3 +396,32 @@ 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", + #"log10_mej_wind", + #"vej_wind", + "KNtheta", + ] + + 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"]) + #knprops["log10_mej_wind"] = np.log10(knprops["mej_wind"]) + del knprops["mej_dyn"] + #del knprops["mej_wind"] + # del knprops["morphology"] + + data_out[key] = knprops + data_out[key] = {**data_out[key], **data[key]} + + return data_out, parameters From 4b6789990c7378e381b6814761928a242bcdd19f Mon Sep 17 00:00:00 2001 From: mreuter01 <98431015+mreuter01@users.noreply.github.com> Date: Tue, 6 Aug 2024 16:16:52 -0600 Subject: [PATCH 02/17] Update utils.py Un-commenting the Ye_wind parameter --- nmma/em/utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nmma/em/utils.py b/nmma/em/utils.py index 057e04c4..1d61d560 100644 --- a/nmma/em/utils.py +++ b/nmma/em/utils.py @@ -1673,7 +1673,7 @@ def get_knprops_from_LANLfilename(filename): knprops = {} for prop in [ # "morphology", - # "Ye_wind", + "Ye_wind", "mej_dyn", "vej_dyn", "mej_wind", From 10d771c4aac1165f69e1f80afb5a9804a7c8adb5 Mon Sep 17 00:00:00 2001 From: mreuter01 <98431015+mreuter01@users.noreply.github.com> Date: Tue, 6 Aug 2024 17:30:01 -0600 Subject: [PATCH 03/17] Update model_parameters.py Commenting out KNtheta parameter in LANL1D --- nmma/em/model_parameters.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nmma/em/model_parameters.py b/nmma/em/model_parameters.py index 6be5da32..a9677547 100644 --- a/nmma/em/model_parameters.py +++ b/nmma/em/model_parameters.py @@ -405,7 +405,7 @@ def LANL1D(data): "vej_dyn", #"log10_mej_wind", #"vej_wind", - "KNtheta", + #"KNtheta", ] data_out = {} From 7aab0d85c729a4bb1a7933580c25a00795ab7e4e Mon Sep 17 00:00:00 2001 From: mreuter01 <98431015+mreuter01@users.noreply.github.com> Date: Tue, 6 Aug 2024 17:30:52 -0600 Subject: [PATCH 04/17] Update model.py Adding parameters for LANL1D --- nmma/em/model.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/nmma/em/model.py b/nmma/em/model.py index b59a7c67..6a5d12af 100644 --- a/nmma/em/model.py +++ b/nmma/em/model.py @@ -97,6 +97,11 @@ "vej_wind", "KNtheta", ], + "LANL1D": [ + "Ye_wind", + "log10_mej_dyn", + "vej_dyn", + ], } From ac3672bba12046a7a47366a39393d31c47d2c0d4 Mon Sep 17 00:00:00 2001 From: mreuter01 <98431015+mreuter01@users.noreply.github.com> Date: Wed, 7 Aug 2024 15:37:09 -0600 Subject: [PATCH 05/17] Create LANL1D.prior Creation of LANL1d prior file --- priors/LANL1D.prior | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 priors/LANL1D.prior diff --git a/priors/LANL1D.prior b/priors/LANL1D.prior new file mode 100644 index 00000000..ef8e2bf6 --- /dev/null +++ b/priors/LANL1D.prior @@ -0,0 +1,5 @@ +log10_mej_dyn = Uniform(name='log10_mej_dyn', minimum=-3., maximum=-1., latex_label='$\\log_{10}M^{\\rm{dyn}}_{\\rm{ej}}$') +vej_dyn = Uniform(name='vej_dyn', minimum=5.0, maximum=40.0, latex_label='$V^{\\rm{dyn}}_{\\rm{ej}}$') +Ye_wind = Uniform(name='Ye_wind', minimum=0.05, maximum=0.50, latex_label='$Ye_wind$') +luminosity_distance = Uniform(minimum=0.0, maximum=200., name='luminosity_distance',latex_label='$D_L$') +timeshift = Uniform(minimum=-2.0, maximum=1.0, name='trigger_time',latex_label='$t_0$') From e507ea0db466a23123ad3d9563e756cadf285da0 Mon Sep 17 00:00:00 2001 From: mreuter01 <98431015+mreuter01@users.noreply.github.com> Date: Thu, 8 Aug 2024 13:20:36 -0600 Subject: [PATCH 06/17] Update LANL1D.prior edited vej_dyn to the proper numbers --- priors/LANL1D.prior | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/priors/LANL1D.prior b/priors/LANL1D.prior index ef8e2bf6..2ab39782 100644 --- a/priors/LANL1D.prior +++ b/priors/LANL1D.prior @@ -1,5 +1,5 @@ log10_mej_dyn = Uniform(name='log10_mej_dyn', minimum=-3., maximum=-1., latex_label='$\\log_{10}M^{\\rm{dyn}}_{\\rm{ej}}$') -vej_dyn = Uniform(name='vej_dyn', minimum=5.0, maximum=40.0, latex_label='$V^{\\rm{dyn}}_{\\rm{ej}}$') -Ye_wind = Uniform(name='Ye_wind', minimum=0.05, maximum=0.50, latex_label='$Ye_wind$') +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='$Ye_{wind}$') luminosity_distance = Uniform(minimum=0.0, maximum=200., name='luminosity_distance',latex_label='$D_L$') timeshift = Uniform(minimum=-2.0, maximum=1.0, name='trigger_time',latex_label='$t_0$') From 4ca4815eab6b44411cf0f5eea84213ba021a191d Mon Sep 17 00:00:00 2001 From: mreuter01 <98431015+mreuter01@users.noreply.github.com> Date: Thu, 8 Aug 2024 13:31:53 -0600 Subject: [PATCH 07/17] Update utils.py update get_knprops_from_LANLfilename to account for masses in filenames that aren't followed by another letter --- nmma/em/utils.py | 25 ++++++++++++++++++------- 1 file changed, 18 insertions(+), 7 deletions(-) diff --git a/nmma/em/utils.py b/nmma/em/utils.py index 1d61d560..fd47f269 100644 --- a/nmma/em/utils.py +++ b/nmma/em/utils.py @@ -1643,13 +1643,24 @@ def get_knprops_from_LANLfilename(filename): # Record mass elif "m" == info[0] and info != "mags": - md = float(info[2:]) - # Recast masses - if md in [1, 5]: - md /= 100 - elif md in [2]: - md /= 1000 - + if info[1].isdigit(): + md = float(info[1:]) + # Recast masses + if len(info[1:]) == 1: + md /= 10 + if len(info[1:]) == 2: + md /= 100 + if len(info[1:]) == 3: + md /= 1000 + else: + md = float(info[2:]) + # Recast masses + if md in [1, 5]: + md /= 100 + elif md in [2]: + md /= 1000 + + # Record velocity elif "v" == info[0]: vd = float(info[1:]) / 100 From 8732ec1ab7ef67c942f94de3e6dd86ceaf3ebce9 Mon Sep 17 00:00:00 2001 From: mreuter01 <98431015+mreuter01@users.noreply.github.com> Date: Thu, 8 Aug 2024 16:04:59 -0600 Subject: [PATCH 08/17] Update LANL1D.prior Adjusting the timeshift --- priors/LANL1D.prior | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/priors/LANL1D.prior b/priors/LANL1D.prior index 2ab39782..4ed10d68 100644 --- a/priors/LANL1D.prior +++ b/priors/LANL1D.prior @@ -2,4 +2,4 @@ log10_mej_dyn = Uniform(name='log10_mej_dyn', minimum=-3., maximum=-1., latex_l 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='$Ye_{wind}$') luminosity_distance = Uniform(minimum=0.0, maximum=200., name='luminosity_distance',latex_label='$D_L$') -timeshift = Uniform(minimum=-2.0, maximum=1.0, name='trigger_time',latex_label='$t_0$') +timeshift = Uniform(minimum=-0.01, maximum=0.01, name='trigger_time',latex_label='$t_0$') From ad8939cf1be53702078d82254a8c32e13ab284a9 Mon Sep 17 00:00:00 2001 From: mreuter01 <98431015+mreuter01@users.noreply.github.com> Date: Fri, 9 Aug 2024 11:15:47 -0600 Subject: [PATCH 09/17] Update model.py changing from log_10_mej_dyn to mej_dyn --- nmma/em/model.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nmma/em/model.py b/nmma/em/model.py index 6a5d12af..739021ff 100644 --- a/nmma/em/model.py +++ b/nmma/em/model.py @@ -99,7 +99,7 @@ ], "LANL1D": [ "Ye_wind", - "log10_mej_dyn", + "mej_dyn", "vej_dyn", ], } From 452744f2de4ef6363f0a116fe92af2b0b72a632b Mon Sep 17 00:00:00 2001 From: mreuter01 <98431015+mreuter01@users.noreply.github.com> Date: Fri, 9 Aug 2024 11:17:26 -0600 Subject: [PATCH 10/17] Update model_parameters.py Changed from log_10_mej_dyn to mej_dyn in LANL1D --- nmma/em/model_parameters.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/nmma/em/model_parameters.py b/nmma/em/model_parameters.py index a9677547..b58fd180 100644 --- a/nmma/em/model_parameters.py +++ b/nmma/em/model_parameters.py @@ -401,7 +401,7 @@ def LANL1D(data): parameters = [ "Ye_wind", - "log10_mej_dyn", + "mej_dyn", "vej_dyn", #"log10_mej_wind", #"vej_wind", @@ -415,9 +415,9 @@ def LANL1D(data): knprops = get_knprops_from_LANLfilename(key) # best to interpolate masses in log10 - knprops["log10_mej_dyn"] = np.log10(knprops["mej_dyn"]) + #knprops["log10_mej_dyn"] = np.log10(knprops["mej_dyn"]) #knprops["log10_mej_wind"] = np.log10(knprops["mej_wind"]) - del knprops["mej_dyn"] + #del knprops["mej_dyn"] #del knprops["mej_wind"] # del knprops["morphology"] From 433886876153d11feb197155e482cf61881103f2 Mon Sep 17 00:00:00 2001 From: mreuter01 <98431015+mreuter01@users.noreply.github.com> Date: Mon, 12 Aug 2024 10:23:47 -0600 Subject: [PATCH 11/17] Update LANL1D.prior Changing timeshift --- priors/LANL1D.prior | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/priors/LANL1D.prior b/priors/LANL1D.prior index 4ed10d68..2ab39782 100644 --- a/priors/LANL1D.prior +++ b/priors/LANL1D.prior @@ -2,4 +2,4 @@ log10_mej_dyn = Uniform(name='log10_mej_dyn', minimum=-3., maximum=-1., latex_l 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='$Ye_{wind}$') luminosity_distance = Uniform(minimum=0.0, maximum=200., name='luminosity_distance',latex_label='$D_L$') -timeshift = Uniform(minimum=-0.01, maximum=0.01, name='trigger_time',latex_label='$t_0$') +timeshift = Uniform(minimum=-2.0, maximum=1.0, name='trigger_time',latex_label='$t_0$') From a00353d775b9354f78e4b81613c521cdac6dad91 Mon Sep 17 00:00:00 2001 From: mreuter01 <98431015+mreuter01@users.noreply.github.com> Date: Tue, 13 Aug 2024 14:44:50 -0600 Subject: [PATCH 12/17] Update model_parameters.py updating log10_mej_dyn --- nmma/em/model_parameters.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/nmma/em/model_parameters.py b/nmma/em/model_parameters.py index b58fd180..a9677547 100644 --- a/nmma/em/model_parameters.py +++ b/nmma/em/model_parameters.py @@ -401,7 +401,7 @@ def LANL1D(data): parameters = [ "Ye_wind", - "mej_dyn", + "log10_mej_dyn", "vej_dyn", #"log10_mej_wind", #"vej_wind", @@ -415,9 +415,9 @@ def LANL1D(data): knprops = get_knprops_from_LANLfilename(key) # best to interpolate masses in log10 - #knprops["log10_mej_dyn"] = np.log10(knprops["mej_dyn"]) + knprops["log10_mej_dyn"] = np.log10(knprops["mej_dyn"]) #knprops["log10_mej_wind"] = np.log10(knprops["mej_wind"]) - #del knprops["mej_dyn"] + del knprops["mej_dyn"] #del knprops["mej_wind"] # del knprops["morphology"] From c27b544cd9354dbd8b434f118e4fb6126c271f71 Mon Sep 17 00:00:00 2001 From: mreuter01 <98431015+mreuter01@users.noreply.github.com> Date: Tue, 13 Aug 2024 14:47:15 -0600 Subject: [PATCH 13/17] Update model.py updating log10_mej_dyn --- nmma/em/model.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nmma/em/model.py b/nmma/em/model.py index 739021ff..6a5d12af 100644 --- a/nmma/em/model.py +++ b/nmma/em/model.py @@ -99,7 +99,7 @@ ], "LANL1D": [ "Ye_wind", - "mej_dyn", + "log10_mej_dyn", "vej_dyn", ], } From 7d2c393651a2ab778952928927b3884c37b9e3dc Mon Sep 17 00:00:00 2001 From: mreuter01 <98431015+mreuter01@users.noreply.github.com> Date: Thu, 15 Aug 2024 17:09:05 -0600 Subject: [PATCH 14/17] Update LANL1D.prior Setting timeshift=0 and luminosity_distance=40.7 to properly reflect the files --- priors/LANL1D.prior | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/priors/LANL1D.prior b/priors/LANL1D.prior index 2ab39782..87afb509 100644 --- a/priors/LANL1D.prior +++ b/priors/LANL1D.prior @@ -1,5 +1,5 @@ -log10_mej_dyn = Uniform(name='log10_mej_dyn', minimum=-3., maximum=-1., latex_label='$\\log_{10}M^{\\rm{dyn}}_{\\rm{ej}}$') +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='$Ye_{wind}$') -luminosity_distance = Uniform(minimum=0.0, maximum=200., name='luminosity_distance',latex_label='$D_L$') -timeshift = Uniform(minimum=-2.0, maximum=1.0, name='trigger_time',latex_label='$t_0$') +Ye_wind = Uniform(name='Ye_wind', minimum=0.05, maximum=0.50, latex_label='$Y_{\\rm{e}}$') +luminosity_distance = 40.7 +timeshift = 0 From 267ca717134a910d7056d17713867753e0ffbbc2 Mon Sep 17 00:00:00 2001 From: mreuter01 <98431015+mreuter01@users.noreply.github.com> Date: Tue, 20 Aug 2024 13:07:18 -0600 Subject: [PATCH 15/17] Update utils.py Reverting file back to its previous state --- nmma/em/utils.py | 22 ++++++---------------- 1 file changed, 6 insertions(+), 16 deletions(-) diff --git a/nmma/em/utils.py b/nmma/em/utils.py index fd47f269..a12327d2 100644 --- a/nmma/em/utils.py +++ b/nmma/em/utils.py @@ -1643,22 +1643,12 @@ def get_knprops_from_LANLfilename(filename): # Record mass elif "m" == info[0] and info != "mags": - if info[1].isdigit(): - md = float(info[1:]) - # Recast masses - if len(info[1:]) == 1: - md /= 10 - if len(info[1:]) == 2: - md /= 100 - if len(info[1:]) == 3: - md /= 1000 - else: - md = float(info[2:]) - # Recast masses - if md in [1, 5]: - md /= 100 - elif md in [2]: - md /= 1000 + md = float(info[2:]) + # Recast masses + if md in [1, 5]: + md /= 100 + elif md in [2]: + md /= 1000 # Record velocity From b2b73dff4281e8d58a7f4e8f6dbeb173c666f620 Mon Sep 17 00:00:00 2001 From: mreuter01 <98431015+mreuter01@users.noreply.github.com> Date: Wed, 21 Aug 2024 09:46:27 -0600 Subject: [PATCH 16/17] Update model_parameters.py Removed unnecessary commenting from LANL1D --- nmma/em/model_parameters.py | 6 ------ 1 file changed, 6 deletions(-) diff --git a/nmma/em/model_parameters.py b/nmma/em/model_parameters.py index a9677547..980d7950 100644 --- a/nmma/em/model_parameters.py +++ b/nmma/em/model_parameters.py @@ -403,9 +403,6 @@ def LANL1D(data): "Ye_wind", "log10_mej_dyn", "vej_dyn", - #"log10_mej_wind", - #"vej_wind", - #"KNtheta", ] data_out = {} @@ -416,10 +413,7 @@ def LANL1D(data): # best to interpolate masses in log10 knprops["log10_mej_dyn"] = np.log10(knprops["mej_dyn"]) - #knprops["log10_mej_wind"] = np.log10(knprops["mej_wind"]) del knprops["mej_dyn"] - #del knprops["mej_wind"] - # del knprops["morphology"] data_out[key] = knprops data_out[key] = {**data_out[key], **data[key]} From 16540fd1abdce009bb4e09956b6189c3bf44086b Mon Sep 17 00:00:00 2001 From: mreuter01 <98431015+mreuter01@users.noreply.github.com> Date: Thu, 22 Aug 2024 16:52:58 -0600 Subject: [PATCH 17/17] Update model.py --- nmma/em/model.py | 1 + 1 file changed, 1 insertion(+) diff --git a/nmma/em/model.py b/nmma/em/model.py index 6a5d12af..64b55104 100644 --- a/nmma/em/model.py +++ b/nmma/em/model.py @@ -113,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"] ),