mxlib
c++ tools for analyzing astronomical data and other tasks by Jared R. Males. [git repo]

Constants with dimensions are provided with a template argument specifying the units system to use, see Unit Conversions.

Functions

template<typename units >
constexpr units::realT mx::astro::constants::G ()
 Newton's Gravitational Constant. More...
 
template<typename units >
constexpr units::realT mx::astro::constants::c ()
 The speed of light. More...
 
template<typename units >
constexpr units::realT mx::astro::constants::k ()
 Boltzmann Constant. More...
 
template<typename units >
constexpr units::realT mx::astro::constants::sigma ()
 Stefan-Boltzmann Constant. More...
 
template<typename units >
constexpr units::realT mx::astro::constants::h ()
 Planck Constant. More...
 
template<typename units >
constexpr units::realT mx::astro::constants::day ()
 Length of day. More...
 
template<typename units >
constexpr units::realT mx::astro::constants::year ()
 Length of year. More...
 
template<typename units >
constexpr units::realT mx::astro::constants::au ()
 Astronomical Unit. More...
 
template<typename units >
constexpr units::realT mx::astro::constants::parsec ()
 The parsec. More...
 
template<typename units >
constexpr units::realT mx::astro::constants::radSun ()
 Radius of the Sun. More...
 
template<typename units >
constexpr units::realT mx::astro::constants::solarIrrad ()
 Solar Irradiance at 1 au. More...
 
template<typename units >
constexpr units::realT mx::astro::constants::lumSun ()
 Luminosity of the Sun. More...
 
template<typename units >
constexpr units::realT mx::astro::constants::TeffSun ()
 Effective Temperature of the Sun. More...
 
template<typename units >
constexpr units::realT mx::astro::constants::GMSun ()
 Solar Mass Parameter. More...
 
template<typename units >
constexpr units::realT mx::astro::constants::massSun ()
 Solar Mass. More...
 
template<typename units >
constexpr units::realT mx::astro::constants::radEarth ()
 Radius of Earth (nominal equatorial) More...
 
template<typename units >
constexpr units::realT mx::astro::constants::GMEarth ()
 Earth Mass Parameter. More...
 
template<typename units >
constexpr units::realT mx::astro::constants::massEarth ()
 Earth Mass. More...
 
template<typename units >
constexpr units::realT mx::astro::constants::radJupiter ()
 Radius of Jupiter (nominal equatorial) More...
 
template<typename units >
constexpr units::realT mx::astro::constants::GMJupiter ()
 Jupiter Mass Parameter. More...
 
template<typename units >
constexpr units::realT mx::astro::constants::massJupiter ()
 Jupiter Mass. More...
 
template<typename units >
constexpr units::realT mx::astro::constants::mrMercury ()
 Mass ratio of Mercury to the Sun. More...
 
template<typename units >
constexpr units::realT mx::astro::constants::massMercury ()
 Mass of Mercury. More...
 
template<typename units >
constexpr units::realT mx::astro::constants::radVenus ()
 Radius of Mercury. More...
 
template<typename units >
constexpr units::realT mx::astro::constants::mrMars ()
 Mass ratio of Mars to the Sun. More...
 
template<typename units >
constexpr units::realT mx::astro::constants::massMars ()
 Mass of Mars. More...
 
template<typename units >
constexpr units::realT mx::astro::constants::radSaturn ()
 Radius of Mars. More...
 
template<typename units >
constexpr units::realT mx::astro::constants::mrUranus ()
 Mass ratio of Uranus to the Sun. More...
 
template<typename units >
constexpr units::realT mx::astro::constants::massUranus ()
 Mass of Uranus. More...
 
template<typename units >
constexpr units::realT mx::astro::constants::radNeptune ()
 Radius of Uranus. More...
 

Function Documentation

◆ au()

template<typename units >
constexpr units::realT mx::astro::constants::au ( )
constexpr

Astronomical Unit.

As defined by IAU Resolution 2012 B2

Definition at line 118 of file constants.hpp.

◆ c()

template<typename units >
constexpr units::realT mx::astro::constants::c ( )
constexpr

The speed of light.

Source: 2014 CODATA recommended values [16], http://physics.nist.gov/cuu/Constants/index.html

