def load_astropy_constant_dataset(h_node): py_type, data = get_type_and_data(h_node) unit = h_node.attrs["unit"][0] abbrev = h_node.attrs["abbrev"][0] name = h_node.attrs["name"][0] ref = h_node.attrs["reference"][0] unc = h_node.attrs["uncertainty"][0] system = None if "system" in h_node.attrs.keys(): system = h_node.attrs["system"][0] c = Constant(abbrev, name, data, unit, unc, ref, system) return c
* https://hal.archives-ouvertes.fr/hal-00433235/document (New values of gravitational moments J2 and J4 deduced from helioseismology, Redouane Mecheri et al) """ from astropy import time from astropy.constants import Constant # See for example USNO Circular 179 J2000 = time.Time("J2000", scale="tt") GM_sun = Constant( "GM_sun", "Heliocentric gravitational constant", 1.32712442099e20, "m3 / (s2)", 0.0000000001e20, "IAU 2009 system of astronomical constants", system="si", ) GM_earth = Constant( "GM_earth", "Geocentric gravitational constant", 3.986004418e14, "m3 / (s2)", 0.000000008e14, "IAU 2009 system of astronomical constants", system="si", )
# HACK: sphinx-autoapi variable definition M_earth = _M_earth M_jupiter = _M_jupiter M_sun = _M_sun # See for example USNO Circular 179 J2000_TT = time.Time("J2000", scale="tt") J2000_TDB = time.Time("J2000", scale="tdb") J2000 = J2000_TT GM_sun = Constant( "GM_sun", "Heliocentric gravitational constant", 1.32712442099e20, "m3 / (s2)", 0.0000000001e20, "IAU 2009 system of astronomical constants", system="si", ) GM_earth = Constant( "GM_earth", "Geocentric gravitational constant", 3.986004418e14, "m3 / (s2)", 0.000000008e14, "IAU 2009 system of astronomical constants", system="si", )
J2 for the Sun was obtained from: * https://hal.archives-ouvertes.fr/hal-00433235/document (New values of gravitational moments J2 and J4 deduced from helioseismology, Redouane Mecheri et al) """ from astropy.constants import Constant from astropy import time J2000 = time.Time('J2000', scale='tdb') GM_sun = Constant('GM_sun', 'Heliocentric gravitational constant', 1.32712442099e20, 'm3 / (s2)', 0.0000000001e20, 'IAU 2009 system of astronomical constants', system='si') GM_earth = Constant('GM_earth', 'Geocentric gravitational constant', 3.986004418e14, 'm3 / (s2)', 0.000000008e14, 'IAU 2009 system of astronomical constants', system='si') # Anderson, John D. et al. “The Mass, Gravity Field, and Ephemeris of Mercury.” Icarus 71.3 (1987): 337–349. # Crossref. Web. DOI: 10.1016/0019-1035(87)90033-9 GM_mercury = Constant('GM_mercury',
allen = "Allen's Astrophysical Quantities 4th Ed." archinal = 'Archinal et al. 2018' asplund = "Asplund et al. 2006" fivian = "Fivian et al. 2008" meeus = "Meeus 1998 Astronomical Algorithms 2nd Ed." physical_constants['mass'] = astrocon.M_sun physical_constants['radius'] = astrocon.R_sun physical_constants['luminosity'] = astrocon.L_sun physical_constants['mean distance'] = astrocon.au # following needs error estimate if appropriate physical_constants['perihelion distance'] = Constant('perihelion', "Perihelion Distance", 1.471e11, 'm', 0, allen, system='si') # following needs error estimate if appropriate physical_constants['aphelion distance'] = Constant('aphelion', "Aphelion Distance", 1.521e11, 'm', 0, allen, system='si') physical_constants['age'] = Constant('age', "Age of the Sun",
# references gsfc_fact = "http://nssdc.gsfc.nasa.gov/planetary/factsheet/sunfact.html" allen = "Allen's Astrophysical Quantities 4th Ed." asplund = "Asplund et al. 2006" fivian = "Fivian et al. 2008" physical_constants['mass'] = astrocon.M_sun physical_constants['radius'] = astrocon.R_sun physical_constants['luminosity'] = astrocon.L_sun physical_constants['mean distance'] = astrocon.au # following needs error estimate if appropriate physical_constants['perihelion distance'] = Constant('perihelion', "Perihelion Distance", 1.471e11, 'm', 0, allen, system='si') # following needs error estimate if appropriate physical_constants['aphelion distance'] = Constant('aphelion', "Aphelion Distance", 1.521e11, 'm', 0, allen, system='si') physical_constants['age'] = Constant('age', "Age of the Sun",
# -*- coding: utf-8 -*- """Constants for gMeterPy. """ from astropy.constants import Constant from astropy.constants import c omega = Constant( abbrev='omega', name='Mean angular rotation rate of the Earth', value=7292115.0e-11, unit='rad / s', uncertainty=0.0, reference='') atm_sens = Constant( abbrev='atm_sens', name='Default sensitivity of changes in gravity ' 'with variations in atmospheric pressure.', value=0.3, unit='uGal / mbar', uncertainty=0.0, reference='IAG 1983 Resolution no.9') # ISO 2533:1975 constants class ISA1975(Constant): default_reference = 'Standard Atmosphere ISO 2533:1975' _registry = {}
.. _`DOI: 10.1007/s10569-011-9352-4`: http://dx.doi.org/10.1007/s10569-011-9352-4 .. _`DOI: 10.1007/s10569-010-9320-4`: http://dx.doi.org/10.1007/s10569-010-9320-4 """ from astropy.constants import Constant from astropy import time J2000 = time.Time('J2000', scale='tdb') GM_sun = Constant('GM_sun', 'Heliocentric gravitational constant', 1.32712442099e20, 'm3 / (s2)', 0.0000000001e20, 'IAU 2009 system of astronomical constants', system='si') GM_earth = Constant('GM_earth', 'Geocentric gravitational constant', 3.986004418e14, 'm3 / (s2)', 0.000000008e14, 'IAU 2009 system of astronomical constants', system='si') # Anderson, John D. et al. “The Mass, Gravity Field, and Ephemeris of Mercury.” Icarus 71.3 (1987): 337–349. # Crossref. Web. DOI: 10.1016/0019-1035(87)90033-9 GM_mercury = Constant('GM_mercury',
# TODO: pass namespace for units package so that prefixes are loaded (otherwise calling ksolMass will call from the old constants) ns = None from distutils.version import LooseVersion if LooseVersion(astropyversion) < LooseVersion('2.0'): """ see https://www.iau.org/static/resolutions/IAU2015_English.pdf Here we'll override astropy's constants to adhere to the IAU Resolution for nominal units """ # TODO: find correct error estimate for this value of G G = Constant('G', "Gravitational constant", 6.67408e-11, 'm3 / (kg s2)', 0.00080e-11, 'NSFA 2011', system='si') c.G = G c.si.G = G GM_sun = Constant('GM_sun', "Solar G*M", 1.3271244e20, 'm3 / (s2)', None, "IAU 2015 Resolution B3", system='si') c.GM_sun = GM_sun c.si.GM_sun = GM_sun
from astropy.constants import Constant rotational_period_earth = Constant( "rotational_period_earth", "Earth rotational period", 0.9972698, "d", 0, "Vallado, D. and McClain, W. Fundamentals of astrodynamics and applications.", system="si", ) rotational_period_sun = Constant( "rotational_period_sun", "Sun rotational period", 25.38, "d", 0, "Vallado, D. and McClain, W. Fundamentals of astrodynamics and applications.", system="si", ) rotational_period_mercury = Constant( "rotational_period_mercury", "Mercury rotational period", 58.6462, "d", 0, "Vallado, D. and McClain, W. Fundamentals of astrodynamics and applications.", system="si", )
* Archinal, B. A. et al. “Report of the IAU Working Group on Cartographic Coordinates and Rotational Elements: 2009.” Celestial Mechanics and Dynamical Astronomy 109.2 (2010): 101–135. Crossref. Web. `DOI: 10.1007/s10569-010-9320-4`_ .. _`DOI: 10.1007/s10569-011-9352-4`: http://dx.doi.org/10.1007/s10569-011-9352-4 .. _`DOI: 10.1007/s10569-010-9320-4`: http://dx.doi.org/10.1007/s10569-010-9320-4 """ from astropy.constants import Constant GM_sun = Constant('GM_sun', 'Heliocentric gravitational constant', 1.32712442099e20, 'm3 / (s2)', 0.0000000001e20, 'IAU 2009 system of astronomical constants', system='si') GM_earth = Constant('GM_earth', 'Geocentric gravitational constant', 3.986004418e14, 'm3 / (s2)', 0.000000008e14, 'IAU 2009 system of astronomical constants', system='si') # Anderson, John D. et al. “The Mass, Gravity Field, and Ephemeris of Mercury.” Icarus 71.3 (1987): 337–349. # Crossref. Web. DOI: 10.1016/0019-1035(87)90033-9 GM_mercury = Constant('GM_mercury', 'Mercury gravitational constant', 22032.09,