[yt-svn] commit/yt: 7 new changesets
commits-noreply at bitbucket.org
commits-noreply at bitbucket.org
Wed Jun 8 08:09:06 PDT 2016
7 new commits in yt:
https://bitbucket.org/yt_analysis/yt/commits/0615cf12bfcf/
Changeset: 0615cf12bfcf
Branch: yt
User: MatthewTurk
Date: 2016-06-03 17:18:01+00:00
Summary: Adding Earth radius (volumetric mean radius)
Affected #: 2 files
diff -r 331c7ef7049d257043699a8b570cf7bd8c39a82f -r 0615cf12bfcf553cdf2a8c8f1f5804073854f72f yt/units/unit_lookup_table.py
--- a/yt/units/unit_lookup_table.py
+++ b/yt/units/unit_lookup_table.py
@@ -23,7 +23,7 @@
planck_charge_esu, planck_energy_erg, planck_mass_grams, \
planck_temperature_K, planck_time_s, mass_hydrogen_grams, \
grams_per_pound, standard_gravity_cm_per_s2, pascal_per_atm, \
- newton_cgs
+ newton_cgs, cm_per_rearth
import numpy as np
# Lookup a unit symbol with the symbol string, and provide a tuple with the
@@ -151,6 +151,10 @@
"m_geom": (mass_sun_grams, dimensions.mass, 0.0, r"M_\odot"),
"l_geom": (newton_cgs*mass_sun_grams/speed_of_light_cm_per_s**2, dimensions.length, 0.0, r"M_\odot"),
"t_geom": (newton_cgs*mass_sun_grams/speed_of_light_cm_per_s**3, dimensions.time, 0.0, r"M_\odot"),
+
+ # Some earth units
+ "Rearth": (cm_per_rearth, dimensions.length, 0.0, r"R_\oplus"),
+ "rearth": (cm_per_rearth, dimensions.length, 0.0, r"R_\oplus"),
}
# This dictionary formatting from magnitude package, credit to Juan Reyero.
diff -r 331c7ef7049d257043699a8b570cf7bd8c39a82f -r 0615cf12bfcf553cdf2a8c8f1f5804073854f72f yt/utilities/physical_ratios.py
--- a/yt/utilities/physical_ratios.py
+++ b/yt/utilities/physical_ratios.py
@@ -29,6 +29,7 @@
mpc_per_pc = 1e-6
mpc_per_au = 4.84813682e-12
mpc_per_rsun = 2.253962e-14
+mpc_per_rearth= 2.06470307893e-16
mpc_per_miles = 5.21552871e-20
mpc_per_km = 3.24077929e-20
mpc_per_cm = 3.24077929e-25
@@ -40,6 +41,7 @@
m_per_cm = 1e-2
ly_per_cm = 1.05702341e-18
rsun_per_cm = 1.4378145e-11
+rearth_per_cm = 1.56961033e-9 # Mean (volumetric) radius
au_per_cm = 6.68458712e-14
ang_per_cm = 1.0e8
@@ -49,6 +51,7 @@
pc_per_mpc = 1.0 / mpc_per_pc
au_per_mpc = 1.0 / mpc_per_au
rsun_per_mpc = 1.0 / mpc_per_rsun
+rsun_per_mpc = 1.0 / mpc_per_rearth
miles_per_mpc = 1.0 / mpc_per_miles
km_per_mpc = 1.0 / mpc_per_km
cm_per_mpc = 1.0 / mpc_per_cm
@@ -59,6 +62,7 @@
cm_per_pc = 1.0 / pc_per_cm
cm_per_ly = 1.0 / ly_per_cm
cm_per_rsun = 1.0 / rsun_per_cm
+cm_per_rearth = 1.0 / rearth_per_cm
cm_per_au = 1.0 / au_per_cm
cm_per_ang = 1.0 / ang_per_cm
https://bitbucket.org/yt_analysis/yt/commits/9eece30b1c74/
Changeset: 9eece30b1c74
Branch: yt
User: MatthewTurk
Date: 2016-06-03 17:27:13+00:00
Summary: Adding RJup
Affected #: 2 files
diff -r 0615cf12bfcf553cdf2a8c8f1f5804073854f72f -r 9eece30b1c74ca7dec153b4142fe4812fd7d887a yt/units/unit_lookup_table.py
--- a/yt/units/unit_lookup_table.py
+++ b/yt/units/unit_lookup_table.py
@@ -23,7 +23,7 @@
planck_charge_esu, planck_energy_erg, planck_mass_grams, \
planck_temperature_K, planck_time_s, mass_hydrogen_grams, \
grams_per_pound, standard_gravity_cm_per_s2, pascal_per_atm, \
- newton_cgs, cm_per_rearth
+ newton_cgs, cm_per_rearth, cm_per_rjup
import numpy as np
# Lookup a unit symbol with the symbol string, and provide a tuple with the
@@ -152,9 +152,11 @@
"l_geom": (newton_cgs*mass_sun_grams/speed_of_light_cm_per_s**2, dimensions.length, 0.0, r"M_\odot"),
"t_geom": (newton_cgs*mass_sun_grams/speed_of_light_cm_per_s**3, dimensions.time, 0.0, r"M_\odot"),
- # Some earth units
+ # Some Solar System units
"Rearth": (cm_per_rearth, dimensions.length, 0.0, r"R_\oplus"),
"rearth": (cm_per_rearth, dimensions.length, 0.0, r"R_\oplus"),
+ "Rjup": (cm_per_rjup, dimensions.length, 0.0, r"R_\mathrm{Jup}"),
+ "rjup": (cm_per_rjup, dimensions.length, 0.0, r"R_\mathrm{Jup}"),
}
# This dictionary formatting from magnitude package, credit to Juan Reyero.
diff -r 0615cf12bfcf553cdf2a8c8f1f5804073854f72f -r 9eece30b1c74ca7dec153b4142fe4812fd7d887a yt/utilities/physical_ratios.py
--- a/yt/utilities/physical_ratios.py
+++ b/yt/utilities/physical_ratios.py
@@ -30,6 +30,7 @@
mpc_per_au = 4.84813682e-12
mpc_per_rsun = 2.253962e-14
mpc_per_rearth= 2.06470307893e-16
+mpc_per_rjup = 2.26566120943e-15
mpc_per_miles = 5.21552871e-20
mpc_per_km = 3.24077929e-20
mpc_per_cm = 3.24077929e-25
@@ -42,6 +43,7 @@
ly_per_cm = 1.05702341e-18
rsun_per_cm = 1.4378145e-11
rearth_per_cm = 1.56961033e-9 # Mean (volumetric) radius
+rjup_per_cm = 1.43039006737e-10 # Mean (volumetric) radius
au_per_cm = 6.68458712e-14
ang_per_cm = 1.0e8
@@ -51,7 +53,8 @@
pc_per_mpc = 1.0 / mpc_per_pc
au_per_mpc = 1.0 / mpc_per_au
rsun_per_mpc = 1.0 / mpc_per_rsun
-rsun_per_mpc = 1.0 / mpc_per_rearth
+rearth_per_mpc= 1.0 / mpc_per_rearth
+rjup_per_mpc = 1.0 / mpc_per_rjup
miles_per_mpc = 1.0 / mpc_per_miles
km_per_mpc = 1.0 / mpc_per_km
cm_per_mpc = 1.0 / mpc_per_cm
@@ -63,6 +66,7 @@
cm_per_ly = 1.0 / ly_per_cm
cm_per_rsun = 1.0 / rsun_per_cm
cm_per_rearth = 1.0 / rearth_per_cm
+cm_per_rjup = 1.0 / rjup_per_cm
cm_per_au = 1.0 / au_per_cm
cm_per_ang = 1.0 / ang_per_cm
https://bitbucket.org/yt_analysis/yt/commits/fc34e69ebc97/
Changeset: fc34e69ebc97
Branch: yt
User: MatthewTurk
Date: 2016-06-03 17:28:47+00:00
Summary: Adding source
Affected #: 1 file
diff -r 9eece30b1c74ca7dec153b4142fe4812fd7d887a -r fc34e69ebc974884f2606012b261570efd077d5d yt/utilities/physical_ratios.py
--- a/yt/utilities/physical_ratios.py
+++ b/yt/utilities/physical_ratios.py
@@ -3,10 +3,11 @@
# Physical Constants and Units Conversion Factors
#
# Values for these constants, unless otherwise noted, are drawn from IAU,
-# IUPAC, and NIST data, whichever is newer.
+# IUPAC, NIST, and NASA data, whichever is newer.
# http://maia.usno.navy.mil/NSFA/IAU2009_consts.html
# http://goldbook.iupac.org/list_goldbook_phys_constants_defs.html
# http://physics.nist.gov/cuu/Constants/index.html
+# http://nssdc.gsfc.nasa.gov/planetary/factsheet/jupiterfact.html
# Elementary masses
mass_electron_grams = 9.10938291e-28
https://bitbucket.org/yt_analysis/yt/commits/122ee30c373e/
Changeset: 122ee30c373e
Branch: yt
User: MatthewTurk
Date: 2016-06-03 17:31:01+00:00
Summary: Switching to r_something
Affected #: 1 file
diff -r fc34e69ebc974884f2606012b261570efd077d5d -r 122ee30c373ef0c461f15a717c5c26f9e9ede36c yt/units/unit_lookup_table.py
--- a/yt/units/unit_lookup_table.py
+++ b/yt/units/unit_lookup_table.py
@@ -153,10 +153,10 @@
"t_geom": (newton_cgs*mass_sun_grams/speed_of_light_cm_per_s**3, dimensions.time, 0.0, r"M_\odot"),
# Some Solar System units
- "Rearth": (cm_per_rearth, dimensions.length, 0.0, r"R_\oplus"),
- "rearth": (cm_per_rearth, dimensions.length, 0.0, r"R_\oplus"),
- "Rjup": (cm_per_rjup, dimensions.length, 0.0, r"R_\mathrm{Jup}"),
- "rjup": (cm_per_rjup, dimensions.length, 0.0, r"R_\mathrm{Jup}"),
+ "R_earth": (cm_per_rearth, dimensions.length, 0.0, r"R_\oplus"),
+ "r_earth": (cm_per_rearth, dimensions.length, 0.0, r"R_\oplus"),
+ "R_jup": (cm_per_rjup, dimensions.length, 0.0, r"R_\mathrm{Jup}"),
+ "r_jup": (cm_per_rjup, dimensions.length, 0.0, r"R_\mathrm{Jup}"),
}
# This dictionary formatting from magnitude package, credit to Juan Reyero.
https://bitbucket.org/yt_analysis/yt/commits/eb27556ea12a/
Changeset: eb27556ea12a
Branch: yt
User: MatthewTurk
Date: 2016-06-03 17:34:24+00:00
Summary: Adding aliases for R_sun and r_sun
Affected #: 1 file
diff -r 122ee30c373ef0c461f15a717c5c26f9e9ede36c -r eb27556ea12a9296763f58d784d10a6e3a2e5309 yt/units/unit_lookup_table.py
--- a/yt/units/unit_lookup_table.py
+++ b/yt/units/unit_lookup_table.py
@@ -87,6 +87,8 @@
"msun": (mass_sun_grams, dimensions.mass, 0.0, r"M_\odot"),
"Rsun": (cm_per_rsun, dimensions.length, 0.0, r"R_\odot"),
"rsun": (cm_per_rsun, dimensions.length, 0.0, r"R_\odot"),
+ "R_sun": (cm_per_rsun, dimensions.length, 0.0, r"R_\odot"),
+ "r_sun": (cm_per_rsun, dimensions.length, 0.0, r"R_\odot"),
"Lsun": (luminosity_sun_ergs_per_sec, dimensions.power, 0.0, r"L_\odot"),
"Tsun": (temp_sun_kelvin, dimensions.temperature, 0.0, r"T_\odot"),
"Zsun": (metallicity_sun, dimensions.dimensionless, 0.0, r"Z_\odot"),
https://bitbucket.org/yt_analysis/yt/commits/6c51cf6ff90e/
Changeset: 6c51cf6ff90e
Branch: yt
User: ngoldbaum
Date: 2016-06-03 19:17:07+00:00
Summary: adding new unit symbols for earth and jupiter
Affected #: 1 file
diff -r eb27556ea12a9296763f58d784d10a6e3a2e5309 -r 6c51cf6ff90e130e3a153a22024d3d13fe3fc28c yt/units/unit_symbols.py
--- a/yt/units/unit_symbols.py
+++ b/yt/units/unit_symbols.py
@@ -116,11 +116,11 @@
Msun = solar_mass = quan(1.0, "Msun")
msun = quan(1.0, "msun")
-Rsun = solar_radius = quan(1.0, "Rsun")
-rsun = quan(1.0, "rsun")
-Lsun = lsun = solar_luminosity = quan(1.0, "Lsun")
-Tsun = solar_temperature = quan(1.0, "Tsun")
-Zsun = solar_metallicity = quan(1.0, "Zsun")
+Rsun = R_sun = solar_radius = quan(1.0, "Rsun")
+rsun = r_sun = quan(1.0, "rsun")
+Lsun = lsun = l_sun = solar_luminosity = quan(1.0, "Lsun")
+Tsun = T_sun = solar_temperature = quan(1.0, "Tsun")
+Zsun = Z_sun = solar_metallicity = quan(1.0, "Zsun")
#
# Misc Astronomical units
@@ -129,6 +129,10 @@
AU = astronomical_unit = quan(1.0, "AU")
au = quan(1.0, "au")
ly = light_year = quan(1.0, "ly")
+Rearth = R_earth = earth_radius = quan(1.0, 'R_earth')
+rearth = r_earth = quan(1.0, 'r_earth')
+Rjup = R_jup = jupiter_radius = quan(1.0, 'R_jup')
+rjup = r_jup = quan(1.0, 'r_jup')
#
# Physical units
https://bitbucket.org/yt_analysis/yt/commits/ce2031d2484d/
Changeset: ce2031d2484d
Branch: yt
User: ngoldbaum
Date: 2016-06-08 15:08:50+00:00
Summary: Merged in MatthewTurk/yt (pull request #2211)
Adding Earth radius to units
Affected #: 3 files
diff -r dfd64d5141389dbad512ad547ee5983876f8cf68 -r ce2031d2484da5d02bcced20938161f624fccf6f yt/units/unit_lookup_table.py
--- a/yt/units/unit_lookup_table.py
+++ b/yt/units/unit_lookup_table.py
@@ -23,7 +23,7 @@
planck_charge_esu, planck_energy_erg, planck_mass_grams, \
planck_temperature_K, planck_time_s, mass_hydrogen_grams, \
grams_per_pound, standard_gravity_cm_per_s2, pascal_per_atm, \
- newton_cgs
+ newton_cgs, cm_per_rearth, cm_per_rjup
import numpy as np
# Lookup a unit symbol with the symbol string, and provide a tuple with the
@@ -87,6 +87,8 @@
"msun": (mass_sun_grams, dimensions.mass, 0.0, r"M_\odot"),
"Rsun": (cm_per_rsun, dimensions.length, 0.0, r"R_\odot"),
"rsun": (cm_per_rsun, dimensions.length, 0.0, r"R_\odot"),
+ "R_sun": (cm_per_rsun, dimensions.length, 0.0, r"R_\odot"),
+ "r_sun": (cm_per_rsun, dimensions.length, 0.0, r"R_\odot"),
"Lsun": (luminosity_sun_ergs_per_sec, dimensions.power, 0.0, r"L_\odot"),
"Tsun": (temp_sun_kelvin, dimensions.temperature, 0.0, r"T_\odot"),
"Zsun": (metallicity_sun, dimensions.dimensionless, 0.0, r"Z_\odot"),
@@ -151,6 +153,12 @@
"m_geom": (mass_sun_grams, dimensions.mass, 0.0, r"M_\odot"),
"l_geom": (newton_cgs*mass_sun_grams/speed_of_light_cm_per_s**2, dimensions.length, 0.0, r"M_\odot"),
"t_geom": (newton_cgs*mass_sun_grams/speed_of_light_cm_per_s**3, dimensions.time, 0.0, r"M_\odot"),
+
+ # Some Solar System units
+ "R_earth": (cm_per_rearth, dimensions.length, 0.0, r"R_\oplus"),
+ "r_earth": (cm_per_rearth, dimensions.length, 0.0, r"R_\oplus"),
+ "R_jup": (cm_per_rjup, dimensions.length, 0.0, r"R_\mathrm{Jup}"),
+ "r_jup": (cm_per_rjup, dimensions.length, 0.0, r"R_\mathrm{Jup}"),
}
# This dictionary formatting from magnitude package, credit to Juan Reyero.
diff -r dfd64d5141389dbad512ad547ee5983876f8cf68 -r ce2031d2484da5d02bcced20938161f624fccf6f yt/units/unit_symbols.py
--- a/yt/units/unit_symbols.py
+++ b/yt/units/unit_symbols.py
@@ -116,11 +116,11 @@
Msun = solar_mass = quan(1.0, "Msun")
msun = quan(1.0, "msun")
-Rsun = solar_radius = quan(1.0, "Rsun")
-rsun = quan(1.0, "rsun")
-Lsun = lsun = solar_luminosity = quan(1.0, "Lsun")
-Tsun = solar_temperature = quan(1.0, "Tsun")
-Zsun = solar_metallicity = quan(1.0, "Zsun")
+Rsun = R_sun = solar_radius = quan(1.0, "Rsun")
+rsun = r_sun = quan(1.0, "rsun")
+Lsun = lsun = l_sun = solar_luminosity = quan(1.0, "Lsun")
+Tsun = T_sun = solar_temperature = quan(1.0, "Tsun")
+Zsun = Z_sun = solar_metallicity = quan(1.0, "Zsun")
#
# Misc Astronomical units
@@ -129,6 +129,10 @@
AU = astronomical_unit = quan(1.0, "AU")
au = quan(1.0, "au")
ly = light_year = quan(1.0, "ly")
+Rearth = R_earth = earth_radius = quan(1.0, 'R_earth')
+rearth = r_earth = quan(1.0, 'r_earth')
+Rjup = R_jup = jupiter_radius = quan(1.0, 'R_jup')
+rjup = r_jup = quan(1.0, 'r_jup')
#
# Physical units
diff -r dfd64d5141389dbad512ad547ee5983876f8cf68 -r ce2031d2484da5d02bcced20938161f624fccf6f yt/utilities/physical_ratios.py
--- a/yt/utilities/physical_ratios.py
+++ b/yt/utilities/physical_ratios.py
@@ -3,10 +3,11 @@
# Physical Constants and Units Conversion Factors
#
# Values for these constants, unless otherwise noted, are drawn from IAU,
-# IUPAC, and NIST data, whichever is newer.
+# IUPAC, NIST, and NASA data, whichever is newer.
# http://maia.usno.navy.mil/NSFA/IAU2009_consts.html
# http://goldbook.iupac.org/list_goldbook_phys_constants_defs.html
# http://physics.nist.gov/cuu/Constants/index.html
+# http://nssdc.gsfc.nasa.gov/planetary/factsheet/jupiterfact.html
# Elementary masses
mass_electron_grams = 9.10938291e-28
@@ -29,6 +30,8 @@
mpc_per_pc = 1e-6
mpc_per_au = 4.84813682e-12
mpc_per_rsun = 2.253962e-14
+mpc_per_rearth= 2.06470307893e-16
+mpc_per_rjup = 2.26566120943e-15
mpc_per_miles = 5.21552871e-20
mpc_per_km = 3.24077929e-20
mpc_per_cm = 3.24077929e-25
@@ -40,6 +43,8 @@
m_per_cm = 1e-2
ly_per_cm = 1.05702341e-18
rsun_per_cm = 1.4378145e-11
+rearth_per_cm = 1.56961033e-9 # Mean (volumetric) radius
+rjup_per_cm = 1.43039006737e-10 # Mean (volumetric) radius
au_per_cm = 6.68458712e-14
ang_per_cm = 1.0e8
@@ -49,6 +54,8 @@
pc_per_mpc = 1.0 / mpc_per_pc
au_per_mpc = 1.0 / mpc_per_au
rsun_per_mpc = 1.0 / mpc_per_rsun
+rearth_per_mpc= 1.0 / mpc_per_rearth
+rjup_per_mpc = 1.0 / mpc_per_rjup
miles_per_mpc = 1.0 / mpc_per_miles
km_per_mpc = 1.0 / mpc_per_km
cm_per_mpc = 1.0 / mpc_per_cm
@@ -59,6 +66,8 @@
cm_per_pc = 1.0 / pc_per_cm
cm_per_ly = 1.0 / ly_per_cm
cm_per_rsun = 1.0 / rsun_per_cm
+cm_per_rearth = 1.0 / rearth_per_cm
+cm_per_rjup = 1.0 / rjup_per_cm
cm_per_au = 1.0 / au_per_cm
cm_per_ang = 1.0 / ang_per_cm
Repository URL: https://bitbucket.org/yt_analysis/yt/
--
This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.
More information about the yt-svn
mailing list