ARTS  2.3.1285(git:92a29ea9-dirty)
rte.h
Go to the documentation of this file.
1 /* Copyright (C) 2002-2012
2  Patrick Eriksson <Patrick.Eriksson@chalmers.se>
3  Stefan Buehler <sbuehler@ltu.se>
4 
5  This program is free software; you can redistribute it and/or modify it
6  under the terms of the GNU General Public License as published by the
7  Free Software Foundation; either version 2, or (at your option) any
8  later version.
9 
10  This program is distributed in the hope that it will be useful,
11  but WITHOUT ANY WARRANTY; without even the implied warranty of
12  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  GNU General Public License for more details.
14 
15  You should have received a copy of the GNU General Public License
16  along with this program; if not, write to the Free Software
17  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
18  USA. */
19 
20 /*===========================================================================
21  === File description
22  ===========================================================================*/
23 
32 #ifndef rte_h
33 #define rte_h
34 
35 /*===========================================================================
36  === External declarations
37  ===========================================================================*/
38 
39 #include "agenda_class.h"
40 #include "arts.h"
41 #include "auto_md.h"
42 #include "complex.h"
43 #include "jacobian.h"
44 #include "matpackI.h"
45 #include "matpackII.h"
46 #include "matpackIII.h"
47 #include "optproperties.h"
48 #include "ppath.h"
49 
50 /*===========================================================================
51  === Functions in rte.cc
52  ===========================================================================*/
53 
82  ArrayOfStokesVector& dS_dx,
83  const ArrayOfRetrievalQuantity& jacobian_quantities,
84  ConstVectorView ppath_f_grid,
85  ConstVectorView ppath_line_of_sight,
86  ConstVectorView ppath_vmrs,
87  const Numeric& ppath_temperature,
88  const Numeric& ppath_pressure,
89  const ArrayOfIndex& jacobian_species,
90  const ArrayOfIndex& jacobian_wind,
91  const Index& lte,
92  const Index& atmosphere_dim,
93  const bool& jacobian_do);
94 
111 void adjust_los(VectorView los, const Index& atmosphere_dim);
112 
129 void apply_iy_unit(MatrixView iy,
130  const String& iy_unit,
131  ConstVectorView f_grid,
132  const Numeric& n,
133  const ArrayOfIndex& i_pol);
134 
153  ConstMatrixView iy,
154  const String& iy_unit,
155  ConstVectorView f_grid,
156  const Numeric& n,
157  const ArrayOfIndex& i_pol);
158 
178 void bending_angle1d(Numeric& alpha, const Ppath& ppath);
179 
213  Numeric& dlf,
214  const Agenda& ppath_step_agenda,
215  const Index& atmosphere_dim,
216  ConstVectorView p_grid,
217  ConstVectorView lat_grid,
218  ConstVectorView lon_grid,
219  ConstTensor3View z_field,
220  ConstVectorView f_grid,
221  ConstVectorView refellipsoid,
222  ConstMatrixView z_surface,
223  const Ppath& ppath,
224  const Numeric& ppath_lmax,
225  const Numeric& ppath_lraytrace,
226  const Numeric& dza,
227  const Verbosity& verbosity);
228 
260  Numeric& dlf,
261  const Agenda& ppath_step_agenda,
262  const Index& atmosphere_dim,
263  ConstVectorView p_grid,
264  ConstVectorView lat_grid,
265  ConstVectorView lon_grid,
266  ConstTensor3View z_field,
267  ConstVectorView f_grid,
268  ConstVectorView refellipsoid,
269  ConstMatrixView z_surface,
270  const Ppath& ppath,
271  const Numeric& ppath_lmax,
272  const Numeric& ppath_lraytrace,
273  const Numeric& dza,
274  const Verbosity& verbosity);
275 
297  const Numeric& u,
298  const Numeric& v,
299  const Numeric& w,
300  const Index& atmosphere_dim);
301 
327 void ext2trans(MatrixView trans_mat,
328  Index& icase,
329  ConstMatrixView ext_mat_av,
330  const Numeric& l_step);
331 
351 void get_iy(Workspace& ws,
352  Matrix& iy,
353  const Index& cloudbox_on,
354  ConstVectorView f_grid,
355  const EnergyLevelMap& nlte_field,
356  ConstVectorView rte_pos,
357  ConstVectorView rte_los,
358  ConstVectorView rte_pos2,
359  const String& iy_unit,
360  const Agenda& iy_main_agenda);
361 
393  Matrix& iy,
394  ArrayOfTensor3& diy_dx,
395  ConstTensor3View iy_transmission,
396  const Index& iy_id,
397  const Index& jacobian_do,
398  const ArrayOfRetrievalQuantity& jacobian_quantities,
399  const Ppath& ppath,
400  ConstVectorView rte_pos2,
401  const Index& atmosphere_dim,
402  const EnergyLevelMap& nlte_field,
403  const Index& cloudbox_on,
404  const Index& stokes_dim,
405  ConstVectorView f_grid,
406  const String& iy_unit,
407  ConstTensor3View surface_props_data,
408  const Agenda& iy_main_agenda,
409  const Agenda& iy_space_agenda,
410  const Agenda& iy_surface_agenda,
411  const Agenda& iy_cloudbox_agenda,
412  const Index& iy_agenda_call1,
413  const Verbosity& verbosity);
414 
443 void get_ppath_atmvars(Vector& ppath_p,
444  Vector& ppath_t,
445  EnergyLevelMap& ppath_nlte,
446  Matrix& ppath_vmr,
447  Matrix& ppath_wind,
448  Matrix& ppath_mag,
449  const Ppath& ppath,
450  const Index& atmosphere_dim,
451  ConstVectorView p_grid,
452  ConstTensor3View t_field,
453  const EnergyLevelMap& nlte_field,
454  ConstTensor4View vmr_field,
455  ConstTensor3View wind_u_field,
456  ConstTensor3View wind_v_field,
457  ConstTensor3View wind_w_field,
458  ConstTensor3View mag_u_field,
459  ConstTensor3View mag_v_field,
460  ConstTensor3View mag_w_field);
461 
477 void get_ppath_cloudvars(ArrayOfIndex& clear2cloudy,
478  Matrix& ppath_pnd,
479  ArrayOfMatrix& ppath_dpnd_dx,
480  const Ppath& ppath,
481  const Index& atmosphere_dim,
482  const ArrayOfIndex& cloudbox_limits,
483  const Tensor4& pnd_field,
484  const ArrayOfTensor4& dpnd_field_dx);
485 
500 void get_ppath_f(Matrix& ppath_f,
501  const Ppath& ppath,
502  ConstVectorView f_grid,
503  const Index& atmosphere_dim,
504  const Numeric& rte_alonglos_v,
505  ConstMatrixView ppath_wind);
506 
517 Range get_rowindex_for_mblock(const Sparse& sensor_response,
518  const Index& imblock);
519 
532  VectorView dB_dT,
533  ConstVectorView ppath_f_grid,
534  const Numeric& ppath_temperature,
535  const bool& do_temperature_derivative);
536 
563  Workspace& ws,
565  StokesVector& S,
566  Index& lte,
568  ArrayOfStokesVector& dS_dx,
569  const Agenda& propmat_clearsky_agenda,
570  const ArrayOfRetrievalQuantity& jacobian_quantities,
571  ConstVectorView ppath_f_grid,
572  ConstVectorView ppath_magnetic_field,
573  ConstVectorView ppath_line_of_sight,
574  const EnergyLevelMap& ppath_nlte,
575  ConstVectorView ppath_vmrs,
576  const Numeric& ppath_temperature,
577  const Numeric& ppath_pressure,
578  const ArrayOfIndex& jacobian_species,
579  const bool& jacobian_do);
580 
612  MatrixView J,
613  Tensor3View dJ_dx,
614  const PropagationMatrix& K,
615  const StokesVector& a,
616  const StokesVector& S,
617  const ArrayOfPropagationMatrix& dK_dx,
618  const ArrayOfStokesVector& da_dx,
619  const ArrayOfStokesVector& dS_dx,
620  ConstVectorView B,
621  ConstVectorView dB_dT,
622  const ArrayOfRetrievalQuantity& jacobian_quantities,
623  const bool& jacobian_do);
624 
639 void get_stepwise_frequency_grid(VectorView ppath_f_grid,
640  ConstVectorView f_grid,
641  ConstVectorView ppath_wind,
642  ConstVectorView ppath_line_of_sight,
643  const Numeric& rte_alonglos_v,
644  const Index& atmosphere_dim);
645 
658 void get_stepwise_f_partials(Vector& f_partials,
659  const Index& component,
660  ConstVectorView& ppath_line_of_sight,
661  ConstVectorView f_grid,
662  const Index& atmosphere_dim);
663 
682  StokesVector& ap,
683  PropagationMatrix& Kp,
684  ArrayOfStokesVector& dap_dx,
685  ArrayOfPropagationMatrix& dKp_dx,
686  const ArrayOfRetrievalQuantity& jacobian_quantities,
687  ConstMatrixView ppath_1p_pnd, // the ppath_pnd at this ppath point
688  const ArrayOfMatrix&
689  ppath_dpnd_dx, // the full ppath_dpnd_dx, ie all ppath points
690  const Index ppath_1p_id,
691  const ArrayOfArrayOfSingleScatteringData& scat_data,
692  ConstVectorView ppath_line_of_sight,
693  ConstVectorView ppath_temperature,
694  const Index& atmosphere_dim,
695  const bool& jacobian_do);
696 
710  StokesVector& Sp,
711  ArrayOfStokesVector& dSp_dx,
712  const ArrayOfRetrievalQuantity& jacobian_quantities,
713  ConstVectorView ppath_1p_pnd,
714  const ArrayOfMatrix& ppath_dpnd_dx,
715  const Index ppath_1p_id,
716  const ArrayOfArrayOfSingleScatteringData& scat_data,
717  ConstTensor7View cloudbox_field,
718  ConstVectorView za_grid,
719  ConstVectorView aa_grid,
720  ConstMatrixView ppath_line_of_sight,
721  const GridPos& ppath_pressure,
722  const Vector& temperature,
723  const Index& atmosphere_dim,
724  const bool& jacobian_do,
725  const Index& t_interp_order = 1);
726 
751  Tensor3View T,
752  Tensor4View dT_dx_close,
753  Tensor4View dT_dx_far,
754  ConstTensor3View cumulative_transmission_close,
755  const PropagationMatrix& K_close,
756  const PropagationMatrix& K_far,
757  const ArrayOfPropagationMatrix& dK_close_dx,
758  const ArrayOfPropagationMatrix& dK_far_dx,
759  const Numeric& ppath_distance,
760  const bool& first_level,
761  const Numeric& dr_dT_close = 0,
762  const Numeric& dr_dT_far = 0,
763  const Index& it = -1);
764 
771 void iyb_calc(Workspace& ws,
772  Vector& iyb,
773  ArrayOfVector& iyb_aux,
774  ArrayOfMatrix& diyb_dx,
775  Matrix& geo_pos_matrix,
776  const Index& imblock,
777  const Index& atmosphere_dim,
778  const EnergyLevelMap& nlte_field,
779  const Index& cloudbox_on,
780  const Index& stokes_dim,
781  ConstVectorView f_grid,
782  ConstMatrixView sensor_pos,
783  ConstMatrixView sensor_los,
784  ConstMatrixView transmitter_pos,
785  ConstMatrixView mblock_dlos_grid,
786  const String& iy_unit,
787  const Agenda& iy_main_agenda,
788  const Agenda& geo_pos_agenda,
789  const Index& j_analytical_do,
790  const ArrayOfRetrievalQuantity& jacobian_quantities,
791  const ArrayOfArrayOfIndex& jacobian_indices,
792  const ArrayOfString& iy_aux_vars,
793  const Verbosity& verbosity);
794 
818 void iy_transmission_mult(Tensor3& iy_trans_total,
819  ConstTensor3View iy_trans_old,
820  ConstTensor3View iy_trans_new);
821 
840 void iy_transmission_mult(Matrix& iy_new,
841  ConstTensor3View iy_trans,
842  ConstMatrixView iy_old);
843 
859 void mirror_los(Vector& los_mirrored,
860  ConstVectorView los,
861  const Index& atmosphere_dim);
862 
879 void pos2true_latlon(Numeric& lat,
880  Numeric& lon,
881  const Index& atmosphere_dim,
882  ConstVectorView lat_grid,
883  ConstVectorView lat_true,
884  ConstVectorView lon_true,
885  ConstVectorView pos);
886 
896  ArrayOfIndex& jac_species_i,
897  ArrayOfIndex& jac_scat_i,
898  ArrayOfIndex& jac_is_t,
899  ArrayOfIndex& jac_wind_i,
900  ArrayOfIndex& jac_mag_i,
901  ArrayOfIndex& jac_other,
902  ArrayOfTensor3& diy_dx,
903  ArrayOfTensor3& diy_dpath,
904  const Index& ns,
905  const Index& nf,
906  const Index& np,
907  const Index& nq,
908  const ArrayOfArrayOfSpeciesTag& abs_species,
909  const Index& cloudbox_on,
910  const ArrayOfString& scat_species,
911  const ArrayOfTensor4& dpnd_field_dx,
912  const ArrayOfRetrievalQuantity& jacobian_quantities,
913  const Index& iy_agenda_call1,
914  const bool is_active = false);
915 
926  Workspace& ws,
927  ArrayOfTensor3& diy_dx,
928  ArrayOfTensor3& diy_dpath,
929  const Index& ns,
930  const Index& nf,
931  const Index& np,
932  const Index& atmosphere_dim,
933  const Ppath& ppath,
934  const Vector& ppvar_p,
935  const Vector& ppvar_t,
936  const Matrix& ppvar_vmr,
937  const Index& iy_agenda_call1,
938  const Tensor3& iy_transmission,
939  const Agenda& water_p_eq_agenda,
940  const ArrayOfRetrievalQuantity& jacobian_quantities,
941  const ArrayOfIndex jac_species_i,
942  const ArrayOfIndex jac_is_t);
943 
955  Matrix& iy,
956  ArrayOfTensor3& diy_dx,
957  Tensor3& ppvar_iy,
958  const Index& ns,
959  const Index& np,
960  const Vector& f_grid,
961  const Ppath& ppath,
962  const ArrayOfRetrievalQuantity& jacobian_quantities,
963  const Index& j_analytical_do,
964  const String& iy_unit);
965 
970 void yCalc_mblock_loop_body(bool& failed,
971  String& fail_msg,
972  ArrayOfArrayOfVector& iyb_aux_array,
973  Workspace& ws,
974  Vector& y,
975  Vector& y_f,
976  ArrayOfIndex& y_pol,
977  Matrix& y_pos,
978  Matrix& y_los,
979  Matrix& y_geo,
980  Matrix& jacobian,
981  const Index& atmosphere_dim,
982  const EnergyLevelMap& nlte_field,
983  const Index& cloudbox_on,
984  const Index& stokes_dim,
985  const Vector& f_grid,
986  const Matrix& sensor_pos,
987  const Matrix& sensor_los,
988  const Matrix& transmitter_pos,
989  const Matrix& mblock_dlos_grid,
990  const Sparse& sensor_response,
991  const Vector& sensor_response_f,
992  const ArrayOfIndex& sensor_response_pol,
993  const Matrix& sensor_response_dlos,
994  const String& iy_unit,
995  const Agenda& iy_main_agenda,
996  const Agenda& geo_pos_agenda,
997  const Agenda& jacobian_agenda,
998  const Index& jacobian_do,
999  const ArrayOfRetrievalQuantity& jacobian_quantities,
1000  const ArrayOfArrayOfIndex& jacobian_indices,
1001  const ArrayOfString& iy_aux_vars,
1002  const Verbosity& verbosity,
1003  const Index& mblock_index,
1004  const Index& n1y,
1005  const Index& j_analytical_do);
1006 
1023 void ze_cfac(Vector& fac,
1024  const Vector& f_grid,
1025  const Numeric& ze_tref,
1026  const Numeric& k2);
1027 
1028 #endif // rte_h
void get_stepwise_clearsky_propmat(Workspace &ws, PropagationMatrix &K, StokesVector &S, Index &lte, ArrayOfPropagationMatrix &dK_dx, ArrayOfStokesVector &dS_dx, const Agenda &propmat_clearsky_agenda, const ArrayOfRetrievalQuantity &jacobian_quantities, ConstVectorView ppath_f_grid, ConstVectorView ppath_magnetic_field, ConstVectorView ppath_line_of_sight, const EnergyLevelMap &ppath_nlte, ConstVectorView ppath_vmrs, const Numeric &ppath_temperature, const Numeric &ppath_pressure, const ArrayOfIndex &jacobian_species, const bool &jacobian_do)
Gets the clearsky propgation matrix and NLTE contributions.
Definition: rte.cc:1322
INDEX Index
The type to use for all integer numbers and indices.
Definition: matpack.h:39
The VectorView class.
Definition: matpackI.h:610
#define ns
void get_ppath_atmvars(Vector &ppath_p, Vector &ppath_t, EnergyLevelMap &ppath_nlte, Matrix &ppath_vmr, Matrix &ppath_wind, Matrix &ppath_mag, const Ppath &ppath, const Index &atmosphere_dim, ConstVectorView p_grid, ConstTensor3View t_field, const EnergyLevelMap &nlte_field, ConstTensor4View vmr_field, ConstTensor3View wind_u_field, ConstTensor3View wind_v_field, ConstTensor3View wind_w_field, ConstTensor3View mag_u_field, ConstTensor3View mag_v_field, ConstTensor3View mag_w_field)
Determines pressure, temperature, VMR, winds and magnetic field for each propgataion path point...
Definition: rte.cc:1034
A class implementing complex numbers for ARTS.
The Tensor4View class.
Definition: matpackIV.h:284
The Agenda class.
Definition: agenda_class.h:44
void get_stepwise_f_partials(Vector &f_partials, const Index &component, ConstVectorView &ppath_line_of_sight, ConstVectorView f_grid, const Index &atmosphere_dim)
Computes the ratio that a partial derivative with regards to frequency relates to the wind of come co...
Definition: rte.cc:1541
void get_stepwise_frequency_grid(VectorView ppath_f_grid, ConstVectorView f_grid, ConstVectorView ppath_wind, ConstVectorView ppath_line_of_sight, const Numeric &rte_alonglos_v, const Index &atmosphere_dim)
Inverse of get_stepwise_f_partials.
Definition: rte.cc:1521
A constant view of a Tensor7.
Definition: matpackVII.h:147
void bending_angle1d(Numeric &alpha, const Ppath &ppath)
Calculates the bending angle for a 1D atmosphere.
Definition: rte.cc:327
Routines for setting up the jacobian.
The Vector class.
Definition: matpackI.h:860
void rtmethods_unit_conversion(Matrix &iy, ArrayOfTensor3 &diy_dx, Tensor3 &ppvar_iy, const Index &ns, const Index &np, const Vector &f_grid, const Ppath &ppath, const ArrayOfRetrievalQuantity &jacobian_quantities, const Index &j_analytical_do, const String &iy_unit)
This function handles the unit conversion to be done at the end of some radiative transfer WSMs...
Definition: rte.cc:2553
The MatrixView class.
Definition: matpackI.h:1093
Numeric fac(const Index n)
fac
Definition: math_funcs.cc:63
void mirror_los(Vector &los_mirrored, ConstVectorView los, const Index &atmosphere_dim)
Determines the backward direction for a given line-of-sight.
Definition: rte.cc:2290
The Sparse class.
Definition: matpackII.h:60
The Tensor4 class.
Definition: matpackIV.h:421
The range class.
Definition: matpackI.h:160
void adjust_los(VectorView los, const Index &atmosphere_dim)
Ensures that the zenith and azimuth angles of a line-of-sight vector are inside defined ranges...
Definition: rte.cc:140
void yCalc_mblock_loop_body(bool &failed, String &fail_msg, ArrayOfArrayOfVector &iyb_aux_array, Workspace &ws, Vector &y, Vector &y_f, ArrayOfIndex &y_pol, Matrix &y_pos, Matrix &y_los, Matrix &y_geo, Matrix &jacobian, const Index &atmosphere_dim, const EnergyLevelMap &nlte_field, const Index &cloudbox_on, const Index &stokes_dim, const Vector &f_grid, const Matrix &sensor_pos, const Matrix &sensor_los, const Matrix &transmitter_pos, const Matrix &mblock_dlos_grid, const Sparse &sensor_response, const Vector &sensor_response_f, const ArrayOfIndex &sensor_response_pol, const Matrix &sensor_response_dlos, const String &iy_unit, const Agenda &iy_main_agenda, const Agenda &geo_pos_agenda, const Agenda &jacobian_agenda, const Index &jacobian_do, const ArrayOfRetrievalQuantity &jacobian_quantities, const ArrayOfArrayOfIndex &jacobian_indices, const ArrayOfString &iy_aux_vars, const Verbosity &verbosity, const Index &mblock_index, const Index &n1y, const Index &j_analytical_do)
Performs calculations for one measurement block, on y-level.
Definition: rte.cc:2595
cmplx FADDEEVA() w(cmplx z, double relerr)
Definition: Faddeeva.cc:680
void ext2trans(MatrixView trans_mat, Index &icase, ConstMatrixView ext_mat_av, const Numeric &l_step)
Converts an extinction matrix to a transmission matrix.
Definition: rte.cc:800
void defocusing_sat2sat(Workspace &ws, Numeric &dlf, const Agenda &ppath_step_agenda, const Index &atmosphere_dim, ConstVectorView p_grid, ConstVectorView lat_grid, ConstVectorView lon_grid, ConstTensor3View z_field, ConstVectorView f_grid, ConstVectorView refellipsoid, ConstMatrixView z_surface, const Ppath &ppath, const Numeric &ppath_lmax, const Numeric &ppath_lraytrace, const Numeric &dza, const Verbosity &verbosity)
Calculates defocusing for limb measurements between two satellites.
Definition: rte.cc:613
void rtmethods_jacobian_finalisation(Workspace &ws, ArrayOfTensor3 &diy_dx, ArrayOfTensor3 &diy_dpath, const Index &ns, const Index &nf, const Index &np, const Index &atmosphere_dim, const Ppath &ppath, const Vector &ppvar_p, const Vector &ppvar_t, const Matrix &ppvar_vmr, const Index &iy_agenda_call1, const Tensor3 &iy_transmission, const Agenda &water_p_eq_agenda, const ArrayOfRetrievalQuantity &jacobian_quantities, const ArrayOfIndex jac_species_i, const ArrayOfIndex jac_is_t)
This function fixes the last steps to made on the Jacobian in some radiative transfer WSMs...
Definition: rte.cc:2416
Stokes vector is as Propagation matrix but only has 4 possible values.
void iyb_calc(Workspace &ws, Vector &iyb, ArrayOfVector &iyb_aux, ArrayOfMatrix &diyb_dx, Matrix &geo_pos_matrix, const Index &imblock, const Index &atmosphere_dim, const EnergyLevelMap &nlte_field, const Index &cloudbox_on, const Index &stokes_dim, ConstVectorView f_grid, ConstMatrixView sensor_pos, ConstMatrixView sensor_los, ConstMatrixView transmitter_pos, ConstMatrixView mblock_dlos_grid, const String &iy_unit, const Agenda &iy_main_agenda, const Agenda &geo_pos_agenda, const Index &j_analytical_do, const ArrayOfRetrievalQuantity &jacobian_quantities, const ArrayOfArrayOfIndex &jacobian_indices, const ArrayOfString &iy_aux_vars, const Verbosity &verbosity)
Performs calculations for one measurement block, on iy-level.
Definition: rte.cc:2051
Structure to store a grid position.
Definition: interpolation.h:73
A constant view of a Tensor4.
Definition: matpackIV.h:133
void adapt_stepwise_partial_derivatives(ArrayOfPropagationMatrix &dK_dx, ArrayOfStokesVector &dS_dx, const ArrayOfRetrievalQuantity &jacobian_quantities, ConstVectorView ppath_f_grid, ConstVectorView ppath_line_of_sight, ConstVectorView ppath_vmrs, const Numeric &ppath_temperature, const Numeric &ppath_pressure, const ArrayOfIndex &jacobian_species, const ArrayOfIndex &jacobian_wind, const Index &lte, const Index &atmosphere_dim, const bool &jacobian_do)
Adapts clearsky partial derivatives.
Definition: rte.cc:59
void defocusing_general(Workspace &ws, Numeric &dlf, const Agenda &ppath_step_agenda, const Index &atmosphere_dim, ConstVectorView p_grid, ConstVectorView lat_grid, ConstVectorView lon_grid, ConstTensor3View z_field, ConstVectorView f_grid, ConstVectorView refellipsoid, ConstMatrixView z_surface, const Ppath &ppath, const Numeric &ppath_lmax, const Numeric &ppath_lraytrace, const Numeric &dza, const Verbosity &verbosity)
Defocusing for arbitrary geometry (zenith angle part only)
Definition: rte.cc:494
void get_stepwise_scattersky_propmat(StokesVector &ap, PropagationMatrix &Kp, ArrayOfStokesVector &dap_dx, ArrayOfPropagationMatrix &dKp_dx, const ArrayOfRetrievalQuantity &jacobian_quantities, ConstMatrixView ppath_1p_pnd, const ArrayOfMatrix &ppath_dpnd_dx, const Index ppath_1p_id, const ArrayOfArrayOfSingleScatteringData &scat_data, ConstVectorView ppath_line_of_sight, ConstVectorView ppath_temperature, const Index &atmosphere_dim, const bool &jacobian_do)
Computes the contribution by scattering at propagation path point.
Definition: rte.cc:1591
The Tensor3 class.
Definition: matpackIII.h:339
The global header file for ARTS.
void apply_iy_unit(MatrixView iy, const String &iy_unit, ConstVectorView f_grid, const Numeric &n, const ArrayOfIndex &i_pol)
Performs conversion from radiance to other units, as well as applies refractive index to fulfill the ...
Definition: rte.cc:163
void get_ppath_cloudvars(ArrayOfIndex &clear2cloudy, Matrix &ppath_pnd, ArrayOfMatrix &ppath_dpnd_dx, const Ppath &ppath, const Index &atmosphere_dim, const ArrayOfIndex &cloudbox_limits, const Tensor4 &pnd_field, const ArrayOfTensor4 &dpnd_field_dx)
Determines the particle fields along a propagation path.
Definition: rte.cc:1153
Header file for sparse matrices.
Range get_rowindex_for_mblock(const Sparse &sensor_response, const Index &imblock)
Returns the "range" of y corresponding to a measurement block.
Definition: rte.cc:1301
void iy_transmission_mult(Tensor3 &iy_trans_total, ConstTensor3View iy_trans_old, ConstTensor3View iy_trans_new)
Multiplicates iy_transmission with transmissions.
Definition: rte.cc:2253
void get_iy_of_background(Workspace &ws, Matrix &iy, ArrayOfTensor3 &diy_dx, ConstTensor3View iy_transmission, const Index &iy_id, const Index &jacobian_do, const ArrayOfRetrievalQuantity &jacobian_quantities, const Ppath &ppath, ConstVectorView rte_pos2, const Index &atmosphere_dim, const EnergyLevelMap &nlte_field, const Index &cloudbox_on, const Index &stokes_dim, ConstVectorView f_grid, const String &iy_unit, ConstTensor3View surface_props_data, const Agenda &iy_main_agenda, const Agenda &iy_space_agenda, const Agenda &iy_surface_agenda, const Agenda &iy_cloudbox_agenda, const Index &iy_agenda_call1, const Verbosity &verbosity)
Determines iy of the "background" of a propgation path.
Definition: rte.cc:916
void apply_iy_unit2(Tensor3View J, ConstMatrixView iy, const String &iy_unit, ConstVectorView f_grid, const Numeric &n, const ArrayOfIndex &i_pol)
Largely as apply_iy_unit but operates on jacobian data.
Definition: rte.cc:238
ArrayOfTransmissionMatrix cumulative_transmission(const ArrayOfTransmissionMatrix &T, const CumulativeTransmission type)
Accumulate the transmission matrix over all layers.
Declarations for agendas.
The Tensor3View class.
Definition: matpackIII.h:239
void rtmethods_jacobian_init(ArrayOfIndex &jac_species_i, ArrayOfIndex &jac_scat_i, ArrayOfIndex &jac_is_t, ArrayOfIndex &jac_wind_i, ArrayOfIndex &jac_mag_i, ArrayOfIndex &jac_other, ArrayOfTensor3 &diy_dx, ArrayOfTensor3 &diy_dpath, const Index &ns, const Index &nf, const Index &np, const Index &nq, const ArrayOfArrayOfSpeciesTag &abs_species, const Index &cloudbox_on, const ArrayOfString &scat_species, const ArrayOfTensor4 &dpnd_field_dx, const ArrayOfRetrievalQuantity &jacobian_quantities, const Index &iy_agenda_call1, const bool is_active=false)
This function fixes the initial steps around Jacobian calculations, to be done inside radiative trans...
Definition: rte.cc:2348
Numeric dotprod_with_los(ConstVectorView los, const Numeric &u, const Numeric &v, const Numeric &w, const Index &atmosphere_dim)
Calculates the dot product between a field and a LOS.
Definition: rte.cc:730
NUMERIC Numeric
The type to use for all floating point numbers.
Definition: matpack.h:33
The Matrix class.
Definition: matpackI.h:1193
void get_stepwise_scattersky_source(StokesVector &Sp, ArrayOfStokesVector &dSp_dx, const ArrayOfRetrievalQuantity &jacobian_quantities, ConstVectorView ppath_1p_pnd, const ArrayOfMatrix &ppath_dpnd_dx, const Index ppath_1p_id, const ArrayOfArrayOfSingleScatteringData &scat_data, ConstTensor7View cloudbox_field, ConstVectorView za_grid, ConstVectorView aa_grid, ConstMatrixView ppath_line_of_sight, const GridPos &ppath_pressure, const Vector &temperature, const Index &atmosphere_dim, const bool &jacobian_do, const Index &t_interp_order=1)
Calculates the stepwise scattering source terms.
Definition: rte.cc:1708
void get_stepwise_blackbody_radiation(VectorView B, VectorView dB_dT, ConstVectorView ppath_f_grid, const Numeric &ppath_temperature, const bool &do_temperature_derivative)
Get the blackbody radiation at propagation path point.
Definition: rte.cc:1307
void get_iy(Workspace &ws, Matrix &iy, const Index &cloudbox_on, ConstVectorView f_grid, const EnergyLevelMap &nlte_field, ConstVectorView rte_pos, ConstVectorView rte_los, ConstVectorView rte_pos2, const String &iy_unit, const Agenda &iy_main_agenda)
Basic call of iy_main_agenda.
Definition: rte.cc:877
Implementation of Matrix, Vector, and such stuff.
Propagation path structure and functions.
This can be used to make arrays out of anything.
Definition: array.h:40
void get_ppath_f(Matrix &ppath_f, const Ppath &ppath, ConstVectorView f_grid, const Index &atmosphere_dim, const Numeric &rte_alonglos_v, ConstMatrixView ppath_wind)
Determines the Doppler shifted frequencies along the propagation path.
Definition: rte.cc:1257
void get_stepwise_effective_source(MatrixView J, Tensor3View dJ_dx, const PropagationMatrix &K, const StokesVector &a, const StokesVector &S, const ArrayOfPropagationMatrix &dK_dx, const ArrayOfStokesVector &da_dx, const ArrayOfStokesVector &dS_dx, ConstVectorView B, ConstVectorView dB_dT, const ArrayOfRetrievalQuantity &jacobian_quantities, const bool &jacobian_do)
Gets the effective source at propagation path point.
Definition: rte.cc:1427
A constant view of a Tensor3.
Definition: matpackIII.h:132
A constant view of a Vector.
Definition: matpackI.h:476
A constant view of a Matrix.
Definition: matpackI.h:982
Workspace class.
Definition: workspace_ng.h:40
void ze_cfac(Vector &fac, const Vector &f_grid, const Numeric &ze_tref, const Numeric &k2)
Calculates factor to convert back-scattering to Ze.
Definition: rte.cc:2736
The structure to describe a propagation path and releated quantities.
Definition: ppath.h:48
void pos2true_latlon(Numeric &lat, Numeric &lon, const Index &atmosphere_dim, ConstVectorView lat_grid, ConstVectorView lat_true, ConstVectorView lon_true, ConstVectorView pos)
Determines the true alt and lon for an "ARTS position".
Definition: rte.cc:2314
Scattering database structure and functions.
void get_stepwise_transmission_matrix(Tensor3View cumulative_transmission, Tensor3View T, Tensor4View dT_dx_close, Tensor4View dT_dx_far, ConstTensor3View cumulative_transmission_close, const PropagationMatrix &K_close, const PropagationMatrix &K_far, const ArrayOfPropagationMatrix &dK_close_dx, const ArrayOfPropagationMatrix &dK_far_dx, const Numeric &ppath_distance, const bool &first_level, const Numeric &dr_dT_close=0, const Numeric &dr_dT_far=0, const Index &it=-1)
Computes layer transmission matrix and cumulative transmission.
Definition: rte.cc:1879