Definition at line 60 of file constants.hpp.

Referenced by mx::improc::cubicConvolTransform< _arithT >::cubicConvolTransform(), mx::fits::fitsHeaderCard::fitsHeaderCard(), mx::fits::fitsHeader::append(), mx::astro::baseSpectrum< realT >::charFlux(), mx::improc::combine2ImagesMasked(), mx::fits::fitsHeaderCard::comment(), mx::ioutils::convertFromString< bool >(), mx::ioutils::convertToString(), mx::math::cubicDepressed(), mx::math::cubicDescriminant(), mx::dumpGitStatus(), mx::math::fit::levmarInterface< fitterT >::dumpParameters(), mx::math::fit::levmarInterface< fitterT >::dumpReport(), mx::improc::imCenterCircleSym< realT >::dumpResults(), mx::improc::imCenterRadon< transformT >::dumpResults(), mx::AO::analysis::aoAtmosphere< _realT >::dX(), mx::AO::analysis::aoAtmosphere< _realT >::dY(), mx::AO::analysis::F_mod(), mx::math::func::gaussian2D(), mx::math::func::gaussian2D_ang(), mx::math::func::gaussian2D_gen2rot(), mx::math::func::gaussian2D_jacobian(), mx::math::func::gaussian2D_rot2gen(), mx::math::fit::guessGauss2D_ang(), mx::improc::imageMean(), mx::improc::imageVariance(), mx::fits::fitsHeader::insert_after(), mx::fits::fitsHeader::insert_before(), mx::wfp::lyotCoronagraph< _realT, _fpmaskFloatT >::loadFocalMask(), mx::improc::maskCircle(), mx::sigproc::normPSD(), mx::AO::analysis::aoSystem< _realT, _inputSpectT, iosT >::optimumTauWFS(), mx::math::quarticRoots(), mx::improc::radprof(), mx::improc::radprofim(), mx::improc::imageXCorrFFT< _ccImT >::refIm(), mx::AO::analysis::aoAtmosphere< _realT >::update_v_wind(), mx::math::vectorSub(), mx::AO::analysis::aoAtmosphere< _realT >::X(), mx::AO::analysis::aoAtmosphere< _realT >::X_Z(), mx::AO::analysis::aoAtmosphere< _realT >::Y(), mx::sigproc::zernike(), mx::sigproc::zernikeR(), mx::sigproc::zernikeRCoeffs(), mx::improc::zeroNaNCube(), and mx::improc::zeroNaNs().

◆ day()

template<typename units >
constexpr units::realT mx::astro::constants::day ( )
constexpr

◆ G()

◆ GMEarth()

template<typename units >
constexpr units::realT mx::astro::constants::GMEarth ( )
constexpr

Earth Mass Parameter.

\( GM_{e} = 3.986004 \times 10^14 \: m^3 \: s^{-2} \)

Source: IAU Resolution 2015 B2, https://www.iau.org/static/resolutions/IAU2015_English.pdf

Definition at line 215 of file constants.hpp.

◆ GMJupiter()

template<typename units >
constexpr units::realT mx::astro::constants::GMJupiter ( )
constexpr

Jupiter Mass Parameter.

\( GM_{J} = 1.2668653 \times 10^17 \: m^3 \: s^{-2} \)

Source: IAU Resolution 2015 B2, https://www.iau.org/static/resolutions/IAU2015_English.pdf

Definition at line 249 of file constants.hpp.

◆ GMSun()

template<typename units >
constexpr units::realT mx::astro::constants::GMSun ( )
constexpr

Solar Mass Parameter.

\( GM_{sun} = 1.3271244 \times 10^20 \: m^3 \: s^{-2} \)

Source: IAU Resolution 2015 B2, https://www.iau.org/static/resolutions/IAU2015_English.pdf

Definition at line 181 of file constants.hpp.

◆ h()

template<typename units >
constexpr units::realT mx::astro::constants::h ( )
constexpr

◆ k()

template<typename units >
constexpr units::realT mx::astro::constants::k ( )
constexpr

Boltzmann Constant.

\( k = 1.38064852 \times 10^{-23} \: J \: K^{-1}\)

