ARTS  2.0.49
optproperties.cc File Reference

This file contains definitions and functions related to the optical properties of particles. More...

#include <cmath>
#include <stdexcept>
#include "arts.h"
#include "matpackVII.h"
#include "array.h"
#include "math_funcs.h"
#include "messages.h"
#include "logic.h"
#include "interpolation.h"
#include "optproperties.h"
#include "xml_io.h"

Go to the source code of this file.

Macros

#define F11   pha_mat_int[0]
 
#define F12   pha_mat_int[1]
 
#define F22   pha_mat_int[2]
 
#define F33   pha_mat_int[3]
 
#define F34   pha_mat_int[4]
 
#define F44   pha_mat_int[5]
 

Functions

void abs_vecTransform (VectorView abs_vec_lab, ConstTensor3View abs_vec_data, ConstVectorView za_datagrid, ConstVectorView aa_datagrid, const ParticleType &ptype, const Numeric &za_sca, const Numeric &aa_sca, const Verbosity &verbosity)
 Transformation of absorption vector. More...
 
void ext_matTransform (MatrixView ext_mat_lab, ConstTensor3View ext_mat_data, ConstVectorView za_datagrid, ConstVectorView aa_datagrid, const ParticleType &ptype, const Numeric &za_sca, const Numeric &aa_sca, const Verbosity &verbosity)
 Transformation of extinction matrix. More...
 
void pha_matTransform (MatrixView pha_mat_lab, ConstTensor5View pha_mat_data, ConstVectorView za_datagrid, ConstVectorView aa_datagrid, const ParticleType &ptype, const Index &za_sca_idx, const Index &aa_sca_idx, const Index &za_inc_idx, const Index &aa_inc_idx, ConstVectorView scat_za_grid, ConstVectorView scat_aa_grid, const Verbosity &verbosity)
 Transformation of phase matrix. More...
 
void interpolate_scat_angleDOIT (VectorView pha_mat_int, ConstTensor5View pha_mat_data, const Index &za_sca_idx, const Index &aa_sca_idx, const Index &za_inc_idx, const Index &aa_inc_idx, const ArrayOfArrayOfArrayOfArrayOfGridPos &scat_theta_gps, ConstTensor5View scat_theta_itws)
 Interpolate data on the scattering angle. More...
 
void interpolate_scat_angle (VectorView pha_mat_int, Numeric &theta_rad, ConstTensor5View pha_mat_data, ConstVectorView za_datagrid, const Numeric &za_sca, const Numeric &aa_sca, const Numeric &za_inc, const Numeric &aa_inc)
 Interpolate data on the scattering angle. More...
 
void pha_mat_labCalc (MatrixView pha_mat_lab, ConstVectorView pha_mat_int, const Numeric &za_sca, const Numeric &aa_sca, const Numeric &za_inc, const Numeric &aa_inc, const Numeric &theta_rad)
 Calculate phase matrix in laboratory coordinate system. More...
 
ostream & operator<< (ostream &os, const SingleScatteringData &)
 
ostream & operator<< (ostream &os, const ArrayOfSingleScatteringData &)
 
ostream & operator<< (ostream &os, const ScatteringMetaData &)
 
ostream & operator<< (ostream &os, const ArrayOfScatteringMetaData &)
 

Variables

const Numeric DEG2RAD
 
const Numeric RAD2DEG
 
const Numeric PI
 

Detailed Description

This file contains definitions and functions related to the optical properties of particles.

Author
Claudia Emde claud.nosp@m.ia.e.nosp@m.mde@d.nosp@m.lr.d.nosp@m.e
Date
Thu Mar 6 11:29:59 2003

Definition in file optproperties.cc.

Macro Definition Documentation

◆ F11

#define F11   pha_mat_int[0]

Definition at line 56 of file optproperties.cc.

◆ F12

#define F12   pha_mat_int[1]

Definition at line 57 of file optproperties.cc.

◆ F22

#define F22   pha_mat_int[2]

Definition at line 58 of file optproperties.cc.

◆ F33

#define F33   pha_mat_int[3]

Definition at line 59 of file optproperties.cc.

◆ F34

#define F34   pha_mat_int[4]

Definition at line 60 of file optproperties.cc.

◆ F44

#define F44   pha_mat_int[5]

Definition at line 61 of file optproperties.cc.

Function Documentation

◆ abs_vecTransform()

void abs_vecTransform ( VectorView  abs_vec_lab,
ConstTensor3View  abs_vec_data,
ConstVectorView  za_datagrid,
ConstVectorView  aa_datagrid,
const ParticleType ptype,
const Numeric za_sca,
const Numeric aa_sca,
const Verbosity verbosity 
)

Transformation of absorption vector.

In the single scattering database the data of the absorption vector is stored in different coordinate systems, depending on the type of hydrometeor species.

