1 #ifndef _ATM_SPECTRALGRID_H
2 #define _ATM_SPECTRALGRID_H
29 #error "This is a C++ include file and cannot be used from plain C"
107 const std::string &freqUnits);
108 SpectralGrid(
double refFreq,
const std::vector<double> &chanFreq,
const std::string &freqUnits);
109 SpectralGrid(
const std::vector<double> &chanFreq,
const std::string &freqUnits);
130 unsigned int refChan,
153 unsigned int refChan,
155 const std::string &freqUnits);
173 unsigned int add(
unsigned int numChan,
174 unsigned int refChan,
188 unsigned int add(
unsigned int numChan,
189 unsigned int refChan,
191 const std::string &freqUnits);
203 unsigned int add(
unsigned int numChan,
206 const std::string &freqUnits);
207 unsigned int add(
unsigned int numChan,
209 const std::vector<double> &chanFreq,
210 const std::string &freqUnits);
211 unsigned int add(
const std::vector<Frequency> &chanFreq)
214 std::vector<double> v;
215 for(
unsigned int i = 0; i < chanFreq.size(); i++) {
216 v.push_back(chanFreq[i].
get(
"GHz"));
218 spwid =
add(chanFreq.size(), chanFreq[0].get(
"GHz"), v,
"GHz");
235 void add(
unsigned int numChan,
236 unsigned int refChan,
257 unsigned int getNumChan(
unsigned int spwId)
const;
270 unsigned int getRefChan(
unsigned int spwId)
const;
320 unsigned int chanNum,
321 const std::string &freqUnits)
const;
338 double getChanNum(
unsigned int spwId,
double freq)
const;
388 bool isRegular(
unsigned int spwId)
const;
403 std::vector<std::string>
getAssocNature(
unsigned int spwId)
const;
411 std::vector<unsigned int>
getAssocSpwId(
unsigned int spwId)
const;
413 std::vector<unsigned int>
getAssocSpwIds(
const std::vector<unsigned int> &spwIds)
const;
463 void appendChanFreq(
unsigned int numChan,
const std::vector<double> &chanFreq);
#define ATM_NAMESPACE_END
std::vector< unsigned int > getAssocSpwId(unsigned int spwId) const
Accessor to the identifier of the associated spectral window(s)
std::vector< unsigned int > v_transfertId_
Spectral grid defined as a list of frequencies with basic complementary informations.
std::vector< double > v_loFreq_
bool isRegular() const
Method to know if the spectral grid is regular or not (the first spectral window) ...
double getChanNum(double freq) const
Method to get the grid position for a given frequency specified in Hz (the first spectral window) ...
std::vector< double > v_intermediateFrequency_
std::vector< double > getSpectralWindow(unsigned int spwId) const
Accessor to retrieve the spectral grid of a spectral window.
unsigned int getNumChan() const
Accessor to the number of frequency points for the first spectral window.
Frequency getBandwidth() const
Method to get the frequency range encompassing the list of frequency grid points (for the first spect...
std::vector< SidebandSide > v_sidebandSide_
std::vector< std::string > getAssocNature(unsigned int spwId) const
Accessor to the nature(s) of the associated spectral window(s)
Frequency getMaxFreq() const
Method to get the frequency (Hz) for the point at the largest frequency (for the first spectral windo...
std::string getSidebandType(unsigned int spwId) const
Accessor for the type of sideband.
bool wrongSpwId(unsigned int spwId) const
#define ATM_NAMESPACE_BEGIN
std::vector< double > v_refFreq_
frequency at reference channel for every spectral window
Frequency getChanFreq(unsigned int chanNum) const
Accessor to the frequency (Hz) for a given grid point (for the first spectral window) ...
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 sp...
std::vector< double > v_minFreq_
frequency minimum for every spectral window
bool operator==(const SpectralGrid &) const
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.
std::string getSidebandSide(unsigned int spwId) const
Accessor for the side of the sideband.
std::vector< double > v_maxFreq_
frequency maximum for every spectral window
Frequency getChanSep() const
Accessor to the channel separation for regularily spaced grids (for the first spectral window) ...
std::vector< double > v_chanFreq_
Channel frequencies of ALL the channels (i.e. all spectral window appended)
std::vector< double > v_chanSep_
channel separation for every spectral window
Frequency getMinFreq() const
Method to get the frequency (Hz) for the point at the lowest frequency (for the first spectral window...
unsigned int add(const std::vector< Frequency > &chanFreq)
std::vector< SidebandType > v_sidebandType_
std::string getSideband(unsigned int spwId) const
Accessor for the side of the sideband and its type.
Defines a frequency value with units.
std::vector< std::vector< std::string > > vv_assocNature_
std::vector< std::vector< unsigned int > > vv_assocSpwId_
Frequency getChanWidth(unsigned int chanNum) const
std::vector< unsigned int > v_refChan_
reference channel for every spectral window
double getLoFrequency() const
void appendChanFreq(unsigned int numChan, double *chanFreq)
std::vector< unsigned int > v_numChan_
number of channels for every spectral window
unsigned int getRefChan() const
Accessor to the reference channel of the first spectral window.
std::string freqUnits_
The frequency inits (always Hz)
std::vector< unsigned int > getAssocSpwIds(const std::vector< unsigned int > &spwIds) const
Frequency getRefFreq() const
Frequency getRefFreq();.
unsigned int getNumSpectralWindow() const
Accessor to the number of spectral wondows.