Source: 2014 CODATA recommended values [16], http://physics.nist.gov/cuu/Constants/index.html

Definition at line 71 of file constants.hpp.

Referenced by mx::fits::fitsHeaderCard::fitsHeaderCard(), mx::AO::sim::directPhaseReconstructor< realT >::accumulateRMat(), mx::fits::fitsHeader::append(), mx::AO::analysis::shwfs< realT, iosT >::beta_p(), mx::AO::analysis::aoSystem< _realT, _inputSpectT, iosT >::C0var(), mx::AO::analysis::aoSystem< _realT, _inputSpectT, iosT >::C1var(), mx::AO::analysis::aoSystem< _realT, _inputSpectT, iosT >::C4var(), mx::AO::analysis::aoSystem< _realT, _inputSpectT, iosT >::C5var(), mx::AO::analysis::aoSystem< _realT, _inputSpectT, iosT >::C7var(), mx::AO::analysis::aoSystem< _realT, _inputSpectT, iosT >::C_(), mx::AO::sim::pywfsSlopeReconstructor< _floatT >::calcMeasurement(), mx::improc::imCenterCircleSym< realT >::center(), mx::AO::analysis::F_zernike(), mx::AO::analysis::aoSystem< _realT, _inputSpectT, iosT >::fittingError(), mx::AO::analysis::fourierPSDMap(), mx::AO::analysis::fourierVarVec(), mx::math::func::gammaDistribution(), mx::math::func::gammaDistributionDenom(), mx::math::func::gammaDistributionMean(), mx::math::func::gammaDistributionMode(), mx::math::func::gammaDistributionVariance(), mx::improc::imageRebinMeanReject(), mx::fits::fitsHeader::insert_after(), mx::fits::fitsHeader::insert_before(), mx::AO::analysis::kInt(), mx::sigproc::makeFourierModeFreqs_PandV(), mx::improc::eigenCube< dataT >::mean(), mx::AO::analysis::aoSystem< _realT, _inputSpectT, iosT >::ncpError(), mx::sigproc::normPSD(), mx::AO::analysis::vonKarmanSpectrum< realT >::operator()(), mx::AO::analysis::aoSystem< _realT, _inputSpectT, iosT >::optimumTauWFS(), mx::ioutils::textTable::outPut(), mx::AO::analysis::phiInt_basic(), mx::AO::analysis::phiInt_mod(), mx::sigproc::psdVarMeanParams< _realT >::psdVal(), mx::AO::sim::directPhaseReconstructor< realT >::reconstruct(), SCENARIO(), mx::improc::eigenCube< dataT >::sigmaMean(), mx::AO::analysis::aoSystem< _realT, _inputSpectT, iosT >::timeDelayError(), mx::math::func::weibull(), mx::math::func::weibull_lambda(), mx::AO::analysis::aoAtmosphere< _realT >::X(), mx::AO::analysis::aoAtmosphere< _realT >::X_Z(), mx::AO::analysis::aoAtmosphere< _realT >::Y(), mx::sigproc::zernikeQNorm(), mx::sigproc::zernikeR(), and mx::sigproc::zernikeRCoeffs().

◆ lumSun()

template<typename units >
constexpr units::realT mx::astro::constants::lumSun ( )
constexpr

Luminosity of the Sun.

\( L_{sun} = 3.828\times 10^{26} \: W\)

Source: IAU Resolution 2015 B2, https://www.iau.org/static/resolutions/IAU2015_English.pdf

Definition at line 159 of file constants.hpp.

◆ massEarth()

template<typename units >
constexpr units::realT mx::astro::constants::massEarth ( )
constexpr

Earth Mass.

The mass of Earth is the mass parameter divided by the gravitational constant.

\( M_{e} = GM_{e}/G \)

Definition at line 227 of file constants.hpp.

◆ massJupiter()

template<typename units >
constexpr units::realT mx::astro::constants::massJupiter ( )
constexpr

Jupiter Mass.

The mass of Jupiter is the Jupiter mass parameter divided by the gravitational constant.

\( M_{J} = GM_{J}/G \)

Definition at line 261 of file constants.hpp.

◆ massMars()

