Go to the documentation of this file.
55 Vector itw1(2),itwl(2),itwr(2);
68 return itw1[0]*yl+itw1[1]*yr;
80 os <<
"SLIData2 : Output operator not implemented";
127 Index anr = a[0].nrows();
128 Index anc = a[0].ncols();
130 assert(tia.
nrows() == anr);
131 assert(tia.
ncols() == anc);
133 for (
Index inr = 0; inr < anr; inr++)
134 for (
Index inc = 0; inc < anc; inc++)
136 tia(inr,inc) = a[tc.
idx](inr,inc)*itw[0] + a[tc.
idx+1](inr,inc)*itw[1];
175 assert(tia.
nelem() == an);
177 for (
Index i=0; i<an; ++i )
179 tia[i] = a[tc.
idx][i]*itw[0] + a[tc.
idx+1][i]*itw[1];
202 if(
abs(aa_sca-aa_inc)<ANG_TOL)
206 else if (
abs(
abs(aa_sca-aa_inc)-180)<ANG_TOL)
208 theta_rad=
DEG2RAD*(za_sca+za_inc);
209 if (theta_rad>
PI){theta_rad=2*
PI-theta_rad;}
221 theta_rad = acos(cos(za_sca_rad) * cos(za_inc_rad) +
222 sin(za_sca_rad) * sin(za_inc_rad) *
223 cos(aa_sca_rad - aa_inc_rad));
238 for (
Index i = 0; i < 6; i++)
250 for (
Index i = 0; i < 6; i++)
304 const Index& stokes_dim,
309 Matrix incT(stokes_dim,stokes_dim,0.0);
310 Matrix opt_depth_mat(stokes_dim,stokes_dim);
317 gridpos(gp, cum_l_step, pathlength);
319 interp(K, itw,ext_matArray,gp[0]);
320 delta_s = pathlength - cum_l_step[gp[0].idx];
322 opt_depth_mat+=ext_matArray[gp[0].idx];
323 opt_depth_mat*=-delta_s/2;
324 if ( stokes_dim == 1 )
326 incT(0,0)=exp(opt_depth_mat(0,0));
330 for (
Index i=0;i<stokes_dim;i++)
332 incT(i,i)=exp(opt_depth_mat(i,i));
340 mult(T,TArray[gp[0].idx],incT);
342 interp(K_abs, itw, abs_vecArray,gp[0]);
344 temperature=
interp(itw,t_ppath,gp[0]);
346 for (
Index i=0;i<N_pt;i++)
351 for (
Index i=0; i<2; i++)
bool is_same_within_epsilon(const Numeric &a, const Numeric &b, const Numeric &epsilon)
Check, if two numbers agree within a given epsilon.
void interp(MatrixView tia, ConstVectorView itw, const ArrayOfMatrix &a, const GridPos &tc)
Red 1D Interpolate.
ostream & operator<<(ostream &os, const SLIData2 &)
void matrix_exp_p30(MatrixView M, ConstMatrixView A)
matrix_exp_p30
void gridpos(ArrayOfGridPos &gp, ConstVectorView old_grid, ConstVectorView new_grid, const Numeric &extpolfac)
Set up a grid position Array.
Interpolation classes and functions created for use within Monte Carlo scattering simulations.
const Numeric RAD2DEG
Global constant, conversion from radians to degrees.
Index ncols() const
Returns the number of columns.
bool is_diagonal(ConstMatrixView A)
Checks if a square matrix is diagonal.
Index nrows() const
Returns the number of rows.
const Numeric DEG2RAD
Global constant, conversion from degrees to radians.
bool is_size(ConstVectorView x, const Index &n)
Verifies that the size of x is l.
The structure to describe a propagation path and releated quantities.
Structure which describes the single scattering properties of a.
This can be used to make arrays out of anything.
void mult(VectorView y, const ConstMatrixView &M, const ConstVectorView &x)
Matrix Vector multiplication.
Index ncols() const
Returns the number of columns.
Index nelem() const
Returns the number of elements.
Numeric sum() const
The sum of all elements of a Vector.
NUMERIC Numeric
The type to use for all floating point numbers.
void interp_scat_angle_temperature(VectorView pha_mat_int, Numeric &theta_rad, const SingleScatteringData &scat_data, const Numeric &za_sca, const Numeric &aa_sca, const Numeric &za_inc, const Numeric &aa_inc, const Numeric &rte_temperature)
void interpTArray(Matrix &T, Vector &K_abs, Numeric &temperature, MatrixView &K, Vector &rte_pos, Vector &rte_los, VectorView &pnd_vec, const ArrayOfMatrix &TArray, const ArrayOfMatrix &ext_matArray, const ArrayOfVector &abs_vecArray, const Vector &t_ppath, const Matrix &pnd_ppath, const Vector &cum_l_step, const Numeric &pathlength, const Index &stokes_dim, const Ppath &ppath)
interpTarray
Structure to store a grid position.
Header file for logic.cc.
A 2D sequential linear interpolation (SLI) lookup table.
Numeric interpolate(Numeric x1, Numeric x2) const
Perform sequential interpolation.
INDEX Index
The type to use for all integer numbers and indices.
const Numeric sum_check_epsilon
The maximum difference from 1 that we allow for a sum check.
A constant view of a Vector.
Index nelem() const
Number of elements.
void interpweights(VectorView itw, const GridPos &tc)
Red 1D interpolation weights.