Skip to content

Commit 5f12228

Browse files
authored
Updated translator to deal with aperture quantities not already defined.
1 parent 5c12140 commit 5f12228

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

velociraptor/catalogue/translator.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ def get_aperture_unit(unit_name: str, unit_system: VelociraptorUnits):
3939
"veldisp": unit_system.velocity,
4040
}
4141

42-
return key[corrected_name]
42+
return key.get(corrected_name, None)
4343

4444

4545
def get_particle_property_name_conversion(name: str, ptype: str):
@@ -64,10 +64,12 @@ def get_particle_property_name_conversion(name: str, ptype: str):
6464
"mass_gas": "Gas Mass $M_{\\rm g}$",
6565
"mass_star": "Stellar Mass $M_*$",
6666
"mass_bh": "Black Hole Mass $M_{\\rm BH}$",
67+
"mass_interloper": "Mass of Interlopers",
6768
"npart_": "Number of Particles $N$",
6869
"npart_gas": "Number of Gas Particles $N_{\\rm g}$",
6970
"npart_star": "Number of Stellar Particles $N_*$",
7071
"npart_bh": "Black Hole Mass $N_{\\rm BH}$",
72+
"npart_interloper": "Number of Interlopers",
7173
"rhalfmass_": "Half-mass Radius $R_{50}$",
7274
"rhalfmass_gas": "Gas Half-mass Radius $R_{50, {\\rm g}}$",
7375
"rhalfmass_star": "Stellar Half-mass Radius $R_{50, *}$",
@@ -79,4 +81,4 @@ def get_particle_property_name_conversion(name: str, ptype: str):
7981
"SubgridMasses_aperture_total_solar_mass_bh": "Subgrid Black Hole Mass $M_{\\rm BH}$",
8082
}
8183

82-
return key[combined_name]
84+
return key.get(combined_name, corrected_name)

0 commit comments

Comments
 (0)