template<typename units >
constexpr units::realT mx::astro::constants::massMars ( )
constexpr

Mass of Mars.

The mass of Mars is the mass of the Sun divided by the mass ratio of Mars to the Sun.

Definition at line 364 of file constants.hpp.

◆ massMercury()

template<typename units >
constexpr units::realT mx::astro::constants::massMercury ( )
constexpr

Mass of Mercury.

The mass of Mercury is the mass of the Sun divided by the mass ratio of Mercury to the Sun.

Definition at line 288 of file constants.hpp.

◆ massSun()

template<typename units >
constexpr units::realT mx::astro::constants::massSun ( )
constexpr

Solar Mass.

The mass of Sun is the Solar mass parameter divided by the graviational constant.

\( M_{Sun} = GM_{Sun}/G \)

Definition at line 193 of file constants.hpp.

◆ massUranus()

template<typename units >
constexpr units::realT mx::astro::constants::massUranus ( )
constexpr

Mass of Uranus.

The mass of Uranus is the mass of the Sun divided by the mass ratio of Uranus to the Sun.

Definition at line 441 of file constants.hpp.

◆ mrMars()

template<typename units >
constexpr units::realT mx::astro::constants::mrMars ( )
constexpr

Mass ratio of Mars to the Sun.

\( M_{Sun}/M_{Ma} = 3.09870359 \times 10^{6}\)

Source: IAU Resolution 2009 B2, https://www.iau.org/static/resolutions/IAU2009_English.pdf. see also http://maia.usno.navy.mil/NSFA/NSFA_cbe.html

Definition at line 353 of file constants.hpp.

◆ mrMercury()

template<typename units >
constexpr units::realT mx::astro::constants::mrMercury ( )
constexpr

Mass ratio of Mercury to the Sun.

\( M_{Sun}/M_{Me} = 6.023657330 \times 10^{6} \)

Source: IAU Resolution 2009 B2, https://www.iau.org/static/resolutions/IAU2009_English.pdf. see also http://maia.usno.navy.mil/NSFA/NSFA_cbe.html

Definition at line 277 of file constants.hpp.

◆ mrUranus()

template<typename units >
constexpr units::realT mx::astro::constants::mrUranus ( )
constexpr

Mass ratio of Uranus to the Sun.

\( M_{Sun}/M_{U} = 2.2902951 \times 10^{4}\)

Source: IAU Resolution 2009 B2, https://www.iau.org/static/resolutions/IAU2009_English.pdf. see also http://maia.usno.navy.mil/NSFA/NSFA_cbe.html

Definition at line 430 of file constants.hpp.

◆ parsec()

template<typename units >
constexpr units::realT mx::astro::constants::parsec ( )
constexpr

The parsec.

Definition at line 125 of file constants.hpp.

◆ radEarth()

template<typename units >
constexpr units::realT mx::astro::constants::radEarth ( )
constexpr

Radius of Earth (nominal equatorial)

\( R_{e} = 6.3781\times 10^6 \: m \)

Source: IAU Resolution 2015 B2, https://www.iau.org/static/resolutions/IAU2015_English.pdf

Definition at line 204 of file constants.hpp.

◆ radJupiter()

template<typename units >
constexpr units::realT mx::astro::constants::radJupiter ( )
constexpr

Radius of Jupiter (nominal equatorial)

\( R_{J} = 7.1492\times 10^7 \: m \)

Source: IAU Resolution 2015 B2, https://www.iau.org/static/resolutions/IAU2015_English.pdf

Definition at line 238 of file constants.hpp.

◆ radNeptune()

template<typename units >
constexpr units::realT mx::astro::constants::radNeptune ( )
constexpr

Radius of Uranus.

\f$ = 2.5559 \times 10^{7}

Source: Seidelmann et al. (2007) \cite seidelmann_2007

*/ template<typename units> constexpr typename units::realT radUranus() { return static_cast<typename units::realT>(2.5559e7)*units::length; }

Mass ratio of Neptune to the Sun.

/** \( M_{Sun}/M_{U} = 1.941226 \times 10^{4}\)

Source: IAU Resolution 2009 B2, https://www.iau.org/static/resolutions/IAU2009_English.pdf. see also http://maia.usno.navy.mil/NSFA/NSFA_cbe.html

*/ template<typename units> constexpr typename units::realT mrNeptune() { return static_cast<typename units::realT>( 1.941226e4); }

