ARTS 2.5.4 (git: 4c0d3b4d)
Conversion Namespace Reference

Namespace containing several practical unit conversions, physical and mathematical. More...

## Functions

template<class T >

template<class T >

template<class T >
auto cosd (T x) noexcept -> decltype(std::cos(deg2rad(x)))
Returns the cosine of the deg2rad of the input. More...

template<class T >
auto sind (T x) noexcept -> decltype(std::sin(deg2rad(x)))
Returns the sine of the deg2rad of the input. More...

template<class T >
auto tand (T x) noexcept -> decltype(std::tan(deg2rad(x)))
Returns the tangent of the deg2rad of the input. More...

template<class T >
auto acosd (T x) noexcept -> decltype(rad2deg(std::acos(x)))
Returns rad2deg of the arc-cosine of the input. More...

template<class T >
auto asind (T x) noexcept -> decltype(rad2deg(std::asin(x)))
Returns rad2deg of the arc-sine of the input. More...

template<class T >
auto atand (T x) noexcept -> decltype(rad2deg(std::atan(x)))
Returns rad2deg of the arc-tangent of the input. More...

template<class T1 , class T2 >
auto atan2d (T1 y, T2 x) noexcept -> decltype(rad2deg(std::atan2(y, x)))
Returns rad2deg of the arc-tangent of inputs #T1/#T2
More...

template<class T >
constexpr auto kaycm2freq (T x) noexcept -> decltype(x *(100 *c))
Conversion from Kayser wavenumber to Hz. More...

template<class T >
constexpr auto freq2kaycm (T x) noexcept -> decltype(x/(100 *c))
Conversion from Hz to Kayser wavenumber. More...

template<class T >
constexpr auto angcm2freq (T x) noexcept -> decltype(kaycm2freq(inv_two_pi))
Conversion from Angular wavenumber to Hz. More...

template<class T >
constexpr auto freq2angcm (T x) noexcept -> decltype(x/kaycm2freq(inv_two_pi))
Conversion from Hz to Angular wavenumber. More...

template<class T >
constexpr auto angfreq2freq (T x) noexcept -> decltype(x *inv_two_pi)
Conversion from Angular Hz to Hz. More...

template<class T >
constexpr auto freq2angfreq (T x) noexcept -> decltype(x *two_pi)
Conversion from Hz to Angular Hz. More...

template<class T >
constexpr auto wavelen2freq (T x) noexcept -> decltype(c/x)
Conversion from wavelength to Hz. More...

template<class T >
constexpr auto freq2wavelen (T x) noexcept -> decltype(c/x)
Conversion from Hz to wavelength. More...

template<class T >
constexpr auto hz2ghz (T x) noexcept -> decltype(x *1e-9)
Conversion from wavelength to Hz. More...

template<class T >
constexpr auto ghz2hz (T x) noexcept -> decltype(x *1e9)
Conversion from Hz to wavelength. More...

