@@ -32,7 +32,7 @@ def registration_fail_all(
32
32
information that is available from the velociraptor catalogue
33
33
34
34
Return signature:
35
-
35
+
36
36
+ field_units: the units that correspond to field_path.
37
37
+ name: A fancy (possibly LaTeX'd) name for the field.
38
38
+ snake_case: A correct snake_case name for the field.
@@ -954,6 +954,39 @@ def registration_stellar_birth_densities(
954
954
return
955
955
956
956
957
+ def registration_snii_thermal_feedback_densities (
958
+ field_path : str , unit_system : VelociraptorUnits
959
+ ) -> (unyt .Unit , str , str ):
960
+ """
961
+ SNII thermal feedback density registrations.
962
+ """
963
+
964
+ if (
965
+ not field_path [:14 ] == "DensitiesAtLastSupernovaEvent"
966
+ and field_path [- 4 :] == "gas"
967
+ ):
968
+ raise RegistrationDoesNotMatchError
969
+
970
+ unit = unit_system .mass / unit_system .length ** 3
971
+
972
+ # Need to do a regex search (average, min, max)
973
+ match_string = "DensitiesAtLastSupernovaEvent_([a-z]+)_gas"
974
+ regex = cached_regex (match_string )
975
+ match = regex .match (field_path )
976
+
977
+ if match :
978
+ minmax = match .group (1 )
979
+
980
+ full_name = f"SNII Thermal Feedback Density ({ minmax } )"
981
+ snake_case = minmax .lower ()
982
+
983
+ return unit , full_name , snake_case
984
+ else :
985
+ raise RegistrationDoesNotMatchError
986
+
987
+ return
988
+
989
+
957
990
def registration_species_fractions (
958
991
field_path : str , unit_system : VelociraptorUnits
959
992
) -> (unyt .Unit , str , str ):
@@ -1089,6 +1122,7 @@ def registration_spherical_overdensities(
1089
1122
"hydrogen_phase_fractions" ,
1090
1123
"black_hole_masses" ,
1091
1124
"stellar_birth_densities" ,
1125
+ "snii_thermal_feedback_densities" ,
1092
1126
"species_fractions" ,
1093
1127
"fail_all" ,
1094
1128
]
0 commit comments