ARTS  2.4.0(git:4fb77825)
raw.h
Go to the documentation of this file.
1 /* Copyright (C) 2020
2  * Richard Larsson <larsson@mps.mpg.de>
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 
27 #ifndef RAW_H
28 #define RAW_H
29 
30 #include "covariance_matrix.h"
31 #include "matpackI.h"
32 
44 constexpr Numeric calibration(Numeric pc, Numeric pa, Numeric ph, Numeric tc, Numeric th) noexcept
45 {
46  return tc + (th - tc) * (pa - pc) / (ph - pc);
47 }
48 
59 constexpr Numeric systemtemp(Numeric pc, Numeric ph, Numeric tc, Numeric th) noexcept
60 {
61  return (th*pc - tc*ph) / (ph - pc);
62 }
63 
64 namespace linalg {
74 void avg(VectorView y, const ArrayOfVector& ys, const Index start=0, const Index end=-1);
75 
86 void std(VectorView std, const Vector& y, const ArrayOfVector& ys, const Index start=0, const Index end=-1);
87 
98 void var(VectorView var, const Vector& y, const ArrayOfVector& ys, const Index start=0, const Index end=-1);
99 
110 void cov(MatrixView cov, const Vector& y, const ArrayOfVector& ys, const Index start=0, const Index end=-1);
111 
120 }; // linalg
121 
122 #endif // RAW_H
MatrixView
The MatrixView class.
Definition: matpackI.h:1093
linalg::std
void std(VectorView std, const Vector &y, const ArrayOfVector &ys, const Index start=0, const Index end=-1)
Compute the standard deviation of the ranged ys.
Definition: raw.cc:66
ARTS::Var::y
Vector y(Workspace &ws) noexcept
Definition: autoarts.h:7401
systemtemp
constexpr Numeric systemtemp(Numeric pc, Numeric ph, Numeric tc, Numeric th) noexcept
Computes the linear receiver temperature formula.
Definition: raw.h:59
covariance_matrix.h
Header files of CovarianceMatrix class.
calibration
constexpr Numeric calibration(Numeric pc, Numeric pa, Numeric ph, Numeric tc, Numeric th) noexcept
Computes the linear calibration formula.
Definition: raw.h:44
matpackI.h
Implementation of Matrix, Vector, and such stuff.
Array< Vector >
linalg::median
Numeric median(const ConstVectorView v, const ArrayOfIndex &pos=ArrayOfIndex{})
Get the median of the vector in the range.
Definition: raw.cc:90
VectorView
The VectorView class.
Definition: matpackI.h:610
Numeric
NUMERIC Numeric
The type to use for all floating point numbers.
Definition: matpack.h:33
linalg::var
void var(VectorView var, const Vector &y, const ArrayOfVector &ys, const Index start=0, const Index end=-1)
Compute the variance of the ranged ys.
Definition: raw.cc:49
Zeeman::end
constexpr Rational end(Rational Ju, Rational Jl, Polarization type) noexcept
Gives the largest M for a polarization type of this transition.
Definition: zeemandata.h:108
linalg::avg
void avg(VectorView y, const ArrayOfVector &ys, const Index start=0, const Index end=-1)
Compute the average of the ranged ys.
Definition: raw.cc:32
Zeeman::start
constexpr Rational start(Rational Ju, Rational Jl, Polarization type) noexcept
Gives the lowest M for a polarization type of this transition.
Definition: zeemandata.h:77
Index
INDEX Index
The type to use for all integer numbers and indices.
Definition: matpack.h:39
Vector
The Vector class.
Definition: matpackI.h:860
linalg
Definition: raw.h:64
ConstVectorView
A constant view of a Vector.
Definition: matpackI.h:476
linalg::cov
void cov(MatrixView cov, const Vector &y, const ArrayOfVector &ys, const Index start=0, const Index end=-1)
Compute the covariance matrix of the ranged ys.
Definition: raw.cc:72