Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add some missing alternate spellings #77

Merged
merged 1 commit into from
Mar 26, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions unyt/_unit_lookup_table.py
Original file line number Diff line number Diff line change
Expand Up @@ -425,16 +425,16 @@
("yr", ("year",)),
# Solar units
("Msun", ("solar_mass", "solMass")),
("Rsun", ("r_sun", "solar_radius", "solRadius")),
("Lsun", ("l_sun", "solar_luminosity", "solLuminosity")),
("Rsun", ("rsun", "r_sun", "solar_radius", "solRadius")),
("Lsun", ("lsun", "l_sun", "solar_luminosity", "solLuminosity")),
("Tsun", ("t_sun", "solar_temperature", "solTemperature")),
("Zsun", ("z_sun", "solar_metallicity", "solMetallicity")),
("Mjup", ("m_jup", "jupiter_mass")),
("Mearth", ("m_earth", "earth_mass")),
("Rjup", ("r_jup", "jupiter_radius")),
("Rearth", ("r_earth", "earth_radius")),
# astro distances
("AU", ("astronomical_unit",)),
("AU", ("au", "astronomical_unit")),
("pc", ("parsec",)),
("ly", ("light_year",)),
# angles
Expand Down Expand Up @@ -514,7 +514,8 @@ def append_name(n, okey, key):
append_name(names[key], key, alt)
if not alt.islower() or len(alt) < 4:
continue
append_name(names[key], key, alt.title())
if alt.title() not in names[key]:
append_name(names[key], key, alt.title())
return names, inv_names


Expand Down