casa  5.7.0-16
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Protected Attributes | Private Member Functions | List of all members
sdmbin::DataDescriptionsSet Class Reference

Definition of the first level in the tree hierarchy: set of spectro-polarization descriptions, basebands. More...

#include <DataDescriptionsSet.h>

Inheritance diagram for sdmbin::DataDescriptionsSet:
sdmbin::SwitchCyclesList sdmbin::BaselinesSet

Public Member Functions

 DataDescriptionsSet ()
 
 DataDescriptionsSet (asdm::ASDM *const datasetPtr, std::vector< asdm::Tag > v_switchCycleId, std::vector< asdm::Tag > v_dataDescriptionId, CorrelationModeMod::CorrelationMode corrMode, std::vector< AtmPhaseCorrectionMod::AtmPhaseCorrection > atmPhaseCodes)
 Define the first level in the tree hierarchy. More...
 
 DataDescriptionsSet (std::vector< int > v_switchCycleId, std::vector< int > v_dataDescriptionId, CorrelationModeMod::CorrelationMode corrMode, std::vector< AtmPhaseCorrectionMod::AtmPhaseCorrection > atmPhaseCodes)
 Define the first level in the tree hierarchy. More...
 
 DataDescriptionsSet (const DataDescriptionsSet &)
 Copy constructor. More...
 
virtual ~DataDescriptionsSet ()
 Destructor. More...
 
BasebandNameMod::BasebandName getBasebandName (unsigned int ndd)
 Get the baseband name of a given dataDescription. More...
 
unsigned int getBasebandIndex (unsigned int ndd)
 Get the baseband number of a given dataDescription. More...
 
unsigned int numBaseband ()
 Accessor to the number of basebands. More...
 
unsigned int numBin (unsigned int ndd)
 Accessor to the number of steps for the baseband of a given dataDescription. More...
 
unsigned int numPol (unsigned int ndd)
 Accessor to the number of polarization products of a given dataDescription. More...
 
unsigned int numSdPol (unsigned int ndd)
 Accessor to the number of polarization cross-products of a given dataDescription. More...
 
unsigned int numChan (unsigned int ndd)
 Accessor to the number of frequency channels of a given dataDescription. More...
 
asdm::Tag getSpwId (unsigned int ndd)
 Accessor to get the spwtral window identifier of a given dataDescription. More...
 
asdm::Frequency totBandwidth (unsigned int ndd)
 Accessor to the total frequency bandwidth of a given dataDescription. More...
 
unsigned int numApc ()
 Size of the apc axis (can be only 1 or 2) More...
 
Enum
< AtmPhaseCorrectionMod::AtmPhaseCorrection > 
atmPhaseCorrection (unsigned int atmPhaseCorrectionIndex)
 Accessor to the atmospherePhaseCorrection. More...
 
unsigned int atmPhaseCorrectionIndex (AtmPhaseCorrectionMod::AtmPhaseCorrection apc)
 Get the index position along the apc axis. More...
 
int numAutoData (unsigned int ndd)
 Provide the number of auto-correlations for a given dataDescription. More...
 
unsigned int numCrossData (unsigned int ndd)
 Provide the number of cross-correlations for a given dataDescription. More...
 
unsigned int sumMetaDataIndex ()
 Provide the number of switchCycle phases cumulated over all the basebands in the configuration. More...
 
unsigned int metaDataIndex (unsigned int ndd)
 Provide the index for a given dataDescription in the meta-data tree. More...
 
CorrelationModeMod::CorrelationMode getCorrelationMode ()
 Get the bitSize (actually the number of bytes, 2 or 4) used for the visibilities. More...
 
unsigned int getNumDataDescription ()
 Get the number of dataDescription. More...
 
unsigned int getNumChan (unsigned int ndd)
 Get the number of frequency channels for a given dataDescription. More...
 
unsigned int getNumPol (unsigned int bbIndex)
 Get the number of Polarization Products given a baseband. More...
 
unsigned int getNumPol (BasebandNameMod::BasebandName bbName)
 Get the number of Polarization Products given a baseband. More...
 
unsigned int getNumSdPol (unsigned int bbIndex)
 Get the number of Polarization Products in the case of zero-baselines given a baseband. More...
 
unsigned int getNumSdPol (BasebandNameMod::BasebandName bbName)
 Get the number of Polarization Products in the case of zero-baselines given a baseband. More...
 
unsigned int getNdd (unsigned int bbIndex, unsigned int j)
 Get the index of a dataDescription given its index in its parent baseband. More...
 
unsigned int getNdd (BasebandNameMod::BasebandName bbName, unsigned int j)
 Get the index of a dataDescription given its index in its parent baseband. More...
 
unsigned int getNumSpw (unsigned int bbIndex)
 Get the number of Spectral Windows in a given baseband identified by its index. More...
 
unsigned int getNumSpw (BasebandNameMod::BasebandName bbName)
 Get the number of Spectral Windows in a given baseband identified by its name. More...
 
unsigned int getDataDescriptionIndex (asdm::Tag dataDescriptionId)
 Get the dataDescription index given a dataDescriptionId identifier. More...
 
unsigned long getAutoSize ()
 Get the size of the block of data for the auto-correlations originating from one antenna. More...
 
unsigned long getCrossSize ()
 Get the size of the block of cross-correlation data for the ensemble of spectral windows and a single non-zero baseline. More...
 
unsigned long getNumAutoData ()
 Number of auto-correlations produce for one antenna. More...
 
