ARTS  2.3.1285(git:92a29ea9-dirty)
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,
104  ConstVectorView f_grid,
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
INDEX Index
The type to use for all integer numbers and indices.
Definition: matpack.h:39
ArrayOfVector & Xsecs()
Get cross sections.
Definition: hitran_xsec.h:82
The VectorView class.
Definition: matpackI.h:610
const ArrayOfVector & TemperatureSlope() const
Get slope of temperature fit.
Definition: hitran_xsec.h:64
const ArrayOfVector & Fgrids() const
Get frequency grids of cross sections.
Definition: hitran_xsec.h:58
ArrayOfVector & Fgrids()
Get frequency grids of cross sections.
Definition: hitran_xsec.h:79
void SetSpecies(const Index species)
Set species name.
Definition: hitran_xsec.h:46
std::ostream & operator<<(std::ostream &os, const XsecRecord &xd)
Definition: hitran_xsec.cc:350
Declarations having to do with the four output streams.
ArrayOfVector & TemperatureIntersect()
Get intersect of temperature fit.
Definition: hitran_xsec.h:88
The Vector class.
Definition: matpackI.h:860
ArrayOfVector mfgrids
Definition: hitran_xsec.h:120
ConstVectorView RefPressure() const
Get reference pressures.
Definition: hitran_xsec.h:52
ArrayOfVector & TemperatureSlope()
Get slope of temperature fit.
Definition: hitran_xsec.h:85
This file contains the definition of Array.
ConstVectorView RefTemperature() const
Get reference temperatures.
Definition: hitran_xsec.h:55
ArrayOfVector mtintersect
Definition: hitran_xsec.h:123
The global header file for ARTS.
friend void xml_read_from_stream(std::istream &is_xml, XsecRecord &cr, bifstream *pbifs, const Verbosity &verbosity)
Binary output file stream class.
Definition: bifstream.h:42
This file contains the class declaration of bifstream.
Index mspecies
Definition: hitran_xsec.h:116
Vector mrefpressure
Definition: hitran_xsec.h:118
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
NUMERIC Numeric
The type to use for all floating point numbers.
Definition: matpack.h:33
Vector mcoeffs
Definition: hitran_xsec.h:117
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
ArrayOfVector mxsecs
Definition: hitran_xsec.h:121
Implementation of Matrix, Vector, and such stuff.
Index Species() const
Return species index.
Definition: hitran_xsec.h:40
Array< XsecRecord > ArrayOfXsecRecord
Definition: hitran_xsec.h:126
Vector & RefTemperature()
Get reference temperatures.
Definition: hitran_xsec.h:76
Vector mreftemperature
Definition: hitran_xsec.h:119
A constant view of a Vector.
Definition: matpackI.h:476
Vector & Coeffs()
Get coefficients.
Definition: hitran_xsec.h:70
const ArrayOfVector & Xsecs() const
Get cross sections.
Definition: hitran_xsec.h:61
ConstVectorView Coeffs() const
Get coefficients.
Definition: hitran_xsec.h:49
String SpeciesName() const
Return species name.
Definition: hitran_xsec.cc:53
ArrayOfVector mtslope
Definition: hitran_xsec.h:122
const ArrayOfVector & TemperatureIntersect() const
Get intersect of temperature fit.
Definition: hitran_xsec.h:67
Vector & RefPressure()
Get reference pressures.
Definition: hitran_xsec.h:73
This file contains the definition of String, the ARTS string class.