Skip to content

Commit

Permalink
Merge pull request #102 from correac/Register_Nitrogen
Browse files Browse the repository at this point in the history
Adding SOAP registration of carbon and nitrogen abundances (PR ready to be reviewed)
  • Loading branch information
MatthieuSchaller authored Dec 20, 2023
2 parents c8fcf8a + 06e593b commit 0d6e404
Show file tree
Hide file tree
Showing 2 changed files with 108 additions and 0 deletions.
12 changes: 12 additions & 0 deletions velociraptor/catalogue/registration.py
Original file line number Diff line number Diff line change
Expand Up @@ -1087,18 +1087,24 @@ def registration_log_element_ratios_times_masses(
"LogIronOverHydrogen": "Fe_over_H",
"LogOxygenOverHydrogenAtomic": "O_over_H_atomic",
"LogOxygenOverHydrogenMolecular": "O_over_H_molecular",
"LogNitrogenOverOxygen": "N_over_O",
"LogCarbonOverOxygen": "C_over_O",
}[long_species]
element_name = {
"LogOxygenOverHydrogen": "Oxygen",
"LogIronOverHydrogen": "Iron",
"LogOxygenOverHydrogenAtomic": "Atomic-phase Oxygen",
"LogOxygenOverHydrogenMolecular": "Molecular-phase Oxygen",
"LogNitrogenOverOxygen": "Nitrogen over Oxygen",
"LogCarbonOverOxygen": "Carbon over Oxygen",
}[long_species]
fraction_name = {
"LogOxygenOverHydrogen": "O/H",
"LogIronOverHydrogen": "Fe/H",
"LogOxygenOverHydrogenAtomic": "O/H",
"LogOxygenOverHydrogenMolecular": "O/H",
"LogNitrogenOverOxygen": "N/O",
"LogCarbonOverOxygen": "C/O",
}[long_species]

