ARTS  2.3.1285(git:92a29ea9-dirty)
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 "interpolation_poly.h"
38 #include "matpackVII.h"
39 #include "messages.h"
40 #include "mystring.h"
41 #include "propagationmatrix.h"
42 
44 //structure (a scattering element).
53 enum PType : Index {
57 };
58 
60 
67 };
68 
69 /*===========================================================================
70  === The SingleScatteringData structure
71  ===========================================================================*/
72 
90 };
91 
94 
95 ostream& operator<<(ostream& os, const SingleScatteringData& ssd);
96 ostream& operator<<(ostream& os, const ArrayOfSingleScatteringData& assd);
97 
98 /*===========================================================================
99  === The ScatteringMetaData structure
100  ===========================================================================*/
117 };
118 
121 
122 ostream& operator<<(ostream& os, const ScatteringMetaData& ssd);
123 ostream& operator<<(ostream& os, const ArrayOfScatteringMetaData& assd);
124 
125 // General functions:
126 // =============================================================
127 
128 void opt_prop_Bulk( //Output
129  Tensor5& ext_mat,
130  Tensor4& abs_vec,
131  Index& ptype,
132  //Input
133  const ArrayOfTensor5& ext_mat_ss,
134  const ArrayOfTensor4& abs_vec_ss,
135  const ArrayOfIndex& ptypes_ss);
136 
137 void opt_prop_ScatSpecBulk( //Output
138  ArrayOfTensor5& ext_mat,
139  ArrayOfTensor4& abs_vec,
141  //Input
142  const ArrayOfArrayOfTensor5& ext_mat_se,
143  const ArrayOfArrayOfTensor4& abs_vec_se,
144  const ArrayOfArrayOfIndex& ptypes_se,
145  ConstMatrixView pnds,
146  ConstMatrixView t_ok);
147 
148 void opt_prop_NScatElems( //Output
149  ArrayOfArrayOfTensor5& ext_mat,
150  ArrayOfArrayOfTensor4& abs_vec,
151  ArrayOfArrayOfIndex& ptypes,
152  Matrix& t_ok,
153  //Input
154  const ArrayOfArrayOfSingleScatteringData& scat_data,
155  const Index& stokes_dim,
156  const Vector& T_array,
157  const Matrix& dir_array,
158  const Index& f_index,
159  const Index& t_interp_order = 1);
160 
161 void opt_prop_1ScatElem( //Output
162  Tensor5View ext_mat,
163  Tensor4View abs_vec,
164  Index& ptype,
165  VectorView t_ok,
166  //Input
167  const SingleScatteringData& ssd,
168  const Vector& T_array,
169  const Matrix& dir_array,
170  const Index& f_index,
171  const Index& t_interp_order = 1);
172 
173 void ext_mat_SSD2Stokes( //Output
174  MatrixView ext_mat_stokes,
175  //Input
176  ConstVectorView ext_mat_ssd,
177  const Index& stokes_dim,
178  const Index& ptype);
179 
180 void abs_vec_SSD2Stokes( //Output
181  VectorView abs_vec_stokes,
182  //Input
183  ConstVectorView abs_vec_ssd,
184  const Index& stokes_dim,
185  const Index& ptype);
186 
187 void pha_mat_Bulk( //Output
188  Tensor6& pha_mat,
189  Index& ptype,
190  //Input
191  const ArrayOfTensor6& pha_mat_ss,
192  const ArrayOfIndex& ptypes_ss);
193 
194 void pha_mat_ScatSpecBulk( //Output
195  ArrayOfTensor6& pha_mat,
197  //Input
198  const ArrayOfArrayOfTensor6& pha_mat_se,
199  const ArrayOfArrayOfIndex& ptypes_se,
200  ConstMatrixView pnds,
201  ConstMatrixView t_ok);
202 
203 void pha_mat_NScatElems( //Output
204  ArrayOfArrayOfTensor6& pha_mat,
205  ArrayOfArrayOfIndex& ptypes,
206  Matrix& t_ok,
207  //Input
208  const ArrayOfArrayOfSingleScatteringData& scat_data,
209  const Index& stokes_dim,
210  const Vector& T_array,
211  const Matrix& pdir_array,
212  const Matrix& idir_array,
213  const Index& f_index,
214  const Index& t_interp_order = 1);
215 
216 void pha_mat_1ScatElem( //Output
217  Tensor6View pha_mat,
218  Index& ptype,
219  VectorView t_ok,
220  //Input
221  const SingleScatteringData& ssd,
222  const Vector& T_array,
223  const Matrix& pdir_array,
224  const Matrix& idir_array,
225  const Index& f_start,
226  const Index& t_interp_order = 1);
227 
228 void FouComp_1ScatElem( //Output
229  Tensor7View pha_mat_fou,
230  Index& ptype,
231  VectorView t_ok,
232  //Input
233  const SingleScatteringData& ssd,
234  const Vector& T_array,
235  const Vector& pdir_array,
236  const Vector& idir_array,
237  const Index& f_start,
238  const Index& t_interp_order,
239  const Index& naa_totran);
240 
241 void abs_vecTransform( //Output and Input
242  StokesVector& abs_vec_lab,
243  //Input
245  ConstVectorView za_datagrid,
246  ConstVectorView aa_datagrid,
247  const PType& ptype,
248  const Numeric& za_sca,
249  const Numeric& aa_sca,
250  const Verbosity& verbosity);
251 
252 void ext_matTransform( //Output and Input
253  PropagationMatrix& ext_mat_lab,
254  //Input
256  ConstVectorView za_datagrid,
257  ConstVectorView aa_datagrid,
258  const PType& ptype,
259  const Numeric& za_sca,
260  const Numeric& aa_sca,
261  const Verbosity& verbosity);
262 
263 void pha_matTransform( //Output
264  MatrixView pha_mat_lab,
265  //Input
267  ConstVectorView za_datagrid,
268  ConstVectorView aa_datagrid,
269  const PType& ptype,
270  const Index& za_sca_idx,
271  const Index& aa_sca_idx,
272  const Index& za_inc_idx,
273  const Index& aa_inc_idx,
276  const Verbosity& verbosity);
277 
278 void ext_matFromabs_vec( //Output
279  MatrixView ext_mat,
280  //Input
281  ConstVectorView abs_vec,
282  const Index& stokes_dim);
283 
284 void ssd_tinterp_parameters( //Output
285  VectorView t_ok,
286  Index& this_T_interp_order,
287  ArrayOfGridPosPoly& T_gp,
288  Matrix& T_itw,
289  //Input
291  const Vector& T_array,
292  const Index& t_interp_order);
293 
294 // Functions for the case: Randomly oriented particles:
295 // ========================================================
296 
297 Numeric scat_angle(const Numeric& za_sca,
298  const Numeric& aa_sca,
299  const Numeric& za_inc,
300  const Numeric& aa_inc);
301 
302 void interpolate_scat_angle( //Output:
303  VectorView pha_mat_int,
304  //Input:
306  ConstVectorView za_datagrid,
307  const Numeric theta);
308 
309 void pha_mat_labCalc( //Output:
310  MatrixView pha_mat_lab,
311  //Input:
312  ConstVectorView pha_mat_int,
313  const Numeric& za_sca,
314  const Numeric& aa_sca,
315  const Numeric& za_inc,
316  const Numeric& aa_inc,
317  const Numeric& theta_rad);
318 
319 // Get ext_mat and abs_vec from propmat_clearsky:
320 // ========================================================
321 
322 void opt_prop_sum_propmat_clearsky( //Output:
323  PropagationMatrix& ext_mat,
324  StokesVector& abs_vec,
325  //Input:
326  const ArrayOfPropagationMatrix& propmat_clearsky);
327 
328 PType PTypeFromString(const String& ptype_string);
329 PType PType2FromString(const String& ptype_string);
330 
332 
334 
336  const String& particle_ssdmethod_string);
337 
339  const ParticleSSDMethod& particle_ssdmethod_type);
340 
341 #endif //optproperties_h
String PTypeToString(const PType &ptype)
Convert particle type enum value to String.
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
INDEX Index
The type to use for all integer numbers and indices.
Definition: matpack.h:39
Array< Array< ScatteringMetaData > > ArrayOfArrayOfScatteringMetaData
The VectorView class.
Definition: matpackI.h:610
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.
The Tensor4View class.
Definition: matpackIV.h:284
void ConvertAzimuthallyRandomSingleScatteringData(SingleScatteringData &ssd)
Convert azimuthally-random oriented SingleScatteringData to latest version.
Declarations having to do with the four output streams.
The Tensor7View class.
Definition: matpackVII.h:1286
The Vector class.
Definition: matpackI.h:860
The MatrixView class.
Definition: matpackI.h:1093
void ext_matFromabs_vec(MatrixView ext_mat, ConstVectorView abs_vec, const Index &stokes_dim)
Derive extinction matrix from absorption vector.
String ParticleSSDMethodToString(const ParticleSSDMethod &particle_ssdmethod_type)
The Tensor4 class.
Definition: matpackIV.h:421
Numeric scat_angle(const Numeric &za_sca, const Numeric &aa_sca, const Numeric &za_inc, const Numeric &aa_inc)
Calculates the scattering angle.
Array< ScatteringMetaData > ArrayOfScatteringMetaData
The Tensor6View class.
Definition: matpackVI.h:621
The Tensor7 class.
Definition: matpackVII.h:2382
Stokes vector is as Propagation matrix but only has 4 possible values.
void interpolate_scat_angle(VectorView pha_mat_int, ConstTensor5View pha_mat_data, ConstVectorView za_datagrid, const Numeric theta)
Interpolate data on the scattering angle.
ostream & operator<<(ostream &os, const SingleScatteringData &ssd)
void ssd_tinterp_parameters(VectorView t_ok, Index &this_T_interp_order, ArrayOfGridPosPoly &T_gp, Matrix &T_itw, ConstVectorView T_grid, const Vector &T_array, const Index &t_interp_order)
Determine T-interpol parameters for a specific scattering element.
Numeric diameter_volume_equ
ParticleSSDMethod ParticleSSDMethodFromString(const String &particle_ssdmethod_string)
Convert particle ssd method name to enum value.
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.
Stuff related to the propagation matrix.
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:53
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 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.
A constant view of a Tensor5.
Definition: matpackV.h:143
NUMERIC Numeric
The type to use for all floating point numbers.
Definition: matpack.h:33
The Matrix class.
Definition: matpackI.h:1193
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.
ParticleSSDMethod
An attribute to classify the method to be used for SingleScatteringData.
Definition: optproperties.h:64
The Tensor5View class.
Definition: matpackV.h:333
Numeric diameter_area_equ_aerodynamical
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.
This can be used to make arrays out of anything.
Definition: array.h:40
void pha_mat_Bulk(Tensor6 &pha_mat, Index &ptype, const ArrayOfTensor6 &pha_mat_ss, const ArrayOfIndex &ptypes_ss)
Scattering species bulk phase matrix.
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.
Header file for interpolation_poly.cc.
Array< SingleScatteringData > ArrayOfSingleScatteringData
Definition: optproperties.h:92
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 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.
A constant view of a Tensor3.
Definition: matpackIII.h:132
The Tensor6 class.
Definition: matpackVI.h:1088
A constant view of a Vector.
Definition: matpackI.h:476
PType PTypeFromString(const String &ptype_string)
Convert ptype name to enum value.
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.
A constant view of a Matrix.
Definition: matpackI.h:982
Implementation of gridded fields.
void opt_prop_sum_propmat_clearsky(PropagationMatrix &ext_mat, StokesVector &abs_vec, const ArrayOfPropagationMatrix &propmat_clearsky)
Get optical properties from propmat_clearsky.
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 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 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.
Array< Array< SingleScatteringData > > ArrayOfArrayOfSingleScatteringData
Definition: optproperties.h:93
The Tensor5 class.
Definition: matpackV.h:506
This file contains the definition of String, the ARTS string class.