unsigned long getNumCrossData ()
 Number of cross-correlations produced by one non-zero baseline for the set of dataDescriptions. More...
 
unsigned long getNumAutoData (asdm::Tag autoDataDescriptionId)
 Number of auto-correlations produced by one antenna for one dataDescription. More...
 
unsigned long getNumCrossData (asdm::Tag crossDataDescriptionId)
 Number of cross-correlations produced by one non-zero baseline for a given dataDescription. More...
 
asdm::Tag getAutoDataDescriptionId (asdm::Tag crossDataDescriptionId)
 Get the array of dataDescriptionId identifiers for the auto-correlations. More...
 
std::vector< asdm::TaggetAutoDataDescriptionId ()
 Get the array of dataDescriptionId identifiers for the cross-correlations. More...
 
std::vector< asdm::TaggetCrossDataDescriptionId ()
 Get the array of dataDescriptionId identifiers for the cross-correlations. More...
 
- Public Member Functions inherited from sdmbin::SwitchCyclesList
std::vector< asdm::TaggetSwitchCyclesList ()
 Accessor on the array of SwitchCycle identifiers. More...
 
std::vector< asdm::TaggetSwitchCyclesList (BasebandNameMod::BasebandName basebandName)
 Accessor on the array of SwitchCycle identifiers given a named baseband. More...
 
std::vector< int > getNumBin ()
 Accessor on the number of steps for the SwitchCycles for every of the dataDesription in the list in configDescription. More...
 
std::vector< int > getNumBin (BasebandNameMod::BasebandName basebandName)
 Accessor on the number of steps for the SwitchCycles given a named basebaband. More...
 
 SwitchCyclesList (const SwitchCyclesList &)
 Copy constructor. More...
 
virtual ~SwitchCyclesList ()
 

Protected Attributes

std::vector< asdm::Tagv_dataDescriptionIdArray_
 the input array of dataDescription identifiers More...
 
Enum
< CorrelationModeMod::CorrelationMode > 
e_cm_
 Type-safe correlation mode. More...
 
CorrelationModeMod::CorrelationMode correlationMode_
 Correlation mode. More...
 
EnumSet
< AtmPhaseCorrectionMod::AtmPhaseCorrection > 
es_apc_
 Atmospheric Phase Correction set. More...
 
std::vector
< AtmPhaseCorrectionMod::AtmPhaseCorrection > 
v_atmPhaseCorrection_
 sequence of the Atmospheric Phase Correction values along the apc axis More...
 
std::vector< unsigned int > v_numPol_
 number of cross-products (size numDataDesc_) More...
 
std::vector< asdm::Tagv_spwId_
 sequence of spectral window identifiers (size numDataDesc_) More...
 
std::vector< unsigned int > v_numChan_
 sequence of nb of chan. i.e. spectral points (size numDataDesc_) More...
 
std::vector
< BasebandNameMod::BasebandName > 
v_basebandName_
 (size numDataDesc_), baseband name for every spectral window. More...
 
std::vector< std::vector< int > > vv_nsp_
 Nb of chan. per dataDescription (size numBaseband) vectors. More...
 
std::map
< BasebandNameMod::BasebandName,
std::vector< DataDescParams > > 
m_bn_v_ddp_
 The sequence of dataDescParams in the different basebands. More...
 
std::map< asdm::Tag,
BasebandNameMod::BasebandName > 
m_ddid_bbn_
 Association between the dataDescriptionId and the baseband name. More...
 
unsigned int numApc_
 APC axis size (can take the value 1 or 2 only) More...
 
unsigned int numDataDescription_
 Explicit number of dataDescriptionId. More...
 
unsigned int sumMetaDataIndex_
 Sum of the elements of the vector v_metaDataIndex_. More...
 
unsigned long sumAutoSize_
 Sum of the elements of the vector v_autoSize_. More...
 
unsigned long sumCrossSize_
 Sum of the elements of the vector v_crossSize_. More...
 
std::vector< unsigned int > v_metaDataIndex_
 Indices for positions for every dataDesc (size numDataDesc_) More...
 
std::vector< unsigned long > v_cumulAutoSize_
 Number of bytes to skip for every dataDesc (size numDataDesc_) More...
 
std::vector< unsigned long > v_cumulCrossSize_
 Number of bytes to skip for every dataDesc (size numDataDesc_) More...
 
std::vector< unsigned long > v_numAutoData_
 Number of auto-correlations per antenna (size numDataDesc_) More...
 
std::vector< unsigned long > v_numCrossData_
 Number of cross-correlations per antenna pair (size numDataDesc_) More...
 
std::vector< unsigned long > v_autoSize_
 Size, in nb PDT values, for every dataDesc (size numDataDesc_) More...
 
std::vector< unsigned long > v_crossSize_
 Size, in nb PDT values, for every dataDesc (size numDataDesc_) More...
 
std::vector< asdm::Tagv_crossDataDescriptionId_
 Vector of dataDecsritionId for the cross-correlations (size numDataDesc_) More...
 
std::vector< asdm::Tagv_autoDataDescriptionId_
 Vector of dataDecsritionId for the auto-correlations (size <= numDataDesc_) More...
 
std::vector< bool > v_pairDataDescriptionId_
 true if crossDataDecsritionId assoc to autoDataDecsritionId (size numDataDesc_) More...
 
std::vector
< BasebandNameMod::BasebandName > 
v_basebandSet_
 Sequence of baseband names. More...
 
