Skip to content

Commit f24a1cf

Browse files
Fix invalid escape sequence warning/error
1 parent a60c8aa commit f24a1cf

File tree

2 files changed

+11
-11
lines changed

2 files changed

+11
-11
lines changed

velociraptor/catalogue/registration.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ def registration_rotational_support(
190190
) -> (unyt.Unit, str, str):
191191
"""
192192
Registers rotational support quantities (those beginning with K).
193-
Note that this corresponds to \kappa in Sales+2010 _not_ K.
193+
Note that this corresponds to \\kappa in Sales+2010 _not_ K.
194194
"""
195195

196196
if not field_path[0] == "K":
@@ -451,7 +451,7 @@ def registration_star_formation_rate(
451451

452452
unit = unit_system.star_formation_rate
453453

454-
full_name = r"Star Formation Rate $\dot{\rho}_*$"
454+
full_name = "Star Formation Rate $\\dot{\\rho}_*$"
455455

456456
return unit, full_name, field_path.lower()
457457

@@ -716,7 +716,7 @@ def registration_veldisp(
716716
coordinate = match.group(1)
717717
ptype = match.group(2)
718718

719-
full_name = f"$\sigma_{{{{\\rm v}}, {coordinate.lower()}}}$"
719+
full_name = "$\\sigma_{{{{\\rm v}}, {coordinate.lower()}}}$"
720720

721721
if ptype:
722722
full_name += f" ({ptype})"
@@ -1050,8 +1050,8 @@ def registration_cold_dense_gas_properties(
10501050
except KeyError:
10511051
raise RegistrationDoesNotMatchError
10521052
full_name = (
1053-
f"{long_quantity} Masses in Cold, Dense ($T < 10^{{4.5}}\;{{\rm K}}$, "
1054-
f"$n_{{\\rm H}}$ > 0.1 \\; {{\rm cm^{{-3}}}}$) Gas ({aperture_size} kpc)"
1053+
f"{long_quantity} Masses in Cold, Dense ($T < 10^{{4.5}} [{{\\rm K}}]$, "
1054+
f"$n_{{\\rm H}}$ > 0.1 [{{\\rm cm^{{-3}}}}]$) Gas ({aperture_size} kpc)"
10551055
)
10561056
snake_case = f"cold_dense_{short_quantity}_mass_{aperture_size}_kpc"
10571057
return unit, full_name, snake_case

velociraptor/catalogue/translator.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1466,8 +1466,8 @@ def get_particle_property_name_conversion(name: str, ptype: str):
14661466
combined_name = f"{corrected_name}_{ptype}".lower()
14671467

14681468
key = {
1469-
"sfr_": "SFR $\dot{\\rho}_*$",
1470-
"sfr_gas": "Gas SFR $\dot{\\rho}_*$",
1469+
"sfr_": "SFR $\\dot{\\rho}_*$",
1470+
"sfr_gas": "Gas SFR $\\dot{\\rho}_*$",
14711471
"zmet_": "Metallicity $Z$",
14721472
"zmet_gas": "Gas Metallicity $Z_{\\rm g}$",
14731473
"zmet_star": "Star Metallicity $Z_*$",
@@ -1487,10 +1487,10 @@ def get_particle_property_name_conversion(name: str, ptype: str):
14871487
"rhalfmass_star": "Stellar Half-mass Radius $R_{50, *}$",
14881488
"rhalfmass_bh": "Black Hole Half-mass Radius $R_{50, {\\rm BH}}$",
14891489
"r_": "Radius $R_{\\rm SO}$",
1490-
"veldisp_": "Velocity Dispersion $\sigma$",
1491-
"veldisp_gas": "Gas Velocity Dispersion $\sigma_{\\rm g}}$",
1492-
"veldisp_star": "Stellar Velocity Dispersion $\sigma_{*}$",
1493-
"veldisp_bh": "Black Hole Velocity Dispersion $\sigma_{\\rm BH}$",
1490+
"veldisp_": "Velocity Dispersion $\\sigma$",
1491+
"veldisp_gas": "Gas Velocity Dispersion $\\sigma_{\\rm g}}$",
1492+
"veldisp_star": "Stellar Velocity Dispersion $\\sigma_{*}$",
1493+
"veldisp_bh": "Black Hole Velocity Dispersion $\\sigma_{\\rm BH}$",
14941494
"subgridmasses_aperture_total_solar_mass_bh": "Subgrid Black Hole Mass $M_{\\rm BH}$",
14951495
}
14961496

0 commit comments

Comments
 (0)