48 const Vector& refellipsoid,
49 const Tensor3& surface_props_data,
50 const Agenda& ppath_agenda,
51 const Agenda& iy_main_agenda,
52 const Agenda& iy_space_agenda,
53 const Agenda& iy_surface_agenda,
54 const Agenda& iy_cloudbox_agenda,
55 const Agenda& propmat_clearsky_agenda,
62 if (abs_lines_per_species.
nelem() not_eq 1)
63 throw std::runtime_error(
"Only for one species...");
65 throw std::runtime_error(
"Must hit line center, nf % 2 must be 1.");
78 for (
auto& lines: abs_lines_per_species) {
79 for (
auto& band: lines) {
80 for (
Index k=0; k<band.NumLines(); k++) {
81 nlinspace(f_grid[
Range(il * nf, nf)], band.F0(k) * (1 - df), band.F0(k) * (1 + df), nf);
110 for (
Index ip = 0; ip < np; ip++)
112 "Your lineshape integration does normalize. Increase nf and decrease df until it does.",
118 additional_source_field,
127 propmat_clearsky_agenda);
131 for (
Index ip=0; ip<np; ip++) {
133 for (
auto& lines: abs_lines_per_species) {
134 for (
auto& band: lines) {
136 const Vector vmrs = band.BroadeningSpeciesVMR(vmr_field(
joker, ip, 0, 0), abs_species);
137 for (
Index k=0; k<band.NumLines(); k++) {
138 const auto X = band.ShapeParameters(k, t_field(ip, 0, 0), p_grid[ip], vmrs);
140 band.Line(k), t_field(ip, 0, 0), 0, 0, doppler_constant, X,
141 band.LineShapeType(), band.Mirroring(), band.Normalization());
147 for (
auto& aols : lineshapes)
148 for (
auto& ls : aols)
150 "Your lineshape integration does not normalize. Increase nf and decrease df until it does.",
157 const Ppath& path = ppath_field[
i];
158 counted_path_index[
i].resize(path.
np);
159 for (
Index ip_path = 0; ip_path < path.
np; ip_path++) {
161 counted_path_index[
i][ip_path] = counter[ip_grid];
166 line_irradiance =
Matrix(nl, np, 0.0);
167 line_transmission =
Tensor3(1, nl, np, 0.0);
171 line_radiance[
i].resize(sorted_index[
i].
nelem(), nl);
174 Agenda l_iy_main_agenda(iy_main_agenda);
175 Agenda l_iy_space_agenda(iy_space_agenda);
176 Agenda l_iy_surface_agenda(iy_surface_agenda);
177 Agenda l_iy_cloudbox_agenda(iy_cloudbox_agenda);
179 #pragma omp parallel for if (not arts_omp_in_parallel()) \ 180 schedule(guided) default(shared) firstprivate(l_ws, \ 183 l_iy_surface_agenda, \ 184 l_iy_cloudbox_agenda,\ 187 const Ppath& path = ppath_field[
i];
201 additional_source_field,
209 l_iy_cloudbox_agenda,
213 for (
Index ip_path = 0; ip_path < path.
np; ip_path++) {
215 for (il = 0; il < nl; il++)
216 line_radiance[ip_grid](counted_path_index[
i][ip_path], il) =
218 lvl_rad[ip_path], lineshapes[il][ip_grid], f_grid);
222 for (
Index ip = 0; ip < np; ip++) {
223 for (il = 0; il < nl; il++) {
225 cos_zenith_angles[ip],
233 for (
Index ip = 0; ip < np; ip++)
234 for (il = 0; il < nl; il++)
236 transmat_field(ip, 0, 0), lineshapes[il][ip], f_grid);
INDEX Index
The type to use for all integer numbers and indices.
Numeric test_integrate_zenith(const Vector &cosza, const Array< Index > &sorted_index)
Integrate cos(za) over the angles.
Vector vmrs(const ConstVectorView &atmospheric_vmrs, const ArrayOfArrayOfSpeciesTag &atmospheric_species, const QuantumIdentifier &self, const ArrayOfSpeciesTag &lineshape_species, bool self_in_list, bool bath_in_list, Type type)
Returns a VMR vector for this model's main calculations.
Index nelem() const
Number of elements.
Numeric test_integrate_convolved(const Eigen::Ref< Eigen::VectorXcd > F, const Vector &f)
Integrate the line shape.
Implements a propagation matrix field.
Array< RetrievalQuantity > ArrayOfRetrievalQuantity
Creates a 3D field of a base unit.
void emission_from_propmat_field(Workspace &ws, ArrayOfRadiationVector &lvl_rad, ArrayOfRadiationVector &src_rad, ArrayOfTransmissionMatrix &lyr_tra, ArrayOfTransmissionMatrix &tot_tra, const FieldOfPropagationMatrix &propmat_field, const FieldOfStokesVector &absorption_field, const FieldOfStokesVector &additional_source_field, const Vector &f_grid, const Tensor3 &t_field, const EnergyLevelMap &nlte_field, const Ppath &ppath, const Agenda &iy_main_agenda, const Agenda &iy_space_agenda, const Agenda &iy_surface_agenda, const Agenda &iy_cloudbox_agenda, const Tensor3 &surface_props_data, const Verbosity &verbosity)
Computes the radiation and transmission from fields of atmospheric propagation.
invlib::Vector< ArtsVector > Vector
invlib wrapper type for ARTS vectors.
Index nelem() const
Returns the number of elements.
void ppath_fieldFromDownUpLimbGeoms(Workspace &ws, ArrayOfPpath &ppath_field, const Agenda &ppath_agenda, const Numeric &ppath_lmax, const Numeric &ppath_lraytrace, const Index &atmgeom_checked, const Tensor3 &z_field, const Vector &f_grid, const Index &cloudbox_on, const Index &cloudbox_checked, const Index &ppath_inside_cloudbox_do, const Vector &rte_pos, const Vector &rte_los, const Vector &rte_pos2, const Vector &refellipsoid, const Index &atmosphere_dim, const Index &zenith_angles_per_position, const Verbosity &verbosity)
WORKSPACE METHOD: ppath_fieldFromDownUpLimbGeoms.
Numeric integrate_convolved(const RadiationVector &I, const Eigen::VectorXcd &F, const Vector &f)
Convolve intensity and line shape and integrate.
Stuff related to lineshape functions.
The global header file for ARTS.
Numeric integrate_zenith(const VectorView j, const Vector &cosza, const Array< Index > &sorted_index)
Convolve source function with 1D sphere and integrate.
void nlinspace(Vector &x, const Numeric start, const Numeric stop, const Index n)
nlinspace
NUMERIC Numeric
The type to use for all floating point numbers.
Declarations required for the calculation of absorption coefficients.
Radiation field calculations.
Propagation path structure and functions.
void field_of_propagation(Workspace &ws, FieldOfPropagationMatrix &propmat_field, FieldOfStokesVector &absorption_field, FieldOfStokesVector &additional_source_field, const Index &stokes_dim, const Vector &f_grid, const Vector &p_grid, const Tensor3 &z_field, const Tensor3 &t_field, const EnergyLevelMap &nlte_field, const Tensor4 &vmr_field, const ArrayOfRetrievalQuantity &jacobian_quantities, const Agenda &propmat_clearsky_agenda)
Creates a field of propagation matrices, absorption vectors, and source vectors.
void set_lineshape(Eigen::Ref< Eigen::VectorXcd > F, const Eigen::Ref< const Eigen::VectorXd > f_grid, const Absorption::SingleLine &line, const Numeric &temperature, const Numeric &zeeman_df, const Numeric &magnetic_magnitude, const Numeric &doppler_constant, const LineShape::Output &lso, const LineShape::Type lineshape_type, const Absorption::MirroringType mirroring_type, const Absorption::NormalizationType norm_type)
Sets the lineshape normalized to unity.
FieldOfTransmissionMatrix transmat_field_calc_from_propmat_field(const FieldOfPropagationMatrix &propmat_field, const Numeric &r)
Get a field of transmission matrices from the propagation matrix field.
Index np
Number of points describing the ppath.
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 DopplerConstant(Numeric T, Numeric mass)
Returns the frequency-independent part of the Doppler broadening.
Index nelem(const Lines &l)
Number of lines.
The structure to describe a propagation path and releated quantities.
Header file for helper functions for OpenMP.
Index grid_index_from_gp(const GridPos &gp)
Get a discrete position from grid pos.
ComplexConstMatrixViewMap MapToEigen(const ConstComplexMatrixView &A)
invlib::Matrix< ArtsMatrix > Matrix
invlib wrapper type for ARTS matrices.
This file contains declerations of functions of physical character.
void line_irradianceCalcForSingleSpeciesNonOverlappingLinesPseudo2D(Workspace &ws, Matrix &line_irradiance, Tensor3 &line_transmission, const ArrayOfArrayOfSpeciesTag &abs_species, const ArrayOfArrayOfAbsorptionLines &abs_lines_per_species, const EnergyLevelMap &nlte_field, const Tensor4 &vmr_field, const Tensor3 &t_field, const Tensor3 &z_field, const Vector &p_grid, const Vector &refellipsoid, const Tensor3 &surface_props_data, const Agenda &ppath_agenda, const Agenda &iy_main_agenda, const Agenda &iy_space_agenda, const Agenda &iy_surface_agenda, const Agenda &iy_cloudbox_agenda, const Agenda &propmat_clearsky_agenda, const Numeric &df, const Index &nz, const Index &nf, const Numeric &r, const Verbosity &verbosity)
WORKSPACE METHOD: line_irradianceCalcForSingleSpeciesNonOverlappingLinesPseudo2D. ...
ArrayOfGridPos gp_p
Index position with respect to the pressure grid.
void error_in_integrate(const String &error_msg, const Numeric &value_that_should_be_unity)
Throws an error if integration values are bad.