astroconst package

Submodules

Module contents

AstroConst package

A Python package that provides astronomical constants. The code is being developed by Marc van der Sluys of the department of Astrophysics at the Radboud University Nijmegen, the Institute of Nuclear and High-Energy Physics (Nikhef), and the Institute for Gravitational and Subatomic Physics (GRASP) at Utrecht University, all in The Netherlands. The AstroConst package can be used under the conditions of the EUPL 1.2 licence. These pages contain the API documentation. For more information on the Python package, licence and source code, see the AstroConst GitHub page.

astroconst.G = 6.67428e-11

Newton’s gravitational constant

astroconst.GeV = 1.6021765999999998e-10

1 GeV in Joule

astroconst.Gly = 9.460730500000001e+24

Gigalightyear in metres

astroconst.Gpc = 3.0856775999999997e+25

Gigaparsec in metres

astroconst.Gyr = 3.1556925187488e+16

Gigayear = 1e9 tropical years

astroconst.H0 = 2.1842852279836366e-18

Hubble constant in Hertz

astroconst.Jy = 1e-26

Jansky in W/m^2 Hz

astroconst.Lo = 3.85e+26

Solar luminosity in SI (W)

astroconst.Lsun = 3.85e+26

Solar luminosity in SI (W)

astroconst.MJy = 1.0000000000000001e-20

MegaJansky in W/m^2 Hz

astroconst.MeV = 1.6021766e-13

1 MeV in Joule

astroconst.Mly = 9.4607305e+21

Megalightyear in metres

astroconst.Mo = 1.9891e+30

Solar mass in SI (kg)

astroconst.Mo_per_year = 6.303212331943727e+22

Solar mass per year (for mass transfer, accretion)

astroconst.Mpc = 3.0856776e+22

Megaparsec in metres

astroconst.Msun = 1.9891e+30

Solar mass in SI (kg)

astroconst.Myr = 31556925187488.0

Megayear = 1e6 tropical years

astroconst.R_inf = 10973731.568157

Rydberg constant (m^-1)

astroconst.Ro = 695990000.0

Solar radius in SI (m)

astroconst.Rsun = 695990000.0

Solar radius in SI (m)

astroconst.a_0 = 5.2917721e-11

Bohr radius of the atom (m)

astroconst.a_rad = 7.56572310579377e-16

Radiation (density) constant, 7.56591e-16 J m^-3 K^-4

astroconst.age_of_universe = 4.350753275598971e+17

Age of the universe in seconds

astroconst.am2r = 0.0002908882086657216

Factor to convert arcminutes to radians

astroconst.amu = 1.66053904e-27

Atomic mass unit; (mass of C12 atom)/12, 1.6605402e-27 kg

astroconst.as2r = 4.84813681109536e-06

Factor to convert arcseconds to radians.

astroconst.au = 149597870700

Astronomical unit

astroconst.au_lighttime_days = 0.005775518331436995

The light time for 1 AU in days (for apparent planet positions)

astroconst.bohr_rad = 5.2917721e-11

Bohr radius of the atom (m)

astroconst.c = 299792458

Speed of light in vacuo

astroconst.c2k = 273.15

Degrees Celcius to Kelvin (shift)

astroconst.c3rd = 0.3333333333333333

One third

astroconst.cm = 0.01

Centimeter in SI (m)

astroconst.cmb_temp = 2.72548

Temperature of cosmic microwave background in Kelvin

astroconst.cos_dec_gp_2000 = np.float64(0.8899880796439262)

Cosine of dec_gp_2000, needed for coordinate transformations

astroconst.d2h = 0.06666666666666667

Factor to convert degrees to hours

astroconst.d2r = 0.017453292519943295

Factor to convert degrees to radians.

astroconst.day = 86400.0

Default day == solar day = 86400 s

astroconst.day_sid = 0.997269663

Siderial day in days

astroconst.day_sol = 86400.0

Solar day = 86400 s in SI

astroconst.dec_gp_2000 = 0.4734773

27.12825° in rad

Type:

Dec of the Galactic pole for J2000

astroconst.dow_en = array(['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday',        'Saturday'], dtype='<U9')

Capitalised day-of-week names in English.

astroconst.dow_en_abr = array(['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'], dtype='<U3')

Capitalised three-letter day-of-week abbreviations in English.

astroconst.dow_en_abr2 = array(['Su', 'Mo', 'Tu', 'We', 'Th', 'Fr', 'Sa'], dtype='<U2')

Capitalised two-letter day-of-week abbreviations in English.

