From eb7ea8e6c22e1639919f2a1e5f651c8c01ab4870 Mon Sep 17 00:00:00 2001 From: Andrey Sheshukov Date: Wed, 15 May 2024 14:37:21 +0300 Subject: [PATCH 1/6] Mark Nakazato models forming black hole --- python/snewpy/models/ccsn.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/python/snewpy/models/ccsn.py b/python/snewpy/models/ccsn.py index 73b4cad6..6e0b966a 100644 --- a/python/snewpy/models/ccsn.py +++ b/python/snewpy/models/ccsn.py @@ -87,8 +87,7 @@ def __init__(self, progenitor_mass:u.Quantity, revival_time:u.Quantity, metallic filename = f"nakazato-{eos}-z{metallicity}-t_rev{int(revival_time)}ms-s{progenitor_mass:3.1f}.fits" else: filename = f"nakazato-{eos}-BH-z{metallicity}-s{progenitor_mass:3.1f}.fits" - #modify metadata if needed... - #self.metadata['name']=value + self.metadata['Black hole']=(revival_time==0) return super().__init__(filename, self.metadata) From 0298ad5c501937e4c9ed8299afb28809ea913589 Mon Sep 17 00:00:00 2001 From: Andrey Sheshukov Date: Wed, 15 May 2024 17:34:11 +0300 Subject: [PATCH 2/6] Tag Warren_2020 models forming BH --- python/snewpy/models/ccsn_loaders.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/python/snewpy/models/ccsn_loaders.py b/python/snewpy/models/ccsn_loaders.py index 73136a7b..3a8c304c 100644 --- a/python/snewpy/models/ccsn_loaders.py +++ b/python/snewpy/models/ccsn_loaders.py @@ -253,7 +253,10 @@ def __init__(self, filename, metadata={}): # Set model metadata. self.filename = os.path.basename(filename) - + #A simulation is considered to explode if its diagnostic explosion energy + #exceeds 1e49 ergs. This is in line with the definition of explosion time + #in arXiv:1902.01340v2, p. 16. + metadata['Black hole'] = f['sim_data']['expl_energy'][-1][1] <= 1e49 super().__init__(simtab, metadata) From 5603c2220b2a76b5c8c73e604b7f52eef4856af0 Mon Sep 17 00:00:00 2001 From: Andrey Sheshukov Date: Wed, 15 May 2024 17:37:11 +0300 Subject: [PATCH 3/6] Mark Zha_2021 and OConnor_2015 forming BH --- python/snewpy/models/ccsn.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/python/snewpy/models/ccsn.py b/python/snewpy/models/ccsn.py index 6e0b966a..137db308 100644 --- a/python/snewpy/models/ccsn.py +++ b/python/snewpy/models/ccsn.py @@ -237,6 +237,8 @@ class OConnor_2015(loaders.OConnor_2015): def __init__(self, progenitor_mass:u.Quantity): # Filename is currently the same regardless of parameters filename = 'M1_neutrinos.dat' + #this model forms BH + self.metadata['Black hole']=True return super().__init__(filename, self.metadata) @deprecated('eos') @@ -256,6 +258,8 @@ def _metadata_from_filename(self, filename:str)->dict: def __init__(self, *, progenitor_mass:u.Quantity): filename = f's{progenitor_mass.value:g}.dat' + #tag if this simulation forms a black hole + self.metadata['Black hole'] = self.filename[:-4] not in ['s18','s25'] return super().__init__(filename, self.metadata) @deprecated('eos') From 1ded0d9b0d0c7751de4c729105846a98bcddc86c Mon Sep 17 00:00:00 2001 From: Andrey Sheshukov Date: Wed, 15 May 2024 17:41:47 +0300 Subject: [PATCH 4/6] Fix typo --- python/snewpy/models/ccsn.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/snewpy/models/ccsn.py b/python/snewpy/models/ccsn.py index 137db308..35cd1fc0 100644 --- a/python/snewpy/models/ccsn.py +++ b/python/snewpy/models/ccsn.py @@ -259,7 +259,7 @@ def _metadata_from_filename(self, filename:str)->dict: def __init__(self, *, progenitor_mass:u.Quantity): filename = f's{progenitor_mass.value:g}.dat' #tag if this simulation forms a black hole - self.metadata['Black hole'] = self.filename[:-4] not in ['s18','s25'] + self.metadata['Black hole'] = filename[:-4] not in ['s18','s25'] return super().__init__(filename, self.metadata) @deprecated('eos') From 6d128ba598aee0ebf7cd5e22aeafe17dacb44619 Mon Sep 17 00:00:00 2001 From: Andrey Sheshukov Date: Fri, 17 May 2024 15:44:07 +0300 Subject: [PATCH 5/6] Mark Walk_2019 forming BH --- python/snewpy/models/ccsn.py | 1 + 1 file changed, 1 insertion(+) diff --git a/python/snewpy/models/ccsn.py b/python/snewpy/models/ccsn.py index 35cd1fc0..3ad1dae0 100644 --- a/python/snewpy/models/ccsn.py +++ b/python/snewpy/models/ccsn.py @@ -178,6 +178,7 @@ class Walk_2019(loaders.Walk_2019): """ def __init__(self, * ,progenitor_mass:u.Quantity, direction:int): filename = f's{progenitor_mass.value:3.1f}c_3DBH_dir{direction}' + self.metadata['Black hole']=True return super().__init__(filename=filename, metadata=self.metadata) From 4f9ae4a6a35f1a3c2951ebc9125fd74cb7aa0a88 Mon Sep 17 00:00:00 2001 From: Andrey Sheshukov Date: Tue, 21 May 2024 16:58:33 +0300 Subject: [PATCH 6/6] Distinguish non-exploding and BH forming for the Warren_2020 model --- python/snewpy/models/ccsn_loaders.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/python/snewpy/models/ccsn_loaders.py b/python/snewpy/models/ccsn_loaders.py index 3a8c304c..9a8d18d7 100644 --- a/python/snewpy/models/ccsn_loaders.py +++ b/python/snewpy/models/ccsn_loaders.py @@ -256,7 +256,9 @@ def __init__(self, filename, metadata={}): #A simulation is considered to explode if its diagnostic explosion energy #exceeds 1e49 ergs. This is in line with the definition of explosion time #in arXiv:1902.01340v2, p. 16. - metadata['Black hole'] = f['sim_data']['expl_energy'][-1][1] <= 1e49 + metadata['Explodes'] = f['sim_data']['expl_energy'][-1][1] > 1e49 + metadata['Black hole'] = metadata['Explodes'] and (simtab['TIME'][-1] < 4.99) + super().__init__(simtab, metadata)