ARTS 2.5.4 (git: 31ce4f0e)
star.h File Reference

Declaration of functions in star.cc. More...

#include "arts.h"
#include "gridded_fields.h"
#include "matpack.h"
#include "transmissionmatrix.h"
#include "energylevelmap.h"
#include "optproperties.h"

Go to the source code of this file.

Classes

struct  Star
 The structure to describe a propagation path and releated quantities. More...
 

Typedefs

using ArrayOfStar = Array< Star >
 An array of star. More...
 

Functions

void get_scattered_starsource (Workspace &ws, RadiationVector &scattered_starlight, const Vector &f_grid, const Numeric &p, const Numeric &T, const Vector &vmr, const Matrix &transmitted_starlight, const Vector &gas_scattering_los_in, const Vector &gas_scattering_los_out, const Agenda &gas_scattering_agenda)
 Calculates the radiance spectrum of star which is scattered by the atmospheric gases. More...
 
void get_star_background (Matrix &iy, Index &stars_visible, const ArrayOfStar &stars, const Ppath &ppath, const Vector &f_grid, const Index &stokes_dim, const Index &atmosphere_dim, const Vector &refellipsoid)
 Gets the star background for a given ppath. More...
 
void get_star_radiation (Matrix &iy, Index &stars_visible, const Star &star, const Vector &rtp_pos, const Vector &rtp_los, const Vector &refellipsoid)
 Checks and adds star radiance if star is in line of sight. More...
 
void get_direct_radiation (Workspace &ws, ArrayOfMatrix &direct_radiation, ArrayOfArrayOfTensor3 &ddirect_radiation_dx, const Index &stokes_dim, const Vector &f_grid, const Index &atmosphere_dim, const Vector &p_grid, const Vector &lat_grid, const Vector &lon_grid, const Tensor3 &t_field, const EnergyLevelMap &nlte_field, const Tensor4 &vmr_field, const ArrayOfArrayOfSpeciesTag &abs_species, const Tensor3 &wind_u_field, const Tensor3 &wind_v_field, const Tensor3 &wind_w_field, const Tensor3 &mag_u_field, const Tensor3 &mag_v_field, const Tensor3 &mag_w_field, const Index &cloudbox_on, const ArrayOfIndex &cloudbox_limits, const Index &gas_scattering_do, const Index &irradiance_flag, const ArrayOfPpath &star_ppaths, const ArrayOfStar &stars, const ArrayOfIndex &stars_visible, const Vector &refellipsoid, const Tensor4 &pnd_field, const ArrayOfTensor4 &dpnd_field_dx, const ArrayOfString &scat_species, const ArrayOfArrayOfSingleScatteringData &scat_data, const Index &jacobian_do, const ArrayOfRetrievalQuantity &jacobian_quantities, const Agenda &propmat_clearsky_agenda, const Agenda &water_p_eq_agenda, const Agenda &gas_scattering_agenda, const Numeric &rte_alonglos_v, const Verbosity &verbosity)
 Calculates the transmitted star radiation at the end position of the ppath. More...
 
void get_star_ppaths (Workspace &ws, ArrayOfPpath &star_ppaths, ArrayOfIndex &stars_visible, ArrayOfVector &star_rte_los, const Vector &rte_pos, const ArrayOfStar &stars, const Vector &f_grid, const Index &atmosphere_dim, const Vector &p_grid, const Vector &lat_grid, const Vector &lon_grid, const Tensor3 &z_field, const Matrix &z_surface, const Vector &refellipsoid, const Numeric &ppath_lmax, const Numeric &ppath_lraytrace, const Agenda &ppath_step_agenda, const Verbosity &verbosity)
 Calculates the ppath towards the stars from a given position and indicates if star is visible or not. More...
 
Matrix regrid_star_spectrum (const GriddedField2 &star_spectrum_raw, const Vector &f_grid, const Index &stokes_dim, const Numeric &temperature, const Verbosity &verbosity)
 regrid_star_spectrum More...
 

Detailed Description

Typedef Documentation

◆ ArrayOfStar

An array of star.

Definition at line 78 of file star.h.

Function Documentation

◆ get_direct_radiation()