EnumSet
< BasebandNameMod::BasebandName > 
e_basebandSet_
 Set of baseband names. More...
 
std::vector< unsigned int > v_numSpwPerBb_
 Number of spectral windows in every baseband. More...
 
- Protected Attributes inherited from sdmbin::SwitchCyclesList
std::map
< BasebandNameMod::BasebandName,
std::vector< asdm::Tag > > 
m_bn_v_scId_
 
std::map
< BasebandNameMod::BasebandName,
std::vector< int > > 
m_bn_v_numBin_
 
std::vector< std::vector< int > > vv_numBin_
 
std::vector< int > v_numBin_
 
asdm::ASDMdatasetPtr_
 
std::vector< std::vector
< asdm::Tag > > 
vv_switchCycleId_
 
std::vector< asdm::Tagv_switchCycleId_
 

Private Member Functions

void size ()
 
void metaDataIndex ()
 
void mapScToBaseband ()
 SwitchCyclesList defines the abstract base type of a hierarchy. More...
 

Additional Inherited Members

- Protected Member Functions inherited from sdmbin::SwitchCyclesList
 SwitchCyclesList ()
 
 SwitchCyclesList (asdm::ASDM *const datasetPtr, std::vector< asdm::Tag > v_switchCycleId)
 Class to define the root of the tree hierarchy. More...
 
 SwitchCyclesList (asdm::ASDM *const datasetPtr, std::vector< std::vector< asdm::Tag > > vv_switchCycleId)
 Class to define the root of the tree hierarchy. More...
 
 SwitchCyclesList (asdm::ASDM *const datasetPtr, std::vector< std::vector< int > > vv_switchCycleId)
 Class to define the root of the tree hierarchy. More...
 

Detailed Description

Definition of the first level in the tree hierarchy: set of spectro-polarization descriptions, basebands.

Definition at line 31 of file DataDescriptionsSet.h.

Constructor & Destructor Documentation

sdmbin::DataDescriptionsSet::DataDescriptionsSet ( )
sdmbin::DataDescriptionsSet::DataDescriptionsSet ( asdm::ASDM *const  datasetPtr,
std::vector< asdm::Tag v_switchCycleId,
std::vector< asdm::Tag v_dataDescriptionId,
CorrelationModeMod::CorrelationMode  corrMode,
std::vector< AtmPhaseCorrectionMod::AtmPhaseCorrection >  atmPhaseCodes 
)

Define the first level in the tree hierarchy.

Precondition
the pointer to the SDM dataset is already known
Parameters
v_switchCycleIda sequence of switchCycle identifiers, one per data description. It is not a set
v_dataDescriptionIdthe sequence of DataDescription identifiers. it is an ordered set
corrModethe correlation mode used:
  • CROSS_ONLY if, in the data products, there are only visibilities (i.e. no auto-correlation data)
  • AUTO-ONLY if, in the data products, there are only auto-correlations (i.e. no visibilities data)
  • CROSS_AND_AUTO if , in the data products, there are both visibilities and auto-correlations
atmPhaseCodesthe vector of atmospheric phase correction enumerators used:
  • AP_UNCORRECTED
  • AP_CORRECTED
  • AP_MIXED
Postcondition
the first level of the tree hierarchy being defined this class can be derived to set the second level (class BaselinesSet).
Note
Use the alternate constructor DataDescriptionsSet( SwitchCyclesList& , vector<int> , int , int , int); if the data description identifiers are typed int.
Use the alternate constructor if the data description identifiers are typed int.
sdmbin::DataDescriptionsSet::DataDescriptionsSet ( std::vector< int >  v_switchCycleId,
std::vector< int >  v_dataDescriptionId,
CorrelationModeMod::CorrelationMode  corrMode,
std::vector< AtmPhaseCorrectionMod::AtmPhaseCorrection >  atmPhaseCodes 
)

Define the first level in the tree hierarchy.

Precondition
the pointer to the SDM dataset is already known
Parameters
datasetPtrthe SDM dataset
switchCyclesLista switchCycle object
v_dataDescriptionIdArraythe set of DataDescription identifiers
corrModethe correlation mode used:
  • CROSS_ONLY
  • AUTO-ONLY
  • CROSS_AND_AUTO
atmPhaseCodesthe vector of atmospheric phase correction enumerators used:
  • AP_UNCORRECTED
  • AP_CORRECTED
  • AP_MIXED
bitSize(MAY BECOME OBSOLETE in the future since bitSize is now imposed to be the same for all spectral windows)
Postcondition
the first level of the tree hierarchy is now defined
Note
Use the alternate constructor DataDescriptionsSet( SwitchCyclesList& , vector<Tag> , int , int , int); if the data description identifiers are with the asdm type Tag.
sdmbin::DataDescriptionsSet::DataDescriptionsSet ( const DataDescriptionsSet )

Copy constructor.

virtual sdmbin::DataDescriptionsSet::~DataDescriptionsSet ( )
virtual

Destructor.

Note
use the default implementation

Member Function Documentation

Enum<AtmPhaseCorrectionMod::AtmPhaseCorrection> sdmbin::DataDescriptionsSet::atmPhaseCorrection ( unsigned int  atmPhaseCorrectionIndex)

Accessor to the atmospherePhaseCorrection.

