Go to the documentation of this file.
31 const Numeric& value_that_should_be_unity) {
32 if (
std::abs(value_that_should_be_unity - 1.0) > 1e-4) {
33 std::ostringstream os;
34 os <<
"Failure in normalization:\n" << error_msg <<
"\n";
35 throw std::runtime_error(os.str());
44 for (
Index i = 0; i < n - 1; i++)
45 val += 0.5 * (f[i + 1] - f[i]) * (F[i].real() + F[i + 1].real());
55 for (
Index i = 0; i < n - 1; i++)
56 val += 0.5 * (cosza[sorted_index[i]] - cosza[sorted_index[i + 1]]);
62 const Eigen::VectorXcd& F,
67 for (
Index i = 0; i < n - 1; i++)
68 val += 0.5 * (f[i + 1] - f[i]) *
69 (I(i, 0) * F[i].real() + I(i + 1, 0) * F[i + 1].real());
75 const Eigen::VectorXcd& F,
80 for (
Index i = 0; i < n - 1; i++)
81 val += 0.5 * (f[i + 1] - f[i]) *
82 (T(i, 0, 0) * F[i].real() + T(i + 1, 0, 0) * F[i + 1].real());
93 for (
Index i = 0; i < n - 1; i++)
94 val += 0.25 * (cosza[sorted_index[i]] - cosza[sorted_index[i + 1]]) *
95 (j[sorted_index[i]] + j[sorted_index[i + 1]]);
120 for (
Index ip = 0; ip < path.np; ip++) {
122 zeniths_array[ind].push_back(path.los(ip, 0));
127 sorted_index.resize(nalt);
129 for (
Index i = 0; i < nalt; i++) {
133 for (
Index j = 0; j <
data.nelem(); j++)
data[j] = zeniths_array[i][j];
Array< Numeric > ArrayOfNumeric
An array of Numeric.
Numeric test_integrate_convolved(const Eigen::Ref< Eigen::VectorXcd > F, const Vector &f)
Integrate the line shape.
void sorted_index_of_ppath_field(ArrayOfArrayOfIndex &sorted_index, ArrayOfVector &cosza, const ArrayOfPpath &ppath_field)
Get sorting of zenith angles in field of ppath.
G0 G2 FVC Y DV Numeric Numeric Numeric Zeeman LowerQuantumNumbers void * data
const Numeric DEG2RAD
Global constant, conversion from degrees to radians.
Index nelem(const Lines &l)
Number of lines.
void get_sorted_indexes(ArrayOfIndex &sorted, const T &data)
get_sorted_indexes
Numeric integrate_convolved(const RadiationVector &I, const Eigen::VectorXcd &F, const Vector &f)
Convolve intensity and line shape and integrate.
Numeric test_integrate_zenith(const Vector &cosza, const Array< Index > &sorted_index)
Integrate cos(za) over the angles.
Radiation field calculations.
Index nelem() const
Returns the number of elements.
Index grid_index_from_gp(const GridPos &gp)
Get a discrete position from grid pos.
NUMERIC Numeric
The type to use for all floating point numbers.
ArrayOfPpath ppath_field(Workspace &ws) noexcept
Structure to store a grid position.
Radiation Vector for Stokes dimension 1-4.
INDEX Index
The type to use for all integer numbers and indices.
Class to keep track of Transmission Matrices for Stokes Dim 1-4.
void error_in_integrate(const String &error_msg, const Numeric &value_that_should_be_unity)
Throws an error if integration values are bad.
Contains sorting routines.
Numeric integrate_zenith(const VectorView j, const Vector &cosza, const Array< Index > &sorted_index)
Convolve source function with 1D sphere and integrate.