template<class T >
constexpr auto atm2pa (T x) noexcept -> decltype(x *101 '325.0)
Conversion from Atm to Pa. More...

template<class T >
constexpr auto pa2atm (T x) noexcept -> decltype(x/101 '325.0)
Conversion from Pa to Atm. More...

template<class T >
constexpr auto bar2pa (T x) noexcept -> decltype(x *1e5)
Conversion from bar to Pa. More...

template<class T >
constexpr auto pa2bar (T x) noexcept -> decltype(x *1e-5)
Conversion from Pa to bar. More...

template<class T >
constexpr auto torr2pa (T x) noexcept -> decltype(x *atm2pa(1.0/760.0))
Conversion from Torr to Pa. More...

template<class T >
constexpr auto pa2torr (T x) noexcept -> decltype(x/atm2pa(1.0/760.0))
Conversion from Pa to Torr. More...

template<class T >
constexpr auto mhz_per_torr2hz_per_pa (T x) noexcept -> decltype(x *pa2torr(1e6))
Conversion from MHz/Torr to Hz/Pa. More...

template<class T >
constexpr auto celsius2kelvin (T x) noexcept -> decltype(x+273.15)
Conversion from C to K. More...

template<class T >
constexpr auto kelvin2celsius (T x) noexcept -> decltype(x - 273.15)
Conversion from K to C. More...

template<class T >
constexpr auto kaycm_per_cmsquared2hz_per_msquared (T x) noexcept -> decltype(x *kaycm2freq(1e-4))
Conversion from cm-1 per molecule per cm^2 to Hz per molecule per m^2. More...

template<class T >
constexpr auto hz_per_msquared2kaycm_per_cmsquared (T x) noexcept -> decltype(x *freq2kaycm(1e4))
Conversion from Hz per molecule per m^2 to cm-1 per molecule per cm^2. More...

template<class T >
constexpr auto kaycm_per_atm2hz_per_pa (T x) noexcept -> decltype(x *kaycm2freq(pa2atm(1)))
Conversion from cm-1 per atmosphere to Hz per Pascal. More...

template<class T >
constexpr auto hz_per_pa2kaycm_per_atm (T x) noexcept -> decltype(x *freq2kaycm(atm2pa(1)))
Conversion from Hz per Pascal to cm-1 per atmosphere. More...

template<class T >
constexpr auto kaycm2joule (T x) noexcept -> decltype(x *kaycm2freq(h))
Conversion from cm-1 to Joule. More...

template<class T >
constexpr auto hz2joule (T x) noexcept -> decltype(x *h)
Conversion from MHz to Joule. More...

template<class T >
constexpr auto mhz2joule (T x) noexcept -> decltype(hz2joule(x) *1e6)
Conversion from MHz to Joule. More...

template<class T >
constexpr auto kelvin2joule (T x) noexcept -> decltype(x *k)
Conversion from Kelvin to Joule. More...

template<class T >
constexpr auto joule2hz (T x) noexcept -> decltype(x/h)
Conversion from Hz to Joule. More...

template<class T >
constexpr auto joule2kaycm (T x) noexcept -> decltype(x/kaycm2freq(h))
Conversion from Joule to cm-1. More...

template<class T >
constexpr auto angstrom2meter (T x) noexcept -> decltype(x *1e-10)
Conversion from Å to meter. More...

template<class T >
constexpr auto meter2angstrom (T x) noexcept -> decltype(x *1e10)
Conversion from meter to Å More...

## Detailed Description

Namespace containing several practical unit conversions, physical and mathematical.

## ◆ acosd()

template<class T >
 auto Conversion::acosd ( T x ) -> decltype(rad2deg(std::acos(x)))
noexcept

Returns rad2deg of the arc-cosine of the input.

Definition at line 361 of file constants.h.

## ◆ angcm2freq()

template<class T >
 constexpr auto Conversion::angcm2freq ( T x ) -> decltype(kaycm2freq(inv_two_pi))
constexprnoexcept

Conversion from Angular wavenumber to Hz.

Definition at line 397 of file constants.h.

## ◆ angfreq2freq()

template<class T >
 constexpr auto Conversion::angfreq2freq ( T x ) -> decltype(x * inv_two_pi)
constexprnoexcept

Conversion from Angular Hz to Hz.

Definition at line 410 of file constants.h.

## ◆ angstrom2meter()

template<class T >
 constexpr auto Conversion::angstrom2meter ( T x ) -> decltype(x * 1e-10)
constexprnoexcept

Conversion from Å to meter.

Definition at line 565 of file constants.h.

## ◆ asind()

template<class T >
 auto Conversion::asind ( T x ) -> decltype(rad2deg(std::asin(x)))
noexcept

Returns rad2deg of the arc-sine of the input.

Definition at line 367 of file constants.h.

## ◆ atan2d()

template<class T1 , class T2 >
 auto Conversion::atan2d ( T1 y, T2 x ) -> decltype(rad2deg(std::atan2(y, x)))
noexcept

Returns rad2deg of the arc-tangent of inputs #T1/#T2

Definition at line 379 of file constants.h.

## ◆ atand()

template<class T >
 auto Conversion::atand ( T x ) -> decltype(rad2deg(std::atan(x)))
noexcept

Returns rad2deg of the arc-tangent of the input.

Definition at line 373 of file constants.h.

## ◆ atm2pa()

template<class T >
 constexpr auto Conversion::atm2pa ( T x ) -> decltype(x * 101'325.0)
constexprnoexcept

Conversion from Atm to Pa.

Definition at line 446 of file constants.h.

Referenced by hz_per_pa2kaycm_per_atm(), pa2torr(), test_hitran2017(), and torr2pa().

## ◆ bar2pa()

template<class T >
 constexpr auto Conversion::bar2pa ( T x ) -> decltype(x * 1e5)
constexprnoexcept

Conversion from bar to Pa.

Definition at line 458 of file constants.h.

## ◆ celsius2kelvin()

template<class T >
 constexpr auto Conversion::celsius2kelvin ( T x ) -> decltype(x + 273.15)
constexprnoexcept

Conversion from C to K.

Definition at line 489 of file constants.h.

## ◆ cosd()

template<class T >
 auto Conversion::cosd ( T x ) -> decltype(std::cos(deg2rad(x)))
noexcept

Returns the cosine of the deg2rad of the input.

Definition at line 343 of file constants.h.

Referenced by test18(), test19(), test20(), test21(), test23(), and test28().

template<class T >
constexprnoexcept

Definition at line 331 of file constants.h.

Referenced by cosd(), propmat_clearskyAddOnTheFlyLineMixingWithZeeman(), sind(), tand(), and zeeman_on_the_fly().

## ◆ freq2angcm()

template<class T >
 constexpr auto Conversion::freq2angcm ( T x ) -> decltype(x / kaycm2freq(inv_two_pi))
constexprnoexcept

Conversion from Hz to Angular wavenumber.

Definition at line 403 of file constants.h.

## ◆ freq2angfreq()

template<class T >
 constexpr auto Conversion::freq2angfreq ( T x ) -> decltype(x * two_pi)
constexprnoexcept

Conversion from Hz to Angular Hz.

Definition at line 416 of file constants.h.

## ◆ freq2kaycm()

template<class T >
 constexpr auto Conversion::freq2kaycm ( T x ) -> decltype(x / (100 * c))
constexprnoexcept

Conversion from Hz to Kayser wavenumber.

Definition at line 391 of file constants.h.

## ◆ freq2wavelen()

template<class T >
 constexpr auto Conversion::freq2wavelen ( T x ) -> decltype(c / x)
constexprnoexcept

Conversion from Hz to wavelength.

Definition at line 428 of file constants.h.

## ◆ ghz2hz()

template<class T >
 constexpr auto Conversion::ghz2hz ( T x ) -> decltype(x * 1e9)
constexprnoexcept

Conversion from Hz to wavelength.

Definition at line 440 of file constants.h.

## ◆ hz2ghz()

template<class T >
 constexpr auto Conversion::hz2ghz ( T x ) -> decltype(x * 1e-9)
constexprnoexcept

Conversion from wavelength to Hz.

Definition at line 434 of file constants.h.

## ◆ hz2joule()

template<class T >
 constexpr auto Conversion::hz2joule ( T x ) -> decltype(x * h)
constexprnoexcept

Conversion from MHz to Joule.

Definition at line 535 of file constants.h.

Referenced by mhz2joule().

## ◆ hz_per_msquared2kaycm_per_cmsquared()

template<class T >
 constexpr auto Conversion::hz_per_msquared2kaycm_per_cmsquared ( T x ) -> decltype(x * freq2kaycm(1e4))
constexprnoexcept

Conversion from Hz per molecule per m^2 to cm-1 per molecule per cm^2.

Definition at line 508 of file constants.h.

References freq2kaycm().

## ◆ hz_per_pa2kaycm_per_atm()

template<class T >
 constexpr auto Conversion::hz_per_pa2kaycm_per_atm ( T x ) -> decltype(x * freq2kaycm(atm2pa(1)))
constexprnoexcept

Conversion from Hz per Pascal to cm-1 per atmosphere.

Definition at line 522 of file constants.h.

References atm2pa(), and freq2kaycm().

## ◆ joule2hz()

template<class T >
 constexpr auto Conversion::joule2hz ( T x ) -> decltype(x / h)
constexprnoexcept

Conversion from Hz to Joule.

Definition at line 553 of file constants.h.

## ◆ joule2kaycm()

template<class T >
 constexpr auto Conversion::joule2kaycm ( T x ) -> decltype(x / kaycm2freq(h))
constexprnoexcept

Conversion from Joule to cm-1.

Definition at line 559 of file constants.h.

## ◆ kaycm2freq()

template<class T >
 constexpr auto Conversion::kaycm2freq ( T x ) -> decltype(x * (100 * c))
constexprnoexcept

Conversion from Kayser wavenumber to Hz.

Definition at line 385 of file constants.h.

Referenced by lm_hitran_2017::calcw(), kaycm_per_atm2hz_per_pa(), and test_hitran2017().

## ◆ kaycm2joule()

template<class T >
 constexpr auto Conversion::kaycm2joule ( T x ) -> decltype(x * kaycm2freq(h))
constexprnoexcept

Conversion from cm-1 to Joule.

Definition at line 529 of file constants.h.

## ◆ kaycm_per_atm2hz_per_pa()

template<class T >
 constexpr auto Conversion::kaycm_per_atm2hz_per_pa ( T x ) -> decltype(x * kaycm2freq(pa2atm(1)))
constexprnoexcept

Conversion from cm-1 per atmosphere to Hz per Pascal.

Definition at line 515 of file constants.h.

References kaycm2freq(), and pa2atm().

## ◆ kaycm_per_cmsquared2hz_per_msquared()

template<class T >
 constexpr auto Conversion::kaycm_per_cmsquared2hz_per_msquared ( T x ) -> decltype(x * kaycm2freq(1e-4))
constexprnoexcept

Conversion from cm-1 per molecule per cm^2 to Hz per molecule per m^2.

Definition at line 501 of file constants.h.

Referenced by test_hitran2017().

## ◆ kelvin2celsius()

template<class T >
 constexpr auto Conversion::kelvin2celsius ( T x ) -> decltype(x - 273.15)
constexprnoexcept

Conversion from K to C.

Definition at line 495 of file constants.h.

## ◆ kelvin2joule()

template<class T >
 constexpr auto Conversion::kelvin2joule ( T x ) -> decltype(x * k)
constexprnoexcept

Conversion from Kelvin to Joule.

Definition at line 547 of file constants.h.

## ◆ meter2angstrom()

template<class T >
 constexpr auto Conversion::meter2angstrom ( T x ) -> decltype(x * 1e10)
constexprnoexcept

Conversion from meter to Å

Definition at line 571 of file constants.h.

## ◆ mhz2joule()

template<class T >
 constexpr auto Conversion::mhz2joule ( T x ) -> decltype(hz2joule(x) * 1e6)
constexprnoexcept

Conversion from MHz to Joule.

Definition at line 541 of file constants.h.

References hz2joule().

Referenced by Absorption::LineMixing::Makarov2020etal::erot().

## ◆ mhz_per_torr2hz_per_pa()

template<class T >
 constexpr auto Conversion::mhz_per_torr2hz_per_pa ( T x ) -> decltype(x * pa2torr(1e6))
constexprnoexcept

Conversion from MHz/Torr to Hz/Pa.

Definition at line 482 of file constants.h.

References pa2torr().

## ◆ pa2atm()

template<class T >
 constexpr auto Conversion::pa2atm ( T x ) -> decltype(x / 101'325.0)
constexprnoexcept

Conversion from Pa to Atm.

Definition at line 452 of file constants.h.

Referenced by kaycm_per_atm2hz_per_pa().

## ◆ pa2bar()

template<class T >
 constexpr auto Conversion::pa2bar ( T x ) -> decltype(x * 1e-5)
constexprnoexcept

Conversion from Pa to bar.

Definition at line 464 of file constants.h.

## ◆ pa2torr()

template<class T >
 constexpr auto Conversion::pa2torr ( T x ) -> decltype(x / atm2pa(1.0 / 760.0))
constexprnoexcept

Conversion from Pa to Torr.

Definition at line 476 of file constants.h.

References atm2pa().

Referenced by mhz_per_torr2hz_per_pa().

template<class T >
constexprnoexcept

Definition at line 337 of file constants.h.

Referenced by acosd(), asind(), atan2d(), and atand().

## ◆ sind()

template<class T >
 auto Conversion::sind ( T x ) -> decltype(std::sin(deg2rad(x)))
noexcept

Returns the sine of the deg2rad of the input.

Definition at line 349 of file constants.h.

Referenced by test18(), test19(), test20(), test21(), test23(), and test28().

## ◆ tand()

template<class T >
 auto Conversion::tand ( T x ) -> decltype(std::tan(deg2rad(x)))
noexcept

Returns the tangent of the deg2rad of the input.

Definition at line 355 of file constants.h.

## ◆ torr2pa()

template<class T >
 constexpr auto Conversion::torr2pa ( T x ) -> decltype(x * atm2pa(1.0 / 760.0))
constexprnoexcept

Conversion from Torr to Pa.

Definition at line 470 of file constants.h.

References atm2pa().

Referenced by main().

## ◆ wavelen2freq()

template<class T >
 constexpr auto Conversion::wavelen2freq ( T x ) -> decltype(c / x)
constexprnoexcept

Conversion from wavelength to Hz.

Definition at line 422 of file constants.h.