See AUG for information about different classifications of the hydrometeor species.

Output and Input:

Parameters
abs_vec_labAbsorption vector in Laboratory frame. Input:
abs_vec_dataAbsorption vector in database.
za_datagridZenith angle grid in the database.
aa_datagridZenith angle grid in the database.
ptypeClasiification of the hydometeor species.
za_scaZenith angle of scattered direction.
aa_scaAzimuth angle of scattered direction.
Author
Claudia Emde
Date
2003-05-24

Definition at line 85 of file optproperties.cc.

References CREATE_OUT0, gridpos(), interp(), interpweights(), joker, ConstTensor3View::ncols(), ConstVectorView::nelem(), ConstTensor3View::npages(), PARTICLE_TYPE_GENERAL, PARTICLE_TYPE_HORIZ_AL, and PARTICLE_TYPE_MACROS_ISO.

Referenced by opt_prop_sptFromData(), and opt_prop_sptFromMonoData().

◆ ext_matTransform()

void ext_matTransform ( MatrixView  ext_mat_lab,
ConstTensor3View  ext_mat_data,
ConstVectorView  za_datagrid,
ConstVectorView  aa_datagrid,
const ParticleType ptype,
const Numeric za_sca,
const Numeric aa_sca,
const Verbosity verbosity 
)

Transformation of extinction matrix.

In the single scattering database the data of the extinction matrix is stored in different coordinate systems, depending on the type of hydrometeor species.

See AUG for information about different classifications of the hydrometeor species.

Output and Input:

Parameters
ext_mat_labExtinction matrix in Laboratory frame. Input:
ext_mat_dataExtinction matrix in database.
za_datagridZenith angle grid in the database.
aa_datagridZenith angle grid in the database.
ptypeClasiification of the hydometeor species.
za_scaZenith angle of scattered direction.
aa_scaAzimuth angle of scattered direction.
Author
Claudia Emde
Date
2003-05-24

Definition at line 190 of file optproperties.cc.

References CREATE_OUT0, gridpos(), interp(), interpweights(), joker, ConstMatrixView::ncols(), ConstTensor3View::ncols(), ConstTensor3View::npages(), PARTICLE_TYPE_GENERAL, PARTICLE_TYPE_HORIZ_AL, and PARTICLE_TYPE_MACROS_ISO.

Referenced by opt_prop_sptFromData(), and opt_prop_sptFromMonoData().

◆ interpolate_scat_angle()

void interpolate_scat_angle ( VectorView  pha_mat_int,
Numeric theta_rad,
ConstTensor5View  pha_mat_data,
ConstVectorView  za_datagrid,
const Numeric za_sca,
const Numeric aa_sca,
const Numeric za_inc,
const Numeric aa_inc 
)

Interpolate data on the scattering angle.

This function is used for the transformation of the phase matrix from scattering frame to the laboratory frame for randomly oriented scattering media (case PTYPE_MACRO_ISO).

The scattering angle is calculated from the angles defining the directions of the incoming and scattered radiation. After that the data (which is stored in the data files as a function of the scattering angle) is interpolated on the calculated scattering angle.

Parameters
[out]pha_mat_intInterpolated phase matrix.
[out]theta_radScattering angle [rad].
[in]pha_mat_dataPhase matrix in database.
[in]za_datagridZenith angle grid in the database.
[in]za_scaZenith angle of scattered direction [rad].
[in]aa_scaAzimuth angle of scattered direction [rad].
[in]za_incZenith angle of incoming direction [rad].
[in]aa_incAzimuth angle of incoming direction [rad].
Author
Claudia Emde
Date
2003-08-19

Definition at line 614 of file optproperties.cc.

References abs, DEG2RAD, gridpos(), interp(), interpweights(), joker, ConstTensor5View::ncols(), PI, and RAD2DEG.

Referenced by pha_matTransform().

◆ interpolate_scat_angleDOIT()

void interpolate_scat_angleDOIT ( VectorView  pha_mat_int,
ConstTensor5View  pha_mat_data,
const Index za_sca_idx,
const Index aa_sca_idx,
const Index za_inc_idx,
const Index aa_inc_idx,
const ArrayOfArrayOfArrayOfArrayOfGridPos scat_theta_gps,
ConstTensor5View  scat_theta_itws 
)

Interpolate data on the scattering angle.

This function is used for the transformation of the phase matrix from scattering frame to the laboratory frame for randomly oriented scattering media (case PTYPE_MACRO_ISO).

The scattering angle is calculated from the angles defining the directions of the incoming and scattered radiation. After that the data (which is stored in the data files as a function of the scattering angle) is interpolated on the calculated scattering angle.

