ARTS  2.3.1285(git:92a29ea9-dirty)
radiation_field.cc File Reference

Radiation field calculations. More...

#include "radiation_field.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. More...
 
Numeric test_integrate_convolved (const Eigen::Ref< Eigen::VectorXcd > F, const Vector &f)
 Integrate the line shape. More...
 
Numeric test_integrate_zenith (const Vector &cosza, const Array< Index > &sorted_index)
 Integrate cos(za) over the angles. More...
 
Numeric integrate_convolved (const RadiationVector &I, const Eigen::VectorXcd &F, const Vector &f)
 Convolve intensity and line shape and integrate. More...
 
Numeric integrate_convolved (const TransmissionMatrix &T, const Eigen::VectorXcd &F, const Vector &f)
 Convolve transmission and line shape and integrate. More...
 
Numeric integrate_zenith (const VectorView j, const Vector &cosza, const Array< Index > &sorted_index)
 Convolve source function with 1D sphere and integrate. More...
 
Index grid_index_from_gp (const GridPos &gp)
 Get a discrete position from grid pos. More...
 
void sorted_index_of_ppath_field (ArrayOfArrayOfIndex &sorted_index, ArrayOfVector &cosza, const ArrayOfPpath &ppath_field)
 Get sorting of zenith angles in field of ppath. More...
 

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 30 of file radiation_field.cc.

References abs.

◆ 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 100 of file radiation_field.cc.

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

Referenced by 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 61 of file radiation_field.cc.

References i, n, and ConstVectorView::nelem().

◆ 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 74 of file radiation_field.cc.

References i, n, and ConstVectorView::nelem().

◆ integrate_zenith()

Numeric integrate_zenith ( const VectorView  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 87 of file radiation_field.cc.

References i, n, and ConstVectorView::nelem().

◆ 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 107 of file radiation_field.cc.

References data, DEG2RAD, get_sorted_indexes(), grid_index_from_gp(), i, max, ConstVectorView::nelem(), Absorption::nelem(), and Vector::resize().

◆ 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 39 of file radiation_field.cc.

References i, n, and ConstVectorView::nelem().

◆ 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 50 of file radiation_field.cc.

References i, n, and ConstVectorView::nelem().