Parameters
atmPhaseCorrectionIndexindex (0-based) along the apc axis
Returns
the atmPhaseCorrection enumerator for that index
Note
return an empty enumeration if the index is outside the range along the apc axis
  • AP_UNCORRECTED means the data product contain uncorrected data
  • AP_CORRECTED means the data product contain corrected data
  • AP_MIXED means in the data product contains some data having been corrected, the other not corrected, the criterion for correcting or not being being based to some algorithm
unsigned int sdmbin::DataDescriptionsSet::atmPhaseCorrectionIndex ( AtmPhaseCorrectionMod::AtmPhaseCorrection  apc)

Get the index position along the apc axis.

Parameters
apcan AtmPhaseCorrection enumerator
Returns
The index position (0-based) along the apc axis
Exceptions
-1returned if the input apc value is not present on the apc axis
asdm::Tag sdmbin::DataDescriptionsSet::getAutoDataDescriptionId ( asdm::Tag  crossDataDescriptionId)

Get the array of dataDescriptionId identifiers for the auto-correlations.

Parameters
crossDataDescriptionIdone of the dataDescription identifiers in the set used for the configuration setup
Exceptions
crossDataDescriptionIddoes not exist in the set of dataDescription identifiers in the setup
Returns
The array of dataDescriptionId identifier for the auto-correlations
Note
In the case correlationMode=2 this array of identifiers is only implicit in configDescription. It is automaticly derived based on the input dataDescriptionId identifiers for the cross-correlations (the second parameter in the signature of the constructor of this class).
std::vector<asdm::Tag> sdmbin::DataDescriptionsSet::getAutoDataDescriptionId ( )

Get the array of dataDescriptionId identifiers for the cross-correlations.

Returns
The array of dataDescriptionId identifier for the auto-correlations (zero-baselines)
Exceptions
WouldcorrelationMode=0 the returned vector would have a size of 0
unsigned long sdmbin::DataDescriptionsSet::getAutoSize ( )

Get the size of the block of data for the auto-correlations originating from one antenna.


This size is determined according to the formula
$ sizeof(float) \times \sum_{i=1}^{N_{bb}} \left( N_{bin}(i)~f(N_{pp}(i))~ \sum_{j=1}^{N_{sw}(i)} N_{sp}(j) \right) $
where, for pure single-dish, (i.e. correlationMode=1),
$ f(N_{pp}(i)) = \left\| \begin{array} {r@{\quad if\quad}l} N_{pp}^{o}(i) & N_{pp}^{o}(i) \le 2 \\ 4 & N_{pp}^{o}(i)=3 \\ \end{array} \right. $
and for correlationMode=2
$ f(N_{pp}(i)) = \left\| \begin{array} {r@{\quad if\quad}l} N_{pp}^{oo}(i) & N_{pp}^{oo}(i) \le 2~~ (i.e.~1~re~if~N_{pp}^{oo}(i)=1, ~2~re~if~N_{pp}^{oo}(i)=2)\\ N_{pp}^{oo}(i) & N_{pp}^{oo}(i) = 4~~ (i.e.~3~re + 1~im,~standard~mode) \\ \end{array} \right. $

unsigned int sdmbin::DataDescriptionsSet::getBasebandIndex ( unsigned int  ndd)

Get the baseband number of a given dataDescription.

Parameters
nddThe index of the dataDescription identifier
Exceptions
nddhas an illegal value or is too large for the number of dataDescriptions in the ConfigDescription
Returns
The baseband number (one-based)
BasebandNameMod::BasebandName sdmbin::DataDescriptionsSet::getBasebandName ( unsigned int  ndd)

Get the baseband name of a given dataDescription.

Parameters
nddThe index (zero-based) of the dataDescription identifier
Exceptions
nddhas an illegal value or is too large for the number of dataDescriptions in the ConfigDescription
Returns
The baseband number (one-based)
CorrelationModeMod::CorrelationMode sdmbin::DataDescriptionsSet::getCorrelationMode ( )

Get the bitSize (actually the number of bytes, 2 or 4) used for the visibilities.

Returns
The size (actually in number of bytes)
Note
Since December 2005 only the cross data (the visibilities) may be represented either with 2 bytes or 4 bytes words. The auto data are always represented using 4 bytes. Furthermore the same representation must be used whatever the spectral resolution or the baselines. Hence this getBitSize method no longer requires input parameters.
Note that a visibility being a complex quantity it is represented using two words, the first for the real part and the second for the imaginary part. Note also that for single-dish (zero-baseline), the XY correlation product is also a complex quantity while XX and YY are real quantities, these being represented using a single word. Get the correlation mode used
Returns
The correlation mode:
  • CROSS_ONLY
  • AUTO_ONLY
  • CROSS_AND_AUTO
std::vector<asdm::Tag> sdmbin::DataDescriptionsSet::getCrossDataDescriptionId ( )

Get the array of dataDescriptionId identifiers for the cross-correlations.

Returns
The array of dataDescriptionId identifier for the cross-correlations
Exceptions
wouldcorrelationMode=1 the returned vector would have a size of 0
unsigned long sdmbin::DataDescriptionsSet::getCrossSize ( )

Get the size of the block of cross-correlation data for the ensemble of spectral windows and a single non-zero baseline.


This size is determined according to the formula
$ sizeof(bitSize) \times 2 ~ N_{apc}~ \sum_{i=1}^{N_{bb}} ~\left( N_{bin}(i)~N_{pp}^{oo}(i) \sum_{j=1}^{N_{sw}(i)} N_{sp}(j) \right) $
where there is a factor 2 because a visibility is a complex.
$ sizeof(bitSize)$=2 or 4 bytes (ref. note of Steeve).

