ARTS 2.5.4 (git: 31ce4f0e)
xsec_fit.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 "array.h"
30#include "arts.h"
31#include "bifstream.h"
32#include "gridded_fields.h"
33#include "matpackI.h"
34#include "messages.h"
35#include "mystring.h"
36#include "species.h"
37
44 public:
46 [[nodiscard]] const Species::Species& Species() const { return mspecies; };
47
49 [[nodiscard]] String SpeciesName() const;
50
52 void SetSpecies(const Species::Species species) { mspecies = species; };
53
55 [[nodiscard]] Index Version() const { return mversion; };
56
58 void SetVersion(Index version);
59
71 void Extract(VectorView result,
72 const Vector& f_grid,
73 Numeric pressure,
74 Numeric temperature,
75 const Verbosity& verbosity) const;
76
77 /************ VERSION 2 *************/
79 [[nodiscard]] const Vector& FitMinPressures() const {
80 return mfitminpressures;
81 };
82
84 [[nodiscard]] const Vector& FitMaxPressures() const {
85 return mfitmaxpressures;
86 };
87
89 [[nodiscard]] const Vector& FitMinTemperatures() const {
91 };
92
94 [[nodiscard]] const Vector& FitMaxTemperatures() const {
96 };
97
99 [[nodiscard]] const ArrayOfGriddedField2& FitCoeffs() const {
100 return mfitcoeffs;
101 };
102
104 [[nodiscard]] Vector& FitMinPressures() { return mfitminpressures; };
105
107 [[nodiscard]] Vector& FitMaxPressures() { return mfitmaxpressures; };
108
110 [[nodiscard]] Vector& FitMinTemperatures() { return mfitmintemperatures; };
111
113 [[nodiscard]] Vector& FitMaxTemperatures() { return mfitmaxtemperatures; };
114
116 [[nodiscard]] ArrayOfGriddedField2& FitCoeffs() { return mfitcoeffs; };
117
118 friend std::ostream& operator<<(std::ostream& os, const XsecRecord& xd);
119
120 private:
122 void CalcXsec(VectorView& xsec,
123 Index dataset,
124 Numeric pressure,
125 Numeric temperature) const;
126
127 // /** Calculate temperature derivative of crosssections */
128 // void CalcDT(VectorView& xsec_dt,
129 // Index dataset,
130 // Numeric temperature) const;
131
132 // /** Calculate pressure derivative of crosssections */
133 // void CalcDP(VectorView& xsec_dp,
134 // Index dataset,
135 // Numeric pressure) const;
136
138 void RemoveNegativeXsec(VectorView& xsec) const;
139
140 static const Index P00 = 0;
141 static const Index P10 = 1;
142 static const Index P01 = 2;
143 static const Index P20 = 3;
144
146 Species::Species mspecies;
147 /* VERSION 2 */
153};
154
156
158 Species::Species species);
159
160#endif // HITRAN_XSEC_H
This file contains the definition of Array.
The global header file for ARTS.
This file contains the class declaration of bifstream.
The VectorView class.
Definition: matpackI.h:663
The Vector class.
Definition: matpackI.h:899
Hitran crosssection class.
Definition: xsec_fit.h:43
Vector mfitmaxpressures
Definition: xsec_fit.h:149
const Vector & FitMinPressures() const
Get mininum pressures from fit.
Definition: xsec_fit.h:79
Index mversion
Definition: xsec_fit.h:145
Vector & FitMinTemperatures()
Get mininum temperatures from fit.
Definition: xsec_fit.h:110
const Vector & FitMinTemperatures() const
Get mininum temperatures from fit.
Definition: xsec_fit.h:89
static const Index P00
Definition: xsec_fit.h:140
Vector mfitminpressures
Definition: xsec_fit.h:148
friend std::ostream & operator<<(std::ostream &os, const XsecRecord &xd)
Definition: xsec_fit.cc:234
void CalcXsec(VectorView &xsec, Index dataset, Numeric pressure, Numeric temperature) const
Calculate crosssections.
Definition: xsec_fit.cc:176
Vector & FitMaxTemperatures()
Get maximum temperatures.
Definition: xsec_fit.h:113
Vector mfitmintemperatures
Definition: xsec_fit.h:150
ArrayOfGriddedField2 & FitCoeffs()
Get coefficients.
Definition: xsec_fit.h:116
Species::Species mspecies
Definition: xsec_fit.h:146
Vector mfitmaxtemperatures
Definition: xsec_fit.h:151
ArrayOfGriddedField2 mfitcoeffs
Definition: xsec_fit.h:152
String SpeciesName() const
Return species name.
Definition: xsec_fit.cc:38
Vector & FitMinPressures()
Get mininum pressures from fit.
Definition: xsec_fit.h:104
void RemoveNegativeXsec(VectorView &xsec) const
Remove negative cross sections and adjust integral.
Definition: xsec_fit.cc:205
void SetVersion(Index version)
Set species name.
Definition: xsec_fit.cc:44
static const Index P20
Definition: xsec_fit.h:143
Index Version() const
Return species index.
Definition: xsec_fit.h:55
static const Index P10
Definition: xsec_fit.h:141
Vector & FitMaxPressures()
Get maximum pressures from fit.
Definition: xsec_fit.h:107
void Extract(VectorView result, const Vector &f_grid, Numeric pressure, Numeric temperature, const Verbosity &verbosity) const
Calculate hitran cross section data.
Definition: xsec_fit.cc:52
const Vector & FitMaxPressures() const
Get maximum pressures from fit.
Definition: xsec_fit.h:84
const Vector & FitMaxTemperatures() const
Get maximum temperatures.
Definition: xsec_fit.h:94
void SetSpecies(const Species::Species species)
Set species name.
Definition: xsec_fit.h:52
const ArrayOfGriddedField2 & FitCoeffs() const
Get coefficients.
Definition: xsec_fit.h:99
static const Index P01
Definition: xsec_fit.h:142
const Species::Species & Species() const
Return species index.
Definition: xsec_fit.h:46
Implementation of gridded fields.
Implementation of Matrix, Vector, and such stuff.
NUMERIC Numeric
The type to use for all floating point numbers.
Definition: matpack.h:33
INDEX Index
The type to use for all integer numbers and indices.
Definition: matpack.h:39
Declarations having to do with the four output streams.
This file contains the definition of String, the ARTS string class.
Index hitran_xsec_get_index(const ArrayOfXsecRecord &xsec_data, Species::Species species)
Get the index in xsec_fit_data for the given species.
Definition: xsec_fit.cc:226