ARTS 2.5.9 (git: 825fa5f2)
Go to the documentation of this file.
1/* Copyright (C) 2003-2012 Claudia Emde <>
3 This program is free software; you can redistribute it and/or modify it
4 under the terms of the GNU General Public License as published by the
5 Free Software Foundation; either version 2, or (at your option) any
6 later version.
8 This program is distributed in the hope that it will be useful,
9 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 GNU General Public License for more details.
13 You should have received a copy of the GNU General Public License
14 along with this program; if not, write to the Free Software
15 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
16 USA. */
19 === File description
20 ===========================================================================*/
33#ifndef optproperties_h
34#define optproperties_h
36#include "gridded_fields.h"
37#include "matpackVII.h"
38#include "messages.h"
39#include "mystring.h"
40#include "propagationmatrix.h"
43//structure (a scattering element).
52enum PType : Index {
69 === The SingleScatteringData structure
70 ===========================================================================*/
90 friend ostream& operator<<(ostream& os, const SingleScatteringData& ssd);
97 === The ScatteringMetaData structure
98 ===========================================================================*/
116 friend ostream& operator<<(ostream& os, const ScatteringMetaData& ssd);
122// General functions:
123// =============================================================
125void opt_prop_Bulk( //Output
126 Tensor5& ext_mat,
127 Tensor4& abs_vec,
128 Index& ptype,
129 //Input
130 const ArrayOfTensor5& ext_mat_ss,
131 const ArrayOfTensor4& abs_vec_ss,
132 const ArrayOfIndex& ptypes_ss);
134void opt_prop_ScatSpecBulk( //Output
135 ArrayOfTensor5& ext_mat,
136 ArrayOfTensor4& abs_vec,
137 ArrayOfIndex& ptype,
138 //Input
139 const ArrayOfArrayOfTensor5& ext_mat_se,
140 const ArrayOfArrayOfTensor4& abs_vec_se,
141 const ArrayOfArrayOfIndex& ptypes_se,
142 ConstMatrixView pnds,
143 ConstMatrixView t_ok);
145void opt_prop_NScatElems( //Output
146 ArrayOfArrayOfTensor5& ext_mat,
147 ArrayOfArrayOfTensor4& abs_vec,
148 ArrayOfArrayOfIndex& ptypes,
149 Matrix& t_ok,
150 //Input
151 const ArrayOfArrayOfSingleScatteringData& scat_data,
152 const Index& stokes_dim,
153 const Vector& T_array,
154 const Matrix& dir_array,
155 const Index& f_index,
156 const Index& t_interp_order = 1);
158void opt_prop_1ScatElem( //Output
159 Tensor5View ext_mat,
160 Tensor4View abs_vec,
161 Index& ptype,
162 VectorView t_ok,
163 //Input
164 const SingleScatteringData& ssd,
165 const Vector& T_array,
166 const Matrix& dir_array,
167 const Index& f_index,
168 const Index& t_interp_order = 1);
170void ext_mat_SSD2Stokes( //Output
171 MatrixView ext_mat_stokes,
172 //Input
173 ConstVectorView ext_mat_ssd,
174 const Index& stokes_dim,
175 const Index& ptype);
177void abs_vec_SSD2Stokes( //Output
178 VectorView abs_vec_stokes,
179 //Input
180 ConstVectorView abs_vec_ssd,
181 const Index& stokes_dim,
182 const Index& ptype);
184void pha_mat_Bulk( //Output
185 Tensor6& pha_mat,
186 Index& ptype,
187 //Input
188 const ArrayOfTensor6& pha_mat_ss,
189 const ArrayOfIndex& ptypes_ss);
191void pha_mat_ScatSpecBulk( //Output
192 ArrayOfTensor6& pha_mat,
193 ArrayOfIndex& ptype,
194 //Input
195 const ArrayOfArrayOfTensor6& pha_mat_se,
196 const ArrayOfArrayOfIndex& ptypes_se,
197 ConstMatrixView pnds,
198 ConstMatrixView t_ok);
200void pha_mat_NScatElems( //Output
201 ArrayOfArrayOfTensor6& pha_mat,
202 ArrayOfArrayOfIndex& ptypes,
203 Matrix& t_ok,
204 //Input
205 const ArrayOfArrayOfSingleScatteringData& scat_data,
206 const Index& stokes_dim,
207 const Vector& T_array,
208 const Matrix& pdir_array,
209 const Matrix& idir_array,
210 const Index& f_index,
211 const Index& t_interp_order = 1);
213void pha_mat_1ScatElem( //Output
214 Tensor6View pha_mat,
215 Index& ptype,
216 VectorView t_ok,
217 //Input
218 const SingleScatteringData& ssd,
219 const Vector& T_array,
220 const Matrix& pdir_array,
221 const Matrix& idir_array,
222 const Index& f_start,
223 const Index& t_interp_order = 1);
225void FouComp_1ScatElem( //Output
226 Tensor7View pha_mat_fou,
227 Index& ptype,
228 VectorView t_ok,
229 //Input
230 const SingleScatteringData& ssd,
231 const Vector& T_array,
232 const Vector& pdir_array,
233 const Vector& idir_array,
234 const Index& f_start,
235 const Index& t_interp_order,
236 const Index& naa_totran);
238void abs_vecTransform( //Output and Input
239 StokesVector& abs_vec_lab,
240 //Input
241 ConstTensor3View abs_vec_data,
242 ConstVectorView za_datagrid,
243 ConstVectorView aa_datagrid,
244 const PType& ptype,
245 const Numeric& za_sca,
246 const Numeric& aa_sca,
247 const Verbosity& verbosity);
249void ext_matTransform( //Output and Input
250 PropagationMatrix& ext_mat_lab,
251 //Input
252 ConstTensor3View ext_mat_data,
253 ConstVectorView za_datagrid,
254 ConstVectorView aa_datagrid,
255 const PType& ptype,
256 const Numeric& za_sca,
257 const Numeric& aa_sca,
258 const Verbosity& verbosity);
260void pha_matTransform( //Output
261 MatrixView pha_mat_lab,
262 //Input
263 ConstTensor5View pha_mat_data,
264 ConstVectorView za_datagrid,
265 ConstVectorView aa_datagrid,
266 const PType& ptype,
267 const Index& za_sca_idx,
268 const Index& aa_sca_idx,
269 const Index& za_inc_idx,
270 const Index& aa_inc_idx,
271 ConstVectorView za_grid,
272 ConstVectorView aa_grid,
273 const Verbosity& verbosity);
275void ext_matFromabs_vec( //Output
276 MatrixView ext_mat,
277 //Input
278 ConstVectorView abs_vec,
279 const Index& stokes_dim);
281// Functions for the case: Randomly oriented particles:
282// ========================================================
284Numeric scat_angle(const Numeric& za_sca,
285 const Numeric& aa_sca,
286 const Numeric& za_inc,
287 const Numeric& aa_inc);
289void interpolate_scat_angle( //Output:
290 VectorView pha_mat_int,
291 //Input:
292 ConstTensor5View pha_mat_data,
293 ConstVectorView za_datagrid,
294 const Numeric theta);
296void pha_mat_labCalc( //Output:
297 MatrixView pha_mat_lab,
298 //Input:
299 ConstVectorView pha_mat_int,
300 const Numeric& za_sca,
301 const Numeric& aa_sca,
302 const Numeric& za_inc,
303 const Numeric& aa_inc,
304 const Numeric& theta_rad);
306// Get ext_mat and abs_vec from propmat_clearsky:
307// ========================================================
309void opt_prop_sum_propmat_clearsky( //Output:
310 PropagationMatrix& ext_mat,
311 StokesVector& abs_vec,
312 //Input:
313 const PropagationMatrix& propmat_clearsky);
315PType PTypeFromString(const String& ptype_string);
316PType PType2FromString(const String& ptype_string);
318String PTypeToString(const PType& ptype);
323 const String& particle_ssdmethod_string);
326 const ParticleSSDMethod& particle_ssdmethod_type);
329 MatrixView abs_data,
330 Tensor3View pfun_data,
331 const ArrayOfSingleScatteringData& scat_data,
332 const Index& iss,
333 ConstMatrixView pnd_data,
334 ArrayOfIndex& cloudbox_limits,
335 ConstVectorView T_grid,
336 ConstVectorView sa_grid);
338#endif //optproperties_h
This can be used to make arrays out of anything.
Definition: array.h:48
A constant view of a Matrix.
Definition: matpackI.h:1065
A constant view of a Tensor3.
Definition: matpackIII.h:133
A constant view of a Tensor5.
Definition: matpackV.h:144
A constant view of a Vector.
Definition: matpackI.h:521
The MatrixView class.
Definition: matpackI.h:1188
The Matrix class.
Definition: matpackI.h:1285
Stokes vector is as Propagation matrix but only has 4 possible values.
The Tensor3View class.
Definition: matpackIII.h:251
The Tensor4View class.
Definition: matpackIV.h:296
The Tensor4 class.
Definition: matpackIV.h:435
The Tensor5View class.
Definition: matpackV.h:348
The Tensor5 class.
Definition: matpackV.h:524
The Tensor6View class.
Definition: matpackVI.h:635
The Tensor6 class.
Definition: matpackVI.h:1105
The Tensor7View class.
Definition: matpackVII.h:1308
The Tensor7 class.
Definition: matpackVII.h:2407
The VectorView class.
Definition: matpackI.h:674
The Vector class.
Definition: matpackI.h:910
Implementation of gridded fields.
The type to use for all floating point numbers.
Definition: matpack.h:33
The type to use for all integer numbers and indices.
Definition: matpack.h:39
Declarations having to do with the four output streams.
This file contains the definition of String, the ARTS string class.
PType PType2FromString(const String &ptype_string)
Convert ptype name to enum value.
An attribute to classify the particle type (ptype) of a SingleScatteringData.
Definition: optproperties.h:52
Definition: optproperties.h:53
Definition: optproperties.h:54
Definition: optproperties.h:55
void pha_mat_NScatElems(ArrayOfArrayOfTensor6 &pha_mat, ArrayOfArrayOfIndex &ptypes, Matrix &t_ok, const ArrayOfArrayOfSingleScatteringData &scat_data, const Index &stokes_dim, const Vector &T_array, const Matrix &pdir_array, const Matrix &idir_array, const Index &f_index, const Index &t_interp_order=1)
Phase matrices from all scattering elements.
void ext_mat_SSD2Stokes(MatrixView ext_mat_stokes, ConstVectorView ext_mat_ssd, const Index &stokes_dim, const Index &ptype)
Extinction matrix scat_data to stokes format conversion.
void opt_prop_ScatSpecBulk(ArrayOfTensor5 &ext_mat, ArrayOfTensor4 &abs_vec, ArrayOfIndex &ptype, const ArrayOfArrayOfTensor5 &ext_mat_se, const ArrayOfArrayOfTensor4 &abs_vec_se, const ArrayOfArrayOfIndex &ptypes_se, ConstMatrixView pnds, ConstMatrixView t_ok)
Scattering species bulk extinction and absorption.
void FouComp_1ScatElem(Tensor7View pha_mat_fou, Index &ptype, VectorView t_ok, const SingleScatteringData &ssd, const Vector &T_array, const Vector &pdir_array, const Vector &idir_array, const Index &f_start, const Index &t_interp_order, const Index &naa_totran)
Preparing phase matrix fourier series components for one scattering element.
Array< ScatteringMetaData > ArrayOfScatteringMetaData
An attribute to classify the method to be used for SingleScatteringData.
Definition: optproperties.h:63
Definition: optproperties.h:64
Definition: optproperties.h:65
void ext_matFromabs_vec(MatrixView ext_mat, ConstVectorView abs_vec, const Index &stokes_dim)
Derive extinction matrix from absorption vector.
void opt_prop_sum_propmat_clearsky(PropagationMatrix &ext_mat, StokesVector &abs_vec, const PropagationMatrix &propmat_clearsky)
Get optical properties from propmat_clearsky.
void opt_prop_NScatElems(ArrayOfArrayOfTensor5 &ext_mat, ArrayOfArrayOfTensor4 &abs_vec, ArrayOfArrayOfIndex &ptypes, Matrix &t_ok, const ArrayOfArrayOfSingleScatteringData &scat_data, const Index &stokes_dim, const Vector &T_array, const Matrix &dir_array, const Index &f_index, const Index &t_interp_order=1)
Extinction and absorption from all scattering elements.
Numeric scat_angle(const Numeric &za_sca, const Numeric &aa_sca, const Numeric &za_inc, const Numeric &aa_inc)
Calculates the scattering angle.
String ParticleSSDMethodToString(const ParticleSSDMethod &particle_ssdmethod_type)
Array< SingleScatteringData > ArrayOfSingleScatteringData
Definition: optproperties.h:93
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.
void abs_vecTransform(StokesVector &abs_vec_lab, ConstTensor3View abs_vec_data, ConstVectorView za_datagrid, ConstVectorView aa_datagrid, const PType &ptype, const Numeric &za_sca, const Numeric &aa_sca, const Verbosity &verbosity)
Transformation of absorption vector.
Array< Array< SingleScatteringData > > ArrayOfArrayOfSingleScatteringData
Definition: optproperties.h:94
void opt_prop_1ScatElem(Tensor5View ext_mat, Tensor4View abs_vec, Index &ptype, VectorView t_ok, const SingleScatteringData &ssd, const Vector &T_array, const Matrix &dir_array, const Index &f_index, const Index &t_interp_order=1)
Preparing extinction and absorption from one scattering element.
PType PTypeFromString(const String &ptype_string)
Convert ptype name to enum value.
void pha_mat_ScatSpecBulk(ArrayOfTensor6 &pha_mat, ArrayOfIndex &ptype, const ArrayOfArrayOfTensor6 &pha_mat_se, const ArrayOfArrayOfIndex &ptypes_se, ConstMatrixView pnds, ConstMatrixView t_ok)
Scattering species bulk phase matrices.
void pha_mat_Bulk(Tensor6 &pha_mat, Index &ptype, const ArrayOfTensor6 &pha_mat_ss, const ArrayOfIndex &ptypes_ss)
Scattering species bulk phase matrix.
void ext_matTransform(PropagationMatrix &ext_mat_lab, ConstTensor3View ext_mat_data, ConstVectorView za_datagrid, ConstVectorView aa_datagrid, const PType &ptype, const Numeric &za_sca, const Numeric &aa_sca, const Verbosity &verbosity)
Transformation of extinction matrix.
void ConvertAzimuthallyRandomSingleScatteringData(SingleScatteringData &ssd)
Convert azimuthally-random oriented SingleScatteringData to latest version.
void abs_vec_SSD2Stokes(VectorView abs_vec_stokes, ConstVectorView abs_vec_ssd, const Index &stokes_dim, const Index &ptype)
Absorption vector scat_data to stokes format conversion.
void opt_prop_Bulk(Tensor5 &ext_mat, Tensor4 &abs_vec, Index &ptype, const ArrayOfTensor5 &ext_mat_ss, const ArrayOfTensor4 &abs_vec_ss, const ArrayOfIndex &ptypes_ss)
one-line descript
ParticleSSDMethod ParticleSSDMethodFromString(const String &particle_ssdmethod_string)
Convert particle ssd method name to enum value.
Array< Array< ScatteringMetaData > > ArrayOfArrayOfScatteringMetaData
void pha_mat_1ScatElem(Tensor6View pha_mat, Index &ptype, VectorView t_ok, const SingleScatteringData &ssd, const Vector &T_array, const Matrix &pdir_array, const Matrix &idir_array, const Index &f_start, const Index &t_interp_order=1)
Preparing phase matrix from one scattering element.
void interpolate_scat_angle(VectorView pha_mat_int, ConstTensor5View pha_mat_data, ConstVectorView za_datagrid, const Numeric theta)
Interpolate data on the scattering angle.
void pha_matTransform(MatrixView pha_mat_lab, ConstTensor5View pha_mat_data, ConstVectorView za_datagrid, ConstVectorView aa_datagrid, const PType &ptype, const Index &za_sca_idx, const Index &aa_sca_idx, const Index &za_inc_idx, const Index &aa_inc_idx, ConstVectorView za_grid, ConstVectorView aa_grid, const Verbosity &verbosity)
Transformation of phase matrix.
String PTypeToString(const PType &ptype)
Convert particle type enum value to String.
void ext_abs_pfun_from_tro(MatrixView ext_data, MatrixView abs_data, Tensor3View pfun_data, const ArrayOfSingleScatteringData &scat_data, const Index &iss, ConstMatrixView pnd_data, ArrayOfIndex &cloudbox_limits, ConstVectorView T_grid, ConstVectorView sa_grid)
Extinction, absorption and phase function for one scattering species, 1D and TRO.
Stuff related to the propagation matrix.
Numeric diameter_area_equ_aerodynamical
friend ostream & operator<<(ostream &os, const ScatteringMetaData &ssd)
Numeric diameter_volume_equ
friend ostream & operator<<(ostream &os, const SingleScatteringData &ssd)