ARTS  2.3.1285(git:92a29ea9-dirty)
linerecord_partitionfunctiondata.h
Go to the documentation of this file.
1 /* Copyright (C) 2015
2 Richard Larsson <ric.larsson@gmail.com>
3 
4 This program is free software; you can redistribute it and/or modify it
5 under the terms of the GNU General Public License as published by the
6 Free Software Foundation; either version 2, or (at your option) any
7 later version.
8 
9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details.
13 
14 You should have received a copy of the GNU General Public License
15 along with this program; if not, write to the Free Software
16 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
17 USA. */
18 
26 #ifndef linerecord_partitionfunctiondata_h
27 #define linerecord_partitionfunctiondata_h
28 
29 #include <stdexcept>
30 #include "matpackI.h"
31 #include "array.h"
32 #include "mystring.h"
33 
35 {
36 public:
37 
38  enum PF_Type {
39  PF_NONE, // Reserved for no linerecord partition function data. Defaults to abs_species partition function data
40  PF_Coeff // Reserved for coefficients method similar to default
41  };
42 
43  // Defining an object
45 
46  // Use these to get the raw data from this class
47  const PF_Type& Type() const {return mtype;}
48  const ArrayOfVector& Data() const {return mdata;}
49  const Index& GetNelem() const {return mnelem;}
50 
51  // Use these to return data in the format required by the line shape calculator
52  Index GetPartitionFunctionDataParams(Numeric& part, const Numeric& line_t0, const Numeric& atm_t) const;
53  void GetCoeff(Numeric& part, const Numeric& line_t0, const Numeric& atm_t) const;
54 
55  // Use these to read data from XML-formats
56  void StorageTag2SetType(const String& input);
57  void SetNelem(const Index& input) {mnelem = input;}
59  void SetDataFromVectorWithKnownType(const Vector& input);
60  void Vector2CoeffData(const Vector& input);
61  void Vector2NoneData(const Vector&);
62 
63  // Use these to save output vector in ARTS catalog
64  void GetVectorFromData(Vector& output) const;
65  void CoeffData2Vector(Vector& output) const;
66  String Type2StorageTag() const;
67 
68 private:
69  // mtype identifies the type of partition function and mdata should contain the required data
73 };
74 
75 #endif // linerecord_partitionfunctiondata_h
INDEX Index
The type to use for all integer numbers and indices.
Definition: matpack.h:39
const ArrayOfVector & Data() const
void CoeffData2Vector(Vector &output) const
The Vector class.
Definition: matpackI.h:860
void GetVectorFromData(Vector &output) const
This file contains the definition of Array.
NUMERIC Numeric
The type to use for all floating point numbers.
Definition: matpack.h:33
Index GetPartitionFunctionDataParams(Numeric &part, const Numeric &line_t0, const Numeric &atm_t) const
Implementation of Matrix, Vector, and such stuff.
void GetCoeff(Numeric &part, const Numeric &line_t0, const Numeric &atm_t) const
void Vector2CoeffData(const Vector &input)
void SetDataFromVectorWithKnownType(const Vector &input)
void StorageTag2SetType(const String &input)
This file contains the definition of String, the ARTS string class.