ARTS 2.5.11 (git: 725533f0)
radiation_field.cc File Reference

Radiation field calculations. More...

#include "radiation_field.h"
#include "arts_conversions.h"
#include "sorting.h"

Go to the source code of this file.

Functions

void error_in_integrate (const String &error_msg, const Numeric &value_that_should_be_unity)
 Throws an error if integration values are bad.
 
Numeric test_integrate_convolved (const Eigen::Ref< Eigen::VectorXcd > &F, const Vector &f)
 Integrate the line shape.
 
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.
 
Numeric integrate_convolved (const TransmissionMatrix &T, const Eigen::VectorXcd &F, const Vector &f)
 Convolve transmission and line shape and integrate.
 
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.
 
void sorted_index_of_ppath_field (ArrayOfArrayOfIndex &sorted_index, ArrayOfVector &cosza, const ArrayOfPpath &ppath_field)
 Get sorting of zenith angles in field of ppath.
 

Detailed Description

Radiation field calculations.

Author
Richard Larsson
Date
2019-09-04

Definition in file radiation_field.cc.

Function Documentation

◆ error_in_integrate()

void error_in_integrate ( const String error_msg,
const Numeric &  value_that_should_be_unity 
)

Throws an error if integration values are bad.

Parameters
[in]error_msgError message to print
[in]value_that_should_be_unityCheck value

Definition at line 13 of file radiation_field.cc.

References ARTS_USER_ERROR_IF.

Referenced by line_irradianceCalcForSingleSpeciesNonOverlappingLinesPseudo2D().

◆ grid_index_from_gp()

Index grid_index_from_gp ( const GridPos gp)

Get a discrete position from grid pos.

Assumes the grid pos has been set to extend over the path

Parameters
[in]gpGrid position
Returns
Index Position

Definition at line 80 of file radiation_field.cc.

References GridPos::fd, and GridPos::idx.

Referenced by line_irradianceCalcForSingleSpeciesNonOverlappingLinesPseudo2D(), and sorted_index_of_ppath_field().

◆ integrate_convolved() [1/2]

Numeric integrate_convolved ( const RadiationVector I,
const Eigen::VectorXcd &  F,
const Vector &  f 
)

Convolve intensity and line shape and integrate.

f must be sorted and in same order as F and I

F must be normalized

Parameters
[in]IIntensity vector
[in]FLine shape normalized
[in]fFrequency grid
Returns
Numeric Integrated absorption

Definition at line 41 of file radiation_field.cc.

Referenced by line_irradianceCalcForSingleSpeciesNonOverlappingLinesPseudo2D().

◆ integrate_convolved() [2/2]

Numeric integrate_convolved ( const TransmissionMatrix T,
const Eigen::VectorXcd &  F,
const Vector &  f 
)

Convolve transmission and line shape and integrate.

f must be sorted and in same order as F and T

F must be normalized

Only consider [0, 0] position of T

Parameters
[in]TTransmission matrix
[in]FLine shape normalized
[in]fFrequency grid
Returns
Numeric Integrated absorption

Definition at line 54 of file radiation_field.cc.

◆ integrate_zenith()

Numeric integrate_zenith ( const ConstVectorView &  j,
const Vector &  cosza,
const Array< Index > &  sorted_index 
)

Convolve source function with 1D sphere and integrate.

Parameters
[in]jSource vector
[in]coszacos of zenith angle
[in]sorted_indexOrder of zenith angles
Returns
Numeric Integrated source function

Definition at line 67 of file radiation_field.cc.

Referenced by line_irradianceCalcForSingleSpeciesNonOverlappingLinesPseudo2D().

◆ sorted_index_of_ppath_field()

void sorted_index_of_ppath_field ( ArrayOfArrayOfIndex sorted_index,
ArrayOfVector &  cosza,
const ArrayOfPpath ppath_field 
)

Get sorting of zenith angles in field of ppath.

Parameters
[out]sorted_indexOrder of zenith angles
[out]coszacos of zenith angle
[in]ppath_fieldAs WSV

Definition at line 86 of file radiation_field.cc.

References Conversion::cosd(), get_sorted_indexes(), and grid_index_from_gp().

Referenced by line_irradianceCalcForSingleSpeciesNonOverlappingLinesPseudo2D().

◆ test_integrate_convolved()

Numeric test_integrate_convolved ( const Eigen::Ref< Eigen::VectorXcd > &  F,
const Vector &  f 
)

Integrate the line shape.

f must be sorted and in same order as F

Return should be 1.0 for a full line shape

Parameters
[in]FLine shape
[in]fFrequency grod
Returns
Numeric Integrated line shape

Definition at line 19 of file radiation_field.cc.

Referenced by line_irradianceCalcForSingleSpeciesNonOverlappingLinesPseudo2D().

◆ test_integrate_zenith()

Numeric test_integrate_zenith ( const Vector &  cosza,
const Array< Index > &  sorted_index 
)

Integrate cos(za) over the angles.

sorted_index must be in same order as cosza

Return should be 1.0 for a full set of zenith angles

Parameters
[in]coszacos of zenith angle
[in]sorted_indexOrder of zenith angles
Returns
Numeric Integration

Definition at line 30 of file radiation_field.cc.

Referenced by line_irradianceCalcForSingleSpeciesNonOverlappingLinesPseudo2D().