ARTS  2.2.66
tmatrix.h File Reference

Declarations for the T-Matrix interface. More...

#include "messages.h"
#include "optproperties.h"

Go to the source code of this file.

Functions

void calcSingleScatteringDataProperties (SingleScatteringData &ssd, ConstMatrixView ref_index_real, ConstMatrixView ref_index_imag, const Numeric equiv_radius=200, const Index np=-1, const Numeric aspect_ratio=1.000001, const Numeric precision=0.001)
 Calculate SingleScatteringData properties. More...
 
void tmatrix_ampld_test (const Verbosity &verbosity)
 T-Matrix validation test. More...
 
void tmatrix_tmd_test (const Verbosity &verbosity)
 T-Matrix validation test. More...
 
void calc_ssp_random_test (const Verbosity &verbosity)
 Single scattering properties calculation for randomly oriented particles. More...
 
void calc_ssp_fixed_test (const Verbosity &verbosity)
 Single scattering properties calculation for particles with fixed orientation. More...
 

Detailed Description

Declarations for the T-Matrix interface.

Author
Oliver Lemke
Date
2013-06-25

Definition in file tmatrix.h.

Function Documentation

◆ calc_ssp_fixed_test()

void calc_ssp_fixed_test ( const Verbosity verbosity)

Single scattering properties calculation for particles with fixed orientation.

Two cases are calculated. One with oblate particles which is equivalent to the following PyARTS case:

from PyARTS import arts_types
from PyARTS import constants
params = {'ptype': constants.PARTICLE_TYPE_HORIZ_AL,
          'f_grid': [230e9, 240e9],
          'T_grid': [220, 250],
          'za_grid': numpy.arange(0, 181, 10),
          'aa_grid': numpy.arange(0, 181, 10),
          'equiv_radius': 200, # equivalent volume radius
          'NP':-1, # -1 for spheroid, -2 for cylinder, positive for chebyshev
          'phase':'ice',
          'mrr': numpy.array([[1.78031135, 1.78150475], [1.78037238, 1.78147686]]),
          'mri': numpy.array([[0.00278706, 0.00507565], [0.00287245, 0.00523012]]),
          'aspect_ratio': 1.5}
s = arts_types.SingleScatteringData(params)
s.calc()
 

And one with prolate particles which is equivalent to the following PyARTS case:

from PyARTS import arts_types
from PyARTS import constants
params = {'ptype': constants.PARTICLE_TYPE_HORIZ_AL,
          'f_grid': [230e9, 240e9],
          'T_grid': [220, 250],
          'za_grid': numpy.arange(0, 181, 10),
          'aa_grid': numpy.arange(0, 181, 10),
          'equiv_radius': 200, # equivalent volume radius
          'NP':-1, # -1 for spheroid, -2 for cylinder, positive for chebyshev
          'phase':'ice',
          'mrr': numpy.array([[1.78031135, 1.78150475], [1.78037238, 1.78147686]]),
          'mri': numpy.array([[0.00278706, 0.00507565], [0.00287245, 0.00523012]]),
          'aspect_ratio': 0.7}
s = arts_types.SingleScatteringData(params)
s.calc()
 
Author
Oliver Lemke

Definition at line 1409 of file tmatrix.cc.

References SingleScatteringData::aa_grid, SingleScatteringData::abs_vec_data, calcSingleScatteringDataProperties(), CREATE_OUT0, SingleScatteringData::ext_mat_data, SingleScatteringData::f_grid, joker, ConstVectorView::nelem(), nlinspace(), SingleScatteringData::particle_type, PARTICLE_TYPE_HORIZ_AL, SingleScatteringData::pha_mat_data, SingleScatteringData::T_grid, and SingleScatteringData::za_grid.

Referenced by TMatrixTest().

◆ calc_ssp_random_test()

void calc_ssp_random_test ( const Verbosity verbosity)

Single scattering properties calculation for randomly oriented particles.

Two cases are calculated. One with oblate particles which is equivalent to the following PyARTS case:

from PyARTS import arts_types
params = {'ptype': constants.PARTICLE_TYPE_HORIZ_AL,
          'f_grid': [230e9, 240e9],
          'T_grid': [220, 250],
          'za_grid': numpy.arange(0, 181, 10),
          'aa_grid': numpy.arange(0, 181, 10),
          'equiv_radius': 200, # equivalent volume radius
          'NP':-1, # -1 for spheroid, -2 for cylinder, positive for chebyshev
          'phase':'ice',
          'mrr': numpy.array([[1.78031135, 1.78150475], [1.78037238, 1.78147686]]),
          'mri': numpy.array([[0.00278706, 0.00507565], [0.00287245, 0.00523012]]),
          'aspect_ratio': 1.5}
s = arts_types.SingleScatteringData(params)
s.calc()
 

And one with prolate particles which is equivalent to the following PyARTS case:

from PyARTS import arts_types
params = {'ptype': constants.PARTICLE_TYPE_HORIZ_AL,
          'f_grid': [230e9, 240e9],
          'T_grid': [220, 250],
          'za_grid': numpy.arange(0, 181, 10),
          'aa_grid': numpy.arange(0, 181, 10),
          'equiv_radius': 200, # equivalent volume radius
          'NP':-1, # -1 for spheroid, -2 for cylinder, positive for chebyshev
          'phase':'ice',
          'mrr': numpy.array([[1.78031135, 1.78150475], [1.78037238, 1.78147686]]),
          'mri': numpy.array([[0.00278706, 0.00507565], [0.00287245, 0.00523012]]),
          'aspect_ratio': 0.7}
s = arts_types.SingleScatteringData(params)
s.calc()
 
Author
Oliver Lemke

Definition at line 1351 of file tmatrix.cc.

References SingleScatteringData::aa_grid, SingleScatteringData::abs_vec_data, calcSingleScatteringDataProperties(), CREATE_OUT0, SingleScatteringData::ext_mat_data, SingleScatteringData::f_grid, joker, ConstVectorView::nelem(), nlinspace(), SingleScatteringData::particle_type, PARTICLE_TYPE_MACROS_ISO, SingleScatteringData::pha_mat_data, SingleScatteringData::T_grid, and SingleScatteringData::za_grid.

Referenced by TMatrixTest().

◆ calcSingleScatteringDataProperties()

void calcSingleScatteringDataProperties ( SingleScatteringData ssd,
ConstMatrixView  ref_index_real,
ConstMatrixView  ref_index_imag,
const Numeric  equiv_radius = 200,
const Index  np = -1,
const Numeric  aspect_ratio = 1.000001,
const Numeric  precision = 0.001 
)

Calculate SingleScatteringData properties.

Port of calc_SSP function from PyARTS.

Parameters
[in,out]ssdGrids given by ssd are used to calculate pha_mat_data, ext_mat_data and abs_vec_data
[in]ref_index_realVector with real parts of refractive index Number of rows must match elements in ssd.f_grid Number of cols must match elements in ssd.T_grid
[in]ref_index_imagVector with imaginary parts of refractive index
[in]equiv_radiusequivalent volume radius [micrometer]
[in]npParticle type (-1 for spheroid, -2 for cylinder)
[in]phaseParticle phase ("ice"), currently unused
[in]aspect_ratioAspect ratio of particles
[in]precisionAccuracy of the computations
Author
Oliver Lemke

Definition at line 927 of file tmatrix.cc.

References SingleScatteringData::aa_grid, SingleScatteringData::abs_vec_data, ampl_(), avgtmatrix_(), beta, calc_phamat(), SingleScatteringData::ext_mat_data, SingleScatteringData::f_grid, integrate_phamat_alpha10(), integrate_phamat_theta0_phi10(), integrate_phamat_theta0_phi_alpha6(), joker, ConstMatrixView::ncols(), ConstVectorView::nelem(), ConstMatrixView::nrows(), SingleScatteringData::particle_type, PARTICLE_TYPE_HORIZ_AL, PARTICLE_TYPE_MACROS_ISO, SingleScatteringData::pha_mat_data, PI, precision, Tensor7::resize(), Tensor5::resize(), SPEED_OF_LIGHT, SingleScatteringData::T_grid, tmatrix_fixed_orientation(), tmatrix_random_orientation(), and SingleScatteringData::za_grid.

Referenced by calc_ssp_fixed_test(), calc_ssp_random_test(), and scat_data_arrayFromMeta().

◆ tmatrix_ampld_test()

void tmatrix_ampld_test ( const Verbosity verbosity)

T-Matrix validation test.

Executes the standard test included with the double precision T-Matrix code for nonspherical particles in a fixed orientation. Should give the same as running the 3rdparty/tmatrix/tmatrix_ampld executable.

Author
Oliver Lemke

Definition at line 1189 of file tmatrix.cc.

References ampl_(), ampmat_to_phamat(), beta, CREATE_OUT0, and tmatrix_().

Referenced by TMatrixTest().

◆ tmatrix_tmd_test()

void tmatrix_tmd_test ( const Verbosity verbosity)

T-Matrix validation test.

Executes the standard test included with the double precision T-Matrix code for randomly oriented nonspherical particles. Should give the same as running the 3rdparty/tmatrix/tmatrix_tmd executable.

Author
Oliver Lemke

Definition at line 1256 of file tmatrix.cc.

References CREATE_OUT0, VectorView::get_c_array(), and tmd_().

Referenced by TMatrixTest().