Parameters
[out]pha_mat_intInterpolated phase matrix.
[in]pha_mat_dataPhase matrix in database.
[in]za_sca_idxIndex of zenith angle of scattered direction.
[in]aa_sca_idxIndex of azimuth angle of scattered direction.
[in]za_inc_idxZenith angle of incoming direction.
[in]aa_inc_idxAzimuth angle of incoming direction.
[in]scat_theta_gpsArray of gridposizions for scattering angle.
[in]scat_theta_itwsInterpolation weights belonging to the scattering angles.
Author
Claudia Emde
Date
2003-05-13

Definition at line 565 of file optproperties.cc.

References interp(), and joker.

◆ operator<<() [1/4]

ostream& operator<< ( ostream &  os,
const ArrayOfScatteringMetaData  
)

Definition at line 910 of file optproperties.cc.

◆ operator<<() [2/4]

ostream& operator<< ( ostream &  os,
const ArrayOfSingleScatteringData  
)

Definition at line 897 of file optproperties.cc.

◆ operator<<() [3/4]

ostream& operator<< ( ostream &  os,
const ScatteringMetaData  
)

Definition at line 903 of file optproperties.cc.

◆ operator<<() [4/4]

ostream& operator<< ( ostream &  os,
const SingleScatteringData  
)

Definition at line 890 of file optproperties.cc.

◆ pha_mat_labCalc()

void pha_mat_labCalc ( MatrixView  pha_mat_lab,
ConstVectorView  pha_mat_int,
const Numeric za_sca,
const Numeric aa_sca,
const Numeric za_inc,
const Numeric aa_inc,
const Numeric theta_rad 
)

Calculate phase matrix in laboratory coordinate system.

Transformation function for the phase matrix for the case of randomly oriented particles (case PTYPE_MACRO_ISO).

Some of the formulas can be found in

Mishchenkho: "Scattering, Absorption and Emission of Light by Small Particles", Cambridge University Press, 2002 Capter 4

The full set of formulas will be documented in AUG.

Output and Input:

Parameters
pha_mat_labPhase matrix in laboratory frame. Input:
pha_mat_intInterpolated phase matrix.
za_scaZenith angle of scattered direction.
aa_scaAzimuth angle of scattered direction.
za_incZenith angle of incoming direction.
aa_incAzimuth angle of incoming direction.
theta_radScattering angle [rad].
Author
Claudia Emde
Date
2003-05-13

Definition at line 705 of file optproperties.cc.

References abs, ANGTOL, DEG2RAD, F11, F12, F22, F33, F34, F44, ConstMatrixView::ncols(), PI, and RAD2DEG.

Referenced by pha_mat_singleExtract(), and pha_matTransform().

◆ pha_matTransform()

void pha_matTransform ( MatrixView  pha_mat_lab,
ConstTensor5View  pha_mat_data,
ConstVectorView  za_datagrid,
ConstVectorView  aa_datagrid,
const ParticleType ptype,
const Index za_sca_idx,
const Index aa_sca_idx,
const Index za_inc_idx,
const Index aa_inc_idx,
ConstVectorView  scat_za_grid,
ConstVectorView  scat_aa_grid,
const Verbosity verbosity 
)

Transformation of phase matrix.

In the single scattering database the data of the phase matrix is stored in different coordinate systems, depending on the type of hydrometeor species.

See AUG for information about different classifications of the hydrometeor species.

Parameters
[in,out]pha_mat_labPhase matrix in Laboratory frame.
[in]pha_mat_dataPhase matrix in database.
[in]za_datagridZenith angle grid in the database.
[in]aa_datagridZenith angle grid in the database.
[in]ptypeClassification of the hydometeor species.
[in]za_sca_idxIndex of zenith angle of scattered direction.
[in]aa_sca_idxIndex of azimuth angle of scattered direction.
[in]za_inc_idxIndex of zenith angle of incoming direction.
[in]aa_inc_idxIndex of azimuth angle of incoming direction.
[in]scat_za_gridFIXME: DOC
[in]scat_aa_gridFIXME: DOC
Author
Claudia Emde
Date
2003-08-19

Definition at line 345 of file optproperties.cc.

References abs, CREATE_OUT0, gridpos(), interp(), interpolate_scat_angle(), interpweights(), joker, ConstMatrixView::ncols(), ConstTensor5View::ncols(), ConstTensor5View::npages(), PARTICLE_TYPE_GENERAL, PARTICLE_TYPE_HORIZ_AL, PARTICLE_TYPE_MACROS_ISO, and pha_mat_labCalc().

Referenced by DoitScatteringDataPrepare(), pha_mat_sptFromData(), and pha_mat_sptFromMonoData().

Variable Documentation

◆ DEG2RAD

const Numeric DEG2RAD
extern

◆ PI

const Numeric PI
extern

◆ RAD2DEG

const Numeric RAD2DEG
extern