astroconst.dow_nl = array(['zondag', 'maandag', 'dinsdag', 'woensdag', 'donderdag', 'vrijdag',        'zaterdag'], dtype='<U9')

Lower-case day-of-week names in Dutch.

astroconst.dow_nl_abr = array(['zo', 'ma', 'di', 'wo', 'do', 'vr', 'za'], dtype='<U2')

Lower-case two-letter day-of-week abbreviations in Dutch.

astroconst.dow_nl_abr4 = array(['zon', 'maa', 'din', 'woe', 'don', 'vrij', 'zat'], dtype='<U4')

Lower-case four-letter day-of-week abbreviations in Dutch.

astroconst.dst_en = array(['standard time', 'daylight-savings time'], dtype='<U21')

English DST timezone names.

astroconst.dst_nl = array(['wintertijd', 'zomertijd'], dtype='<U10')

Dutch DST timezone names.

astroconst.eV = 1.6021766e-19

1 eV in Joule

astroconst.e_earth = 0.01671

//en.wikipedia.org/wiki/Orbital_eccentricity

Type:

Orbital eccentricity of the Earth - https

astroconst.earth_e = 0.01671

//en.wikipedia.org/wiki/Orbital_eccentricity

Type:

Orbital eccentricity of the Earth - https

astroconst.earth_g = 9.798256536325365

Gravitational acceleration at the Earth’s surface in SI (m/s^2)

astroconst.earth_m = 5.972168e+24

//en.wikipedia.org/wiki/Earth

Type:

Mass of the Earth in SI (kg) - https

astroconst.earth_r = 6378136.6

Equatorial radius of the Earth in SI (m), WGS84

astroconst.ec = 1.6021766208e-19

1.6021766e-19 J

Type:

Elementary (electron) charge in Coulomb; ElectronVolt

astroconst.enGrChar = array(['alpha', 'beta', 'gamma', 'delta', 'epsilon', 'zeta', 'eta',        'theta', 'iota', 'kappa', 'lambda', 'mu', 'nu', 'xi', 'omicron',        'pi', 'rho', 'sigma', 'tau', 'upsilon', 'phi', 'chi', 'psi',        'omega'], dtype='<U7')

Lower-case English names for Greek characters.

astroconst.eps0 = 0.409092599824881

Obliquity of the ecliptic in J2000.0, degrees -> radians

astroconst.eps2000 = 0.409092599824881

Obliquity of the ecliptic at J2000.0 (radians)

astroconst.epsilon0 = 8.8541878e-12

Permittivity of vacuum in A^2 s^4 / kg m^3

astroconst.erg = 1e-07

1 erg in Joule

astroconst.fm = 1e-15

Femtometer in SI (m)

astroconst.g = 6.67428e-11

Newton’s gravitational constant

astroconst.g_earth = 9.798256536325365

Gravitational acceleration at the Earth’s surface in SI (m/s^2)

astroconst.gauss = 0.0001

1 Gauss in Tesla

astroconst.glon_se_2000 = 0.5747704

32.93192° in rad

Type:

Galactic longitude of the Spring equinox for J2000

astroconst.gr = 9.80665

Mean gravitational acceleration at the Earth’s surface, m s^-2

astroconst.h2d = 15.0

Factor to convert hours to degrees

astroconst.h2r = 0.2617993877991494

Factor to convert hours to radians.

astroconst.h_bar = 1.0545718001391127e-34

Reduced Planck constant, J s

astroconst.h_p = 6.62607004e-34

Planck’s constant, 6.6260755e-34 J s

astroconst.hour = 3600

Hour in SI

astroconst.hr = 3600

Hour in SI

astroconst.htmlGrChar = array(['&alpha;', '&beta;', '&gamma;', '&delta;', '&epsilon;', '&zeta;',        '&eta;', '&theta;', '&iota;', '&kappa;', '&lambda;', '&mu;',        '&nu;', '&xi;', '&omicron;', '&pi;', '&rho;', '&sigma;', '&tau;',        '&upsilon;', '&phi;', '&chi;', '&psi;', '&omega;'], dtype='<U9')

HTML codes for lower-case Greek characters.

astroconst.jd1820 = 2385801

JD in 1820 (when ΔT=0)

astroconst.jd1875 = 2405890

JD at J1875.0 (when constellation boundaries were defined)

astroconst.jd1900 = 2415021

JD at J1900.0

astroconst.jd1950 = 2433283

JD at J1950.0

astroconst.jd2000 = 2451545

00 UT)

Type:

JD at J2000.0 (2000-01-01 12

astroconst.jd_hip = 2448349.0625

//heasarc.gsfc.nasa.gov/W3Browse/all/hipparcos.html

Type:

JD of the Hipparcos catalogue (1991-04-02 ~13

Type:

29 UT) - https

astroconst.kJy = 1.0000000000000001e-23

kiloJansky in W/m^2 Hz

astroconst.k_b = 1.38064852e-23

Boltzmann constant, 1.380658e-23 J/K

astroconst.keV = 1.6021766e-16

1 keV in Joule

astroconst.kly = 9.4607305e+18

Kilolightyear in metres

astroconst.km = 1000.0

Kilometer in SI (m)

astroconst.kpc = 3.0856776e+19

Kiloparsec in metres

astroconst.kyr = 31556925187.488

Kiloyear = 1e3 tropical years

astroconst.l_sun = 3.85e+26

Solar luminosity in SI (W)

astroconst.ly = 9460730500000000.0

Light year (c * julian year) in metres

astroconst.m_e = 9.1093837e-31

Mass of an electron (kg)

astroconst.m_earth = 5.972168e+24

//en.wikipedia.org/wiki/Earth

Type:

Mass of the Earth in SI (kg) - https

astroconst.m_h = 1.6735328113577246e-27

Mass of a hydrogen atom (kg) = m_p + m_e - 13.6eV/c^2

astroconst.m_pr = 1.6726219e-27

Proton mass (kg)

astroconst.m_sun = 1.9891e+30

Solar mass in SI (kg)

astroconst.mas2r = 4.84813681109536e-09

Factor to convert milliarcseconds to radians.

astroconst.minute = 60

Minute in SI

astroconst.mlen = array([31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31])

Length of the months (for non-leap year).

astroconst.mm = 0.001

Millimeter in SI (m)

astroconst.month = 2629748.16

Default month == Gregorian month in seconds.

astroconst.month_ano = 2380713.1094592

apside to apside, for J2000.0.

Type:

Anomalistic month in seconds

astroconst.month_drac = 2351135.8785888

node to node, for J2000.0.

Type:

Draconic month in seconds

astroconst.month_greg = 2629748.16

average calendar month length of 4800 months over 400 years.

Type:

Gregorian month in seconds

astroconst.month_sid = 2360591.5576608

fixed star to fixed star, for J2000.0.

Type:

Sidereal month in seconds

astroconst.month_syn = 2551442.8768992

phase to phase, for J2000.0.

Type:

Synodic month in seconds

astroconst.month_trop = 2360584.7056224

equinox to equinox, influenced by precession, for J2000.0.

Type:

Tropical month in seconds

astroconst.months_en = array(['', 'January', 'February', 'March', 'April', 'May', 'June', 'July',        'August', 'September', 'October', 'November', 'December'],       dtype='<U9')

Capitalised month names in English.

astroconst.months_en_abr = array(['', 'Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep',        'Oct', 'Nov', 'Dec'], dtype='<U3')

Capitalised month abbreviations in English.

astroconst.months_en_abr_lc = array(['', 'jan', 'feb', 'mar', 'apr', 'may', 'jun', 'jul', 'aug', 'sep',        'oct', 'nov', 'dec'], dtype='<U3')

Lower-case month abbreviations in English.

astroconst.months_en_lc = array(['', 'january', 'february', 'march', 'april', 'may', 'june', 'july',        'august', 'september', 'october', 'november', 'december'],       dtype='<U9')

Lower-case month names in English.

astroconst.months_nl = array(['', 'januari', 'februari', 'maart', 'april', 'mei', 'juni', 'juli',        'augustus', 'september', 'oktober', 'november', 'december'],       dtype='<U9')

Lower-case month names in Dutch.

astroconst.months_nl_abr = array(['', 'jan', 'feb', 'mrt', 'apr', 'mei', 'jun', 'jul', 'aug', 'sep',        'okt', 'nov', 'dec'], dtype='<U3')

Lower-case month abbreviations in Dutch.

astroconst.months_nl_abr_cap = array(['', 'Jan', 'Feb', 'Mrt', 'Apr', 'Mei', 'Jun', 'Jul', 'Aug', 'Sep',        'Okt', 'Nov', 'Dec'], dtype='<U3')

Capitalised month abbreviations in Dutch.

astroconst.months_nl_cap = array(['', 'Januari', 'Februari', 'Maart', 'April', 'Mei', 'Juni', 'Juli',        'Augustus', 'September', 'Oktober', 'November', 'December'],       dtype='<U9')

Capitalised month names in Dutch.

astroconst.moon_a = 384399000.0

//en.wikipedia.org/wiki/Moon

Type:

Semimajor axis of the Moon’s orbit in SI (m) - https

astroconst.moon_e = 0.0549

//en.wikipedia.org/wiki/Moon

Type:

Orbital eccentricity of the Moon - https

astroconst.moon_i = 0.08979719001510825

//en.wikipedia.org/wiki/Moon

Type:

Inclination angle of the Moon’s orbit in SI (rad) - https

astroconst.moon_m = 7.342e+22

//en.wikipedia.org/wiki/Moon

Type:

Mass of the Moon in SI (kg) - https

astroconst.moon_r = 1738100.0

//en.wikipedia.org/wiki/Moon

Type:

Equatorial radius of the Moon in SI (m) - https

astroconst.moonphase_en = array(['New Moon', 'First Quarter', 'Full Moon', 'Last Quarter'],       dtype='<U13')

English names of Lunar phases.

astroconst.moonphase_nl = array(['Nieuwe Maan', 'Eerste Kwartier', 'Volle Maan', 'Laatste Kwartier'],       dtype='<U16')

Dutch names of Lunar phases.

astroconst.mu0 = 1.2566371e-06

Permeability of vacuum in kg m / A^2 s^2

astroconst.mum = 1e-06

Micrometer in SI (m)

astroconst.nm = 1e-09

Nanometer in SI (m)

astroconst.pc = 3.0856776e+16

Parsec (3.26 lightyear) in metres

astroconst.pi = 3.141592653589793

π

astroconst.pi2 = 6.283185307179586

astroconst.pi4 = 12.566370614359172

astroconst.pio2 = 1.5707963267948966

π/2

astroconst.pio4 = 0.7853981633974483

π/4

astroconst.pl_a = array([3.84400000e+08, 5.79093357e+10, 1.08204140e+11, 1.49597871e+11,        2.27942276e+11, 7.78327802e+11, 1.42698417e+12, 2.87093274e+12,        4.49706159e+12, 5.91345423e+12])

Planet semi-major axes (m); [0]=Moon

astroconst.pl_d = array([3.47620600e+06, 4.87940000e+06, 1.21980000e+07, 1.27562732e+07,        6.79240000e+06, 1.42984000e+08, 1.20536000e+08, 5.11180000e+07,        4.95280000e+07, 2.39000000e+06])

Equatorial planet diameters (m); [0]=Moon; Venus = 12103.6km + clouds?

astroconst.pl_e = array([0.0549 , 0.2056 , 0.0068 , 0.01671, 0.0934 , 0.0484 , 0.0541 ,        0.0472 , 0.0086 , 0.2488 ])

//en.wikipedia.org/wiki/Orbital_eccentricity); [0]=Moon.

Type:

Planet orbital eccentricities (s - https

astroconst.pl_p = array([2.36045800e+06, 7.60035920e+06, 1.94137573e+07, 3.15569252e+07,        5.93528960e+07, 3.74328247e+08, 9.29575501e+08, 2.65142863e+09,        5.20058127e+09, 7.82422403e+09])

//en.wikipedia.org/wiki/Orbital_period); [0]=Moon.

Type:

Planet orbital periods (s - https

astroconst.pl_r = array([ 1738103. ,  2439700. ,  6099000. ,  6378136.6,  3396200. ,        71492000. , 60268000. , 25559000. , 24764000. ,  1195000. ])

Planet equatorial radii (m) = pland/2.

astroconst.plname_en = array(['Moon', 'Mercury', 'Venus', 'Sun', 'Mars', 'Jupiter', 'Saturn',        'Uranus', 'Neptune', 'Pluto'], dtype='<U7')

Capitalised planet names.

astroconst.plname_en_abr = array(['Moon', 'Mer.', 'Ven.', 'Sun', 'Mars', 'Jup.', 'Sat.', 'Ura.',        'Nep.', 'Plu.'], dtype='<U4')

Capitalised planet abbreviations.

astroconst.plname_en_lc = array(['moon', 'mercury', 'venus', 'sun', 'mars', 'jupiter', 'saturn',        'uranus', 'neptune', 'pluto'], dtype='<U7')

Lower-case planet names.

astroconst.plname_nl = array(['Maan', 'Mercurius', 'Venus', 'Zon', 'Mars', 'Jupiter', 'Saturnus',        'Uranus', 'Neptunus', 'Pluto'], dtype='<U9')

Capitalised Dutch planet names.

astroconst.plname_nl_abr = array(['Maan', 'Mer.', 'Ven.', 'Zon', 'Mars', 'Jup.', 'Sat.', 'Ura.',        'Nep.', 'Plu.'], dtype='<U4')

Capitalised Dutch planet abbreviations.

astroconst.plname_nl_lc = array(['maan', 'mercurius', 'venus', 'zon', 'mars', 'jupiter', 'saturnus',        'uranus', 'neptunus', 'pluto'], dtype='<U9')

Lower-case Dutch planet names.

astroconst.pm = 1e-12

Picometer in SI (m)

astroconst.r2am = 3437.7467707849396

Factor to convert radians to arcminutes

astroconst.r2as = 206264.80624709636

Factor to convert radians to arcseconds.

astroconst.r2d = 57.29577951308232

Factor to convert radians to degrees.

astroconst.r2h = 3.819718634205488

Factor to convert radians to hours.

astroconst.r2mas = 206264806.24709636

Factor to convert radians to milliarcseconds.

astroconst.r_earth = 6378136.6

Equatorial radius of the Earth in SI (m), WGS84

astroconst.r_sun = 695990000.0

Solar radius in SI (m)

astroconst.ra_gp_2000 = 3.3660329

192.85948° in rad

Type:

RA of the Galactic pole for J2000

astroconst.rydberg = 10973731.568157

Rydberg constant (m^-1)

astroconst.s = 1

Second in SI

astroconst.second = 1

Second in SI

astroconst.sigma = 5.6703668160832706e-08

Stefan-Boltzmann constant, 5.67051e-8 J m^-2 K^-4 s^-1

astroconst.sigma_T = 6.6524587e-29

Thomson cross section of a free electron (m^2)

astroconst.sin_dec_gp_2000 = np.float64(0.45598379147916696)

Sine of dec_gp_2000, needed for coordinate transformations

astroconst.sol_const = 1361.5

Solar constant in W/m^2 (Wikipedia)

astroconst.sol_l = 3.85e+26

Solar luminosity in SI (W)

astroconst.sol_m = 1.9891e+30

Solar mass in SI (kg)

astroconst.sol_r = 695990000.0

Solar radius in SI (m)

astroconst.sun_l = 3.85e+26

Solar luminosity in SI (W)

astroconst.sun_m = 1.9891e+30

Solar mass in SI (kg)

astroconst.sun_r = 695990000.0

Solar radius in SI (m)

astroconst.tH = 4.578156676557863e+17

Hubble time in seconds

astroconst.weekdays_en = array(['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday',        'Saturday'], dtype='<U9')

Capitalised day-of-week names in English.

astroconst.weekdays_en_abr = array(['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'], dtype='<U3')

Capitalised three-letter day-of-week abbreviations in English.

astroconst.weekdays_en_abr2 = array(['Su', 'Mo', 'Tu', 'We', 'Th', 'Fr', 'Sa'], dtype='<U2')

Capitalised two-letter day-of-week abbreviations in English.

astroconst.weekdays_nl = array(['zondag', 'maandag', 'dinsdag', 'woensdag', 'donderdag', 'vrijdag',        'zaterdag'], dtype='<U9')

Lower-case day-of-week names in Dutch.

astroconst.weekdays_nl_abr = array(['zo', 'ma', 'di', 'wo', 'do', 'vr', 'za'], dtype='<U2')

Lower-case two-letter day-of-week abbreviations in Dutch.

astroconst.weekdays_nl_abr4 = array(['zon', 'maa', 'din', 'woe', 'don', 'vrij', 'zat'], dtype='<U4')

Lower-case four-letter day-of-week abbreviations in Dutch.

astroconst.weeks_per_year = 52.1775

Number of weeks in a Gregorian year

astroconst.wien_displ = 0.002897771955

//physics.nist.gov/cgi-bin/cuu/Value?bwien

Type:

Wien’s displacement law

Type:

constant in m K - https

astroconst.year = 31556925.187488

Default year == tropical year (s), for J2000.0.

astroconst.year_anom = 31558432.5386496

apside to apside, for J2000.0

Type:

Anomalistic year in seconds

astroconst.year_greg = 31556952.0

assumes 97 leap years in 400 years, for J2000.0

Type:

Gregorian year in seconds

astroconst.year_jul = 31557600.0

assumes 100 leap years in 400 years, for J2000.0

Type:

Julian year in seconds

astroconst.year_sid = 31558149.7676064

fixed star to fixed star, for J2000.0

Type:

Siderial year in seconds

astroconst.year_trop = 31556925.187488

equinox to equinox, influenced by precession, for J2000.0

Type:

Tropical year in seconds