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::DataStructure Class Reference

A class which gathers the attributes required to define data structures. More...

#include <Integration.h>

Inheritance diagram for sdmbin::DataStructure:
sdmbin::DataDump sdmbin::Integration sdmbin::Subintegration

Public Member Functions

 DataStructure ()
 Empty constructor. More...
 
 DataStructure (uint32_t numPolProduct, uint32_t numBin, Enum< NetSidebandMod::NetSideband > e_sideband, uint32_t numBaseband, uint32_t numAnt, CorrelationModeMod::CorrelationMode correlationMode)
 Constructor for a multi-dimensional structure to use e.g. More...
 
 DataStructure (uint32_t numPolProduct, uint32_t numSpectralPoint, uint32_t numBin, Enum< NetSidebandMod::NetSideband > e_sideband, uint32_t numBaseband, uint32_t numAnt, CorrelationModeMod::CorrelationMode correlationMode)
 An other constructor for a multi-dimensional structure use-case. More...
 
 DataStructure (std::vector< std::vector< uint32_t > > vv_numCrossPolProduct, std::vector< std::vector< uint32_t > > vv_numAutoPolProduct, std::vector< std::vector< uint32_t > > vv_numSpectralPoint, std::vector< std::vector< uint32_t > > vv_numBin, std::vector< std::vector< Enum< NetSidebandMod::NetSideband > > > vv_e_sideband, uint32_t numApc, std::vector< uint32_t > v_numSpectralWindow, uint32_t numBaseband, uint32_t numAnt, CorrelationModeMod::CorrelationMode correlationMode)
 Constructor in the general case, the data structure being eventualy a tree-hierarchy. More...
 
 DataStructure (std::vector< std::vector< uint32_t > > vv_numAutoPolProduct, std::vector< std::vector< uint32_t > > vv_numSpectralPoint, std::vector< std::vector< uint32_t > > vv_numBin, std::vector< std::vector< Enum< NetSidebandMod::NetSideband > > > vv_e_sideband, uint32_t numApc, std::vector< uint32_t > v_numSpectralWindow, uint32_t numBaseband, uint32_t numAnt, CorrelationModeMod::CorrelationMode correlationMode)
 Constructor for the single-dish case, the data structure being eventually a tree-hierarchy. More...
 
 DataStructure (const DataStructure &)
 Copy constructor. More...
 
 ~DataStructure ()
 Destructor (use the default implementation) More...
 
std::vector< std::vector
< uint32_t > > 
numCrossPolProducts ()
 Accessor to the number of polarization cross product for non-zero baselines in every spectral window for every baseband. More...
 
std::vector< std::vector
< uint32_t > > 
numAutoPolProducts ()
 Accessor to the number of polarization cross product for zero-baselines in every spectral window for every baseband. More...
 
std::vector< std::vector
< uint32_t > > 
numSpectralPoints ()
 Accessor to the number of spectral points in every spectral window for every baseband. More...
 
std::vector< std::vector
< uint32_t > > 
numBins ()
 Accessor to the number of bins in every spectral window for every baseband. More...
 
std::vector< std::vector< Enum
< NetSidebandMod::NetSideband > > > 
sidebands ()
 Accessor to the NetSideband qualifiers in every spectral window for every baseband. More...
 
uint32_t numApc ()
 Accessor to the size of the APC axis. More...
 
std::vector< uint32_t > numSpectralWindows ()
 Accessor to the number of spectral windows in the different basebands. More...
 
uint32_t numBaseband ()
 Accessor to the number of basebands. More...
 
uint32_t numAnt ()
 Accessor to the number of antennas. More...
 
CorrelationModeMod::CorrelationMode correlationMode ()
 Accessor to the correlationMode. More...
 
std::vector< uint32_t > leafAxisSizes ()
 Method to get the axis sizes of the leaves when represented as multi-dimensional structures. More...
 
std::vector< uint32_t > leafAxisSizes (uint32_t basebandIndex, uint32_t spectralWindowIndex)
 Axis sizes of the leave of a data structure which may not be necessarily multi-dimensional. More...
 
