sensor.cc File Reference

Functions related to sensor modelling. More...

#include <cmath>
#include <list>
#include "arts.h"
#include "logic.h"
#include "matpackI.h"
#include "matpackII.h"
#include "messages.h"
#include "sensor.h"

Include dependency graph for sensor.cc:

Go to the source code of this file.

Functions

void antenna1d_matrix (Sparse &H, const Index &antenna_dim, ConstMatrixView antenna_los, const GField4 &antenna_response, ConstVectorView za_grid, ConstVectorView f_grid, const Index n_pol, const Index do_norm)
void mixer_matrix (Sparse &H, Vector &f_mixer, const Numeric &lo, const GField1 &filter, ConstVectorView f_grid, const Index &n_pol, const Index &n_sp, const Index &do_norm)
 mixer_matrix
void sensor_aux_vectors (Vector &sensor_response_f, ArrayOfIndex &sensor_response_pol, Vector &sensor_response_za, Vector &sensor_response_aa, ConstVectorView sensor_response_f_grid, const ArrayOfIndex &sensor_response_pol_grid, ConstVectorView sensor_response_za_grid, ConstVectorView sensor_response_aa_grid)
 sensor_aux_vectors
void sensor_integration_vector (VectorView h, ConstVectorView f, ConstVectorView x_f_in, ConstVectorView x_g_in)
 sensor_integration_vector
void sensor_summation_vector (VectorView h, ConstVectorView f, ConstVectorView x_f, ConstVectorView x_g, const Numeric x1, const Numeric x2)
 sensor_summation_vector
void spectrometer_matrix (Sparse &H, ConstVectorView ch_f, const ArrayOfGField1 &ch_response, ConstVectorView sensor_f, const Index &n_pol, const Index &n_sp, const Index &do_norm)
 spectrometer_matrix

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


Detailed Description

Functions related to sensor modelling.

Author:
Mattias Ekström <ekstrom@rss.chalmers.se>
Date:
2003-02-27
Functions to model sensor behaviour and integration calculated as vector multiplication.

Definition in file sensor.cc.


Function Documentation

void antenna1d_matrix ( Sparse H,
const Index antenna_dim,
ConstMatrixView  antenna_los,
const GField4 antenna_response,
ConstVectorView  za_grid,
ConstVectorView  f_grid,
const Index  n_pol,
const Index  do_norm 
)

void mixer_matrix ( Sparse H,
Vector f_mixer,
const Numeric lo,
const GField1 filter,
ConstVectorView  f_grid,
const Index n_pol,
const Index n_sp,
const Index do_norm 
)

mixer_matrix

Sets up the sparse matrix that models the response from sideband filtering and the mixer.

The size of the transfer matrix is changed in the function as follows: nrows = f_mixer.nelem() ncols = f_grid.nelem()

The returned frequencies are given in IF, so both primary and mirror band is converted down.

Parameters:
H The mixer/sideband filter transfer matrix
f_mixer The frequency grid of the mixer
lo The local oscillator frequency
filter The sideband filter data. See *sideband_response* for format and constraints.
f_grid The original frequency grid of the spectrum
n_pol The number of polarisations to consider
n_sp The number of spectra (viewing directions)
do_norm Flag whether rows should be normalised
Author:
Mattias Ekström / Patrick Eriksson
Date:
2003-05-27 / 2008-06-17

Definition at line 225 of file sensor.cc.

References DEBUG_ONLY, GField::get_numeric_grid(), GFIELD1_F_GRID, Sparse::insert_row(), last(), max, ConstVectorView::nelem(), Sparse::resize(), Vector::resize(), and sensor_summation_vector().

Referenced by sensor_responseMixer().

void sensor_aux_vectors ( Vector sensor_response_f,
ArrayOfIndex sensor_response_pol,
Vector sensor_response_za,
Vector sensor_response_aa,
ConstVectorView  sensor_response_f_grid,
const ArrayOfIndex sensor_response_pol_grid,
ConstVectorView  sensor_response_za_grid,
ConstVectorView  sensor_response_aa_grid 
)

sensor_aux_vectors

Sets up the the auxiliary vectors for sensor_response.

The function assumes that all grids are common, and the aux vectors are just the grids repeated

