casa
5.7.0-16
|
Spectral grid defined as a list of frequencies with basic complementary informations. More...
#include <ATMSpectralGrid.h>
Public Member Functions | |
SpectralGrid (const Frequency &oneFreq) | |
SpectralGrid (unsigned int numChan, unsigned int refChan, const Frequency &refFreq, const Frequency &chanSep) | |
A full constructor to be used in cases the channel separation is uniform. More... | |
SpectralGrid (unsigned int numChan, double refFreq, double *chanFreq, const std::string &freqUnits) | |
A full constructor to be used in cases the channel separation is not uniform. More... | |
SpectralGrid (double refFreq, const std::vector< double > &chanFreq, const std::string &freqUnits) | |
SpectralGrid (const std::vector< double > &chanFreq, const std::string &freqUnits) | |
SpectralGrid (const std::vector< Frequency > &chanFreq) | |
SpectralGrid (unsigned int numChan, unsigned int refChan, const Frequency &refFreq, const Frequency &chanSep, const Frequency &intermediateFreq, const SidebandSide &sbSide, const SidebandType &sbType) | |
A full constructor to be used in cases of two sibands (separated or not) The reference frequency, may not coincide with the center of a channel, is the frequency used to track on. More... | |
SpectralGrid (unsigned int numChan, unsigned int refChan, double *chanFreq, const std::string &freqUnits) | |
A full constructor to be used in cases the channel separation is not uniform. More... | |
SpectralGrid () | |
SpectralGrid (const SpectralGrid &) | |
~SpectralGrid () | |
unsigned int | add (unsigned int numChan, unsigned int refChan, const Frequency &refFreq, const Frequency &chanSep) |
Add a new spectral window, uniformly sampled, this spectral window having no sideband. More... | |
unsigned int | add (unsigned int numChan, unsigned int refChan, double *chanFreq, const std::string &freqUnits) |
Add a new spectral window, this spectral window having no sideband. More... | |
unsigned int | add (unsigned int numChan, double refFreq, double *chanFreq, const std::string &freqUnits) |
Add a new spectral window, this spectral window having no sideband. More... | |
unsigned int | add (unsigned int numChan, double refFreq, const std::vector< double > &chanFreq, const std::string &freqUnits) |
unsigned int | add (const std::vector< Frequency > &chanFreq) |
void | add (unsigned int numChan, unsigned int refChan, const Frequency &refFreq, const Frequency &chanSep, const Frequency &intermediateFreq, const SidebandSide &sbSide, const SidebandType &sbType) |
Add two new spectral windows, one spectral window per sideband. More... | |
bool | operator== (const SpectralGrid &) const |
unsigned int | getNumSpectralWindow () const |
Accessor to the number of spectral wondows. More... | |
unsigned int | getNumChan () const |
Accessor to the number of frequency points for the first spectral window. More... | |
unsigned int | getNumChan (unsigned int spwId) const |
Accessor to the number of frequency points for a given spectral window. More... | |
unsigned int | getRefChan () const |
Accessor to the reference channel of the first spectral window. More... | |
unsigned int | getRefChan (unsigned int spwId) const |
Accessor to the reference channel for a given spectral window. More... | |
Frequency | getRefFreq () const |
Frequency getRefFreq();. More... | |
Frequency | getRefFreq (unsigned int spwId) const |
Accessor to the reference frequency (Hz) for a given spectral window. More... | |
Frequency | getChanSep () const |
Accessor to the channel separation for regularily spaced grids (for the first spectral window) More... | |
Frequency | getChanSep (unsigned int spwId) const |
Accessor to the channel separation for regularily spaced grids (for a given spectral window) More... | |
Frequency | getChanFreq (unsigned int chanNum) const |
Accessor to the frequency (Hz) for a given grid point (for the first spectral window) More... | |
Frequency | getChanWidth (unsigned int chanNum) const |
Frequency | getChanFreq (unsigned int spwId, unsigned int chanNum) const |
Accessor to the frequency (Hz) for a given grid point for the specified spectral window. More... | |
Frequency | getChanWidth (unsigned int spwId, unsigned int chanNum) const |
std::vector< double > | getSbChanFreq (unsigned int spwId, unsigned int chanNum, const std::string &freqUnits) const |
Accessor to the frequencies in the specified units for a given channel index (0-based) for the the specified spectral window its corresponding other sideband. More... | |
std::vector< double > | getSpectralWindow (unsigned int spwId) const |
Accessor to retrieve the spectral grid of a spectral window. More... | |
double | getChanNum (double freq) const |
Method to get the grid position for a given frequency specified in Hz (the first spectral window) More... | |
double | getChanNum (unsigned int spwId, double freq) const |
Method to get the grid position for a given frequency specified in Hz for the specified spectral window. More... | |
Frequency | getBandwidth () const |
Method to get the frequency range encompassing the list of frequency grid points (for the first spectral window) More... | |
Frequency | getBandwidth (unsigned int spwId) const |
Method to get the frequency range encompassing the list of frequency grid points for the specified spectral window. More... | |
Frequency | getMinFreq () const |
Method to get the frequency (Hz) for the point at the lowest frequency (for the first spectral window) More... | |
Frequency | getMinFreq (unsigned int spwId) const |
Method to get the frequency in the specified units for the channel at the lowest frequency for the specified spectral window. More... | |
Frequency | getMaxFreq () const |
Method to get the frequency (Hz) for the point at the largest frequency (for the first spectral window) More... | |
Frequency | getMaxFreq (unsigned int spwId) const |
Method to get the frequency in the specified units for the point at the largest frequency (for the first spectral window) More... | |
bool | isRegular () const |
Method to know if the spectral grid is regular or not (the first spectral window) More... | |
bool | isRegular (unsigned int spwId) const |
Method to know if the spectral grid is regular or not for the specified spectral window. More... | |
std::string | getSidebandSide (unsigned int spwId) const |
Accessor for the side of the sideband. More... | |
std::vector< std::string > | getAssocNature (unsigned int spwId) const |
Accessor to the nature(s) of the associated spectral window(s) More... | |
std::vector< unsigned int > | getAssocSpwId (unsigned int spwId) const |
Accessor to the identifier of the associated spectral window(s) More... | |
std::vector< unsigned int > | getAssocSpwIds (const std::vector< unsigned int > &spwIds) const |
std::string | getSidebandType (unsigned int spwId) const |
Accessor for the type of sideband. More... | |
std::string | getSideband (unsigned int spwId) const |
Accessor for the side of the sideband and its type. More... | |
double | getLoFrequency () const |
double | getLoFrequency (unsigned int spwId) const |
Protected Attributes | |
std::string | freqUnits_ |
The frequency inits (always Hz) More... | |
std::vector< double > | v_chanFreq_ |
Channel frequencies of ALL the channels (i.e. all spectral window appended) More... | |
std::vector< unsigned int > | v_numChan_ |
number of channels for every spectral window More... | |
std::vector< unsigned int > | v_refChan_ |
reference channel for every spectral window More... | |
std::vector< double > | v_refFreq_ |
frequency at reference channel for every spectral window More... | |
std::vector< double > | v_chanSep_ |
channel separation for every spectral window More... | |
std::vector< double > | v_maxFreq_ |
frequency maximum for every spectral window More... | |
std::vector< double > | v_minFreq_ |
frequency minimum for every spectral window More... | |
std::vector< double > | v_intermediateFrequency_ |
std::vector< double > | v_loFreq_ |
std::vector< SidebandSide > | v_sidebandSide_ |
std::vector< SidebandType > | v_sidebandType_ |
std::vector< std::vector < unsigned int > > | vv_assocSpwId_ |
std::vector< std::vector < std::string > > | vv_assocNature_ |
std::vector< unsigned int > | v_transfertId_ |
Private Member Functions | |
void | appendChanFreq (unsigned int numChan, double *chanFreq) |
void | appendChanFreq (unsigned int numChan, const std::vector< double > &chanFreq) |
bool | wrongSpwId (unsigned int spwId) const |
Spectral grid defined as a list of frequencies with basic complementary informations.
This grid is composed by a set frequency channels (or pixels) which may or may not be at a regular interval. The grid is composed of one or more spectral windows. A spectral window is defined as a group of channels, this group having the following attributes:
the intermediate frequency (if NetSideband is greater than -1) To every spectral window is assigned an identifier (zero-based) which can be used when retrieving the parameters of a given window.
In case of spectral windows with regularily spaced channels this reference frequency can be associated to a position in channel number units.
There are several different constructors which can be used to define a spectral window. One of these must be used to construct the first spectral window. Would more than a single spectral be necessary, they are appended with the add methods. When there are two sidebands, every of these corresponds to a single spectral window. Note that these two sidebands can be constructed using a single method if the intermediate frequency is an input parameter.
Definition at line 69 of file ATMSpectralGrid.h.
SpectralGrid::SpectralGrid | ( | const Frequency & | oneFreq | ) |
SpectralGrid::SpectralGrid | ( | unsigned int | numChan, |
unsigned int | refChan, | ||
const Frequency & | refFreq, | ||
const Frequency & | chanSep | ||
) |
A full constructor to be used in cases the channel separation is uniform.
The position of the reference frequency is set at the center of the specified reference channel. This reference channel does not need to be necessarily in the range [1,numChan].
numChan | Number of channels for the spectral window |
refChan | Reference channel for the spectral window |
refFreq | Frequency for this reference channel |
chanSep | Frequency increment between two adjacent channels |
SpectralGrid::SpectralGrid | ( | unsigned int | numChan, |
double | refFreq, | ||
double * | chanFreq, | ||
const std::string & | freqUnits | ||
) |
A full constructor to be used in cases the channel separation is not uniform.
In this case the reference frequency may not coincide with the center of a channel. The frequency units (freqUnits) is common for the reference frequency (refFReq) and for the numChan frequencies in the list chanFreq. Known units are GHz, MHz, kHz and Hz.
numChan | Number of channels for the spectral window |
refFreq | The frequency of the reference channel |
chanFreq | The frequencies of the individual channels |
freqUnits | The frequency units used to define refFreq and chanFreq |
SpectralGrid::SpectralGrid | ( | double | refFreq, |
const std::vector< double > & | chanFreq, | ||
const std::string & | freqUnits | ||
) |
SpectralGrid::SpectralGrid | ( | const std::vector< double > & | chanFreq, |
const std::string & | freqUnits | ||
) |
SpectralGrid::SpectralGrid | ( | const std::vector< Frequency > & | chanFreq | ) |
SpectralGrid::SpectralGrid | ( | unsigned int | numChan, |
unsigned int | refChan, | ||
const Frequency & | refFreq, | ||
const Frequency & | chanSep, | ||
const Frequency & | intermediateFreq, | ||
const SidebandSide & | sbSide, | ||
const SidebandType & | sbType | ||
) |
A full constructor to be used in cases of two sibands (separated or not) The reference frequency, may not coincide with the center of a channel, is the frequency used to track on.
The frequency units (freqUnits) is common for the reference frequency (refFReq) and for the numChan frequencies in the list chanFreq. Known units are GHz, MHz, kHz and Hz.
numChan | Number of channels for the spectral window |
refFreq | Frequency of the reference channel |
chanSep | Frequency interval between two adajacent channels |
intermediateFreq | Intermediate Frequency |
SidebandSide | code (see SidebandSide for details) |
SidebandType | code (see SidebandType for details) |
SpectralGrid::SpectralGrid | ( | unsigned int | numChan, |
unsigned int | refChan, | ||
double * | chanFreq, | ||
const std::string & | freqUnits | ||
) |
A full constructor to be used in cases the channel separation is not uniform.
In this case the reference frequency coincides with the center of a channel, the one at the refChan position in the numChan elements of the list of frequencies chanFreq. Hence refChan must be in the range [1,numChan]. The frequency units (freqUnits) is common for the reference frequency (refFReq) and for the numChan frequencies in the list chanFreq. Known units are GHz, MHz, kHz and Hz.
numChan | Number of channels for the spectral window |
refChan | Reference channel for the spectral window |
chanFreq | The frequencies of the individual channels |
freqUnits | The frequency units used to define refFreq and chanFreq |
SpectralGrid::SpectralGrid | ( | ) |
SpectralGrid::SpectralGrid | ( | const SpectralGrid & | ) |
SpectralGrid::~SpectralGrid | ( | ) |
unsigned int SpectralGrid::add | ( | unsigned int | numChan, |
unsigned int | refChan, | ||
const Frequency & | refFreq, | ||
const Frequency & | chanSep | ||
) |
Add a new spectral window, uniformly sampled, this spectral window having no sideband.
numChan | Number of channels for the spectral window |
refChan | Reference channel for the spectral window |
refFreq | Frequency for this reference channel |
chanSep | Frequency increment between two adjacent channels |
Referenced by add(), RefractiveIndexProfile::addNewSpectralWindow(), and SkyStatus::addNewSpectralWindow().
unsigned int SpectralGrid::add | ( | unsigned int | numChan, |
unsigned int | refChan, | ||
double * | chanFreq, | ||
const std::string & | freqUnits | ||
) |
Add a new spectral window, this spectral window having no sideband.
numChan | Number of channels for the spectral window |
refChan | Reference channel for the spectral window |
chanFreq | The frequency for every channel |
freqUnits | The frequency units (GHz, MHz or kHz, else assumed in Hz) used for chanFreq |
unsigned int SpectralGrid::add | ( | unsigned int | numChan, |
double | refFreq, | ||
double * | chanFreq, | ||
const std::string & | freqUnits | ||
) |
Add a new spectral window, this spectral window having no sideband.
numChan | Number of channels for the spectral window |
refFreq | The frequency at the reference channel for the spectral window |
chanFreq | The frequency for every channel |
freqUnits | The frequency units (GHz, MHz or kHz, else assumed in Hz) used for refFreq and chanFreq |
unsigned int SpectralGrid::add | ( | unsigned int | numChan, |
double | refFreq, | ||
const std::vector< double > & | chanFreq, | ||
const std::string & | freqUnits | ||
) |
|
inline |
Definition at line 211 of file ATMSpectralGrid.h.
References add().
void SpectralGrid::add | ( | unsigned int | numChan, |
unsigned int | refChan, | ||
const Frequency & | refFreq, | ||
const Frequency & | chanSep, | ||
const Frequency & | intermediateFreq, | ||
const SidebandSide & | sbSide, | ||
const SidebandType & | sbType | ||
) |
Add two new spectral windows, one spectral window per sideband.
numChan | Number of channels for the spectral window in one sideband |
refFreq | The frequency at the reference channel for that spectral window |
chanSep | The channel separation (unsigned) |
intermediateFreq | the Intermediate Frequency |
|
private |
|
private |
std::vector<std::string> SpectralGrid::getAssocNature | ( | unsigned int | spwId | ) | const |
Accessor to the nature(s) of the associated spectral window(s)
spwId | spectral window identifier (0-based) |
std::vector<unsigned int> SpectralGrid::getAssocSpwId | ( | unsigned int | spwId | ) | const |
Accessor to the identifier of the associated spectral window(s)
spwId | spectral window identifier (0-based) |
std::vector<unsigned int> SpectralGrid::getAssocSpwIds | ( | const std::vector< unsigned int > & | spwIds | ) | const |
Frequency SpectralGrid::getBandwidth | ( | ) | const |
Method to get the frequency range encompassing the list of frequency grid points (for the first spectral window)
Frequency SpectralGrid::getBandwidth | ( | unsigned int | spwId | ) | const |
Method to get the frequency range encompassing the list of frequency grid points for the specified spectral window.
spwId | spectral window identifier (0-based) |
Frequency SpectralGrid::getChanFreq | ( | unsigned int | chanNum | ) | const |
Accessor to the frequency (Hz) for a given grid point (for the first spectral window)
chanNum | the channel number (grid units) @ return the frequency (Hz) corresponding to the center of the channel |
Referenced by RefractiveIndexProfile::getFrequency().
Frequency SpectralGrid::getChanFreq | ( | unsigned int | spwId, |
unsigned int | chanNum | ||
) | const |
Accessor to the frequency (Hz) for a given grid point for the specified spectral window.
spwId | spectral window identifier (0-based) |
chanNum | the channel number (grid units) @ return the frequency (Hz) corresponding to the center of the channel |
double SpectralGrid::getChanNum | ( | double | freq | ) | const |
Method to get the grid position for a given frequency specified in Hz (the first spectral window)
double SpectralGrid::getChanNum | ( | unsigned int | spwId, |
double | freq | ||
) | const |
Method to get the grid position for a given frequency specified in Hz for the specified spectral window.
freq | the frequency (Hz) for the grid position |
spwId | spectral window identifier (0-based) |
Frequency SpectralGrid::getChanSep | ( | ) | const |
Accessor to the channel separation for regularily spaced grids (for the first spectral window)
Frequency SpectralGrid::getChanSep | ( | unsigned int | spwId | ) | const |
Accessor to the channel separation for regularily spaced grids (for a given spectral window)
spwId | spectral window identifier (0-based) |
Frequency SpectralGrid::getChanWidth | ( | unsigned int | chanNum | ) | const |
Frequency SpectralGrid::getChanWidth | ( | unsigned int | spwId, |
unsigned int | chanNum | ||
) | const |
double SpectralGrid::getLoFrequency | ( | ) | const |
double SpectralGrid::getLoFrequency | ( | unsigned int | spwId | ) | const |
Frequency SpectralGrid::getMaxFreq | ( | ) | const |
Method to get the frequency (Hz) for the point at the largest frequency (for the first spectral window)
Frequency SpectralGrid::getMaxFreq | ( | unsigned int | spwId | ) | const |
Method to get the frequency in the specified units for the point at the largest frequency (for the first spectral window)
units | the requested units |
Frequency SpectralGrid::getMinFreq | ( | ) | const |
Method to get the frequency (Hz) for the point at the lowest frequency (for the first spectral window)
Frequency SpectralGrid::getMinFreq | ( | unsigned int | spwId | ) | const |
Method to get the frequency in the specified units for the channel at the lowest frequency for the specified spectral window.
spwId | spectral window identifier (0-based) |
unsigned int SpectralGrid::getNumChan | ( | ) | const |
Accessor to the number of frequency points for the first spectral window.
unsigned int SpectralGrid::getNumChan | ( | unsigned int | spwId | ) | const |
Accessor to the number of frequency points for a given spectral window.
spwId | spectral window identifier (0-based) |
unsigned int SpectralGrid::getNumSpectralWindow | ( | ) | const |
Accessor to the number of spectral wondows.
unsigned int SpectralGrid::getRefChan | ( | ) | const |
Accessor to the reference channel of the first spectral window.
unsigned int SpectralGrid::getRefChan | ( | unsigned int | spwId | ) | const |
Accessor to the reference channel for a given spectral window.
spwId | spectral window identifier (0-based) |
Frequency SpectralGrid::getRefFreq | ( | ) | const |
Accessor to the reference frequency (Hz) for the first spectral window
Frequency SpectralGrid::getRefFreq | ( | unsigned int | spwId | ) | const |
Accessor to the reference frequency (Hz) for a given spectral window.
spwId | spectral window identifier (0-based) |
std::vector<double> SpectralGrid::getSbChanFreq | ( | unsigned int | spwId, |
unsigned int | chanNum, | ||
const std::string & | freqUnits | ||
) | const |
Accessor to the frequencies in the specified units for a given channel index (0-based) for the the specified spectral window its corresponding other sideband.
spwId | spectral window identifier (0-based) |
chanNum | the channel number (grid units) |
freqUnits | the requested units |
std::string SpectralGrid::getSideband | ( | unsigned int | spwId | ) | const |
Accessor for the side of the sideband and its type.
spwId | spectral window identifier (0-based) |
std::string SpectralGrid::getSidebandSide | ( | unsigned int | spwId | ) | const |
Accessor for the side of the sideband.
spwId | spectral window identifier (0-based) |
std::string SpectralGrid::getSidebandType | ( | unsigned int | spwId | ) | const |
Accessor for the type of sideband.
spwId | spectral window identifier (0-based) |
std::vector<double> SpectralGrid::getSpectralWindow | ( | unsigned int | spwId | ) | const |
Accessor to retrieve the spectral grid of a spectral window.
spwId | spectral window identifier (0-based) |
bool SpectralGrid::isRegular | ( | ) | const |
Method to know if the spectral grid is regular or not (the first spectral window)
bool SpectralGrid::isRegular | ( | unsigned int | spwId | ) | const |
Method to know if the spectral grid is regular or not for the specified spectral window.
spwId | spectral window identifier (0-based) |
|
inline |
Definition at line 467 of file ATMSpectralGrid.h.
References freqUnits_, v_chanFreq_, v_chanSep_, v_maxFreq_, v_minFreq_, v_numChan_, and v_refChan_.
|
private |
|
protected |
The frequency inits (always Hz)
Definition at line 441 of file ATMSpectralGrid.h.
Referenced by operator==().
|
protected |
Channel frequencies of ALL the channels (i.e. all spectral window appended)
Definition at line 442 of file ATMSpectralGrid.h.
Referenced by RefractiveIndexProfile::getNumIndividualFrequencies(), and operator==().
|
protected |
channel separation for every spectral window
Definition at line 447 of file ATMSpectralGrid.h.
Referenced by operator==().
|
protected |
Definition at line 450 of file ATMSpectralGrid.h.
|
protected |
Definition at line 451 of file ATMSpectralGrid.h.
|
protected |
frequency maximum for every spectral window
Definition at line 448 of file ATMSpectralGrid.h.
Referenced by operator==().
|
protected |
frequency minimum for every spectral window
Definition at line 449 of file ATMSpectralGrid.h.
Referenced by operator==().
|
protected |
number of channels for every spectral window
Definition at line 444 of file ATMSpectralGrid.h.
Referenced by operator==(), SkyStatus::RT(), and SkyStatus::RTRJ().
|
protected |
reference channel for every spectral window
Definition at line 445 of file ATMSpectralGrid.h.
Referenced by operator==().
|
protected |
frequency at reference channel for every spectral window
Definition at line 446 of file ATMSpectralGrid.h.
|
protected |
Definition at line 453 of file ATMSpectralGrid.h.
|
protected |
Definition at line 454 of file ATMSpectralGrid.h.
|
protected |
Definition at line 458 of file ATMSpectralGrid.h.
Referenced by RefractiveIndexProfile::getAbsCOLines(), RefractiveIndexProfile::getAbsDryCont(), RefractiveIndexProfile::getAbsH2OCont(), RefractiveIndexProfile::getAbsH2OLines(), RefractiveIndexProfile::getAbsN2OLines(), RefractiveIndexProfile::getAbsNO2Lines(), RefractiveIndexProfile::getAbsO2Lines(), RefractiveIndexProfile::getAbsO3Lines(), RefractiveIndexProfile::getAbsSO2Lines(), RefractiveIndexProfile::getAbsTotalDry(), RefractiveIndexProfile::getAbsTotalWet(), RefractiveIndexProfile::getDryOpacity(), RefractiveIndexProfile::getDryOpacityUpTo(), SkyStatus::getH2OContOpacity(), SkyStatus::getH2OContOpacityUpTo(), SkyStatus::getH2OLinesOpacity(), SkyStatus::getH2OLinesOpacityUpTo(), SkyStatus::getTotalOpacityUpTo(), SkyStatus::getWetOpacity(), and SkyStatus::getWetOpacityUpTo().
|
protected |
Definition at line 456 of file ATMSpectralGrid.h.
|
protected |
Definition at line 455 of file ATMSpectralGrid.h.