unsigned int sdmbin::DataDescriptionsSet::getDataDescriptionIndex ( asdm::Tag  dataDescriptionId)

Get the dataDescription index given a dataDescriptionId identifier.

Parameters
dataDescriptionIdThe dataDescriptionId identifier
Exceptions
dataDescriptionIddoes not exist in the set of dataDescription identifiers in the configuration
Returns
The dataDescription index (0-based)
unsigned int sdmbin::DataDescriptionsSet::getNdd ( unsigned int  bbIndex,
unsigned int  j 
)

Get the index of a dataDescription given its index in its parent baseband.

Parameters
bbIndexThe baseband index
Exceptions
bbIndexeqaul or exceeding the number of basebands used in the configuration
Parameters
jThe dataDescription index (zero-based) within that baseband
Exceptions
jtoo large for the number of dataDescriptions in the given baseband
Returns
The index of the dataDescrition in the sequence of dataDescription in the configDescription
unsigned int sdmbin::DataDescriptionsSet::getNdd ( BasebandNameMod::BasebandName  bbName,
unsigned int  j 
)

Get the index of a dataDescription given its index in its parent baseband.

Parameters
bbNameThe baseband name
jThe dataDescription index (zero-based) within that baseband
Exceptions
nosuch babseband name in the configuration or j too large for the number of dataDescriptions given that baseband
Returns
The index of the dataDescrition in the sequence of dataDescription in the configDescription
unsigned long sdmbin::DataDescriptionsSet::getNumAutoData ( )

Number of auto-correlations produce for one antenna.

Note
If the number $N_{pp}^{o}$ of polarization products is 3 the cross product XY counts for one data quantity.
To get this number of polarization products $N_{pp}^{o}$ see the method numSdPol(int ndd); to get it for a given dataDescription index or the method getNumSdPol(int bbNum) for a given baseband.
unsigned long sdmbin::DataDescriptionsSet::getNumAutoData ( asdm::Tag  autoDataDescriptionId)

Number of auto-correlations produced by one antenna for one dataDescription.

Parameters
autoDataDescriptionIddataDescription identifier of the subset of auto-correlations
Exceptions
autoDataDescriptionId(eventualy as infered from crossDataDescriptionId) does not exist for the configuration setup
Note
If the number $N_{pp}^{o}$ of polarization products is 3 the cross product XY counts for one data quantity.
To get this number of polarization products $N_{pp}^{o}$ for a given dataDescription index see the method numSdPol(int ndd); to get it for a given baseband, would it be baseband-based, see the method getNumSdPol(int bbNum).
unsigned int sdmbin::DataDescriptionsSet::getNumChan ( unsigned int  ndd)

Get the number of frequency channels for a given dataDescription.

Parameters
nddThe dataDescription number
Exceptions
nddequal or exeeding the number of dataDescription in the configuration setup
Returns
The number of channels (spectral points) for that dataDescription number (1-based)
unsigned long sdmbin::DataDescriptionsSet::getNumCrossData ( )

Number of cross-correlations produced by one non-zero baseline for the set of dataDescriptions.

Note
This number must be understood as the number complex values, one data value being a complex quantity.
unsigned long sdmbin::DataDescriptionsSet::getNumCrossData ( asdm::Tag  crossDataDescriptionId)

Number of cross-correlations produced by one non-zero baseline for a given dataDescription.

Parameters
crossDataDescriptionIdone of the dataDescription identifiers in the set used for the configuration setup
Exceptions
crossDataDescriptionIddoes not exist in the set of dataDescription identifiers in the setup configDescription setup
Note
This number must be understood as the number complex values, one data value being a complex quantity.
unsigned int sdmbin::DataDescriptionsSet::getNumDataDescription ( )

Get the number of dataDescription.

Returns
The number of dataDescription
unsigned int sdmbin::DataDescriptionsSet::getNumPol ( unsigned int  bbIndex)

Get the number of Polarization Products given a baseband.

Parameters
nbbThe baseband index
Exceptions
bbIndexis equal or exceeds number of basebands in the configuration or not baseband independent
Returns
The number of Polarization Products:
  • if correlationMode=CROSS_ONLY number $ N_{pp}^{oo} $ of products for the non-zero baselines
  • if correlationMode=AUTO_ONLY number $ N_{pp}^{o} $ of products for the zero-baselines
  • if correlationMode=CROSS_AND_AUTO number $ N_{pp}^{oo} $ of products for the non-zero baselines;
    use the method getNumSdPol() to get $ N_{pp}^{o} $, the number of products for the zero-baselines.
Note
To get number of products given a dataDescription use the method numPol(). To get number of products given a basebandName, would that be constant per baseband, use getNumPol(BasebandName bbName)
unsigned int sdmbin::DataDescriptionsSet::getNumPol ( BasebandNameMod::BasebandName  bbName)

Get the number of Polarization Products given a baseband.

Parameters
bbNameThe baseband index (0-based)
Returns
The number of Polarization Products:
  • if CROSS_ONLY number $ N_{pp}^{oo} $ of products for the non-zero baselines
  • if AUTO_ONLY number $ N_{pp}^{o} $ of products for the zero-baselines
  • if CROSS_AND_AUTO number $ N_{pp}^{oo} $ of products for the non-zero baselines;
    use the method getNumSdPol() to get $ N_{pp}^{o} $, the number of products for the zero-baselines.
