ARTS  2.4.0(git:4fb77825)
hitran_xsec.h
Go to the documentation of this file.
1 /* Copyright (C) 2018 Oliver Lemke <oliver.lemke@uni-hamburg.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 
26 #ifndef HITRAN_XSEC_H
27 #define HITRAN_XSEC_H
28 
29 #include "arts.h"
30 
31 #include "array.h"
32 #include "bifstream.h"
33 #include "matpackI.h"
34 #include "messages.h"
35 #include "mystring.h"
36 
37 class XsecRecord {
38  public:
40  Index Species() const { return mspecies; };
41 
43  String SpeciesName() const;
44 
46  void SetSpecies(const Index species) { mspecies = species; };
47 
49  ConstVectorView Coeffs() const { return mcoeffs; };
50 
53 
56 
58  const ArrayOfVector& Fgrids() const { return mfgrids; };
59 
61  const ArrayOfVector& Xsecs() const { return mxsecs; };
62 
64  const ArrayOfVector& TemperatureSlope() const { return mtslope; };
65 
67  const ArrayOfVector& TemperatureIntersect() const { return mtintersect; };
68 
70  Vector& Coeffs() { return mcoeffs; };
71 
74 
77 
79  ArrayOfVector& Fgrids() { return mfgrids; };
80 
82  ArrayOfVector& Xsecs() { return mxsecs; };
83 
86 
89 
103  void Extract(VectorView result,
105  const Numeric& pressure,
106  const Numeric& temperature,
107  const Index& apply_tfit,
108  const Verbosity& verbosity) const;
109 
110  friend void xml_read_from_stream(std::istream& is_xml,
111  XsecRecord& cr,
112  bifstream* pbifs,
113  const Verbosity& verbosity);
114 
115  private:
124 };
125 
127 
129  const Index species);
130 
131 std::ostream& operator<<(std::ostream& os, const XsecRecord& xd);
132 
133 #endif // HITRAN_XSEC_H
hitran_xsec_get_index
Index hitran_xsec_get_index(const ArrayOfXsecRecord &xsec_data, const Index species)
Get the index in hitran_xsec_data for the given species.
Definition: hitran_xsec.cc:342
XsecRecord::RefTemperature
Vector & RefTemperature()
Get reference temperatures.
Definition: hitran_xsec.h:76
XsecRecord::RefTemperature
ConstVectorView RefTemperature() const
Get reference temperatures.
Definition: hitran_xsec.h:55
XsecRecord::mtintersect
ArrayOfVector mtintersect
Definition: hitran_xsec.h:123
XsecRecord::Species
Index Species() const
Return species index.
Definition: hitran_xsec.h:40
XsecRecord::mspecies
Index mspecies
Definition: hitran_xsec.h:116
ARTS::Var::verbosity
Verbosity verbosity(Workspace &ws) noexcept
Definition: autoarts.h:7112
XsecRecord::Coeffs
Vector & Coeffs()
Get coefficients.
Definition: hitran_xsec.h:70
XsecRecord::Xsecs
const ArrayOfVector & Xsecs() const
Get cross sections.
Definition: hitran_xsec.h:61
XsecRecord::xml_read_from_stream
friend void xml_read_from_stream(std::istream &is_xml, XsecRecord &cr, bifstream *pbifs, const Verbosity &verbosity)
XsecRecord::mtslope
ArrayOfVector mtslope
Definition: hitran_xsec.h:122
XsecRecord::TemperatureIntersect
const ArrayOfVector & TemperatureIntersect() const
Get intersect of temperature fit.
Definition: hitran_xsec.h:67
array.h
This file contains the definition of Array.
XsecRecord::Fgrids
ArrayOfVector & Fgrids()
Get frequency grids of cross sections.
Definition: hitran_xsec.h:79
XsecRecord::Extract
void Extract(VectorView result, ConstVectorView f_grid, const Numeric &pressure, const Numeric &temperature, const Index &apply_tfit, const Verbosity &verbosity) const
Interpolate cross section data.
Definition: hitran_xsec.cc:151
XsecRecord::Xsecs
ArrayOfVector & Xsecs()
Get cross sections.
Definition: hitran_xsec.h:82
matpackI.h
Implementation of Matrix, Vector, and such stuff.
Array< Vector >
XsecRecord::mxsecs
ArrayOfVector mxsecs
Definition: hitran_xsec.h:121
ArrayOfXsecRecord
Array< XsecRecord > ArrayOfXsecRecord
Definition: hitran_xsec.h:126
messages.h
Declarations having to do with the four output streams.
my_basic_string< char >
XsecRecord::Coeffs
ConstVectorView Coeffs() const
Get coefficients.
Definition: hitran_xsec.h:49
XsecRecord::mreftemperature
Vector mreftemperature
Definition: hitran_xsec.h:119
VectorView
The VectorView class.
Definition: matpackI.h:610
XsecRecord::mfgrids
ArrayOfVector mfgrids
Definition: hitran_xsec.h:120
Numeric
NUMERIC Numeric
The type to use for all floating point numbers.
Definition: matpack.h:33
Verbosity
Definition: messages.h:49
bifstream
Binary output file stream class.
Definition: bifstream.h:42
XsecRecord
Definition: hitran_xsec.h:37
ARTS::Var::f_grid
Vector f_grid(Workspace &ws) noexcept
Definition: autoarts.h:3449
XsecRecord::RefPressure
Vector & RefPressure()
Get reference pressures.
Definition: hitran_xsec.h:73
bifstream.h
This file contains the class declaration of bifstream.
XsecRecord::SpeciesName
String SpeciesName() const
Return species name.
Definition: hitran_xsec.cc:53
XsecRecord::Fgrids
const ArrayOfVector & Fgrids() const
Get frequency grids of cross sections.
Definition: hitran_xsec.h:58
operator<<
std::ostream & operator<<(std::ostream &os, const XsecRecord &xd)
Definition: hitran_xsec.cc:350
XsecRecord::TemperatureSlope
const ArrayOfVector & TemperatureSlope() const
Get slope of temperature fit.
Definition: hitran_xsec.h:64
XsecRecord::TemperatureIntersect
ArrayOfVector & TemperatureIntersect()
Get intersect of temperature fit.
Definition: hitran_xsec.h:88
XsecRecord::SetSpecies
void SetSpecies(const Index species)
Set species name.
Definition: hitran_xsec.h:46
Index
INDEX Index
The type to use for all integer numbers and indices.
Definition: matpack.h:39
XsecRecord::mrefpressure
Vector mrefpressure
Definition: hitran_xsec.h:118
Vector
The Vector class.
Definition: matpackI.h:860
ConstVectorView
A constant view of a Vector.
Definition: matpackI.h:476
mystring.h
This file contains the definition of String, the ARTS string class.
XsecRecord::RefPressure
ConstVectorView RefPressure() const
Get reference pressures.
Definition: hitran_xsec.h:52
XsecRecord::mcoeffs
Vector mcoeffs
Definition: hitran_xsec.h:117
arts.h
The global header file for ARTS.
XsecRecord::TemperatureSlope
ArrayOfVector & TemperatureSlope()
Get slope of temperature fit.
Definition: hitran_xsec.h:85