void get_direct_radiation ( Workspace ws,
ArrayOfMatrix direct_radiation,
ArrayOfArrayOfTensor3 ddirect_radiation_dx,
const Index stokes_dim,
const Vector f_grid,
const Index atmosphere_dim,
const Vector p_grid,
const Vector lat_grid,
const Vector lon_grid,
const Tensor3 t_field,
const EnergyLevelMap nlte_field,
const Tensor4 vmr_field,
const ArrayOfArrayOfSpeciesTag abs_species,
const Tensor3 wind_u_field,
const Tensor3 wind_v_field,
const Tensor3 wind_w_field,
const Tensor3 mag_u_field,
const Tensor3 mag_v_field,
const Tensor3 mag_w_field,
const Index cloudbox_on,
const ArrayOfIndex cloudbox_limits,
const Index gas_scattering_do,
const Index irradiance_flag,
const ArrayOfPpath star_ppaths,
const ArrayOfStar stars,
const ArrayOfIndex stars_visible,
const Vector refellipsoid,
const Tensor4 pnd_field,
const ArrayOfTensor4 dpnd_field_dx,
const ArrayOfString scat_species,
const ArrayOfArrayOfSingleScatteringData scat_data,
const Index jacobian_do,
const ArrayOfRetrievalQuantity jacobian_quantities,
const Agenda propmat_clearsky_agenda,
const Agenda water_p_eq_agenda,
const Agenda gas_scattering_agenda,
const Numeric rte_alonglos_v,
const Verbosity verbosity 
)

Calculates the transmitted star radiation at the end position of the ppath.

Parameters
[in,out]wsARTS workspace.
[out]direct_radiationMatrix Transmitted monochromatic irradiance spectrum of star.
[out]ddirect_radiation_dxArray of Tensor3 Jacobian of transmitted monochromatic irradiance spectrum of star.
[in]stokes_dimAs the WSV.
[in]f_gridAs the WSV.
[in]atmosphere_dimAs the WSV.
[in]p_gridAs the WSV.
[in]lat_gridAs the WSV.
[in]lon_gridAs the WSV.
[in]t_fieldAs the WSV.
[in]nlte_fieldAs the WSV.
[in]vmr_fieldAs the WSV.
[in]abs_speciesAs the WSV.
[in]wind_u_fieldAs the WSV.
[in]wind_v_fieldAs the WSV.
[in]wind_w_fieldAs the WSV.
[in]mag_u_fieldAs the WSV.
[in]mag_v_fieldAs the WSV.
[in]mag_w_fieldAs the WSV.
[in]cloudbox_onAs the WSV.
[in]cloudbox_limitsAs the WSV.
[in]gas_scattering_doAs the WSV.
[in]irradiance_flagIndex Flag indicating if the transmitted radiation is spectral irradiance (1) or if it is spectral radiance (0).
[in]star_ppathsArrayOfPpath Propagation path towards each star.
[in]starsAs the WSV.
[in]stars_visibleArrayOfIndex Flag indicating if eah star is visible.
[in]refellipsoidAs the WSV.
[in]pnd_fieldAs the WSV.
[in]dpnd_field_dxAs the WSV.
[in]scat_speciesAs the WSV.
[in]scat_dataAs the WSV.
[in]jacobian_doAs the WSV.
[in]jacobian_quantitiesAs the WSV.
[in]propmat_clearsky_agendaAs the WSV.
[in]water_p_eq_agendaAs the WSV.
[in]gas_scattering_agendaAs the WSV.
[in]ppath_step_agendaAs the WSV.
[in]rte_alonglos_vAs the WSV.
[in]verbosityVerbosity.

Definition at line 215 of file star.cc.

References distance3D(), get_star_radiation(), iyTransmissionStandard(), joker, Array< base >::nelem(), ConstVectorView::nelem(), pos2refell_r(), refell2r(), Vector::resize(), and Matrix::resize().

Referenced by iyClearsky(), and iySurfaceLambertianDirect().

◆ get_scattered_starsource()

void get_scattered_starsource ( Workspace ws,
RadiationVector scattered_starlight,
const Vector f_grid,
const Numeric p,
const Numeric T,
const Vector vmr,
const Matrix transmitted_starlight,
const Vector gas_scattering_los_in,
const Vector gas_scattering_los_out,
const Agenda gas_scattering_agenda 
)

Calculates the radiance spectrum of star which is scattered by the atmospheric gases.

Parameters
[in,out]wsARTS workspace.
[out]scattered_starlightRadiationVector scattered monochromatic radiance spectrum of star.
[in]f_gridVector frequency grid.
[in]pNumeric pressure at location of scattering.
[in]TNumeric temperature at location of scattering.
[in]vmrVector volume mixing ratios of absorption species at location of scattering.
[in]transmitted_starlightMatrix transmitted monochromatic irradiance spectrum of star at location of scattering.
[in]gas_scattering_los_inVector incoming direction of the transmitted star irradiance spectrum.
[in]gas_scattering_los_outoutgoing direction of the transmitted star irradiance spectrum.
[in]gas_scattering_agendaAgenda agenda calculating the gas scattering cross sectionand matrix.

Definition at line 65 of file star.cc.

References gas_scattering_agendaExecute(), joker, PropagationMatrix::Kjj(), RadiationVector::leftMul(), ConstMatrixView::ncols(), ConstVectorView::nelem(), ns, and Constant::pi.

Referenced by iyClearsky().

◆ get_star_background()

void get_star_background ( Matrix iy,
Index stars_visible,
const ArrayOfStar stars,
const Ppath ppath,
const Vector f_grid,
const Index stokes_dim,
const Index atmosphere_dim,
const Vector refellipsoid 
)