Note
To get number of products given a dataDescription use the method numPol().
unsigned int sdmbin::DataDescriptionsSet::getNumSdPol ( unsigned int  bbIndex)

Get the number of Polarization Products in the case of zero-baselines given a baseband.

Parameters
bbIndexThe baseband index
Exceptions
notbaseband independent
Returns
The number of Polarization Products $ N_{pp}^{o} $:
  • if CROSS_ONLY the returned number is 0.
  • if AUTO_ONLY this method is equivalent to the method getNumPol().
  • if CROSS_AND_AUTO use the method getNumPol() to get $ N_{pp}^{oo} $, the corresponding number of products for the non-zero baselines.
  • if the input baseband name does not belong to the configuration return 0
Note
To get number of products given a dataDescription use the method numPol().
unsigned int sdmbin::DataDescriptionsSet::getNumSdPol ( BasebandNameMod::BasebandName  bbName)

Get the number of Polarization Products in the case of zero-baselines given a baseband.

Parameters
bbNameThe baseband index (0-based)
Returns
The number of Polarization Products $ N_{pp}^{o} $:
  • if CROSS_ONLY the returned number is 0.
  • if AUTO_ONLY this method is equivalent to the method getNumPol().
  • if CROSS_AND_AUTO use the method getNumPol() to get $ N_{pp}^{oo} $, the corresponding number of products for the non-zero baselines.
  • if the input baseband name does not belong to the configuration return 0
Note
To get number of products given a dataDescription use the method numPol().
unsigned int sdmbin::DataDescriptionsSet::getNumSpw ( unsigned int  bbIndex)

Get the number of Spectral Windows in a given baseband identified by its index.

Parameters
bbNumThe baseband index (zero-based)
Exceptions
bbNumillegal or exceeding the number of basebands used in the configuration
Returns
The number $ N_{sw} $ of spectral windows in the baseband
unsigned int sdmbin::DataDescriptionsSet::getNumSpw ( BasebandNameMod::BasebandName  bbName)

Get the number of Spectral Windows in a given baseband identified by its name.

Parameters
bbNameThe baseband name
Returns
The number $ N_{sw} $ of spectral windows in the baseband or 0 if baseband does not belong to the configuration
asdm::Tag sdmbin::DataDescriptionsSet::getSpwId ( unsigned int  ndd)

Accessor to get the spwtral window identifier of a given dataDescription.

Parameters
nddThe index of the dataDescription identifier in dataDescriptionIdArray
Exceptions
nddis too large for the number of dataDescriptions in the ConfigDescription
Returns
The spectral window identifier
void sdmbin::DataDescriptionsSet::mapScToBaseband ( )
privatevirtual

SwitchCyclesList defines the abstract base type of a hierarchy.

Note
there are various possible levels of constraints for the number of bins. For example, from the highest to the lowest constraint:
  1. With a nutating sub-reflector the number of bins must be the same in all the spectral windows, whatever the baseband.
  2. With frequency-switch observing modes, the number of bins may require to be unique on a baseband basis.
  3. With dedispersion for pulsar observations the number of bins may be solely spectral-window based.
mapScToBaseband(), implemented in the derived class DataDescriptionSets, maps vectors to baseband names to support this, the baseband names being attributes in the definition of the spectral windows.

Implements sdmbin::SwitchCyclesList.

unsigned int sdmbin::DataDescriptionsSet::metaDataIndex ( unsigned int  ndd)

Provide the index for a given dataDescription in the meta-data tree.

Parameters
nddThe index (zero-based) of the dataDescription identifier in dataDescriptionIdArray, the second parameter in the signature of the constructors.
Exceptions
nddhas an illegal value or is too large for the number of dataDescriptions in the ConfigDescription
Returns
The index in the metadata tree
void sdmbin::DataDescriptionsSet::metaDataIndex ( )
private
unsigned int sdmbin::DataDescriptionsSet::numApc ( )

Size of the apc axis (can be only 1 or 2)

Returns
size of this axis (the 3rd inner most in the axis hierarchy)
Note
  • atmospherePhaseCode=0 or 1 this size will be 1
  • if atmospherePhaseCode=2 this size is 2 TODO tell in the SDM document that along this axis the first grid coordinate is for the uncorreceted data and the second for the corrected data.
int sdmbin::DataDescriptionsSet::numAutoData ( unsigned int  ndd)

Provide the number of auto-correlations for a given dataDescription.

Note
would the dataDescription identifier for this index in ConfigDescription be for cross correlations, the corresponding dataDescription for auto-correlations would actually be used
Parameters
nddThe index (zero-based) of the dataDescription identifier in dataDescriptionIdArray (2nd param. in the constructors).
Exceptions
nddhas a value which is illegal or too large for the number of dataDescription used in the configuration
Returns
Number of auto-correlations for that dataDescription
Exceptions
0returned (lax mode) if correlationMode=0.
unsigned int sdmbin::DataDescriptionsSet::numBaseband ( )

Accessor to the number of basebands.

Returns
the number of basebands $ N_{bb} $
unsigned int sdmbin::DataDescriptionsSet::numBin ( unsigned int  ndd)
inline

Accessor to the number of steps for the baseband of a given dataDescription.

Parameters
nddThe index of the dataDescrition identifier in dataDescriptionIdArray (2nd param. in the constructors).
Exceptions
nddis too large for the number of dataDescriptions in the ConfigDescription
Returns
Number of steps for the baseband of a given dataDescription

