UnitfulAstro.jl Documentation

UnitfulAstro.jl is an extension of Unitful.jl to include units commonly encountered in astronomy.

Table of Units

The list of additional units is given below:

ErgUnitfulAstro.erg1//10000000 J
DyneUnitfulAstro.dyn1//100000 N
ArcminuteUnitfulAstro.arcminute0.016666666666666666 °
ArcsecondUnitfulAstro.arcsecond0.0002777777777777778 °
Julian yearUnitfulAstro.yr365.25 dy
Astronomical unitUnitfulAstro.AU1.495978707e13 cm
Light yearUnitfulAstro.ly9.4607304725808e17 cm
ParsecUnitfulAstro.pc3.0856775814913674e18 cm
JanskyUnitfulAstro.Jy1.0e-23 erg Hz^-1 cm^-2 s^-1
AngstromUnitfulAstro.angstrom0.1 nm
Solar radiusUnitfulAstro.Rsun6.957e10 cm
Solar irradianceUnitfulAstro.Ssun1.361e6 erg cm^-2 s^-1
Solar luminosityUnitfulAstro.Lsun3.828e33 erg s^-1
G × Solar massUnitfulAstro.GMsun1.3271244e20 m^3 s^-2
Solar massUnitfulAstro.Msun1.9884754153381438e33 g
Earth radius (equatorial)UnitfulAstro.Rearth_e6.3781e8 cm
Earth radius (polar)UnitfulAstro.Rearth_p6.3568e8 cm
Earth radiusUnitfulAstro.Rearth6.3781e8 cm
G × Earth massUnitfulAstro.GMearth3.986004e14 m^3 s^-2
Earth massUnitfulAstro.Mearth5.972364730419773e27 g
Jupiter radius (equatorial)UnitfulAstro.Rjup_e7.1492e9 cm
Jupiter radius (polar)UnitfulAstro.Rjup_p6.6854e9 cm
Jupiter radiusUnitfulAstro.Rjup7.1492e9 cm
G × Jupiter massUnitfulAstro.GMjup1.2668653e17 m^3 s^-2
Jupiter massUnitfulAstro.Mjup1.8981871658715508e30 g
Solar flux unitUnitfulAstro.SFU10//1 kJy
Total electron content unitUnitfulAstro.TECU1.0e12 cm^-2


julia> using Unitful, UnitfulAstro

julia> uconvert(u"erg", 1 * Unitful.kg * Unitful.gn * Unitful.m)
9.80665e7 erg

julia> uconvert(u"Jy", 1.23e-20 * u"erg/s/cm^2/Hz")
1230.0000000000002 Jy

julia> uconvert(u"ly", 1 * u"pc")
3.2615637771674337 ly

IAU Resolutions

Copies of recent IAU resolutions which formalize the definitions of some units used in this package are linked below.