ARTS
2.0.49
|
Workspace functions related to sensor modelling variables. More...
#include <cmath>
#include <stdexcept>
#include <string>
#include "arts.h"
#include "check_input.h"
#include "interpolation_poly.h"
#include "math_funcs.h"
#include "messages.h"
#include "ppath.h"
#include "special_interp.h"
#include "xml_io.h"
#include "sensor.h"
#include "make_vector.h"
#include "sorting.h"
#include "auto_md.h"
Go to the source code of this file.
Functions | |
void | AntennaConstantGaussian1D (Index &antenna_dim, Vector &mblock_za_grid, Vector &mblock_aa_grid, GriddedField4 &r, Matrix &antenna_los, const Index &n_za_grid, const Numeric &fwhm, const Numeric &xwidth_si, const Numeric &dx_si, const Verbosity &verbosity) |
WORKSPACE METHOD: AntennaConstantGaussian1D. More... | |
void | AntennaMultiBeamsToPencilBeams (Matrix &sensor_pos, Matrix &sensor_los, Matrix &antenna_los, Index &antenna_dim, Vector &mblock_za_grid, Vector &mblock_aa_grid, const Index &atmosphere_dim, const Verbosity &verbosity) |
WORKSPACE METHOD: AntennaMultiBeamsToPencilBeams. More... | |
void | AntennaOff (Index &antenna_dim, Vector &mblock_za_grid, Vector &mblock_aa_grid, const Verbosity &verbosity) |
WORKSPACE METHOD: AntennaOff. More... | |
void | AntennaSet1D (Index &antenna_dim, Vector &mblock_aa_grid, const Verbosity &verbosity) |
WORKSPACE METHOD: AntennaSet1D. More... | |
void | AntennaSet2D (Index &antenna_dim, const Index &atmosphere_dim, const Verbosity &verbosity) |
WORKSPACE METHOD: AntennaSet2D. More... | |
void | antenna_responseGaussian (GriddedField4 &r, const Numeric &fwhm, const Numeric &xwidth_si, const Numeric &dx_si, const Verbosity &) |
WORKSPACE METHOD: antenna_responseGaussian. More... | |
void | backend_channel_responseFlat (ArrayOfGriddedField1 &r, const Numeric &resolution, const Verbosity &) |
WORKSPACE METHOD: backend_channel_responseFlat. More... | |
void | backend_channel_responseGaussian (ArrayOfGriddedField1 &r, const Numeric &fwhm, const Numeric &xwidth_si, const Numeric &dx_si, const Verbosity &) |
WORKSPACE METHOD: backend_channel_responseGaussian. More... | |
void | f_gridFromSensorAMSU (Vector &f_grid, const Vector &lo, const ArrayOfVector &f_backend, const ArrayOfArrayOfGriddedField1 &backend_channel_response, const Numeric &spacing, const Verbosity &verbosity) |
WORKSPACE METHOD: f_gridFromSensorAMSU. More... | |
void | f_gridFromSensorHIRS (Vector &f_grid, const Vector &f_backend, const ArrayOfGriddedField1 &backend_channel_response, const Numeric &spacing, const Verbosity &verbosity) |
WORKSPACE METHOD: f_gridFromSensorHIRS. More... | |
void | sensor_responseAntenna (Sparse &sensor_response, Vector &sensor_response_f, ArrayOfIndex &sensor_response_pol, Vector &sensor_response_za, Vector &sensor_response_aa, Vector &sensor_response_za_grid, Vector &sensor_response_aa_grid, const Vector &sensor_response_f_grid, const ArrayOfIndex &sensor_response_pol_grid, const Index &atmosphere_dim, const Index &antenna_dim, const Matrix &antenna_los, const GriddedField4 &antenna_response, const Index &sensor_norm, const Verbosity &verbosity) |
WORKSPACE METHOD: sensor_responseAntenna. More... | |
void | sensor_responseBackend (Sparse &sensor_response, Vector &sensor_response_f, ArrayOfIndex &sensor_response_pol, Vector &sensor_response_za, Vector &sensor_response_aa, Vector &sensor_response_f_grid, const ArrayOfIndex &sensor_response_pol_grid, const Vector &sensor_response_za_grid, const Vector &sensor_response_aa_grid, const Vector &f_backend, const ArrayOfGriddedField1 &backend_channel_response, const Index &sensor_norm, const Verbosity &verbosity) |
WORKSPACE METHOD: sensor_responseBackend. More... | |
void | sensor_responseBackendFrequencySwitching (Sparse &sensor_response, Vector &sensor_response_f, ArrayOfIndex &sensor_response_pol, Vector &sensor_response_za, Vector &sensor_response_aa, Vector &sensor_response_f_grid, const ArrayOfIndex &sensor_response_pol_grid, const Vector &sensor_response_za_grid, const Vector &sensor_response_aa_grid, const Vector &f_backend, const ArrayOfGriddedField1 &backend_channel_response, const Index &sensor_norm, const Numeric &df1, const Numeric &df2, const Verbosity &verbosity) |
WORKSPACE METHOD: sensor_responseBackendFrequencySwitching. More... | |
void | sensor_responseBeamSwitching (Sparse &sensor_response, Vector &sensor_response_f, ArrayOfIndex &sensor_response_pol, Vector &sensor_response_za, Vector &sensor_response_aa, Vector &sensor_response_za_grid, Vector &sensor_response_aa_grid, const Vector &sensor_response_f_grid, const ArrayOfIndex &sensor_response_pol_grid, const Numeric &w1, const Numeric &w2, const Verbosity &verbosity) |
WORKSPACE METHOD: sensor_responseBeamSwitching. More... | |
void | sensor_responseFrequencySwitching (Sparse &sensor_response, Vector &sensor_response_f, ArrayOfIndex &sensor_response_pol, Vector &sensor_response_za, Vector &sensor_response_aa, Vector &sensor_response_f_grid, const ArrayOfIndex &sensor_response_pol_grid, const Vector &sensor_response_za_grid, const Vector &sensor_response_aa_grid, const Verbosity &verbosity) |
WORKSPACE METHOD: sensor_responseFrequencySwitching. More... | |
void | sensor_responseIF2RF (Vector &sensor_response_f, Vector &sensor_response_f_grid, const Numeric &lo, const String &sideband_mode, const Verbosity &) |
WORKSPACE METHOD: sensor_responseIF2RF. More... | |
void | sensor_responseFromArrayData (Sparse &sensor_response, Vector &sensor_response_f, ArrayOfIndex &sensor_response_pol, Vector &sensor_response_za, Vector &sensor_response_aa, const Index &imblock, const ArrayOfSparse &sensor_response_array, const ArrayOfVector &sensor_response_f_array, const ArrayOfArrayOfIndex &sensor_response_pol_array, const ArrayOfVector &sensor_response_za_array, const ArrayOfVector &sensor_response_aa_array, const ArrayOfIndex &sensor_response_index, const Verbosity &) |
WORKSPACE METHOD: sensor_responseFromArrayData. More... | |
void | sensor_responseFillFgrid (Sparse &sensor_response, Vector &sensor_response_f, ArrayOfIndex &sensor_response_pol, Vector &sensor_response_za, Vector &sensor_response_aa, Vector &sensor_response_f_grid, const ArrayOfIndex &sensor_response_pol_grid, const Vector &sensor_response_za_grid, const Vector &sensor_response_aa_grid, const Index &polyorder, const Index &nfill, const Verbosity &verbosity) |
WORKSPACE METHOD: sensor_responseFillFgrid. More... | |
void | sensor_responseInit (Sparse &sensor_response, Vector &sensor_response_f, ArrayOfIndex &sensor_response_pol, Vector &sensor_response_za, Vector &sensor_response_aa, Vector &sensor_response_f_grid, ArrayOfIndex &sensor_response_pol_grid, Vector &sensor_response_za_grid, Vector &sensor_response_aa_grid, const Vector &f_grid, const Vector &mblock_za_grid, const Vector &mblock_aa_grid, const Index &antenna_dim, const Index &atmosphere_dim, const Index &stokes_dim, const Index &sensor_norm, const Verbosity &verbosity) |
WORKSPACE METHOD: sensor_responseInit. More... | |
void | sensorOff (Sparse &sensor_response, Vector &sensor_response_f, ArrayOfIndex &sensor_response_pol, Vector &sensor_response_za, Vector &sensor_response_aa, Vector &sensor_response_f_grid, ArrayOfIndex &sensor_response_pol_grid, Vector &sensor_response_za_grid, Vector &sensor_response_aa_grid, Index &antenna_dim, Vector &mblock_za_grid, Vector &mblock_aa_grid, const Index &atmosphere_dim, const Index &stokes_dim, const Vector &f_grid, const Verbosity &verbosity) |
WORKSPACE METHOD: sensorOff. More... | |
void | sensor_responseMixer (Sparse &sensor_response, Vector &sensor_response_f, ArrayOfIndex &sensor_response_pol, Vector &sensor_response_za, Vector &sensor_response_aa, Vector &sensor_response_f_grid, const ArrayOfIndex &sensor_response_pol_grid, const Vector &sensor_response_za_grid, const Vector &sensor_response_aa_grid, const Numeric &lo, const GriddedField1 &sideband_response, const Index &sensor_norm, const Verbosity &verbosity) |
WORKSPACE METHOD: sensor_responseMixer. More... | |
void | sensor_responseMultiMixerBackend (Sparse &sensor_response, Vector &sensor_response_f, ArrayOfIndex &sensor_response_pol, Vector &sensor_response_za, Vector &sensor_response_aa, Vector &sensor_response_f_grid, const ArrayOfIndex &sensor_response_pol_grid, const Vector &sensor_response_za_grid, const Vector &sensor_response_aa_grid, const Vector &lo_multi, const ArrayOfGriddedField1 &sideband_response_multi, const ArrayOfString &sideband_mode_multi, const ArrayOfVector &f_backend_multi, const ArrayOfArrayOfGriddedField1 &backend_channel_response_multi, const Index &sensor_norm, const Verbosity &verbosity) |
WORKSPACE METHOD: sensor_responseMultiMixerBackend. More... | |
void | sensor_responsePolarisation (Sparse &sensor_response, Vector &sensor_response_f, ArrayOfIndex &sensor_response_pol, Vector &sensor_response_za, Vector &sensor_response_aa, ArrayOfIndex &sensor_response_pol_grid, const Vector &sensor_response_f_grid, const Vector &sensor_response_za_grid, const Vector &sensor_response_aa_grid, const Index &stokes_dim, const String &y_unit, const ArrayOfIndex &sensor_pol, const Verbosity &) |
WORKSPACE METHOD: sensor_responsePolarisation. More... | |
void | sensor_responseSimpleAMSU (Vector &f_grid, Index &antenna_dim, Vector &mblock_za_grid, Vector &mblock_aa_grid, Sparse &sensor_response, Vector &sensor_response_f, ArrayOfIndex &sensor_response_pol, Vector &sensor_response_za, Vector &sensor_response_aa, Vector &sensor_response_f_grid, ArrayOfIndex &sensor_response_pol_grid, Vector &sensor_response_za_grid, Vector &sensor_response_aa_grid, Index &sensor_norm, const Index &atmosphere_dim, const Index &stokes_dim, const Matrix &sensor_description_amsu, const Numeric &spacing, const Verbosity &verbosity) |
WORKSPACE METHOD: sensor_responseSimpleAMSU. More... | |
void | Select (Vector &needles, const Vector &haystack, const ArrayOfIndex &needleind, const Verbosity &verbosity) |
template<class T > | |
void | Select (Array< T > &needles, const Array< T > &haystack, const ArrayOfIndex &needleind, const Verbosity &verbosity) |
void | Select (Sparse &needles, const Sparse &haystack, const ArrayOfIndex &needleind, const Verbosity &verbosity) |
void | WMRFSelectChannels (Vector &f_grid, Sparse &wmrf_weights, Vector &f_backend, const ArrayOfIndex &wmrf_channels, const Verbosity &verbosity) |
WORKSPACE METHOD: WMRFSelectChannels. More... | |
void | sensor_responseWMRF (Sparse &sensor_response, Vector &sensor_response_f, ArrayOfIndex &sensor_response_pol, Vector &sensor_response_za, Vector &sensor_response_aa, Vector &sensor_response_f_grid, const ArrayOfIndex &sensor_response_pol_grid, const Vector &sensor_response_za_grid, const Vector &sensor_response_aa_grid, const Sparse &wmrf_weights, const Vector &f_backend, const Verbosity &verbosity) |
WORKSPACE METHOD: sensor_responseWMRF. More... | |
void | sensor_response_arraySingle (ArrayOfSparse &sensor_response_array, ArrayOfVector &sensor_response_f_array, ArrayOfArrayOfIndex &sensor_response_pol_array, ArrayOfVector &sensor_response_za_array, ArrayOfVector &sensor_response_aa_array, const Sparse &sensor_response, const Vector &sensor_response_f, const ArrayOfIndex &sensor_response_pol, const Vector &sensor_response_za, const Vector &sensor_response_aa, const Verbosity &) |
WORKSPACE METHOD: sensor_response_arraySingle. More... | |
Variables | |
const Numeric | PI |
const Index | GFIELD1_F_GRID |
const Index | GFIELD4_FIELD_NAMES |
const Index | GFIELD4_F_GRID |
const Index | GFIELD4_ZA_GRID |
const Index | GFIELD4_AA_GRID |
Workspace functions related to sensor modelling variables.
These functions are listed in the doxygen documentation as entries of the file auto_md.h.
Definition in file m_sensor.cc.
void antenna_responseGaussian | ( | GriddedField4 & | antenna_response, |
const Numeric & | fwhm, | ||
const Numeric & | xwidth_si, | ||
const Numeric & | dx_si, | ||
const Verbosity & | verbosity | ||
) |
WORKSPACE METHOD: antenna_responseGaussian.
Sets up a gaussian antenna response.
The method assumes that the response is the same for all frequencies and polarisations, and that it can be modelled as gaussian.
The grid generated can be written as <br> si * [-xwidth_si:dx_si:xwidth_si] where si is the standard deviation corresponding to the FWHM. That is, width and spacing of the grid is specified in terms of number of standard deviations. If xwidth_si is set to 2, the response will cover about 95% the complete response. For xwidth_si=3, about 99% is covered.
[out] | antenna_response | WS Output |
[in] | fwhm | Generic Input |
[in] | xwidth_si | Generic Input (Default: "3") |
[in] | dx_si | Generic Input (Default: "0.1") |
Definition at line 251 of file m_sensor.cc.
References GriddedField4::data, gaussian_response(), joker, ConstVectorView::nelem(), Tensor4::resize(), GriddedField::set_grid(), GriddedField::set_grid_name(), and GriddedField::set_name().
Referenced by antenna_responseGaussian_g(), and AntennaConstantGaussian1D().
void AntennaConstantGaussian1D | ( | Index & | antenna_dim, |
Vector & | mblock_za_grid, | ||
Vector & | mblock_aa_grid, | ||
GriddedField4 & | antenna_response, | ||
Matrix & | antenna_los, | ||
const Index & | n_za_grid, | ||
const Numeric & | fwhm, | ||
const Numeric & | xwidth_si, | ||
const Numeric & | dx_si, | ||
const Verbosity & | verbosity | ||
) |
WORKSPACE METHOD: AntennaConstantGaussian1D.
Sets up a 1D gaussian antenna response and a matching mblock_za_grid*.
As antenna_responseGaussian, but alsp creates mblock_za_grid. For returned antenna response, see antenna_responseGaussian.
The length of mblock_za_grid is determined by n_za_grid. The end points of the grid are set to be the same as for the antenna response. The spacing of the grid follows the magnitude of the response; the spacing is smaller where the response is high. More precisely, the grid points are determined by dividing the cumulative sum of the response in equal steps. This makes sense if the representation error of the radiance (as a function of <br> zenith angle) increases linearly with the grid spacing.
The WSV antenna_los is set to 0.
[out] | antenna_dim | WS Output |
[out] | mblock_za_grid | WS Output |
[out] | mblock_aa_grid | WS Output |
[out] | antenna_response | WS Output |
[out] | antenna_los | WS Output |
[in] | n_za_grid | Generic Input |
[in] | fwhm | Generic Input |
[in] | xwidth_si | Generic Input (Default: "3") |
[in] | dx_si | Generic Input (Default: "0.1") |
Definition at line 72 of file m_sensor.cc.
References antenna_responseGaussian(), AntennaSet1D(), GriddedField4::data, GriddedField::get_numeric_grid(), GFIELD4_ZA_GRID, gridpos(), interp(), interpweights(), ConstVectorView::nelem(), nlinspace(), Vector::resize(), and Matrix::resize().
Referenced by AntennaConstantGaussian1D_g().
void AntennaMultiBeamsToPencilBeams | ( | Matrix & | sensor_pos, |
Matrix & | sensor_los, | ||
Matrix & | antenna_los, | ||
Index & | antenna_dim, | ||
Vector & | mblock_za_grid, | ||
Vector & | mblock_aa_grid, | ||
const Index & | atmosphere_dim, | ||
const Verbosity & | verbosity | ||
) |
WORKSPACE METHOD: AntennaMultiBeamsToPencilBeams.
Maps a multi-beam case to a matching pencil beam case.
Cases with overlapping beams are most efficiently handled by letting antenna_los have several rows. That is, there are multiple beams for each measurement block. The drawback is that many variables must be adjusted if the corresponding pencil beam spectra shall be calculated. This method makes this adjustment. That is, if you have a control file for a multiple beam case and for some reason want to avoid the antenna weighting, you add this method before sensor_responseInit, and remove the call of sensor_responseAntenna* and you will get the matching pencil beam spectra.
[out] | sensor_pos | WS Output |
[out] | sensor_los | WS Output |
[out] | antenna_los | WS Output |
[out] | antenna_dim | WS Output |
[out] | mblock_za_grid | WS Output |
[out] | mblock_aa_grid | WS Output |
[in] | atmosphere_dim | WS Input |
Definition at line 115 of file m_sensor.cc.
References AntennaOff(), chk_if_in_range(), joker, ConstMatrixView::ncols(), ConstMatrixView::nrows(), and Matrix::resize().
Referenced by AntennaMultiBeamsToPencilBeams_g().
void AntennaOff | ( | Index & | antenna_dim, |
Vector & | mblock_za_grid, | ||
Vector & | mblock_aa_grid, | ||
const Verbosity & | verbosity | ||
) |
WORKSPACE METHOD: AntennaOff.
Sets some antenna related variables
Use this method to set antenna_dim, mblock_za_grid and mblock_aa_grid* to suitable values (1, [0] and [], respectively) for cases when a sensor is included, but the antenna pattern is neglected.
[out] | antenna_dim | WS Output |
[out] | mblock_za_grid | WS Output |
[out] | mblock_aa_grid | WS Output |
Definition at line 191 of file m_sensor.cc.
References CREATE_OUT2, and Vector::resize().
Referenced by AntennaMultiBeamsToPencilBeams(), AntennaOff_g(), sensor_responseSimpleAMSU(), and sensorOff().
WORKSPACE METHOD: AntennaSet1D.
Sets the antenna dimension to 1D.
Sets antenna_dim to 1 and sets mblock_aa_grid to be empty.
[out] | antenna_dim | WS Output |
[out] | mblock_aa_grid | WS Output |
Definition at line 213 of file m_sensor.cc.
References CREATE_OUT2, CREATE_OUT3, and Vector::resize().
Referenced by AntennaConstantGaussian1D(), and AntennaSet1D_g().
void AntennaSet2D | ( | Index & | antenna_dim, |
const Index & | atmosphere_dim, | ||
const Verbosity & | verbosity | ||
) |
WORKSPACE METHOD: AntennaSet2D.
Sets the antenna dimension to 2D.
Sets antenna_dim to 2.
It is only allowed to set antenna_dim to 2 when atmosphere_dim equals 3.
[out] | antenna_dim | WS Output |
[in] | atmosphere_dim | WS Input |
Definition at line 231 of file m_sensor.cc.
References CREATE_OUT2, and CREATE_OUT3.
Referenced by AntennaSet2D_g().
void backend_channel_responseFlat | ( | ArrayOfGriddedField1 & | backend_channel_response, |
const Numeric & | resolution, | ||
const Verbosity & | verbosity | ||
) |
WORKSPACE METHOD: backend_channel_responseFlat.
Sets up a rectangular channel response.
The response of the backend channels is hee assumed to be constant inside the resolution width, and zero outside.
The method assumes that all channels have the same response.
[out] | backend_channel_response | WS Output |
[in] | resolution | Generic Input |
Definition at line 282 of file m_sensor.cc.
Referenced by backend_channel_responseFlat_g().
void backend_channel_responseGaussian | ( | ArrayOfGriddedField1 & | backend_channel_response, |
const Numeric & | fwhm, | ||
const Numeric & | xwidth_si, | ||
const Numeric & | dx_si, | ||
const Verbosity & | verbosity | ||
) |
WORKSPACE METHOD: backend_channel_responseGaussian.
Sets up a gaussian backend channel response.
The method assumes that all channels have the same response, and that it can be modelled as gaussian.
The grid generated can be written as <br> si * [-xwidth_si:dx_si:xwidth_si] where si is the standard deviation corresponding to the FWHM. That is, width and spacing of the grid is specified in terms of number of standard deviations. If xwidth_si is set to 2, the response will cover about 95% the complete response. For xwidth_si=3, about 99% is covered.
[out] | backend_channel_response | WS Output |
[in] | fwhm | Generic Input |
[in] | xwidth_si | Generic Input (Default: "3") |
[in] | dx_si | Generic Input (Default: "0.1") |
Definition at line 304 of file m_sensor.cc.
References gaussian_response(), and ConstVectorView::nelem().
Referenced by backend_channel_responseGaussian_g().
void f_gridFromSensorAMSU | ( | Vector & | f_grid, |
const Vector & | lo_multi, | ||
const ArrayOfVector & | f_backend_multi, | ||
const ArrayOfArrayOfGriddedField1 & | backend_channel_response_multi, | ||
const Numeric & | spacing, | ||
const Verbosity & | verbosity | ||
) |
WORKSPACE METHOD: f_gridFromSensorAMSU.
Automatically calculate f_grid to match the sensor.
This method is handy if you are simulating an AMSU-type instrument, consisting of a few discrete channels. The case that channels touch, as for MHS, is handled correctly. But the case that channels overlap is not (yet) handled and results in an error message.
The method calculates f_grid to match the instrument, as given by the local oscillator frequencies lo_multi, the backend frequencies f_backend_multi, and the backend channel responses backend_channel_response_multi.
You have to specify the desired spacing in the keyword spacing, which has a default value of 100 MHz. (The actual value is 0.1e9, since our unit is Hz.)
The produced grid will not have exactly the requested spacing, but will not be coarser than requested. The algorithm starts with the band edges, then adds additional points until the spacing is at least as fine as requested.
There is a similar method for HIRS-type instruments, see f_gridFromSensorHIRS.
[out] | f_grid | WS Output |
[in] | lo_multi | WS Input |
[in] | f_backend_multi | WS Input |
[in] | backend_channel_response_multi | WS Input |
[in] | spacing | Generic Input (Default: ".1e9") |
Definition at line 329 of file m_sensor.cc.
References CREATE_OUT2, CREATE_OUT3, find_effective_channel_boundaries(), Array< base >::nelem(), and ConstVectorView::nelem().
Referenced by f_gridFromSensorAMSU_g(), and sensor_responseSimpleAMSU().
void f_gridFromSensorHIRS | ( | Vector & | f_grid, |
const Vector & | f_backend, | ||
const ArrayOfGriddedField1 & | backend_channel_response, | ||
const Numeric & | spacing, | ||
const Verbosity & | verbosity | ||
) |
WORKSPACE METHOD: f_gridFromSensorHIRS.
Automatically calculate f_grid to match the sensor.
This method is handy if you are simulating a HIRS-type instrument, consisting of a few discrete channels.
It calculates f_grid to match the instrument, as given by the nominal band frequencies f_backend and the spectral channel response functions given by backend_channel_response.
You have to specify the desired spacing in the keyword spacing, which has a default value of 5e8 Hz.
The produced grid will not have exactly the requested spacing, but will not be coarser than requested. The algorithm starts with the band edges, then adds additional points until the spacing is at least as fine as requested.
There is a similar method for AMSU-type instruments, see f_gridFromSensorAMSU*.
[out] | f_grid | WS Output |
[in] | f_backend | WS Input |
[in] | backend_channel_response | WS Input |
[in] | spacing | Generic Input (Default: "5e8") |
Definition at line 468 of file m_sensor.cc.
References CREATE_OUT2, CREATE_OUT3, find_effective_channel_boundaries(), Array< base >::nelem(), and ConstVectorView::nelem().
Referenced by f_gridFromSensorHIRS_g().
void Select | ( | Array< T > & | needles, |
const Array< T > & | haystack, | ||
const ArrayOfIndex & | needleind, | ||
const Verbosity & | verbosity | ||
) |
Definition at line 40 of file m_select.h.
References Array< base >::nelem().
Referenced by Select_sg_ArrayOfArrayOfGriddedField1ArrayOfArrayOfGriddedField1_g(), Select_sg_ArrayOfArrayOfGriddedField3ArrayOfArrayOfGriddedField3_g(), Select_sg_ArrayOfArrayOfIndexArrayOfArrayOfIndex_g(), Select_sg_ArrayOfArrayOfLineRecordArrayOfArrayOfLineRecord_g(), Select_sg_ArrayOfArrayOfMatrixArrayOfArrayOfMatrix_g(), Select_sg_ArrayOfArrayOfSpeciesTagArrayOfArrayOfSpeciesTag_g(), Select_sg_ArrayOfArrayOfTensor3ArrayOfArrayOfTensor3_g(), Select_sg_ArrayOfArrayOfTensor6ArrayOfArrayOfTensor6_g(), Select_sg_ArrayOfGriddedField1ArrayOfGriddedField1_g(), Select_sg_ArrayOfGriddedField2ArrayOfGriddedField2_g(), Select_sg_ArrayOfGriddedField3ArrayOfGriddedField3_g(), Select_sg_ArrayOfGriddedField4ArrayOfGriddedField4_g(), Select_sg_ArrayOfIndexArrayOfIndex_g(), Select_sg_ArrayOfLineRecordArrayOfLineRecord_g(), Select_sg_ArrayOfLineshapeSpecArrayOfLineshapeSpec_g(), Select_sg_ArrayOfMatrixArrayOfMatrix_g(), Select_sg_ArrayOfRetrievalQuantityArrayOfRetrievalQuantity_g(), Select_sg_ArrayOfScatteringMetaDataArrayOfScatteringMetaData_g(), Select_sg_ArrayOfSingleScatteringDataArrayOfSingleScatteringData_g(), Select_sg_ArrayOfSparseArrayOfSparse_g(), Select_sg_ArrayOfStringArrayOfString_g(), Select_sg_ArrayOfTensor3ArrayOfTensor3_g(), Select_sg_ArrayOfTensor4ArrayOfTensor4_g(), Select_sg_ArrayOfTensor6ArrayOfTensor6_g(), Select_sg_ArrayOfTensor7ArrayOfTensor7_g(), Select_sg_ArrayOfVectorArrayOfVector_g(), Select_sg_MatrixMatrix_g(), Select_sg_SparseSparse_g(), and Select_sg_VectorVector_g().
void Select | ( | Sparse & | needles, |
const Sparse & | haystack, | ||
const ArrayOfIndex & | needleind, | ||
const Verbosity & | verbosity | ||
) |
Definition at line 136 of file m_select.h.
References CREATE_OUT3, Sparse::ncols(), Array< base >::nelem(), Sparse::nnz(), and Sparse::nrows().
void Select | ( | Vector & | needles, |
const Vector & | haystack, | ||
const ArrayOfIndex & | needleind, | ||
const Verbosity & | verbosity | ||
) |
Definition at line 72 of file m_select.h.
References Array< base >::nelem(), and ConstVectorView::nelem().
Referenced by WMRFSelectChannels().
void sensor_response_arraySingle | ( | ArrayOfSparse & | sensor_response_array, |
ArrayOfVector & | sensor_response_f_array, | ||
ArrayOfArrayOfIndex & | sensor_response_pol_array, | ||
ArrayOfVector & | sensor_response_za_array, | ||
ArrayOfVector & | sensor_response_aa_array, | ||
const Sparse & | sensor_response, | ||
const Vector & | sensor_response_f, | ||
const ArrayOfIndex & | sensor_response_pol, | ||
const Vector & | sensor_response_za, | ||
const Vector & | sensor_response_aa, | ||
const Verbosity & | verbosity | ||
) |
WORKSPACE METHOD: sensor_response_arraySingle.
Sets up sensor_response_array from an existing sensor_response.
Fills sensor_response_array and associated variables with corresponding non-array data. Hence, the array variables get all a length of 1.
[out] | sensor_response_array | WS Output |
[out] | sensor_response_f_array | WS Output |
[out] | sensor_response_pol_array | WS Output |
[out] | sensor_response_za_array | WS Output |
[out] | sensor_response_aa_array | WS Output |
[in] | sensor_response | WS Input |
[in] | sensor_response_f | WS Input |
[in] | sensor_response_pol | WS Input |
[in] | sensor_response_za | WS Input |
[in] | sensor_response_aa | WS Input |
Definition at line 2509 of file m_sensor.cc.
Referenced by sensor_response_arraySingle_g().
void sensor_responseAntenna | ( | Sparse & | sensor_response, |
Vector & | sensor_response_f, | ||
ArrayOfIndex & | sensor_response_pol, | ||
Vector & | sensor_response_za, | ||
Vector & | sensor_response_aa, | ||
Vector & | sensor_response_za_grid, | ||
Vector & | sensor_response_aa_grid, | ||
const Vector & | sensor_response_f_grid, | ||
const ArrayOfIndex & | sensor_response_pol_grid, | ||
const Index & | atmosphere_dim, | ||
const Index & | antenna_dim, | ||
const Matrix & | antenna_los, | ||
const GriddedField4 & | antenna_response, | ||
const Index & | sensor_norm, | ||
const Verbosity & | verbosity | ||
) |
WORKSPACE METHOD: sensor_responseAntenna.
Includes response of the antenna.
The function returns the sensor response matrix after the antenna characteristics have been included.
The function handles "multi-beam" cases where the polarisation coordinate system is the same for all beams.
See antenna_dim, antenna_los and antenna_response for details on how to specify the antenna response.
[out] | sensor_response | WS Output |
[out] | sensor_response_f | WS Output |
[out] | sensor_response_pol | WS Output |
[out] | sensor_response_za | WS Output |
[out] | sensor_response_aa | WS Output |
[out] | sensor_response_za_grid | WS Output |
[out] | sensor_response_aa_grid | WS Output |
[in] | sensor_response_f_grid | WS Input |
[in] | sensor_response_pol_grid | WS Input |
[in] | atmosphere_dim | WS Input |
[in] | antenna_dim | WS Input |
[in] | antenna_los | WS Input |
[in] | antenna_response | WS Input |
[in] | sensor_norm | WS Input |
Definition at line 544 of file m_sensor.cc.
References antenna1d_matrix(), antenna2d_simplified(), chk_if_bool(), chk_if_in_range(), chk_if_increasing(), CREATE_OUT3, GriddedField::get_numeric_grid(), GriddedField::get_string_grid(), GFIELD4_AA_GRID, GFIELD4_F_GRID, GFIELD4_FIELD_NAMES, GFIELD4_ZA_GRID, joker, last(), max, min, mult(), ConstMatrixView::ncols(), Sparse::ncols(), Array< base >::nelem(), ConstVectorView::nelem(), Sparse::nrows(), Sparse::resize(), and sensor_aux_vectors().
Referenced by sensor_responseAntenna_g().
void sensor_responseBackend | ( | Sparse & | sensor_response, |
Vector & | sensor_response_f, | ||
ArrayOfIndex & | sensor_response_pol, | ||
Vector & | sensor_response_za, | ||
Vector & | sensor_response_aa, | ||
Vector & | sensor_response_f_grid, | ||
const ArrayOfIndex & | sensor_response_pol_grid, | ||
const Vector & | sensor_response_za_grid, | ||
const Vector & | sensor_response_aa_grid, | ||
const Vector & | f_backend, | ||
const ArrayOfGriddedField1 & | backend_channel_response, | ||
const Index & | sensor_norm, | ||
const Verbosity & | verbosity | ||
) |
WORKSPACE METHOD: sensor_responseBackend.
Includes response of the backend (spectrometer).
The function returns the sensor response matrix after the backend characteristics have been included.
See f_backend, backend_channel_response and sensor_norm for details on how to specify the backend response.
[out] | sensor_response | WS Output |
[out] | sensor_response_f | WS Output |
[out] | sensor_response_pol | WS Output |
[out] | sensor_response_za | WS Output |
[out] | sensor_response_aa | WS Output |
[out] | sensor_response_f_grid | WS Output |
[in] | sensor_response_pol_grid | WS Input |
[in] | sensor_response_za_grid | WS Input |
[in] | sensor_response_aa_grid | WS Input |
[in] | f_backend | WS Input |
[in] | backend_channel_response | WS Input |
[in] | sensor_norm | WS Input |
Definition at line 811 of file m_sensor.cc.
References CREATE_OUT3, GFIELD1_F_GRID, is_increasing(), last(), max, min, mult(), Sparse::ncols(), Array< base >::nelem(), ConstVectorView::nelem(), Sparse::nrows(), Sparse::resize(), sensor_aux_vectors(), and spectrometer_matrix().
Referenced by sensor_responseBackend_g(), sensor_responseBackendFrequencySwitching(), and sensor_responseMultiMixerBackend().
void sensor_responseBackendFrequencySwitching | ( | Sparse & | sensor_response, |
Vector & | sensor_response_f, | ||
ArrayOfIndex & | sensor_response_pol, | ||
Vector & | sensor_response_za, | ||
Vector & | sensor_response_aa, | ||
Vector & | sensor_response_f_grid, | ||
const ArrayOfIndex & | sensor_response_pol_grid, | ||
const Vector & | sensor_response_za_grid, | ||
const Vector & | sensor_response_aa_grid, | ||
const Vector & | f_backend, | ||
const ArrayOfGriddedField1 & | backend_channel_response, | ||
const Index & | sensor_norm, | ||
const Numeric & | df_1, | ||
const Numeric & | df2, | ||
const Verbosity & | verbosity | ||
) |
WORKSPACE METHOD: sensor_responseBackendFrequencySwitching.
Frequency switching for a pure SSB reciever.
This function can be used for simulation of frequency switching. That is, when the final spectrum is the difference of two spectra shifted in frequency. The switching is performed by the LO, but for a pure singel sideband reciever this is most easily simulated by instead shifting the backend, as done here.
A strightforward frequency switching is modelled (no folding) The channel positions for the first measurement cycle are f_backend+df1, and for the second f_backend+df2. The first measurement cycle is given the negive weight. That is, the output is the spectrum for cycle2 minus the spectrum for cycle1. Output frequency grids are set to f_backend.
Use sensor_responseFrequencySwitching for double sideband cases.
The method has the same general functionality as, and can replace, sensor_responseBackend*.
[out] | sensor_response | WS Output |
[out] | sensor_response_f | WS Output |
[out] | sensor_response_pol | WS Output |
[out] | sensor_response_za | WS Output |
[out] | sensor_response_aa | WS Output |
[out] | sensor_response_f_grid | WS Output |
[in] | sensor_response_pol_grid | WS Input |
[in] | sensor_response_za_grid | WS Input |
[in] | sensor_response_aa_grid | WS Input |
[in] | f_backend | WS Input |
[in] | backend_channel_response | WS Input |
[in] | sensor_norm | WS Input |
[in] | df_1 | Generic Input |
[in] | df2 | Generic Input |
Definition at line 980 of file m_sensor.cc.
References sensor_aux_vectors(), sensor_responseBackend(), and sub().
Referenced by sensor_responseBackendFrequencySwitching_g().
void sensor_responseBeamSwitching | ( | Sparse & | sensor_response, |
Vector & | sensor_response_f, | ||
ArrayOfIndex & | sensor_response_pol, | ||
Vector & | sensor_response_za, | ||
Vector & | sensor_response_aa, | ||
Vector & | sensor_response_za_grid, | ||
Vector & | sensor_response_aa_grid, | ||
const Vector & | sensor_response_f_grid, | ||
const ArrayOfIndex & | sensor_response_pol_grid, | ||
const Numeric & | w1, | ||
const Numeric & | w2, | ||
const Verbosity & | verbosity | ||
) |
WORKSPACE METHOD: sensor_responseBeamSwitching.
Simulation of "beam switching".
The measurement procedure is based on taking the difference between two spectra measured in different directions, and the calculation set-up must treat exactly two observation directions.
The returned spectrum is y = w1*y + w2*y2, where y1 and w1 are the spectrum and weight for the first direction, respectively (y2 and (w2 defined correspondingly for the second direction).
Zenith and azimuth angles after beam switching are set to the values of the second direction.
[out] | sensor_response | WS Output |
[out] | sensor_response_f | WS Output |
[out] | sensor_response_pol | WS Output |
[out] | sensor_response_za | WS Output |
[out] | sensor_response_aa | WS Output |
[out] | sensor_response_za_grid | WS Output |
[out] | sensor_response_aa_grid | WS Output |
[in] | sensor_response_f_grid | WS Input |
[in] | sensor_response_pol_grid | WS Input |
[in] | w1 | Generic Input (Default: "-1") |
[in] | w2 | Generic Input (Default: "1") |
Definition at line 1041 of file m_sensor.cc.
References CREATE_OUT3, Sparse::insert_row(), mult(), Sparse::ncols(), Array< base >::nelem(), ConstVectorView::nelem(), Sparse::nrows(), Vector::resize(), Sparse::resize(), and sensor_aux_vectors().
Referenced by sensor_responseBeamSwitching_g().
void sensor_responseFillFgrid | ( | Sparse & | sensor_response, |
Vector & | sensor_response_f, | ||
ArrayOfIndex & | sensor_response_pol, | ||
Vector & | sensor_response_za, | ||
Vector & | sensor_response_aa, | ||
Vector & | sensor_response_f_grid, | ||
const ArrayOfIndex & | sensor_response_pol_grid, | ||
const Vector & | sensor_response_za_grid, | ||
const Vector & | sensor_response_aa_grid, | ||
const Index & | polyorder, | ||
const Index & | nfill, | ||
const Verbosity & | verbosity | ||
) |
WORKSPACE METHOD: sensor_responseFillFgrid.
Polynomial frequency interpolation of spectra. z The sensor response methods treat the spectra to be piece-wise linear functions. This method is a workaround for making methods handling the spectra in a more elaborate way: it generates spectra on a more dense grid by polynomial interpolation. The interpolation is not done explicitly, it is incorporated into sensor_response.
This method should in general increase the calculation accuracy for a given f_grid. However, the selection of (original) grid points becomes more sensitive when using this method. A poor choice of grid points can result in a decreased accuracy, or generation of negative radiances. Test calculations indicated that the error easily can increase with this method close the edge of f_grid, and it could be wise to make f_grid a bit wider than actually necessary to avoid this effect
The method shall be inserted before the antenna stage. That is, this method shall normally be called directly after sensor_responseInit.
Between each neighbouring points of f_grid, this method adds nfill* grid points. The polynomial order of the interpolation is polyorder*.
[out] | sensor_response | WS Output |
[out] | sensor_response_f | WS Output |
[out] | sensor_response_pol | WS Output |
[out] | sensor_response_za | WS Output |
[out] | sensor_response_aa | WS Output |
[out] | sensor_response_f_grid | WS Output |
[in] | sensor_response_pol_grid | WS Input |
[in] | sensor_response_za_grid | WS Input |
[in] | sensor_response_aa_grid | WS Input |
[in] | polyorder | Generic Input (Default: "3") |
[in] | nfill | Generic Input (Default: "2") |
Definition at line 1289 of file m_sensor.cc.
References abs, CREATE_OUT3, gridpos_poly(), Sparse::insert_row(), interpweights(), max, mult(), Sparse::ncols(), Array< base >::nelem(), ConstVectorView::nelem(), nlinspace(), Sparse::nrows(), Sparse::resize(), and sensor_aux_vectors().
Referenced by sensor_responseFillFgrid_g().
void sensor_responseFrequencySwitching | ( | Sparse & | sensor_response, |
Vector & | sensor_response_f, | ||
ArrayOfIndex & | sensor_response_pol, | ||
Vector & | sensor_response_za, | ||
Vector & | sensor_response_aa, | ||
Vector & | sensor_response_f_grid, | ||
const ArrayOfIndex & | sensor_response_pol_grid, | ||
const Vector & | sensor_response_za_grid, | ||
const Vector & | sensor_response_aa_grid, | ||
const Verbosity & | verbosity | ||
) |
WORKSPACE METHOD: sensor_responseFrequencySwitching.
Simulation of "frequency switching".
A general method for frequency switching. The WSM sensor_responseBackendFrequencySwitching* gives a description of this observation technique, and is also a more straightforward <br> method for pure singel sideband cases.
It is here assume that sensor_responseMultiMixerBackend has been used to calculate the spectrum for two LO positions. This method calculates the difference between these two spectra, where the second spectrum gets weight 1 and the first weight -1 (as in sensor_responseBackendFrequencySwitching*).
Output frequency grids are taken from the second spectrum..
[out] | sensor_response | WS Output |
[out] | sensor_response_f | WS Output |
[out] | sensor_response_pol | WS Output |
[out] | sensor_response_za | WS Output |
[out] | sensor_response_aa | WS Output |
[out] | sensor_response_f_grid | WS Output |
[in] | sensor_response_pol_grid | WS Input |
[in] | sensor_response_za_grid | WS Input |
[in] | sensor_response_aa_grid | WS Input |
Definition at line 1116 of file m_sensor.cc.
References CREATE_OUT3, Sparse::insert_row(), is_multiple(), mult(), Sparse::ncols(), Array< base >::nelem(), ConstVectorView::nelem(), Sparse::nrows(), Vector::resize(), Sparse::resize(), and sensor_aux_vectors().
Referenced by sensor_responseFrequencySwitching_g().
void sensor_responseFromArrayData | ( | Sparse & | sensor_response, |
Vector & | sensor_response_f, | ||
ArrayOfIndex & | sensor_response_pol, | ||
Vector & | sensor_response_za, | ||
Vector & | sensor_response_aa, | ||
const Index & | imblock, | ||
const ArrayOfSparse & | sensor_response_array, | ||
const ArrayOfVector & | sensor_response_f_array, | ||
const ArrayOfArrayOfIndex & | sensor_response_pol_array, | ||
const ArrayOfVector & | sensor_response_za_array, | ||
const ArrayOfVector & | sensor_response_aa_array, | ||
const ArrayOfIndex & | sensor_response_index, | ||
const Verbosity & | verbosity | ||
) |
WORKSPACE METHOD: sensor_responseFromArrayData.
Sets up sensor_response_array from an existing sensor_response.
Fills sensor_response_array and associated variables with corresponding non-array data. Hence, the array variables get all a length of 1.
[out] | sensor_response | WS Output |
[out] | sensor_response_f | WS Output |
[out] | sensor_response_pol | WS Output |
[out] | sensor_response_za | WS Output |
[out] | sensor_response_aa | WS Output |
[in] | imblock | WS Input |
[in] | sensor_response_array | WS Input |
[in] | sensor_response_f_array | WS Input |
[in] | sensor_response_pol_array | WS Input |
[in] | sensor_response_za_array | WS Input |
[in] | sensor_response_aa_array | WS Input |
[in] | sensor_response_index | WS Input |
Definition at line 1235 of file m_sensor.cc.
References Array< base >::nelem().
Referenced by sensor_responseFromArrayData_g().
void sensor_responseIF2RF | ( | Vector & | sensor_response_f, |
Vector & | sensor_response_f_grid, | ||
const Numeric & | lo, | ||
const String & | sideband_mode, | ||
const Verbosity & | verbosity | ||
) |
WORKSPACE METHOD: sensor_responseIF2RF.
Converts sensor response variables from IF to RF.
The function converts intermediate frequencies (IF) in sensor_response_f* and sensor_response_f_grid to radio frequencies (RF). This conversion is needed if the frequency translation of a mixer is included and the position of backend channels are specified in RF.
A direct frequency conversion is performed. Values are not sorted in any way.
[out] | sensor_response_f | WS Output |
[out] | sensor_response_f_grid | WS Output |
[in] | lo | WS Input |
[in] | sideband_mode | WS Input |
Definition at line 1193 of file m_sensor.cc.
References max.
Referenced by sensor_responseIF2RF_g(), and sensor_responseMultiMixerBackend().
void sensor_responseInit | ( | Sparse & | sensor_response, |
Vector & | sensor_response_f, | ||
ArrayOfIndex & | sensor_response_pol, | ||
Vector & | sensor_response_za, | ||
Vector & | sensor_response_aa, | ||
Vector & | sensor_response_f_grid, | ||
ArrayOfIndex & | sensor_response_pol_grid, | ||
Vector & | sensor_response_za_grid, | ||
Vector & | sensor_response_aa_grid, | ||
const Vector & | f_grid, | ||
const Vector & | mblock_za_grid, | ||
const Vector & | mblock_aa_grid, | ||
const Index & | antenna_dim, | ||
const Index & | atmosphere_dim, | ||
const Index & | stokes_dim, | ||
const Index & | sensor_norm, | ||
const Verbosity & | verbosity | ||
) |
WORKSPACE METHOD: sensor_responseInit.
Initialises the variables summarising the sensor response.
This method sets the variables to match monochromatic pencil beam calculations, to be further modified by inclusion of sensor characteristics. Use sensorOff if pure monochromatic pencil beam calculations shall be performed.
The variables are set as follows: <br> sensor_response : Identity matrix, with size matching f_grid, <br> stokes_dim mblock_za_grid and <br> mblock_aa_grid. <br> sensor_response_f : Repeated values of f_grid. <br> sensor_response_pol : Data matching stokes_dim. <br> sensor_response_za : Repeated values of mblock_za_grid. <br> sensor_response_aa : Repeated values of mblock_aa_grid. <br> sensor_response_f_grid : Equal to f_grid. <br> sensor_response_pol_grid: Set to 1:stokes_dim. <br> sensor_response_za_grid : Equal to mblock_za_grid. <br> sensor_response_aa_grid : Equal to mblock_aa_grid.
[out] | sensor_response | WS Output |
[out] | sensor_response_f | WS Output |
[out] | sensor_response_pol | WS Output |
[out] | sensor_response_za | WS Output |
[out] | sensor_response_aa | WS Output |
[out] | sensor_response_f_grid | WS Output |
[out] | sensor_response_pol_grid | WS Output |
[out] | sensor_response_za_grid | WS Output |
[out] | sensor_response_aa_grid | WS Output |
[in] | f_grid | WS Input |
[in] | mblock_za_grid | WS Input |
[in] | mblock_aa_grid | WS Input |
[in] | antenna_dim | WS Input |
[in] | atmosphere_dim | WS Input |
[in] | stokes_dim | WS Input |
[in] | sensor_norm | WS Input |
Definition at line 1429 of file m_sensor.cc.
References chk_if_bool(), chk_if_in_range(), chk_if_increasing(), CREATE_OUT2, CREATE_OUT3, is_decreasing(), is_increasing(), Sparse::make_I(), ConstVectorView::nelem(), and sensor_aux_vectors().
Referenced by sensor_responseInit_g(), sensor_responseSimpleAMSU(), and sensorOff().
void sensor_responseMixer | ( | Sparse & | sensor_response, |
Vector & | sensor_response_f, | ||
ArrayOfIndex & | sensor_response_pol, | ||
Vector & | sensor_response_za, | ||
Vector & | sensor_response_aa, | ||
Vector & | sensor_response_f_grid, | ||
const ArrayOfIndex & | sensor_response_pol_grid, | ||
const Vector & | sensor_response_za_grid, | ||
const Vector & | sensor_response_aa_grid, | ||
const Numeric & | lo, | ||
const GriddedField1 & | sideband_response, | ||
const Index & | sensor_norm, | ||
const Verbosity & | verbosity | ||
) |
WORKSPACE METHOD: sensor_responseMixer.
Includes response of the mixer of a heterodyne system.
The function returns the sensor response matrix after the mixer characteristics have been included. Frequency variables are converted from radio frequency (RF) to intermediate frequency (IF). The returned frequency grid covers the range [0,max_if], where max_if is the highest IF covered by the sideband response grid.
See lo and sideband_response for details on how to specify the mixer response
[out] | sensor_response | WS Output |
[out] | sensor_response_f | WS Output |
[out] | sensor_response_pol | WS Output |
[out] | sensor_response_za | WS Output |
[out] | sensor_response_aa | WS Output |
[out] | sensor_response_f_grid | WS Output |
[in] | sensor_response_pol_grid | WS Input |
[in] | sensor_response_za_grid | WS Input |
[in] | sensor_response_aa_grid | WS Input |
[in] | lo | WS Input |
[in] | sideband_response | WS Input |
[in] | sensor_norm | WS Input |
Definition at line 1562 of file m_sensor.cc.
References CREATE_OUT3, GriddedField1::data, GriddedField::get_numeric_grid(), GFIELD1_F_GRID, is_increasing(), last(), mixer_matrix(), mult(), Sparse::ncols(), Array< base >::nelem(), ConstVectorView::nelem(), Sparse::nrows(), Sparse::resize(), and sensor_aux_vectors().
Referenced by sensor_responseMixer_g(), and sensor_responseMultiMixerBackend().
void sensor_responseMultiMixerBackend | ( | Sparse & | sensor_response, |
Vector & | sensor_response_f, | ||
ArrayOfIndex & | sensor_response_pol, | ||
Vector & | sensor_response_za, | ||
Vector & | sensor_response_aa, | ||
Vector & | sensor_response_f_grid, | ||
const ArrayOfIndex & | sensor_response_pol_grid, | ||
const Vector & | sensor_response_za_grid, | ||
const Vector & | sensor_response_aa_grid, | ||
const Vector & | lo_multi, | ||
const ArrayOfGriddedField1 & | sideband_response_multi, | ||
const ArrayOfString & | sideband_mode_multi, | ||
const ArrayOfVector & | f_backend_multi, | ||
const ArrayOfArrayOfGriddedField1 & | backend_channel_response_multi, | ||
const Index & | sensor_norm, | ||
const Verbosity & | verbosity | ||
) |
WORKSPACE METHOD: sensor_responseMultiMixerBackend.
Handles mixer and backend parts for an instrument having multiple mixer chains.
The WSMs sensor_responseMixer, sensor_responseIF2RF and sensor_responseBackend* are called for each mixer chain, and a complete sensor_response is assembled. The instrument responses are described by lo_multi, sideband_response_multi, sideband_mode_multi*, f_backend_multi and backend_channel_response_multi*. All these WSVs must have same vector or array length. As sensor_responseIF2RF is called, f_backend_multi* must hold RF (not IF) and output frequencies will be in absolute frequency (RF).
[out] | sensor_response | WS Output |
[out] | sensor_response_f | WS Output |
[out] | sensor_response_pol | WS Output |
[out] | sensor_response_za | WS Output |
[out] | sensor_response_aa | WS Output |
[out] | sensor_response_f_grid | WS Output |
[in] | sensor_response_pol_grid | WS Input |
[in] | sensor_response_za_grid | WS Input |
[in] | sensor_response_aa_grid | WS Input |
[in] | lo_multi | WS Input |
[in] | sideband_response_multi | WS Input |
[in] | sideband_mode_multi | WS Input |
[in] | f_backend_multi | WS Input |
[in] | backend_channel_response_multi | WS Input |
[in] | sensor_norm | WS Input |
Definition at line 1716 of file m_sensor.cc.
References Sparse::insert_row(), Array< base >::nelem(), ConstVectorView::nelem(), Sparse::nrows(), Vector::resize(), Sparse::resize(), sensor_aux_vectors(), sensor_responseBackend(), sensor_responseIF2RF(), and sensor_responseMixer().
Referenced by sensor_responseMultiMixerBackend_g(), and sensor_responseSimpleAMSU().
void sensor_responsePolarisation | ( | Sparse & | sensor_response, |
Vector & | sensor_response_f, | ||
ArrayOfIndex & | sensor_response_pol, | ||
Vector & | sensor_response_za, | ||
Vector & | sensor_response_aa, | ||
ArrayOfIndex & | sensor_response_pol_grid, | ||
const Vector & | sensor_response_f_grid, | ||
const Vector & | sensor_response_za_grid, | ||
const Vector & | sensor_response_aa_grid, | ||
const Index & | stokes_dim, | ||
const String & | y_unit, | ||
const ArrayOfIndex & | sensor_pol, | ||
const Verbosity & | verbosity | ||
) |
WORKSPACE METHOD: sensor_responsePolarisation.
Extraction of non-default polarisation components.
The default is to output the Stokes elements I, Q, U and V (up to stokes_dim*). This method allows to change the "polarisation" of the output. Polarisation components to be extracted are selected by sensor_pol*. This method can be applied at any step of the sensor matrix set-up.
The method can only be applied on data for I, Q, U and V. The value of stokes_dim must be sufficiently large for the selected components. For example, I+45 requires that stokes_dim is at least 3.
See sensor_pol for coding of polarisation states.
Note that the state of y_unit is considered. This WSV must give the actual unit of the data. This as, the extraction of components is slightly different if data are radiances or brightness temperatures. In practise this means that y_unit (as to be applied inside yCalc) must be set before calling this method.
[out] | sensor_response | WS Output |
[out] | sensor_response_f | WS Output |
[out] | sensor_response_pol | WS Output |
[out] | sensor_response_za | WS Output |
[out] | sensor_response_aa | WS Output |
[out] | sensor_response_pol_grid | WS Output |
[in] | sensor_response_f_grid | WS Input |
[in] | sensor_response_za_grid | WS Input |
[in] | sensor_response_aa_grid | WS Input |
[in] | stokes_dim | WS Input |
[in] | y_unit | WS Input |
[in] | sensor_pol | WS Input |
Definition at line 1911 of file m_sensor.cc.
References Sparse::insert_row(), max, mult(), Sparse::ncols(), Array< base >::nelem(), ConstVectorView::nelem(), Sparse::nrows(), Sparse::resize(), and sensor_aux_vectors().
Referenced by sensor_responsePolarisation_g().
void sensor_responseSimpleAMSU | ( | Vector & | f_grid, |
Index & | antenna_dim, | ||
Vector & | mblock_za_grid, | ||
Vector & | mblock_aa_grid, | ||
Sparse & | sensor_response, | ||
Vector & | sensor_response_f, | ||
ArrayOfIndex & | sensor_response_pol, | ||
Vector & | sensor_response_za, | ||
Vector & | sensor_response_aa, | ||
Vector & | sensor_response_f_grid, | ||
ArrayOfIndex & | sensor_response_pol_grid, | ||
Vector & | sensor_response_za_grid, | ||
Vector & | sensor_response_aa_grid, | ||
Index & | sensor_norm, | ||
const Index & | atmosphere_dim, | ||
const Index & | stokes_dim, | ||
const Matrix & | sensor_description_amsu, | ||
const Numeric & | spacing, | ||
const Verbosity & | verbosity | ||
) |
WORKSPACE METHOD: sensor_responseSimpleAMSU.
Simplified sensor setup for an AMSU-type instrument.
This method allows quick and simple definition of AMSU-type sensors. Assumptions:
Under these assumptions the only inputs needed are the LO positions, the offsets from the LO, and the IF bandwidths. They are provieded in sensor_description_amsu.
[out] | f_grid | WS Output |
[out] | antenna_dim | WS Output |
[out] | mblock_za_grid | WS Output |
[out] | mblock_aa_grid | WS Output |
[out] | sensor_response | WS Output |
[out] | sensor_response_f | WS Output |
[out] | sensor_response_pol | WS Output |
[out] | sensor_response_za | WS Output |
[out] | sensor_response_aa | WS Output |
[out] | sensor_response_f_grid | WS Output |
[out] | sensor_response_pol_grid | WS Output |
[out] | sensor_response_za_grid | WS Output |
[out] | sensor_response_aa_grid | WS Output |
[out] | sensor_norm | WS Output |
[in] | atmosphere_dim | WS Input |
[in] | stokes_dim | WS Input |
[in] | sensor_description_amsu | WS Input |
[in] | spacing | Generic Input (Default: ".1e9") |
Definition at line 2087 of file m_sensor.cc.
References AntennaOff(), GriddedField1::data, f_gridFromSensorAMSU(), joker, ConstMatrixView::ncols(), ConstMatrixView::nrows(), GriddedField1::resize(), Vector::resize(), sensor_responseInit(), sensor_responseMultiMixerBackend(), GriddedField::set_grid(), GriddedField::set_grid_name(), and GriddedField::set_name().
Referenced by sensor_responseSimpleAMSU_g().
void sensor_responseWMRF | ( | Sparse & | sensor_response, |
Vector & | sensor_response_f, | ||
ArrayOfIndex & | sensor_response_pol, | ||
Vector & | sensor_response_za, | ||
Vector & | sensor_response_aa, | ||
Vector & | sensor_response_f_grid, | ||
const ArrayOfIndex & | sensor_response_pol_grid, | ||
const Vector & | sensor_response_za_grid, | ||
const Vector & | sensor_response_aa_grid, | ||
const Sparse & | wmrf_weights, | ||
const Vector & | f_backend, | ||
const Verbosity & | verbosity | ||
) |
WORKSPACE METHOD: sensor_responseWMRF.
Adds WMRF weights to sensor response.
This method adds a spectrometer response that has been calculated with the weighted mean of representative frequencies (WMRF) method. It consists of a set of selected frequencies, and associated weights.
[out] | sensor_response | WS Output |
[out] | sensor_response_f | WS Output |
[out] | sensor_response_pol | WS Output |
[out] | sensor_response_za | WS Output |
[out] | sensor_response_aa | WS Output |
[out] | sensor_response_f_grid | WS Output |
[in] | sensor_response_pol_grid | WS Input |
[in] | sensor_response_za_grid | WS Input |
[in] | sensor_response_aa_grid | WS Input |
[in] | wmrf_weights | WS Input |
[in] | f_backend | WS Input |
Definition at line 2377 of file m_sensor.cc.
References CREATE_OUT3, max, min, mult(), Sparse::ncols(), Array< base >::nelem(), ConstVectorView::nelem(), Sparse::nrows(), Sparse::resize(), and sensor_aux_vectors().
Referenced by sensor_responseWMRF_g().
void sensorOff | ( | Sparse & | sensor_response, |
Vector & | sensor_response_f, | ||
ArrayOfIndex & | sensor_response_pol, | ||
Vector & | sensor_response_za, | ||
Vector & | sensor_response_aa, | ||
Vector & | sensor_response_f_grid, | ||
ArrayOfIndex & | sensor_response_pol_grid, | ||
Vector & | sensor_response_za_grid, | ||
Vector & | sensor_response_aa_grid, | ||
Index & | antenna_dim, | ||
Vector & | mblock_za_grid, | ||
Vector & | mblock_aa_grid, | ||
const Index & | atmosphere_dim, | ||
const Index & | stokes_dim, | ||
const Vector & | f_grid, | ||
const Verbosity & | verbosity | ||
) |
WORKSPACE METHOD: sensorOff.
Sets sensor WSVs to obtain monochromatic pencil beam values.
A 1D antenna pattern is assumed. The variables are set as follows: <br> antenna_dim : 1. <br> mblock_za_grid : Length 1, value 0. <br> mblock_aa_grid : Empty. <br> sensor_response* : As returned by sensor_responseInit.
[out] | sensor_response | WS Output |
[out] | sensor_response_f | WS Output |
[out] | sensor_response_pol | WS Output |
[out] | sensor_response_za | WS Output |
[out] | sensor_response_aa | WS Output |
[out] | sensor_response_f_grid | WS Output |
[out] | sensor_response_pol_grid | WS Output |
[out] | sensor_response_za_grid | WS Output |
[out] | sensor_response_aa_grid | WS Output |
[out] | antenna_dim | WS Output |
[out] | mblock_za_grid | WS Output |
[out] | mblock_aa_grid | WS Output |
[in] | atmosphere_dim | WS Input |
[in] | stokes_dim | WS Input |
[in] | f_grid | WS Input |
Definition at line 1526 of file m_sensor.cc.
References AntennaOff(), and sensor_responseInit().
Referenced by sensorOff_g().
void WMRFSelectChannels | ( | Vector & | f_grid, |
Sparse & | wmrf_weights, | ||
Vector & | f_backend, | ||
const ArrayOfIndex & | wmrf_channels, | ||
const Verbosity & | verbosity | ||
) |
WORKSPACE METHOD: WMRFSelectChannels.
Select some channels for WMRF calculation.
The HIRS fast setup consists of a precalculated frequency grid covering all HIRS channels, and associated weights for each channel, stored in a weight matrix. (A sensor_response matrix.)
If not all channels are requested for simulation, then this method can be used to remove the unwanted channels. It changes a number of variables in consistent fashion:
Unnecessary frequencies are removed from wmrf_weights.
[out] | f_grid | WS Output |
[out] | wmrf_weights | WS Output |
[out] | f_backend | WS Output |
[in] | wmrf_channels | WS Input |
Definition at line 2244 of file m_sensor.cc.
References chk_if_increasing(), CREATE_OUT2, CREATE_OUT3, max, min, Sparse::ncols(), Array< base >::nelem(), ConstVectorView::nelem(), Sparse::nrows(), Sparse::resize(), Select(), and transpose().
Referenced by WMRFSelectChannels_g().
|
extern |
Referenced by sensor_responseBackend(), and sensor_responseMixer().
|
extern |
Referenced by sensor_responseAntenna().
|
extern |
Referenced by sensor_responseAntenna().
|
extern |
Referenced by sensor_responseAntenna().
|
extern |
Referenced by AntennaConstantGaussian1D(), and sensor_responseAntenna().
|
extern |