if(ndd>=v_basebandName_.size()) Error(SERIOUS,"The dataDescription index must be smaller than %d", v_basebandName_.size());

Definition at line 515 of file DataDescriptionsSet.h.

References sdmbin::SwitchCyclesList::v_numBin_.

Referenced by sdmbin::BaselinesSet::transferId().

unsigned int sdmbin::DataDescriptionsSet::numChan ( unsigned int  ndd)

Accessor to the number of frequency channels of a given dataDescription.

Parameters
nddThe index of the dataDescription identifier in dataDescriptionIdArray (2nd param. in the constructors).
Exceptions
nddis too large for the number of dataDescriptions in the ConfigDescription
Returns
Number of frequency channels (spectral points) for that dataDescription
unsigned int sdmbin::DataDescriptionsSet::numCrossData ( unsigned int  ndd)

Provide the number of cross-correlations for a given dataDescription.

Parameters
nddThe index (zero-based) of the dataDescription identifier in dataDescriptionIdArray
Exceptions
nddhas an illegal value or is too large for the number of dataDescriptions in the ConfigDescription
Returns
the number of cross-correlations for that dataDescription
Exceptions
returns0 if correlationMode=1.
unsigned int sdmbin::DataDescriptionsSet::numPol ( unsigned int  ndd)

Accessor to the number of polarization products of a given dataDescription.

Parameters
nddThe index of the dataDescrition identifier in dataDescriptionIdArray (2nd param. in the constructors).
Exceptions
nddis too large for the number of dataDescriptions in the ConfigDescription
Returns
Number of polarization products depending on the correlation mode:
  • if CROSS_ONLY this is $ N_{pp}^{oo} $, the number of polarization cross products for the non-zero baselines.
  • if AUTO_ONLY this number is $ N_{pp}^{o} $ for the case of "single-dish" data.
  • if CROSS_AND_AUTO this is $ N_{pp}^{oo} $, the number of polarization cross products for the non-zero baselines;
    use the method numSdPol(int) to get the corresponding number $ N_{pp}^{o} $ for the zero baselines.
Note
If it desired to get this number for a given baseband, use the method getNumPol(int bbNum).
unsigned int sdmbin::DataDescriptionsSet::numSdPol ( unsigned int  ndd)

Accessor to the number of polarization cross-products of a given dataDescription.

Parameters
nddThe index (zero-based) of the dataDescription identifier in dataDescriptionIdArray (2nd param. in the constructors).
Exceptions
nddhas an illegal value or is too large for the number of dataDescriptions in the ConfigDescription
Returns
Number of products for the zero-baselines.
If correlationMode=CROSS_AND_AUTO, use the accessor numPol(unsigned int) to get the corresponding number $ N_{pp}^{oo} $ of cross products for the non-zero baselines.
Note
If it desired to get this number $ N_{pp}^{oo} $ for a given baseband, use the method getNumSdPol(int bbNum).
void sdmbin::DataDescriptionsSet::size ( )
private
unsigned int sdmbin::DataDescriptionsSet::sumMetaDataIndex ( )

Provide the number of switchCycle phases cumulated over all the basebands in the configuration.

Returns
the sum $ \sum_{i=1}^{N_{bb}} N_{bin}(i) $
Note
In the software of the ALMA correlator subsystem the following constraint has been set: the number of phases in the switching cycles (e.g. when using the frequency switch observing mode) must be common to all dataDescriptions within a baseband but may be different from baseband to baseband.
asdm::Frequency sdmbin::DataDescriptionsSet::totBandwidth ( unsigned int  ndd)

Accessor to the total frequency bandwidth of a given dataDescription.

Parameters
nddThe index (zero-based) of the dataDescription identifier dataDescriptionIdArray (2nd param. in the constructors).
Exceptions
nddhas an illegal value or is too large for the number of dataDescriptions in the ConfigDescription
Returns
Total spectral bandwidth (Hz)

Member Data Documentation

CorrelationModeMod::CorrelationMode sdmbin::DataDescriptionsSet::correlationMode_
protected

Correlation mode.

Definition at line 469 of file DataDescriptionsSet.h.

EnumSet<BasebandNameMod::BasebandName> sdmbin::DataDescriptionsSet::e_basebandSet_
protected

Set of baseband names.

Definition at line 503 of file DataDescriptionsSet.h.

Enum<CorrelationModeMod::CorrelationMode> sdmbin::DataDescriptionsSet::e_cm_
protected

Type-safe correlation mode.

Definition at line 468 of file DataDescriptionsSet.h.

EnumSet<AtmPhaseCorrectionMod::AtmPhaseCorrection> sdmbin::DataDescriptionsSet::es_apc_
protected

Atmospheric Phase Correction set.

Definition at line 471 of file DataDescriptionsSet.h.

std::map<BasebandNameMod::BasebandName,std::vector<DataDescParams> > sdmbin::DataDescriptionsSet::m_bn_v_ddp_
protected

The sequence of dataDescParams in the different basebands.

Definition at line 479 of file DataDescriptionsSet.h.

std::map<asdm::Tag,BasebandNameMod::BasebandName> sdmbin::DataDescriptionsSet::m_ddid_bbn_
protected

Association between the dataDescriptionId and the baseband name.

Definition at line 480 of file DataDescriptionsSet.h.

unsigned int sdmbin::DataDescriptionsSet::numApc_
protected

APC axis size (can take the value 1 or 2 only)

Definition at line 481 of file DataDescriptionsSet.h.

