ARTS 2.5.11 (git: 725533f0)
m_conversion.h
Go to the documentation of this file.
1
10#ifndef m_conversion_h
11#define m_conversion_h
12
13#include "arts_constants.h"
14#include "matpack_data.h"
15#include "messages.h"
16
18inline constexpr Numeric PI=Constant::pi;
19
20/* Workspace method: Doxygen documentation will be auto-generated */
21inline void FrequencyFromWavelength( // WS Generic Output
22 Numeric& frequency,
23 // WS Generic Input
24 const Numeric& wavelength,
25 const Verbosity&) {
26 // Convert from wavelength to frequency
27 frequency = SPEED_OF_LIGHT / wavelength;
28}
29
30/* Workspace method: Doxygen documentation will be auto-generated */
31inline void FrequencyFromWavelength( // WS Generic Output
32 Vector& frequency,
33 // WS Generic Input
34 const Vector& wavelength,
35 const Verbosity&) {
36 frequency.resize(wavelength.nelem());
37 // Convert from wavelength to frequency
38 for (Index i = 0; i < wavelength.nelem(); i++)
39 frequency[i] = SPEED_OF_LIGHT / wavelength[i];
40}
41
42/* Workspace method: Doxygen documentation will be auto-generated */
43inline void FrequencyFromCGSAngularWavenumber( // WS Generic Output
44 Numeric& frequency,
45 // WS Generic Input
46 const Numeric& angular_wavenumber,
47 const Verbosity&) {
48 frequency = SPEED_OF_LIGHT * angular_wavenumber / (2 * PI) * 100;
49}
50
51/* Workspace method: Doxygen documentation will be auto-generated */
52inline void FrequencyFromCGSAngularWavenumber( // WS Generic Output
53 Vector& frequency,
54 // WS Generic Input
55 const Vector& angular_wavenumber,
56 const Verbosity&) {
57 frequency.resize(angular_wavenumber.nelem());
58 // Convert from angular wavenumber to frequency
59 for (Index i = 0; i < angular_wavenumber.nelem(); i++)
60 frequency[i] = SPEED_OF_LIGHT * angular_wavenumber[i] / (2 * PI) * 100;
61}
62
63/* Workspace method: Doxygen documentation will be auto-generated */
64inline void FrequencyFromCGSKayserWavenumber( // WS Generic Output
65 Numeric& frequency,
66 // WS Generic Input
67 const Numeric& kayser_wavenumber,
68 const Verbosity&) {
69 frequency = SPEED_OF_LIGHT * kayser_wavenumber * 100;
70}
71
72/* Workspace method: Doxygen documentation will be auto-generated */
73inline void FrequencyFromCGSKayserWavenumber( // WS Generic Output
74 Vector& frequency,
75 // WS Generic Input
76 const Vector& kayser_wavenumber,
77 const Verbosity&) {
78 frequency.resize(kayser_wavenumber.nelem());
79 // Convert from Kayser wavenumber to frequency
80 for (Index i = 0; i < kayser_wavenumber.nelem(); i++)
81 frequency[i] = SPEED_OF_LIGHT * kayser_wavenumber[i] * 100;
82}
83
84#endif /* m_conversion_h */
Constants of physical expressions as constexpr.
void FrequencyFromCGSKayserWavenumber(Numeric &frequency, const Numeric &kayser_wavenumber, const Verbosity &)
WORKSPACE METHOD: FrequencyFromCGSKayserWavenumber.
constexpr Numeric SPEED_OF_LIGHT
void FrequencyFromWavelength(Numeric &frequency, const Numeric &wavelength, const Verbosity &)
WORKSPACE METHOD: FrequencyFromWavelength.
void FrequencyFromCGSAngularWavenumber(Numeric &frequency, const Numeric &angular_wavenumber, const Verbosity &)
WORKSPACE METHOD: FrequencyFromCGSAngularWavenumber.
constexpr Numeric PI
Declarations having to do with the four output streams.
constexpr Numeric pi
The following mathematical constants are generated in python Decimal package by the code:
constexpr Numeric speed_of_light
Speed of light [m/s] From: https://en.wikipedia.org/wiki/2019_redefinition_of_SI_base_units Date: 201...