ARTS
2.2.66
m_conversion.h
Go to the documentation of this file.
1
/* Copyright (C) 2012 Claudia Emde <claudia.emde@lmu.de>
2
3
This program is free software; you can redistribute it and/or modify it
4
under the terms of the GNU General Public License as published by the
5
Free Software Foundation; either version 2, or (at your option) any
6
later version.
7
8
This program is distributed in the hope that it will be useful,
9
but WITHOUT ANY WARRANTY; without even the implied warranty of
10
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11
GNU General Public License for more details.
12
13
You should have received a copy of the GNU General Public License
14
along with this program; if not, write to the Free Software
15
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
16
USA. */
17
27
#ifndef m_conversion_h
28
#define m_conversion_h
29
30
extern
const
Numeric
SPEED_OF_LIGHT
;
31
32
/* Workspace method: Doxygen documentation will be auto-generated */
33
void
FrequencyFromWavelength
(
// WS Generic Output
34
Numeric
& frequency,
35
// WS Generic Input
36
const
Numeric
& wavelength,
37
const
Verbosity
&)
38
{
39
40
// Convert from wavelength to frequency
41
frequency=
SPEED_OF_LIGHT
/wavelength;
42
43
}
44
45
46
/* Workspace method: Doxygen documentation will be auto-generated */
47
void
FrequencyFromWavelength
(
// WS Generic Output
48
Vector
& frequency,
49
// WS Generic Input
50
const
Vector
& wavelength,
51
const
Verbosity
&)
52
{
53
frequency.
resize
(wavelength.
nelem
());
54
// Convert from wavelength to frequency
55
for
(
Index
i=0; i<wavelength.
nelem
(); i++)
56
frequency[i]=
SPEED_OF_LIGHT
/wavelength[i];
57
}
58
59
#endif
/* m_conversion_h */
60
SPEED_OF_LIGHT
const Numeric SPEED_OF_LIGHT
Vector::resize
void resize(Index n)
Resize function.
Definition:
matpackI.cc:798
FrequencyFromWavelength
void FrequencyFromWavelength(Numeric &frequency, const Numeric &wavelength, const Verbosity &)
WORKSPACE METHOD: FrequencyFromWavelength.
Definition:
m_conversion.h:33
ConstVectorView::nelem
Index nelem() const
Returns the number of elements.
Definition:
matpackI.cc:180
Numeric
NUMERIC Numeric
The type to use for all floating point numbers.
Definition:
matpack.h:29
Verbosity
Definition:
messages.h:50
Index
INDEX Index
The type to use for all integer numbers and indices.
Definition:
matpack.h:35
Vector
The Vector class.
Definition:
matpackI.h:556
src
m_conversion.h
Generated on Thu Oct 8 2020 12:59:30 for ARTS by
1.8.20