Mass of Neptune.

/** The mass of Neptune is the mass of the Sun divided by the mass ratio of Neptune to the Sun.

*/ template<typename units> constexpr typename units::realT massNeptune() { return massSun<units>()/mrNeptune<units>(); }

Radius of Neptune.

/**

Definition at line 492 of file constants.hpp.

◆ radSaturn()

template<typename units >
constexpr units::realT mx::astro::constants::radSaturn ( )
constexpr

Radius of Mars.

\f$ = 3.39619 \times 10^{6}

Source: Seidelmann et al. (2007) \cite seidelmann_2007

*/ template<typename units> constexpr typename units::realT radMars() { return static_cast<typename units::realT>(3.39619e6)*units::length; }

Mass ratio of Saturn to the Sun.

/** \( M_{Sun}/M_{Sa} = 3.4979018 \times 10^{3}\)

Source: IAU Resolution 2009 B2, https://www.iau.org/static/resolutions/IAU2009_English.pdf. see also http://maia.usno.navy.mil/NSFA/NSFA_cbe.html

*/ template<typename units> constexpr typename units::realT mrSaturn() { return static_cast<typename units::realT>( 3.4979018e3); }

Mass of Saturn.

/** The mass of Saturn is the mass of the Sun divided by the mass ratio of Saturn to the Sun.

*/ template<typename units> constexpr typename units::realT massSaturn() { return massSun<units>()/mrSaturn<units>(); }

Radius of Saturn.

/**

Definition at line 415 of file constants.hpp.

◆ radSun()

template<typename units >
constexpr units::realT mx::astro::constants::radSun ( )
constexpr

Radius of the Sun.

\( R_{sun} = 6.957\times 10^{8} \: m\)

Source: IAU Resolution 2015 B2, https://www.iau.org/static/resolutions/IAU2015_English.pdf

Definition at line 137 of file constants.hpp.

◆ radVenus()

template<typename units >
constexpr units::realT mx::astro::constants::radVenus ( )
constexpr

Radius of Mercury.

\f$ = 2.4397 \times 10^{6}

Source: Seidelmann et al. (2007) \cite seidelmann_2007

*/ template<typename units> constexpr typename units::realT radMercury() { return static_cast<typename units::realT>(2.4397e6)*units::length; }

Mass ratio of Venus to the Sun.

/** \( M_{Sun}/M_{Ve} = 4.08523719 \times 10^{5}\)

Source: IAU Resolution 2009 B2, https://www.iau.org/static/resolutions/IAU2009_English.pdf. see also http://maia.usno.navy.mil/NSFA/NSFA_cbe.html

*/ template<typename units> constexpr typename units::realT mrVenus() { return static_cast<typename units::realT>(4.08523719e5); }

Mass of Venus.

/** The mass of Venus is the mass of the Sun divided by the mass ratio of Venus to the Sun.

*/ template<typename units> constexpr typename units::realT massVenus() { return massSun<units>()/mrVenus<units>(); }

Radius of Venus.

/**

Definition at line 339 of file constants.hpp.

◆ sigma()

◆ solarIrrad()

template<typename units >
constexpr units::realT mx::astro::constants::solarIrrad ( )
constexpr

Solar Irradiance at 1 au.

\( S_{sun} = 1361 \: W \: m^{-2}\)

Source: IAU Resolution 2015 B2, https://www.iau.org/static/resolutions/IAU2015_English.pdf

Definition at line 148 of file constants.hpp.

◆ TeffSun()

template<typename units >
constexpr units::realT mx::astro::constants::TeffSun ( )
constexpr

Effective Temperature of the Sun.

\( T_{sun} = 5772 \: K \)

Source: IAU Resolution 2015 B2, https://www.iau.org/static/resolutions/IAU2015_English.pdf

Definition at line 170 of file constants.hpp.

◆ year()

template<typename units >
constexpr units::realT mx::astro::constants::year ( )
constexpr

Length of year.

As defined by IAU

Definition at line 109 of file constants.hpp.