Parameters:
sensor_response_f As the WSV with same name
sensor_response_pol As the WSV with same name
sensor_response_za As the WSV with same name
sensor_response_aa As the WSV with same name
sensor_response_f_grid As the WSV with same name
sensor_response_pol_grid As the WSV with same name
sensor_response_za_grid As the WSV with same name
sensor_response_aa_grid As the WSV with same name
Author:
Patrick Eriksson
Date:
2008-06-09

Definition at line 350 of file sensor.cc.

References Array< base >::nelem(), ConstVectorView::nelem(), and Vector::resize().

Referenced by sensor_responseAntenna(), sensor_responseBackend(), sensor_responseBeamSwitching(), sensor_responseInit(), sensor_responseMixer(), and sensor_responseMultiMixerBackend().

void sensor_integration_vector ( VectorView  h,
ConstVectorView  f,
ConstVectorView  x_f_in,
ConstVectorView  x_g_in 
)

sensor_integration_vector

Calculates the (row) vector that multiplied with an unknown (column) vector approximates the integral of the product between the functions represented by the two vectors.

E.g. h*g = integral( f(x)*g(x) dx )

See Eriksson et al., Efficient forward modelling by matrix representation of sensor responses, Int. J. Remote Sensing, 27, 1793-1808, 2006, for details.

The grids are internally normalised to cover the range [0,1] for increased numerical stability.

Parameters:
h The multiplication (row) vector.
f The values of function f(x).
x_f_in The grid points of function f(x). Must be increasing.
x_g_in The grid points of function g(x). Can be increasing or decreasing. Must cover a wider range than x_ft (in both ends).
Author:
Mattias Ekström and Patrick Eriksson
Date:
2003-02-13 / 2008-06-12

Definition at line 439 of file sensor.cc.

References b0, dx, is_decreasing(), is_increasing(), and ConstVectorView::nelem().

Referenced by antenna1d_matrix(), and spectrometer_matrix().

void sensor_summation_vector ( VectorView  h,
ConstVectorView  f,
ConstVectorView  x_f,
ConstVectorView  x_g,
const Numeric  x1,
const Numeric  x2 
)

sensor_summation_vector

Calculates the (row) vector that multiplied with an unknown (column) vector approximates the sum of the product between the functions at two points.

E.g. h*g = f(x1)*g(x1) + f(x2)*g(x2)

The typical application is to set up the combined response matrix for mixer and sideband filter.

See Eriksson et al., Efficient forward modelling by matrix representation of sensor responses, Int. J. Remote Sensing, 27, 1793-1808, 2006, for details.

No normalisation of the response is made.

Parameters:
h The summation (row) vector.
f Sideband response.
x_f The grid points of function f(x).
x_g The grid for spectral values (normally equal to f_grid)
x1 Point 1
x2 Point 2
Author:
Mattias Ekström / Patrick Eriksson
Date:
2003-05-26 / 2008-06-17

Definition at line 587 of file sensor.cc.

References gridpos(), interp(), interpweights(), last(), and ConstVectorView::nelem().

Referenced by mixer_matrix().

void spectrometer_matrix ( Sparse H,
ConstVectorView  ch_f,
const ArrayOfGField1 ch_response,
ConstVectorView  sensor_f,
const Index n_pol,
const Index n_sp,
const Index do_norm 
)

spectrometer_matrix

Constructs the sparse matrix that multiplied with the spectral values gives the spectra from the spectrometer.

The input to the function corresponds mainly to WSVs. See f_backend and backend_channel_response for how the backend response is specified.

Parameters:
H The response matrix.
ch_f Corresponds directly to WSV f_backend.
ch_response Corresponds directly to WSV backend_channel_response.
sensor_f Corresponds directly to WSV sensor_response_f_grid.
n_pol The number of polarisations.
n_sp The number of spectra (viewing directions).
do_norm Corresponds directly to WSV sensor_norm.
Author:
Mattias Ekström and Patrick Eriksson
Date:
2003-08-26 / 2008-06-10

Definition at line 653 of file sensor.cc.

References GFIELD1_F_GRID, Sparse::insert_row(), ConstVectorView::nelem(), Array< base >::nelem(), Sparse::resize(), sensor_integration_vector(), and ConstVectorView::sum().

Referenced by sensor_responseBackend().


Variable Documentation

const Numeric PI


Generated on Mon Mar 23 14:06:52 2009 for ARTS by  doxygen 1.5.6