short_floortype = {"Lo": "lowfloor", "Hi": "highfloor"}[floor_type]
Expand Down Expand Up @@ -1143,18 +1149,24 @@ def registration_lin_element_ratios_times_masses(
"OxygenOverHydrogen": "O_over_H",
"IronOverHydrogen": "Fe_over_H",
"IronfromSNIaOverHydrogen": "FeSNIa_over_H",
"NitrogenOverOxygen": "N_over_O",
"CarbonOverOxygen": "C_over_O",
}[long_species]
element_name = {
"TotalOxygenOverHydrogen": "Oxygen",
"OxygenOverHydrogen": "Oxygen",
"IronOverHydrogen": "Iron",
"IronfromSNIaOverHydrogen": "SNIaIron",
"NitrogenOverOxygen": "Nitrogen over Oxygen",
"CarbonOverOxygen": "Carbon over Oxygen",
}[long_species]
fraction_name = {
"TotalOxygenOverHydrogen": "O/H",
"OxygenOverHydrogen": "O/H",
"IronOverHydrogen": "Fe/H",
"IronfromSNIaOverHydrogen": "Fe(SNIa)/H",
"NitrogenOverOxygen": "N/O",
"CarbonOverOxygen": "C/O",
}[long_species]
except KeyError:
raise RegistrationDoesNotMatchError
Expand Down
96 changes: 96 additions & 0 deletions velociraptor/catalogue/translator.py
Original file line number Diff line number Diff line change
Expand Up @@ -1262,6 +1262,102 @@ def VR_to_SOAP(particle_property_name: str) -> str:
"exclusivesphere.100kpc.linearmassweighteddiffuseoxygenoverhydrogenofgas",
-1,
),
"lin_element_ratios_times_masses.lin_N_over_O_total_times_gas_mass_30_kpc": (
"exclusivesphere.30kpc.linearmassweightednitrogenoveroxygenofgas",
-1,
),
"lin_element_ratios_times_masses.lin_N_over_O_total_times_gas_mass_50_kpc": (
"exclusivesphere.50kpc.linearmassweightednitrogenoveroxygenofgas",
-1,
),
"lin_element_ratios_times_masses.lin_N_over_O_total_times_gas_mass_100_kpc": (
"exclusivesphere.100kpc.linearmassweightednitrogenoveroxygenofgas",
-1,
),
"lin_element_ratios_times_masses.lin_N_over_O_times_gas_mass_30_kpc": (
"exclusivesphere.30kpc.linearmassweighteddiffusenitrogenoveroxygenofgas",
-1,
),
"lin_element_ratios_times_masses.lin_N_over_O_times_gas_mass_50_kpc": (
"exclusivesphere.50kpc.linearmassweighteddiffusenitrogenoveroxygenofgas",
-1,
),
"lin_element_ratios_times_masses.lin_N_over_O_times_gas_mass_100_kpc": (
"exclusivesphere.100kpc.linearmassweighteddiffusenitrogenoveroxygenofgas",
-1,
),
"log_element_ratios_times_masses.log_N_over_O_times_gas_mass_lowfloor_30_kpc": (
"exclusivesphere.30kpc.logarithmicmassweighteddiffusenitrogenoveroxygenofgaslowlimit",
-1,
),
"log_element_ratios_times_masses.log_N_over_O_times_gas_mass_lowfloor_50_kpc": (
"exclusivesphere.50kpc.logarithmicmassweighteddiffusenitrogenoveroxygenofgaslowlimit",
-1,
),
"log_element_ratios_times_masses.log_N_over_O_times_gas_mass_lowfloor_100_kpc": (
"exclusivesphere.100kpc.logarithmicmassweighteddiffusenitrogenoveroxygenofgaslowlimit",
-1,
),
"log_element_ratios_times_masses.log_N_over_O_times_gas_mass_highfloor_30_kpc": (
"exclusivesphere.30kpc.logarithmicmassweighteddiffusenitrogenoveroxygenofgashighlimit",
-1,
),
"log_element_ratios_times_masses.log_N_over_O_times_gas_mass_highfloor_50_kpc": (
"exclusivesphere.50kpc.logarithmicmassweighteddiffusenitrogenoveroxygenofgashighlimit",
-1,
),
"log_element_ratios_times_masses.log_N_over_O_times_gas_mass_highfloor_100_kpc": (
"exclusivesphere.100kpc.logarithmicmassweighteddiffusenitrogenoveroxygenofgashighlimit",
-1,
),
"lin_element_ratios_times_masses.lin_C_over_O_total_times_gas_mass_30_kpc": (
"exclusivesphere.30kpc.linearmassweightedcarbonoveroxygenofgas",
-1,
),
"lin_element_ratios_times_masses.lin_C_over_O_total_times_gas_mass_50_kpc": (
"exclusivesphere.50kpc.linearmassweightedcarbonoveroxygenofgas",
-1,
),
"lin_element_ratios_times_masses.lin_C_over_O_total_times_gas_mass_100_kpc": (
"exclusivesphere.100kpc.linearmassweightedcarbonoveroxygenofgas",
-1,
),
"lin_element_ratios_times_masses.lin_C_over_O_times_gas_mass_30_kpc": (
"exclusivesphere.30kpc.linearmassweighteddiffusecarbonoveroxygenofgas",
-1,
),
"lin_element_ratios_times_masses.lin_C_over_O_times_gas_mass_50_kpc": (
"exclusivesphere.50kpc.linearmassweighteddiffusecarbonoveroxygenofgas",
-1,
),
"lin_element_ratios_times_masses.lin_C_over_O_times_gas_mass_100_kpc": (
"exclusivesphere.100kpc.linearmassweighteddiffusecarbonoveroxygenofgas",
-1,
),
"log_element_ratios_times_masses.log_C_over_O_times_gas_mass_lowfloor_30_kpc": (
"exclusivesphere.30kpc.logarithmicmassweighteddiffusecarbonoveroxygenofgaslowlimit",
-1,
),
"log_element_ratios_times_masses.log_C_over_O_times_gas_mass_lowfloor_50_kpc": (
"exclusivesphere.50kpc.logarithmicmassweighteddiffusecarbonoveroxygenofgaslowlimit",
-1,
),
"log_element_ratios_times_masses.log_C_over_O_times_gas_mass_lowfloor_100_kpc": (
"exclusivesphere.100kpc.logarithmicmassweighteddiffusecarbonoveroxygenofgaslowlimit",
-1,
),
"log_element_ratios_times_masses.log_C_over_O_times_gas_mass_highfloor_30_kpc": (
"exclusivesphere.30kpc.logarithmicmassweighteddiffusecarbonoveroxygenofgashighlimit",
-1,
),
"log_element_ratios_times_masses.log_C_over_O_times_gas_mass_highfloor_50_kpc": (
"exclusivesphere.50kpc.logarithmicmassweighteddiffusecarbonoveroxygenofgashighlimit",
-1,
),
"log_element_ratios_times_masses.log_C_over_O_times_gas_mass_highfloor_100_kpc": (
"exclusivesphere.100kpc.logarithmicmassweighteddiffusecarbonoveroxygenofgashighlimit",
-1,
),
"log_element_ratios_times_masses.log_O_over_H_times_gas_mass_lowfloor_30_kpc": (
"exclusivesphere.30kpc.logarithmicmassweighteddiffuseoxygenoverhydrogenofgaslowlimit",
-1,
Expand Down

0 comments on commit 0d6e404

Please sign in to comment.