std::vector< uint32_t > leafAxisSizes (uint32_t dataDescriptionIndex)
 Axis sizes of the leave of a data structure which may not be necessarily multi-dimensional. More...
 
uint32_t isIndexible () const
 A method to know if the whole data structure can be considered as a multi-dimensional structure or not. More...
 
std::vector< uint32_t > eAxisSizes () const
 A method to retrieve the size of all the different axes in case of a multi-dimensional structure. More...
 
std::vector< uint32_t > axisSizes () const
 A method to retrieve the size of the axes for a multi-dimensional structure. More...
 
uint32_t dimension () const
 Accessor to the dimensionality of the structure. More...
 
std::vector< uint32_t > minAxSize () const
 Minimum size for every axis (level) in the structure. More...
 
std::vector< uint32_t > maxAxSize () const
 Maximum size for every axis (level) in the structure. More...
 
uint32_t numAutoData () const
 Number of data value (leaves) that can host the structure. More...
 
uint32_t numCrossData () const
 Number of data value (leaves) that can host the structure. More...
 
std::string axisSequence () const
 Axis sequense: For example 128 means a structure with 3 axes, pol,sp,na. More...
 
void summary () const
 Utility which sumarizes the properties of the data structure. More...
 

Protected Attributes

std::vector< std::vector
< uint32_t > > 
vv_numCrossPolProduct_
 
std::vector< std::vector
< uint32_t > > 
vv_numAutoPolProduct_
 
std::vector< std::vector
< uint32_t > > 
vv_numSpectralPoint_
 
std::vector< std::vector
< uint32_t > > 
vv_numBin_
 
std::vector< std::vector< Enum
< NetSidebandMod::NetSideband > > > 
vv_e_sideband_
 
uint32_t numApc_
 
std::vector< uint32_t > v_numSpectralWindow_
 
uint32_t numBaseband_
 
uint32_t numAnt_
 
CorrelationModeMod::CorrelationMode correlationMode_
 
std::string axisSequence_
 
std::vector< uint32_t > v_minSize_
 
std::vector< uint32_t > v_maxSize_
 

Private Member Functions

std::string setStructureProperties ()
 

Detailed Description

A class which gathers the attributes required to define data structures.

A structure is abstract; it may have the properties of a multi-dimensional structure or of a tree-hierarchy, the dimensionality being reflected by the number of axes in one case or levels in the other case.

A structure may have up to 7 levels:

The choice between the axis 7 and 8 depends on the correlation mode. Note that for meta-data 7 and 8 can be considered implicitly at the same level. For the actual data (visibilities or auto-correlations) 7 and 8 are each other exclusive.

Note
The header of a SDM BLOB has all the informations required to define a data structure. Note also that there are two attributes based on enumerations, sideband and correlationMode. Strictly speacking these do not impact of the data structure. They merely qualify the data contents.

The attribute 'sideband' provides purely semantic information. When there are sidebands it is not mandatory to group substructures by pairs of sidebands because it is not required to store the image sideband.

The attribute 'correlationMode' provides semantic information for the context which constrains the nature of the data, each of these having their own data structure.

Definition at line 42 of file Integration.h.

Constructor & Destructor Documentation

sdmbin::DataStructure::DataStructure ( )

Empty constructor.

sdmbin::DataStructure::DataStructure ( uint32_t  numPolProduct,
uint32_t  numBin,
Enum< NetSidebandMod::NetSideband >  e_sideband,
uint32_t  numBaseband,
uint32_t  numAnt,
CorrelationModeMod::CorrelationMode  correlationMode 
)

Constructor for a multi-dimensional structure to use e.g.

for total power data produced by the baseband processor with correlationMode=1. Determine the property of the structure.