Gets the star background for a given ppath.

iy is zero if there is no star in the line of sight at TOA.

Parameters
[out]iyMatrix radiance spectrum of stars.
[out]stars_visibleIndex indicating if stars are in los
[in]starStar-structure.
[in]ppathPropagation path as the WSV.
[in]f_gridVector as the WSV.
[in]stokes_dimIndex as the WSV.
[in]atmosphere_dimIndex as the WSV.
[in]refellipsoidVector as the WSV.

Definition at line 116 of file star.cc.

References get_star_radiation(), joker, Ppath::los, ConstMatrixView::ncols(), Array< base >::nelem(), ConstVectorView::nelem(), Ppath::np, Ppath::pos, ppath_what_background(), Vector::resize(), and Matrix::resize().

Referenced by iyClearsky(), and surface_get_incoming_direct().

◆ get_star_ppaths()

void get_star_ppaths ( Workspace ws,
ArrayOfPpath star_ppaths,
ArrayOfIndex stars_visible,
ArrayOfVector star_rte_los,
const Vector rte_pos,
const ArrayOfStar stars,
const Vector f_grid,
const Index atmosphere_dim,
const Vector p_grid,
const Vector lat_grid,
const Vector lon_grid,
const Tensor3 z_field,
const Matrix z_surface,
const Vector refellipsoid,
const Numeric ppath_lmax,
const Numeric ppath_lraytrace,
const Agenda ppath_step_agenda,
const Verbosity verbosity 
)

Calculates the ppath towards the stars from a given position and indicates if star is visible or not.

Parameters
[in,out]wsARTS workspace.
[out]star_ppathsArrayOfPpath Propagation path towards each star.
[out]stars_visibleArrayOfIndex Flag indicating if eah star is visible.
[out]star_rte_losArrayOfVector Incoming direction of the each transmitted star radiation.
[in]rte_posAs the WSV.
[in]starsAs the WSV.
[in]f_gridAs the WSV.
[in]atmosphere_dimAs the WSV.
[in]p_gridAs the WSV.
[in]lat_gridAs the WSV.
[in]lon_gridAs the WSV.
[in]z_fieldAs the WSV.
[in]z_surfaceAs the WSV.
[in]refellipsoidAs the WSV.
[in]ppath_lmaxAs the WSV.
[in]ppath_lraytraceAs the WSV.
[in]ppath_step_agendaAs the WSV.
[in]verbosityVerbosity.

Definition at line 391 of file star.cc.

References Constant::e, Array< base >::nelem(), Ppath::np, pos2refell_r(), ppath_what_background(), ppathFromRtePos2(), and rte_losGeometricFromRtePosToRtePos2().

Referenced by iyClearsky(), and iySurfaceLambertianDirect().

◆ get_star_radiation()

void get_star_radiation ( Matrix iy,
Index stars_visible,
const Star star,
const Vector rtp_pos,
const Vector rtp_los,
const Vector refellipsoid 
)

Checks and adds star radiance if star is in line of sight.

Parameters
[in,out]iyMatrix of star.
[out]stars_visibleIndex indicating if star are in los
[in]starStar-structure.
[in]rtp_posThe position of the ppath point.
[in]rtp_losThe line of sight of the ppath.
[in]refellipsoidAs the WSV with the same name.

Definition at line 146 of file star.cc.

References Constant::alpha, beta, Star::distance, Star::latitude, Star::longitude, Constant::pi, poslos2cart(), Star::radius, refell2r(), Star::spectrum, sph2cart(), and sqrt().

Referenced by get_direct_radiation(), and get_star_background().

◆ regrid_star_spectrum()

Matrix regrid_star_spectrum ( const GriddedField2 star_spectrum_raw,
const Vector f_grid,
const Index stokes_dim,
const Numeric temperature,
const Verbosity verbosity 
)

regrid_star_spectrum

Regrids a given spectrum from a griddedfield2 to the f_grid. if the f_grid covers a larger range as the given one, one can choose between two padding options: zeros: Intensities outside the given spectrum are set to zero planck: Intensities outside the given spectrum are initilizied with the black body value at that frequency.

Parameters
[in]star_spectrum_rawgf2 of the given spectrum.
[in]f_gridf_grid for the calculation.
[in]stokes_dimstokes_dim for the calculation.
[in]temperatureTemperature for the planck padding.
Returns
interpolated spectrum
Author
Jon Petersen
Date
2022-01-19

Definition at line 466 of file star.cc.

References ARTS_USER_ERROR, chk_interpolation_grids(), CREATE_OUTS, GriddedField2::data, ConstVectorView::get_c_array(), GriddedField::get_numeric_grid(), gridpos(), interp(), interpweights(), Array< base >::nelem(), ConstVectorView::nelem(), planck(), and ConstVectorView::size().

Referenced by starsAddSingleFromGrid().