14 const Numeric& value_that_should_be_unity) {
16 "Failure in normalization:\n", error_msg,
"\n")
23 const Index n = f.nelem();
24 for (Index i = 0; i < n - 1; i++)
25 val += 0.5 * (f[i + 1] - f[i]) * (F[i].real() + F[i + 1].real());
34 const Index n = cosza.nelem();
35 for (Index i = 0; i < n - 1; i++)
36 val += 0.5 * (cosza[sorted_index[i]] - cosza[sorted_index[i + 1]]);
42 const Eigen::VectorXcd& F,
46 const Index n = f.nelem();
47 for (Index i = 0; i < n - 1; i++)
48 val += 0.5 * (f[i + 1] - f[i]) *
49 (I(i, 0) * F[i].real() + I(i + 1, 0) * F[i + 1].real());
55 const Eigen::VectorXcd& F,
59 const Index n = f.nelem();
60 for (Index i = 0; i < n - 1; i++)
61 val += 0.5 * (f[i + 1] - f[i]) *
62 (T(i, 0, 0) * F[i].real() + T(i + 1, 0, 0) * F[i + 1].real());
72 const Index n = cosza.nelem();
73 for (Index i = 0; i < n - 1; i++)
74 val += 0.25 * (cosza[sorted_index[i]] - cosza[sorted_index[i + 1]]) *
75 (j[sorted_index[i]] + j[sorted_index[i + 1]]);
90 for (
auto& path : ppath_field)
96 for (
auto& path : ppath_field) {
97 for (Index ip = 0; ip < path.np; ip++) {
99 zeniths_array[ind].push_back(path.los(ip, 0));
104 sorted_index.resize(nalt);
106 for (Index i = 0; i < nalt; i++) {
107 Vector& data = cosza[i];
108 data.resize(zeniths_array[i].nelem());
110 for (Index j = 0; j < data.nelem(); j++) data[j] = zeniths_array[i][j];
113 for (Index j = 0; j < data.nelem(); j++)
Array< Numeric > ArrayOfNumeric
An array of Numeric.
This can be used to make arrays out of anything.
#define ARTS_USER_ERROR_IF(condition,...)
auto cosd(auto x) noexcept
Returns the cosine of the deg2rad of the input.
void sorted_index_of_ppath_field(ArrayOfArrayOfIndex &sorted_index, ArrayOfVector &cosza, const ArrayOfPpath &ppath_field)
Get sorting of zenith angles in field of ppath.
Numeric test_integrate_convolved(const Eigen::Ref< Eigen::VectorXcd > &F, const Vector &f)
Integrate the line shape.
void error_in_integrate(const String &error_msg, const Numeric &value_that_should_be_unity)
Throws an error if integration values are bad.
Numeric integrate_zenith(const ConstVectorView &j, const Vector &cosza, const Array< Index > &sorted_index)
Convolve source function with 1D sphere and integrate.
Index grid_index_from_gp(const GridPos &gp)
Get a discrete position from grid pos.
Numeric test_integrate_zenith(const Vector &cosza, const Array< Index > &sorted_index)
Integrate cos(za) over the angles.
Numeric integrate_convolved(const RadiationVector &I, const Eigen::VectorXcd &F, const Vector &f)
Convolve intensity and line shape and integrate.
Radiation field calculations.
Contains sorting routines.
void get_sorted_indexes(ArrayOfIndex &sorted, const T &data)
get_sorted_indexes
Structure to store a grid position.
std::array< Numeric, 2 > fd
Radiation Vector for Stokes dimension 1-4.
Class to keep track of Transmission Matrices for Stokes Dim 1-4.