Note
For simulated data which do not account for sideband effects the attribute e_sideband may have no NetSideband enumerator set. For true data, the hardware used being in principle always known, the appropriated enumerator should be set. The attribute 'sideband' being mandatory in the SDM-BDF, when there is no enumerator set, the value stored for that format will be NOSB.Correlation mode (CROSS_ONLY | AUTO_ONLY | CROSS_AND_AUTO )
Parameters
numPolProductNumber of polarization products
numBinNumber of step in a switching cycle
e_sidebandSideband qualifier (not set or NOSB | LSB | USB | DSB )
numBasebandNumber of basebands
numAntNumber of antennas
sdmbin::DataStructure::DataStructure ( uint32_t  numPolProduct,
uint32_t  numSpectralPoint,
uint32_t  numBin,
Enum< NetSidebandMod::NetSideband >  e_sideband,
uint32_t  numBaseband,
uint32_t  numAnt,
CorrelationModeMod::CorrelationMode  correlationMode 
)

An other constructor for a multi-dimensional structure use-case.

Determine the property of the structure.

Parameters
numPolProductNumber of polarization cross-products
numSpectralPointNumber of spectral points in the spectral window
numBinNumber of bins in the switch cycle
numBasebandNumber of basebands
numAntNumber of antenna (used to determine the number of baselines if correlationMode=CROSS_ONLY or CROSS_AND_AUTO
e_sidebandSideband NOSB | LSB | USB | DSB
correlationMode
  • CROSS_ONLY only non-zero antenna baselines
  • AUTO_ONLY only zero baselines (single-dish)
  • CROSS_AND_AUTO both zero and non-zero.
Note
For simulated data which do not account for sideband effects the attribute e_sideband may have no NetSideband enumerator set. For true data, the hardware used being in principle always known, the appropriated enumerator should be set. The attribute 'sideband' being mandatory in the SDM-BDF, when there is no enumerator set, the value stored for that format will be NOSB.
sdmbin::DataStructure::DataStructure ( std::vector< std::vector< uint32_t > >  vv_numCrossPolProduct,
std::vector< std::vector< uint32_t > >  vv_numAutoPolProduct,
std::vector< std::vector< uint32_t > >  vv_numSpectralPoint,
std::vector< std::vector< uint32_t > >  vv_numBin,
std::vector< std::vector< Enum< NetSidebandMod::NetSideband > > >  vv_e_sideband,
uint32_t  numApc,
std::vector< uint32_t >  v_numSpectralWindow,
uint32_t  numBaseband,
uint32_t  numAnt,
CorrelationModeMod::CorrelationMode  correlationMode 
)

Constructor in the general case, the data structure being eventualy a tree-hierarchy.

Determine the property of the structure.

Parameters
vv_numPolProductNumber of polarization product in every spectral window for every baseband. This vector has a size equal to numBaseband.
vv_numSpectralPointNumber of spectral points in every spectral window for every baseband. This vector has a size equal to numBaseband.
vv_numBinNumber of bins (steps in a switch cycle) in every spectral window for every baseband. This vector has a size equal to numBaseband.
vv_e_sidebandSideband qualifying every spectral window of every baseband.
numApcSize o the atmospheric correction axis
v_numSpectralWindowNumber of spectral window in for every baseband. This vector has a size equal to numBaseband.
numBasebandNumber of baseband
numAntNumber of antenna (used to determine the number of baselines if correlationMode=0 or 2
correlationModeAn enumerator:
  • CROSS_ONLY only non-zero antenna baselines
  • AUTO_ONLY only zero baselines (single-dish)
  • CROSS_AND_AUTO both zero and non-zero.
sdmbin::DataStructure::DataStructure ( std::vector< std::vector< uint32_t > >  vv_numAutoPolProduct,
std::vector< std::vector< uint32_t > >  vv_numSpectralPoint,
std::vector< std::vector< uint32_t > >  vv_numBin,
std::vector< std::vector< Enum< NetSidebandMod::NetSideband > > >  vv_e_sideband,
uint32_t  numApc,
std::vector< uint32_t >  v_numSpectralWindow,
uint32_t  numBaseband,
uint32_t  numAnt,
CorrelationModeMod::CorrelationMode  correlationMode 
)

Constructor for the single-dish case, the data structure being eventually a tree-hierarchy.

Determine the property of the structure.

Parameters
vv_numPolProductNumber of polarization product in every spectral window for every baseband. This vector has a size equal to numBaseband.
vv_numSpectralPointNumber of spectral points in every spectral window for every baseband. This vector has a size equal to numBaseband.
vv_numBinNumber of bins (steps in a switch cycle) in every spectral window for every baseband. This vector has a size equal to numBaseband.
vv_e_sidebandSideband qualifying every spectral window of every baseband.
numApcSize o the atmospheric correction axis
v_numSpectralWindowNumber of spectral window in for every baseband. This vector has a size equal to numBaseband.
numBasebandNumber of baseband
numAntNumber of antenna (used to determine the number of baselines if correlationMode=0 or 2
correlationModeAn enumerator:
  • CROSS_ONLY only non-zero antenna baselines
  • AUTO_ONLY only zero baselines (single-dish)
  • CROSS_AND_AUTO both zero and non-zero.
sdmbin::DataStructure::DataStructure ( const DataStructure )

Copy constructor.

sdmbin::DataStructure::~DataStructure ( )

Destructor (use the default implementation)

Member Function Documentation

std::string sdmbin::DataStructure::axisSequence ( ) const

Axis sequense: For example 128 means a structure with 3 axes, pol,sp,na.

std::vector<uint32_t> sdmbin::DataStructure::axisSizes ( ) const

A method to retrieve the size of the axes for a multi-dimensional structure.

This is the compact form where all the axes of size 1 do not participate to set the dimension of the structure. This vector has a size of 0 in case of a tree structure.

CorrelationModeMod::CorrelationMode sdmbin::DataStructure::correlationMode ( )

Accessor to the correlationMode.

  • 0 implies only interferometric
  • 1 implies only single-dish
  • 2 implies both interferometric and single-dish
uint32_t sdmbin::DataStructure::dimension ( ) const

Accessor to the dimensionality of the structure.

If this is a tree-structure this is the number of levels in the hierarchy.

std::vector<uint32_t> sdmbin::DataStructure::eAxisSizes ( ) const

A method to retrieve the size of all the different axes in case of a multi-dimensional structure.

Returns
vector<uint32_t> a vector of axis sizes This vector has a size of 0 in case of a tree structure else it is the number of axes (including those with a size of 1)
uint32_t sdmbin::DataStructure::isIndexible ( ) const

A method to know if the whole data structure can be considered as a multi-dimensional structure or not.

Returns
the dimensionality (return 0 in case of a tree structure).
Postcondition
when the structure is multi-dimensional the access to the data may be retrieved in the form of an array with this dimensionality.
std::vector<uint32_t> sdmbin::DataStructure::leafAxisSizes ( )

Method to get the axis sizes of the leaves when represented as multi-dimensional structures.

A multi-dimensional leaf is a an array with at most 4 axes:

  • pol (polarization product axis)
  • sp (spectral point axis)
  • apc (atmospheric phase correction axis)
  • bin (bin axis)
    Returns
    the axis sizes of the leaf, the size of the vector corresponding to the dimensionality of the leaf.
std::vector<uint32_t> sdmbin::DataStructure::leafAxisSizes ( uint32_t  basebandIndex,
uint32_t  spectralWindowIndex 
)

Axis sizes of the leave of a data structure which may not be necessarily multi-dimensional.

A multi-dimensional leaf is an array with at most 4 axes:

  • pol (polarization product axis)
  • sp (spectral point axis)
  • apc (atmospheric phase correction axis)
  • bin (bin axis)
    Parameters
    basebandIndexthe baseband index (zero-based)
    spectralWindowIndexthe spectral index (zero-based) in the selected baseband
    Returns
    the axis sizes of the leaf, the size of the vector corresponding to the dimensionality of the leaf.
std::vector<uint32_t> sdmbin::DataStructure::leafAxisSizes ( uint32_t  dataDescriptionIndex)

Axis sizes of the leave of a data structure which may not be necessarily multi-dimensional.

A multi-dimensional leaf is an array with at most 4 axes:

  • pol (polarization product axis)
  • sp (spectral point axis)
  • apc (atmospheric phase correction axis)
  • bin (bin axis)
    Precondition
    The spectral windows are grouped per baseband (this must be always the case)
    Parameters
    dataDescriptionIndex(zero-based)
    spectralWindowIndexthe spectral index (zero-based) in the selected baseband
    Returns
    the axis sizes of the leaf, the size of the vector corresponding to the dimensionality of the leaf.
std::vector<uint32_t> sdmbin::DataStructure::maxAxSize ( ) const

Maximum size for every axis (level) in the structure.

The return size of the vector is equal to the dimension of the structure

std::vector<uint32_t> sdmbin::DataStructure::minAxSize ( ) const

Minimum size for every axis (level) in the structure.

The return size of the vector is equal to the dimension of the structure

uint32_t sdmbin::DataStructure::numAnt ( )

Accessor to the number of antennas.

uint32_t sdmbin::DataStructure::numApc ( )

Accessor to the size of the APC axis.

uint32_t sdmbin::DataStructure::numAutoData ( ) const

Number of data value (leaves) that can host the structure.

std::vector<std::vector<uint32_t> > sdmbin::DataStructure::numAutoPolProducts ( )

Accessor to the number of polarization cross product for zero-baselines in every spectral window for every baseband.

uint32_t sdmbin::DataStructure::numBaseband ( )

Accessor to the number of basebands.

std::vector<std::vector<uint32_t> > sdmbin::DataStructure::numBins ( )

Accessor to the number of bins in every spectral window for every baseband.

uint32_t sdmbin::DataStructure::numCrossData ( ) const

Number of data value (leaves) that can host the structure.

std::vector<std::vector<uint32_t> > sdmbin::DataStructure::numCrossPolProducts ( )

Accessor to the number of polarization cross product for non-zero baselines in every spectral window for every baseband.

std::vector<std::vector<uint32_t> > sdmbin::DataStructure::numSpectralPoints ( )

Accessor to the number of spectral points in every spectral window for every baseband.

std::vector<uint32_t> sdmbin::DataStructure::numSpectralWindows ( )

Accessor to the number of spectral windows in the different basebands.

std::string sdmbin::DataStructure::setStructureProperties ( )
private
std::vector<std::vector<Enum<NetSidebandMod::NetSideband> > > sdmbin::DataStructure::sidebands ( )

Accessor to the NetSideband qualifiers in every spectral window for every baseband.

void sdmbin::DataStructure::summary ( ) const

Utility which sumarizes the properties of the data structure.

Member Data Documentation

std::string sdmbin::DataStructure::axisSequence_
protected

Definition at line 334 of file Integration.h.

CorrelationModeMod::CorrelationMode sdmbin::DataStructure::correlationMode_
protected

Definition at line 333 of file Integration.h.

uint32_t sdmbin::DataStructure::numAnt_
protected

Definition at line 332 of file Integration.h.

uint32_t sdmbin::DataStructure::numApc_
protected

Definition at line 329 of file Integration.h.

uint32_t sdmbin::DataStructure::numBaseband_
protected

Definition at line 331 of file Integration.h.

std::vector<uint32_t> sdmbin::DataStructure::v_maxSize_
protected

Definition at line 336 of file Integration.h.

std::vector<uint32_t> sdmbin::DataStructure::v_minSize_
protected

Definition at line 335 of file Integration.h.

std::vector<uint32_t> sdmbin::DataStructure::v_numSpectralWindow_
protected

Definition at line 330 of file Integration.h.

std::vector<std::vector<Enum<NetSidebandMod::NetSideband> > > sdmbin::DataStructure::vv_e_sideband_
protected

Definition at line 328 of file Integration.h.

std::vector<std::vector<uint32_t> > sdmbin::DataStructure::vv_numAutoPolProduct_
protected

Definition at line 325 of file Integration.h.

std::vector<std::vector<uint32_t> > sdmbin::DataStructure::vv_numBin_
protected

Definition at line 327 of file Integration.h.

std::vector<std::vector<uint32_t> > sdmbin::DataStructure::vv_numCrossPolProduct_
protected

Definition at line 324 of file Integration.h.

std::vector<std::vector<uint32_t> > sdmbin::DataStructure::vv_numSpectralPoint_
protected

Definition at line 326 of file Integration.h.


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