Referenced by sdmbin::BaselinesSet::transferId().

unsigned int sdmbin::DataDescriptionsSet::numDataDescription_
protected

Explicit number of dataDescriptionId.

Definition at line 482 of file DataDescriptionsSet.h.

unsigned long sdmbin::DataDescriptionsSet::sumAutoSize_
protected

Sum of the elements of the vector v_autoSize_.

Definition at line 485 of file DataDescriptionsSet.h.

unsigned long sdmbin::DataDescriptionsSet::sumCrossSize_
protected

Sum of the elements of the vector v_crossSize_.

Definition at line 486 of file DataDescriptionsSet.h.

Referenced by sdmbin::BaselinesSet::transferId().

unsigned int sdmbin::DataDescriptionsSet::sumMetaDataIndex_
protected

Sum of the elements of the vector v_metaDataIndex_.

Definition at line 484 of file DataDescriptionsSet.h.

std::vector<AtmPhaseCorrectionMod::AtmPhaseCorrection> sdmbin::DataDescriptionsSet::v_atmPhaseCorrection_
protected

sequence of the Atmospheric Phase Correction values along the apc axis

Definition at line 472 of file DataDescriptionsSet.h.

std::vector<asdm::Tag> sdmbin::DataDescriptionsSet::v_autoDataDescriptionId_
protected

Vector of dataDecsritionId for the auto-correlations (size <= numDataDesc_)

Definition at line 498 of file DataDescriptionsSet.h.

std::vector<unsigned long> sdmbin::DataDescriptionsSet::v_autoSize_
protected

Size, in nb PDT values, for every dataDesc (size numDataDesc_)

Definition at line 493 of file DataDescriptionsSet.h.

std::vector<BasebandNameMod::BasebandName> sdmbin::DataDescriptionsSet::v_basebandName_
protected

(size numDataDesc_), baseband name for every spectral window.

Definition at line 477 of file DataDescriptionsSet.h.

std::vector<BasebandNameMod::BasebandName> sdmbin::DataDescriptionsSet::v_basebandSet_
protected

Sequence of baseband names.

Definition at line 502 of file DataDescriptionsSet.h.

std::vector<asdm::Tag> sdmbin::DataDescriptionsSet::v_crossDataDescriptionId_
protected

Vector of dataDecsritionId for the cross-correlations (size numDataDesc_)

Definition at line 497 of file DataDescriptionsSet.h.

std::vector<unsigned long> sdmbin::DataDescriptionsSet::v_crossSize_
protected

Size, in nb PDT values, for every dataDesc (size numDataDesc_)

Definition at line 494 of file DataDescriptionsSet.h.

Referenced by sdmbin::BaselinesSet::transferId().

std::vector<unsigned long> sdmbin::DataDescriptionsSet::v_cumulAutoSize_
protected

Number of bytes to skip for every dataDesc (size numDataDesc_)

Definition at line 489 of file DataDescriptionsSet.h.

std::vector<unsigned long> sdmbin::DataDescriptionsSet::v_cumulCrossSize_
protected

Number of bytes to skip for every dataDesc (size numDataDesc_)

Definition at line 490 of file DataDescriptionsSet.h.

Referenced by sdmbin::BaselinesSet::transferId().

std::vector<asdm::Tag> sdmbin::DataDescriptionsSet::v_dataDescriptionIdArray_
protected

the input array of dataDescription identifiers

Definition at line 466 of file DataDescriptionsSet.h.

std::vector<unsigned int> sdmbin::DataDescriptionsSet::v_metaDataIndex_
protected

Indices for positions for every dataDesc (size numDataDesc_)

Definition at line 488 of file DataDescriptionsSet.h.

std::vector<unsigned long> sdmbin::DataDescriptionsSet::v_numAutoData_
protected

Number of auto-correlations per antenna (size numDataDesc_)

Definition at line 491 of file DataDescriptionsSet.h.

std::vector<unsigned int> sdmbin::DataDescriptionsSet::v_numChan_
protected

sequence of nb of chan. i.e. spectral points (size numDataDesc_)

Definition at line 476 of file DataDescriptionsSet.h.

std::vector<unsigned long> sdmbin::DataDescriptionsSet::v_numCrossData_
protected

Number of cross-correlations per antenna pair (size numDataDesc_)

Definition at line 492 of file DataDescriptionsSet.h.

std::vector<unsigned int> sdmbin::DataDescriptionsSet::v_numPol_
protected

number of cross-products (size numDataDesc_)

Definition at line 474 of file DataDescriptionsSet.h.

std::vector<unsigned int> sdmbin::DataDescriptionsSet::v_numSpwPerBb_
protected

Number of spectral windows in every baseband.

Definition at line 505 of file DataDescriptionsSet.h.

std::vector<bool> sdmbin::DataDescriptionsSet::v_pairDataDescriptionId_
protected

true if crossDataDecsritionId assoc to autoDataDecsritionId (size numDataDesc_)

Definition at line 499 of file DataDescriptionsSet.h.

std::vector<asdm::Tag> sdmbin::DataDescriptionsSet::v_spwId_
protected

sequence of spectral window identifiers (size numDataDesc_)

Definition at line 475 of file DataDescriptionsSet.h.

std::vector<std::vector<int> > sdmbin::DataDescriptionsSet::vv_nsp_
protected

Nb of chan. per dataDescription (size numBaseband) vectors.

Definition at line 478 of file DataDescriptionsSet.h.


The documentation for this class was generated from the following file: