ARTS 2.5.0 (git: 9ee3ac6c)
optproperties.h
Go to the documentation of this file.
1/* Copyright (C) 2003-2012 Claudia Emde <claudia.emde@dlr.de>
2
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.
7
8 This program is distributed in the hope that it will be useful,
9 but WITHOUT ANY WARRANTY; without even the implied warranty of
10 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 GNU General Public License for more details.
12
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. */
17
18/*===========================================================================
19 === File description
20 ===========================================================================*/
21
33#ifndef optproperties_h
34#define optproperties_h
35
36#include "gridded_fields.h"
37#include "matpackVII.h"
38#include "messages.h"
39#include "mystring.h"
40#include "propagationmatrix.h"
41
43//structure (a scattering element).
52enum PType : Index {
56};
57
59
66};
67
68/*===========================================================================
69 === The SingleScatteringData structure
70 ===========================================================================*/
71
89};
90
93
94ostream& operator<<(ostream& os, const SingleScatteringData& ssd);
95ostream& operator<<(ostream& os, const ArrayOfSingleScatteringData& assd);
96
97/*===========================================================================
98 === The ScatteringMetaData structure
99 ===========================================================================*/
116};
117
120
121ostream& operator<<(ostream& os, const ScatteringMetaData& ssd);
122ostream& operator<<(ostream& os, const ArrayOfScatteringMetaData& assd);
123
124// General functions:
125// =============================================================
126
127void opt_prop_Bulk( //Output
128 Tensor5& ext_mat,
129 Tensor4& abs_vec,
130 Index& ptype,
131 //Input
132 const ArrayOfTensor5& ext_mat_ss,
133 const ArrayOfTensor4& abs_vec_ss,
134 const ArrayOfIndex& ptypes_ss);
135
136void opt_prop_ScatSpecBulk( //Output
137 ArrayOfTensor5& ext_mat,
138 ArrayOfTensor4& abs_vec,
139 ArrayOfIndex& ptype,
140 //Input
141 const ArrayOfArrayOfTensor5& ext_mat_se,
142 const ArrayOfArrayOfTensor4& abs_vec_se,
143 const ArrayOfArrayOfIndex& ptypes_se,
144 ConstMatrixView pnds,
145 ConstMatrixView t_ok);
146
147void opt_prop_NScatElems( //Output
148 ArrayOfArrayOfTensor5& ext_mat,
149 ArrayOfArrayOfTensor4& abs_vec,
150 ArrayOfArrayOfIndex& ptypes,
151 Matrix& t_ok,
152 //Input
153 const ArrayOfArrayOfSingleScatteringData& scat_data,
154 const Index& stokes_dim,
155 const Vector& T_array,
156 const Matrix& dir_array,
157 const Index& f_index,
158 const Index& t_interp_order = 1);
159
160void opt_prop_1ScatElem( //Output
161 Tensor5View ext_mat,
162 Tensor4View abs_vec,
163 Index& ptype,
164 VectorView t_ok,
165 //Input
166 const SingleScatteringData& ssd,
167 const Vector& T_array,
168 const Matrix& dir_array,
169 const Index& f_index,
170 const Index& t_interp_order = 1);
171
172void ext_mat_SSD2Stokes( //Output
173 MatrixView ext_mat_stokes,
174 //Input
175 ConstVectorView ext_mat_ssd,
176 const Index& stokes_dim,
177 const Index& ptype);
178
179void abs_vec_SSD2Stokes( //Output
180 VectorView abs_vec_stokes,
181 //Input
182 ConstVectorView abs_vec_ssd,
183 const Index& stokes_dim,
184 const Index& ptype);
185
186void pha_mat_Bulk( //Output
187 Tensor6& pha_mat,
188 Index& ptype,
189 //Input
190 const ArrayOfTensor6& pha_mat_ss,
191 const ArrayOfIndex& ptypes_ss);
192
193void pha_mat_ScatSpecBulk( //Output
194 ArrayOfTensor6& pha_mat,
195 ArrayOfIndex& ptype,
196 //Input
197 const ArrayOfArrayOfTensor6& pha_mat_se,
198 const ArrayOfArrayOfIndex& ptypes_se,
199 ConstMatrixView pnds,
200 ConstMatrixView t_ok);
201
202void pha_mat_NScatElems( //Output
203 ArrayOfArrayOfTensor6& pha_mat,
204 ArrayOfArrayOfIndex& ptypes,
205 Matrix& t_ok,
206 //Input
207 const ArrayOfArrayOfSingleScatteringData& scat_data,
208 const Index& stokes_dim,
209 const Vector& T_array,
210 const Matrix& pdir_array,
211 const Matrix& idir_array,
212 const Index& f_index,
213 const Index& t_interp_order = 1);
214
215void pha_mat_1ScatElem( //Output
216 Tensor6View pha_mat,
217 Index& ptype,
218 VectorView t_ok,
219 //Input
220 const SingleScatteringData& ssd,
221 const Vector& T_array,
222 const Matrix& pdir_array,
223 const Matrix& idir_array,
224 const Index& f_start,
225 const Index& t_interp_order = 1);
226
227void FouComp_1ScatElem( //Output
228 Tensor7View pha_mat_fou,
229 Index& ptype,
230 VectorView t_ok,
231 //Input
232 const SingleScatteringData& ssd,
233 const Vector& T_array,
234 const Vector& pdir_array,
235 const Vector& idir_array,
236 const Index& f_start,
237 const Index& t_interp_order,
238 const Index& naa_totran);
239
240void abs_vecTransform( //Output and Input
241 StokesVector& abs_vec_lab,
242 //Input
243 ConstTensor3View abs_vec_data,
244 ConstVectorView za_datagrid,
245 ConstVectorView aa_datagrid,
246 const PType& ptype,
247 const Numeric& za_sca,
248 const Numeric& aa_sca,
249 const Verbosity& verbosity);
250
251void ext_matTransform( //Output and Input
252 PropagationMatrix& ext_mat_lab,
253 //Input
254 ConstTensor3View ext_mat_data,
255 ConstVectorView za_datagrid,
256 ConstVectorView aa_datagrid,
257 const PType& ptype,
258 const Numeric& za_sca,
259 const Numeric& aa_sca,
260 const Verbosity& verbosity);
261
262void pha_matTransform( //Output
263 MatrixView pha_mat_lab,
264 //Input
265 ConstTensor5View pha_mat_data,
266 ConstVectorView za_datagrid,
267 ConstVectorView aa_datagrid,
268 const PType& ptype,
269 const Index& za_sca_idx,
270 const Index& aa_sca_idx,
271 const Index& za_inc_idx,
272 const Index& aa_inc_idx,
273 ConstVectorView za_grid,
274 ConstVectorView aa_grid,
275 const Verbosity& verbosity);
276
277void ext_matFromabs_vec( //Output
278 MatrixView ext_mat,
279 //Input
280 ConstVectorView abs_vec,
281 const Index& stokes_dim);
282
283// Functions for the case: Randomly oriented particles:
284// ========================================================
285
286Numeric scat_angle(const Numeric& za_sca,
287 const Numeric& aa_sca,
288 const Numeric& za_inc,
289 const Numeric& aa_inc);
290
291void interpolate_scat_angle( //Output:
292 VectorView pha_mat_int,
293 //Input:
294 ConstTensor5View pha_mat_data,
295 ConstVectorView za_datagrid,
296 const Numeric theta);
297
298void pha_mat_labCalc( //Output:
299 MatrixView pha_mat_lab,
300 //Input:
301 ConstVectorView pha_mat_int,
302 const Numeric& za_sca,
303 const Numeric& aa_sca,
304 const Numeric& za_inc,
305 const Numeric& aa_inc,
306 const Numeric& theta_rad);
307
308// Get ext_mat and abs_vec from propmat_clearsky:
309// ========================================================
310
311void opt_prop_sum_propmat_clearsky( //Output:
312 PropagationMatrix& ext_mat,
313 StokesVector& abs_vec,
314 //Input:
315 const PropagationMatrix& propmat_clearsky);
316
317PType PTypeFromString(const String& ptype_string);
318PType PType2FromString(const String& ptype_string);
319
320String PTypeToString(const PType& ptype);
321
323
325 const String& particle_ssdmethod_string);
326
328 const ParticleSSDMethod& particle_ssdmethod_type);
329
330#endif //optproperties_h
This can be used to make arrays out of anything.
Definition: array.h:107
A constant view of a Matrix.
Definition: matpackI.h:1014
A constant view of a Tensor3.
Definition: matpackIII.h:132
A constant view of a Tensor5.
Definition: matpackV.h:143
A constant view of a Vector.
Definition: matpackI.h:489
The MatrixView class.
Definition: matpackI.h:1125
The Matrix class.
Definition: matpackI.h:1225
Stokes vector is as Propagation matrix but only has 4 possible values.
The Tensor4View class.
Definition: matpackIV.h:284
The Tensor4 class.
Definition: matpackIV.h:421
The Tensor5View class.
Definition: matpackV.h:333
The Tensor5 class.
Definition: matpackV.h:506
The Tensor6View class.
Definition: matpackVI.h:621
The Tensor6 class.
Definition: matpackVI.h:1088
The Tensor7View class.
Definition: matpackVII.h:1286
The Tensor7 class.
Definition: matpackVII.h:2382
The VectorView class.
Definition: matpackI.h:626
The Vector class.
Definition: matpackI.h:876
Implementation of gridded fields.
INDEX Index
The type to use for all integer numbers and indices.
Definition: matpack.h:39
NUMERIC Numeric
The type to use for all floating point numbers.
Definition: matpack.h:33
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.
PType
An attribute to classify the particle type (ptype) of a SingleScatteringData.
Definition: optproperties.h:52
@ PTYPE_GENERAL
Definition: optproperties.h:53
@ PTYPE_AZIMUTH_RND
Definition: optproperties.h:54
@ PTYPE_TOTAL_RND
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
ParticleSSDMethod
An attribute to classify the method to be used for SingleScatteringData.
Definition: optproperties.h:63
@ PARTICLE_SSDMETHOD_NONE
Definition: optproperties.h:64
@ PARTICLE_SSDMETHOD_TMATRIX
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:91
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:92
ostream & operator<<(ostream &os, const SingleScatteringData &ssd)
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.
Stuff related to the propagation matrix.
Numeric diameter_area_equ_aerodynamical
Numeric diameter_volume_equ