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

The class DataDump extends the class DataStructure by adding time information to assign to the dump the observation date etc... More...

#include <Integration.h>

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

Public Member Functions

 DataDump ()
 
 DataDump (uint32_t numPolProduct, uint32_t numBin, Enum< NetSidebandMod::NetSideband > e_sideband, uint32_t numBaseband, uint32_t numAnt, CorrelationModeMod::CorrelationMode correlationMode, uint64_t time, uint64_t timeCentroid, uint64_t interval, uint64_t exposure, const float *floatData)
 A data dump is an object which can be saved at a persistent level. More...
 
 DataDump (uint32_t numSdPolProduct, uint32_t numSpectralPoint, uint32_t numBin, Enum< NetSidebandMod::NetSideband > e_sideband, uint32_t numBaseband, uint32_t numAnt, CorrelationModeMod::CorrelationMode correlationMode, uint64_t time, uint64_t timeCentroid, uint64_t interval, uint64_t exposure, const float *floatData, const uint32_t *dataFlags)
 A constructor convenient for the total power from the baseband processor when some data have been flagged. More...
 
 DataDump (std::vector< std::vector< uint32_t > > vv_numPolProduct, 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, uint64_t time, uint64_t timeCentroid, uint64_t interval, uint64_t exposure, const float *floatData)
 A constructor to be used in more general case of total power data all the data being valid. More...
 
 DataDump (std::vector< std::vector< uint32_t > > vv_numPolProduct, 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, uint64_t time, uint64_t timeCentroid, uint64_t interval, uint64_t exposure, const float *floatData, const uint32_t *dataFlags)
 A constructor to be used in a more general case of total power data when some data have been flagged. More...
 
 DataDump (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, uint64_t time, uint64_t timeCentroid, uint64_t interval, uint64_t exposure)
 A constructor with no importation nor attachment of binary meta. More...
 
 ~DataDump ()
 Destructor. More...
 
 DataDump (const DataDump &a)
 Copy constructor Perform a deep copy. More...
 
DataDumpoperator= (const DataDump &a)
 Assignement operatator. More...
 
void attachFlags (uint32_t declaredSize, EnumSet< AxisNameMod::AxisName > es_an, uint32_t numData, const uint32_t *flagsPtr)
 
void importFlags (uint32_t declaredSize, EnumSet< AxisNameMod::AxisName > es_an, uint32_t numData, const uint32_t *flagsPtr)
 
void attachActualTimes (uint32_t declaredSize, EnumSet< AxisNameMod::AxisName > es_an, uint32_t numData, const int64_t *actualTimesPtr)
 
void importActualTimes (uint32_t declaredSize, EnumSet< AxisNameMod::AxisName > es_an, uint32_t numData, const int64_t *actualTimesPtr)
 
void attachActualDurations (uint32_t declaredSize, EnumSet< AxisNameMod::AxisName > es_an, uint32_t numData, const int64_t *durationsPtr)
 
void importActualDurations (uint32_t declaredSize, EnumSet< AxisNameMod::AxisName > es_an, uint32_t numData, const int64_t *durationsPtr)
 
void attachZeroLags (uint32_t declaredSize, EnumSet< AxisNameMod::AxisName > es_an, uint32_t numData, const float *zeroLagsPtr)
 
void importZeroLags (uint32_t declaredSize, EnumSet< AxisNameMod::AxisName > es_an, uint32_t numData, const float *zeroLagsPtr)
 
void attachAutoData (uint32_t declaredSize, EnumSet< AxisNameMod::AxisName > es_an, uint32_t numData, const float *autoDataPtr)
 
void importAutoData (uint32_t declaredSize, EnumSet< AxisNameMod::AxisName > es_an, uint32_t numData, const float *autoDataPtr)
 
void attachCrossData (uint32_t declaredSize, EnumSet< AxisNameMod::AxisName > es_an, uint32_t numData, const short int *crossDataPtr)
 
void importCrossData (uint32_t declaredSize, EnumSet< AxisNameMod::AxisName > es_an, uint32_t numData, const short int *crossDataPtr)
 
void attachCrossData (uint32_t declaredSize, EnumSet< AxisNameMod::AxisName > es_an, uint32_t numData, const int *crossDataPtr)
 
void importCrossData (uint32_t declaredSize, EnumSet< AxisNameMod::AxisName > es_an, uint32_t numData, const int *crossDataPtr)
 
void attachCrossData (uint32_t declaredSize, EnumSet< AxisNameMod::AxisName > es_an, uint32_t numData, const float *crossDataPtr)
 
void importCrossData (uint32_t declaredSize, EnumSet< AxisNameMod::AxisName > es_an, uint32_t numData, const float *crossDataPtr)
 
void setScaleFactor (std::vector< std::vector< float > > vv_scaleFactor)
 
uint32_t setIntegration (uint32_t integNum)
 
uint32_t setSubintegration (uint32_t integNum, uint32_t subintegNum)
 
uint32_t setContextUsingProjectPath (std::string projectPathUri)
 
uint32_t integrationNum ()
 Accessor. More...
 
uint32_t subintegrationNum ()
 
float scaleFactor (uint32_t nbb, uint32_t nspw)
 
float scaleFactor (uint32_t ndd)
 
TimeMetadataAccessors

Accessors on time-related attributes

uint64_t time () const
 
uint64_t timeCentroid () const
 
uint64_t interval () const
 
uint64_t exposure () const
 
DataAccessors

Accessors to the actual time values

const int64_t * actualTimes () const
 
const int64_t * actualDurations () const
 
const uint32_t * flags () const
 Accessor to the flags values. More...
 
const float * zeroLags () const
 
const float * autoData () const
 Accessor to the data values. More...
 
const short * crossDataShort () const
 
const int * crossDataLong () const
 
const float * crossDataFloat () const
 
uint32_t floatData (std::vector< std::vector< float > & >)
 Accessor to the data from a 2 levels tree-hierarchy. More...
 
uint32_t floatData (std::vector< std::vector< float * > > &)
 Accessor to the data from a 3 levels tree-hierarchy with muti-dimensional leaves. More...
 
uint32_t floatData (std::vector< std::vector< std::vector< float > > > &)
 Accessor to the data from a 3 levels tree-hierarchy. More...
 
uint32_t floatData (std::vector< std::vector< std::vector< float * > > > &)
 Accessor to the data from a 3 levels tree-hierarchy with muti-dimensional leaves. More...
 
uint32_t floatData (std::vector< std::vector< std::vector< std::vector< float > > > > &)
 Accessor to the data from a 4 levels tree-hierarchy. More...
 
uint32_t floatData (std::vector< std::vector< std::vector< std::vector< float * > > > > &)
 Accessor to the data from a 4 levels tree-hierarchy. More...
 
uint32_t floatData (std::vector< std::vector< std::vector< std::vector< std::vector< float > > > > > &)
 Accessor to the data from a 5 levels tree-hierarchy. More...
 
DataManipulation1

/nant/nbb/nspw/nbin/napc/nsp/npol | | | | | | | | | | | | | corr or uncorr (enum) | | | | | scId (global keys) | | | | spwNames (keys in baseband context) | | | basebandNames (global keys) | | antNames (global keys) | configDescId (global key)

Arithmetics operators (these are axis-size invariant manipulations).

DataDump operator- (const DataDump &B)
 Operator to take the difference between two data dumps. More...
 
DataDump operator-= (const DataDump &)
 Operator to take the difference between two data dumps. More...
 
DataDump operator+ (const DataDump &)
 Operator to take the sum between two data dumps. More...
 
DataDump operator+= (const DataDump &)
 Method to accumulate dumps. More...
 
DataDump operator* (const float &)
 
DataDump operator/ (const float &)
 
DataManipulation2

Manipulations which produce output objects with axis-sizes different to those of the input objects.

DataDump spectralAverage ()
 
DataDump spectralAverage (uint32_t startIndex, uint32_t endIndex)
 
DataDump decim (const DataDump &)
 
DataDump subtractRef (const DataDump &)
 
- Public Member Functions inherited from sdmbin::DataStructure
 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 Member Functions

 DataDump (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, uint64_t time, uint64_t timeCentroid, uint64_t interval, uint64_t exposure, uint32_t numCrossData, const int *crossData, uint32_t numAutoData, const float *floatData, uint32_t numFlags, const uint32_t *dataFlags)
 A constructor used by the operators + and -. More...
 

Protected Attributes

uint32_t integrationNum_
 DataDump binSequence(vector<const DataDump &>); see Subscan. More...
 
uint32_t subintegrationNum_
 
uint64_t time_
 
uint64_t timeCentroid_
 
uint64_t interval_
 
uint64_t exposure_
 
EnumSet< AxisNameMod::AxisName > es_flagsAxes_
 
EnumSet< AxisNameMod::AxisName > es_actualTimesAxes_
 
EnumSet< AxisNameMod::AxisName > es_actualDurationsAxes_
 
EnumSet< AxisNameMod::AxisName > es_weightsAxes_
 
EnumSet< AxisNameMod::AxisName > es_zeroLagsAxes_
 
EnumSet< AxisNameMod::AxisName > es_autoDataAxes_
 
EnumSet< AxisNameMod::AxisName > es_crossDataAxes_
 
uint32_t numFlags_
 
uint32_t numActualTimes_
 
uint32_t numActualDurations_
 
uint32_t numWeights_
 
uint32_t numZeroLags_
 
uint32_t numAutoData_
 
uint32_t numCrossData_
 
std::vector< std::vector< float > > vv_scaleFactor_
 
std::vector< float > v_scaleFactor_
 
const uint32_t * cuintFlagsPtr_
 
const int64_t * clonlonActualTimesPtr_
 
const int64_t * clonlonActualDurationsPtr_
 
const float * cfloatWeightsPtr_
 
const float * cfloatZeroLagsPtr_
 
const float * cfloatAutoDataPtr_
 
const short int * cshortCrossDataPtr_
 
const int * cintCrossDataPtr_
 
const float * cfloatCrossDataPtr_
 
uint32_t * uintFlagsPtr_
 
int64_t * lonlonActualTimesPtr_
 
int64_t * lonlonActualDurationsPtr_
 
float * floatWeightsPtr_
 
float * floatZeroLagsPtr_
 
float * floatAutoDataPtr_
 
short int * shortCrossDataPtr_
 
int * intCrossDataPtr_
 
float * floatCrossDataPtr_
 
- Protected Attributes inherited from sdmbin::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_
 
std::string axisSequence_
 
std::vector< uint32_t > v_minSize_
 
std::vector< uint32_t > v_maxSize_
 

Private Member Functions

void getDataStructure ()
 

Detailed Description

The class DataDump extends the class DataStructure by adding time information to assign to the dump the observation date etc...

It also get effectively the data values with eventualy meta-data (flags, actualTimes, actualDurations), auxiliary data (zeroLags). These may be either attached or truly imported.

A set of constructors is provided to avoid unecessary complexities when the context is simpler than the most general one (e.g. when using a simple filter bank spectrometer with a single dish vs multiple baseband/spectral windows with a multiplicity of antennas).

Behaviors: there are two manipulation categories:

DataDump typed objects resulting from these manipulation are owner of their data, these being deleted when these objects are destroyed.

DataDump typed objects are by default anonymous objects in the context of the project data structure. To be identified in this context it is necessary to tag them by their integration number and eventually their sub-integration number. DataDump typed object resulting from the combination of DataDump typed objects become anonymous. However they keep the information to know tagged object they derived from.

Definition at line 368 of file Integration.h.

Constructor & Destructor Documentation

sdmbin::DataDump::DataDump ( )
sdmbin::DataDump::DataDump ( uint32_t  numPolProduct,
uint32_t  numBin,
Enum< NetSidebandMod::NetSideband >  e_sideband,
uint32_t  numBaseband,
uint32_t  numAnt,
CorrelationModeMod::CorrelationMode  correlationMode,
uint64_t  time,
uint64_t  timeCentroid,
uint64_t  interval,
uint64_t  exposure,
const float *  floatData 
)

A data dump is an object which can be saved at a persistent level.

It has a data structure and time informations to tell when this dump was obtained.

The following constructor is convenient e.g. for the total power from the baseband processor if all the data are valid. With this constructor the data values, read-only, are attached. Would the data be averaged over the duration of a (sub)integration, they must be subsequently tagged by their integration (and sub-integration) number(s) using the method setIntegration (or setSubintegration).

Note
The arrival time of the data dumps may not be synchronized with the time stamp of an integration or sub-integration.
Parameters
numPolProductNumber of polarization cross-products
numBinNumber of bins in the switch cycle
e_sidebandSideband qualifier (not set or NOSB | LSB | USB | DSB )
numBasebandNumber of basebands
numAntNumber of antenna (used to determine the number of baselines if correlationMode=0 or 2
correlationMode( CROSS_ONLY | AUTO_ONLY | CROSS_AND_AUTO )
sdmbin::DataDump::DataDump ( uint32_t  numSdPolProduct,
uint32_t  numSpectralPoint,
uint32_t  numBin,
Enum< NetSidebandMod::NetSideband >  e_sideband,
uint32_t  numBaseband,
uint32_t  numAnt,
CorrelationModeMod::CorrelationMode  correlationMode,
uint64_t  time,
uint64_t  timeCentroid,
uint64_t  interval,
uint64_t  exposure,
const float *  floatData,
const uint32_t *  dataFlags 
)

A constructor convenient for the total power from the baseband processor when some data have been flagged.

Would the data averaged over the duration of an (sub)integration, consider using subsequently the setIntegration (or setSubintegration) method.

Parameters
numSdPolProductNumber of polarization cross-products (zero-baselines)
numSpectralPointNumber of spectral points in the spectral window
numBinNumber of bins in the switch cycle
e_sidebandSideband qualifier (not set or NOSB | LSB | USB | DSB )
numBasebandNumber of basebands
numAntNumber of antenna (used to determine the number of baselines if correlationMode=0 or 2
correlationMode( CROSS_ONLY | AUTO_ONLY | CROSS_AND_AUTO )
  • CROSS_ONLY only non-zero antenna baselines
  • AUTO_ONLY only zero baselines (single-dish)
  • CROSS_AND_AUTO both zero and non-zero.
timeMid-point (over the interval) epoch for the dump
timeCentroidCentroid epoch associated to the exposure This is different than the time value is blanking occured during the observations.
intervalDuration scheduled to produce the dump.
exposureActual duration effectively spent (this is the difference between interval and the time lost due to blanking.
dataFlagsThe data values.
sdmbin::DataDump::DataDump ( std::vector< std::vector< uint32_t > >  vv_numPolProduct,
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,
uint64_t  time,
uint64_t  timeCentroid,
uint64_t  interval,
uint64_t  exposure,
const float *  floatData 
)

A constructor to be used in more general case of total power data all the data being valid.

sdmbin::DataDump::DataDump ( std::vector< std::vector< uint32_t > >  vv_numPolProduct,
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,
uint64_t  time,
uint64_t  timeCentroid,
uint64_t  interval,
uint64_t  exposure,
const float *  floatData,
const uint32_t *  dataFlags 
)

A constructor to be used in a more general case of total power data when some data have been flagged.

sdmbin::DataDump::DataDump ( 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,
uint64_t  time,
uint64_t  timeCentroid,
uint64_t  interval,
uint64_t  exposure 
)

A constructor with no importation nor attachment of binary meta.

sdmbin::DataDump::~DataDump ( )

Destructor.

The pointer to the floatData being one of the parameters in the constructor, this DataDump class does not have the privilege to delete the allocated memory for these floatData; these are under the responsability of the client. More generally, any data attached by the client will never be deleted by this destructor.
However, if floatData has been created by a method in this class, e.g. when using the operator + then the destructor delete this allocated memory. More generally, any data imported by the client will be deleted by this destructor.

List of methods which create DataDump objects by allocating memory to floatData:

  • copy constructor
  • assignement operator =
  • operators -, -, * and /
sdmbin::DataDump::DataDump ( const DataDump a)

Copy constructor Perform a deep copy.

sdmbin::DataDump::DataDump ( 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,
uint64_t  time,
uint64_t  timeCentroid,
uint64_t  interval,
uint64_t  exposure,
uint32_t  numCrossData,
const int *  crossData,
uint32_t  numAutoData,
const float *  floatData,
uint32_t  numFlags,
const uint32_t *  dataFlags 
)
protected

A constructor used by the operators + and -.

Member Function Documentation

const int64_t* sdmbin::DataDump::actualDurations ( ) const
const int64_t* sdmbin::DataDump::actualTimes ( ) const
void sdmbin::DataDump::attachActualDurations ( uint32_t  declaredSize,
EnumSet< AxisNameMod::AxisName >  es_an,
uint32_t  numData,
const int64_t *  durationsPtr 
)
void sdmbin::DataDump::attachActualTimes ( uint32_t  declaredSize,
EnumSet< AxisNameMod::AxisName >  es_an,
uint32_t  numData,
const int64_t *  actualTimesPtr 
)
void sdmbin::DataDump::attachAutoData ( uint32_t  declaredSize,
EnumSet< AxisNameMod::AxisName >  es_an,
uint32_t  numData,
const float *  autoDataPtr 
)
void sdmbin::DataDump::attachCrossData ( uint32_t  declaredSize,
EnumSet< AxisNameMod::AxisName >  es_an,
uint32_t  numData,
const short int *  crossDataPtr 
)
void sdmbin::DataDump::attachCrossData ( uint32_t  declaredSize,
EnumSet< AxisNameMod::AxisName >  es_an,
uint32_t  numData,
const int *  crossDataPtr 
)
void sdmbin::DataDump::attachCrossData ( uint32_t  declaredSize,
EnumSet< AxisNameMod::AxisName >  es_an,
uint32_t  numData,
const float *  crossDataPtr 
)
void sdmbin::DataDump::attachFlags ( uint32_t  declaredSize,
EnumSet< AxisNameMod::AxisName >  es_an,
uint32_t  numData,
const uint32_t *  flagsPtr 
)
void sdmbin::DataDump::attachZeroLags ( uint32_t  declaredSize,
EnumSet< AxisNameMod::AxisName >  es_an,
uint32_t  numData,
const float *  zeroLagsPtr 
)
const float* sdmbin::DataDump::autoData ( ) const

Accessor to the data values.

Methods which can be used in case of multi-dimensional data structure. Example of use-cases:

  • data produced by the baseband processors
  • data produced by one or more filter bank or an acousto-optic spectrometer all with the same number of channels.
  • data produced by the water vapor radiometers
  • ...
Returns
pointer to the multi-dimensional array.
const float* sdmbin::DataDump::crossDataFloat ( ) const
const int* sdmbin::DataDump::crossDataLong ( ) const
const short* sdmbin::DataDump::crossDataShort ( ) const
DataDump sdmbin::DataDump::decim ( const DataDump )
uint64_t sdmbin::DataDump::exposure ( ) const
const uint32_t* sdmbin::DataDump::flags ( ) const

Accessor to the flags values.

Methods which can be used in case of multi-dimensional data structure.

Returns
pointer to the multidimensional array of flags.
uint32_t sdmbin::DataDump::floatData ( std::vector< std::vector< float > & >  )

Accessor to the data from a 2 levels tree-hierarchy.

Note
A multi-dimensional structure being a special case of a tree structure, this method can also be used for 2D multi-dimensional data structures! Example of a use-case:
  • data produced by the sub-band processor with one single-dish when there is more than one baseband.
  • ...
uint32_t sdmbin::DataDump::floatData ( std::vector< std::vector< float * > > &  )

Accessor to the data from a 3 levels tree-hierarchy with muti-dimensional leaves.

Returns
dim the dimensionality of the leaves. The reference to a tree where the leaves are pointers to a multi-dimansional structure.
Note
In general, within a spectral window, the number of polarization products is the same for every spectral point. This being true also for the bin axis, the leaves may correspond to 2, 3 or more exceptionaly (usualy total powers have no apc axis) 4D multi-dimensional structures. Example of use-cases:
  • one single-dish with multiple basebands each with their own set of specific spectral windows.
  • ...
uint32_t sdmbin::DataDump::floatData ( std::vector< std::vector< std::vector< float > > > &  )

Accessor to the data from a 3 levels tree-hierarchy.

Note
A multi-dimensional structure being a special case of a tree structure, this method can also be used for 3D multi-dimensional data structures!
uint32_t sdmbin::DataDump::floatData ( std::vector< std::vector< std::vector< float * > > > &  )

Accessor to the data from a 3 levels tree-hierarchy with muti-dimensional leaves.

Returns
dim the dimensionality of the leaves. The reference to a tree where the leaves are pointers to a multi-dimansional structure.
Note
In general, within a spectral window, the number of polarization products is the same for every spectral point. This being true also for the apc axis, the leaves may correspond to 2 to 4D multi-dimensional structures.

Example of use-cases:

  • data produced by the 4 ACA single-dishes with multiple correlator basebands each with their own set of specific spectral windows.
  • ...
uint32_t sdmbin::DataDump::floatData ( std::vector< std::vector< std::vector< std::vector< float > > > > &  )

Accessor to the data from a 4 levels tree-hierarchy.

Note
A multi-dimensional structure being a special case of a tree structure, this method can also be used for 4D multi-dimensional data structures!

Example of use-cases:

  • data produced by a set of antenna elements with multiple correlator basebands each with their own set of specific spectral windows when there is no bin axis (no switching cycles). in that case the vector returned by reference has it size corresponding to the number of antenna elements
  • ...
uint32_t sdmbin::DataDump::floatData ( std::vector< std::vector< std::vector< std::vector< float * > > > > &  )

Accessor to the data from a 4 levels tree-hierarchy.

Note
A multi-dimensional structure being a special case of a tree structure, this method can also be used for 4D multi-dimensional data structures!
uint32_t sdmbin::DataDump::floatData ( std::vector< std::vector< std::vector< std::vector< std::vector< float > > > > > &  )

Accessor to the data from a 5 levels tree-hierarchy.

Returns
the data tree by reference
Note
this is the general case, the five levels in the tree structure being an, bb, spw, bin, sp Hence the size of this returned vector corresponds to the number of antennas.
void sdmbin::DataDump::getDataStructure ( )
private
void sdmbin::DataDump::importActualDurations ( uint32_t  declaredSize,
EnumSet< AxisNameMod::AxisName >  es_an,
uint32_t  numData,
const int64_t *  durationsPtr 
)
void sdmbin::DataDump::importActualTimes ( uint32_t  declaredSize,
EnumSet< AxisNameMod::AxisName >  es_an,
uint32_t  numData,
const int64_t *  actualTimesPtr 
)
void sdmbin::DataDump::importAutoData ( uint32_t  declaredSize,
EnumSet< AxisNameMod::AxisName >  es_an,
uint32_t  numData,
const float *  autoDataPtr 
)
void sdmbin::DataDump::importCrossData ( uint32_t  declaredSize,
EnumSet< AxisNameMod::AxisName >  es_an,
uint32_t  numData,
const short int *  crossDataPtr 
)
void sdmbin::DataDump::importCrossData ( uint32_t  declaredSize,
EnumSet< AxisNameMod::AxisName >  es_an,
uint32_t  numData,
const int *  crossDataPtr 
)
void sdmbin::DataDump::importCrossData ( uint32_t  declaredSize,
EnumSet< AxisNameMod::AxisName >  es_an,
uint32_t  numData,
const float *  crossDataPtr 
)
void sdmbin::DataDump::importFlags ( uint32_t  declaredSize,
EnumSet< AxisNameMod::AxisName >  es_an,
uint32_t  numData,
const uint32_t *  flagsPtr 
)
void sdmbin::DataDump::importZeroLags ( uint32_t  declaredSize,
EnumSet< AxisNameMod::AxisName >  es_an,
uint32_t  numData,
const float *  zeroLagsPtr 
)
uint32_t sdmbin::DataDump::integrationNum ( )

Accessor.

uint64_t sdmbin::DataDump::interval ( ) const
DataDump sdmbin::DataDump::operator* ( const float &  )
DataDump sdmbin::DataDump::operator+ ( const DataDump )

Operator to take the sum between two data dumps.

Let C be a data dump "sum" of data dumps A and B. Effectively this "sum" is a weighted mean, the weights being equal to the values of the intervals for A and B.

The result attributes of $ C = A + B $ are the following:

  • floatData d: $ d_C(x,y,...) = \big(i_A d_A(x,y,...) + i_B d_B(x,y,...)\big)~/~\big(i_A+i_B\big) $
  • start time: $ ^st_C = MIN(^st_A,^st_B) = MIN( t_A-i_A/2 , t_B-i_B/2 ) $
  • end time: $ ^et_C = MAX(^et_A,^et_B) = MAX( t_A-i_A/2 , t_B-i_B/2 ) $
  • interval i: $ i_C = ~^et_C~- ~^st_C $
  • time t: $ t_C =~ 0.5~\big(~^et_C~+~^st_C~ \big) $
  • time centroid: $ ^ct_C = \big(~e_A~^ct_A~+~e_B~^ct_B~\big)~/~\big(~e_A~+~e_B~\big) $
  • exposure: $ e_C =~e_A~+~e_B $

Example of use-case: sum data dumps to create a new dump with increased signal-to-noise ratio.

Note
To take the exposure for the weights use the operator +=.
DataDump sdmbin::DataDump::operator+= ( const DataDump )

Method to accumulate dumps.

Let A the instance of this data dump and B an other data dump. This method "accumulates" to this A the data dump B. Effectively this accumulation corresponds to a weigthed mean, the weigths being the exposures values. To use the interval values for the wieghts, use the operator +.

The result attributes of the accumulation A += B are the following:

- floatData d: 

$ d(x,y,...) = \big(e d(x,y,...) + i_B d_B(x,y,...)\big)~/~\big(~e~+~e_B~\big) $

  • start time: $ ^st = MIN(^st,^st_B) = MIN( t-i/2 , t_B-i_B/2 ) $
  • end time: $ ^et = MAX(^et,^et_B) = MAX( t-i/2 , t_B-i_B/2 ) $
  • interval i: $ i =~^et~-~^st $
  • time t: $ t =~^st~+~i/2 ) $
  • time centroid: $ ^ct = \big(e~^ct~+~e_B~^ct_B~\big)~/~\big(e+e_B\big) $
  • exposure: $ e = ~e~+~e_B $

Example of use-case: sum data dumps to create a new dump with increased signal-to-noise ratio.

DataDump sdmbin::DataDump::operator- ( const DataDump B)

Operator to take the difference between two data dumps.

Let C be a data dump difference of two data dumps A and B. The result attributes of $ C = A - B $ are the following:

  • floatData d: $ d_{C}(x,y,...) = d_{A}(x,y,...) - d_{B}(x,y,...) $
  • start time: $ ^st_C = MIN(^st_A,^st_B) = MIN( t_A-i_A/2 , t_B-i_B/2 ) $
  • end time: $ ^et_C = MAX(^et_A,^et_B) = MAX( t_A-i_A/2 , t_B-i_B/2 ) $
  • interval i: $ i_C = 0.5~\big(~^et_C~- ~^st_C \big) $
  • time t: $ t_C = 0.5~\big(~^et_C~+ ~^st_C \big) $
  • time centroid: $ ^ct_C = \big(~e_A~^ct_A~+~e_B~^ct_B\big)~/~\big(~e_A~+~e_B~\big) $
  • exposure: $ e_C = 0.5~\big(~e_A~+~e_B\big) $
  • flags: $ f_C(x,y,...) = 0 $ if $ f_A(x,y,...) = f_B(x,y,...) = 0 $ else ...

Example of use-case: compute the difference to subtract a reference data dump to a non-reference data dump.

DataDump sdmbin::DataDump::operator-= ( const DataDump )

Operator to take the difference between two data dumps.

The result attributes of A -= B are the following:

  • floatData d: $ d(x,y,...) = d(x,y,...) - d_{B}(x,y,...) $
  • start time: $ ^st = MIN(^st,^st_B) = MIN( t-i/2 , t_B-i_B/2 ) $
  • end time: $ ^et = MAX(^et,^et_B) = MAX( t-i/2 , t_B-i_B/2 ) $
  • interval i: $ i = 0.5~\big(~^et -~^st_C~\big) $
  • time t: $ t =~^st~+~i/2 $
  • time centroid: $ ^ct = \big(e~^ct~+~e_B~^ct_B \big)~/~\big(~e~+~e_B~\big) $
  • exposure: $ e = 0.5~\big(e~+~e_B\big) $
  • flags: $ f(x,y,...) = 0 $ if $ f(x,y,...) = f_B(x,y,...) = 0 $ else ...

Example of use-case: compute the difference to subtract a reference data dump to a non-reference data dump.

DataDump sdmbin::DataDump::operator/ ( const float &  )
DataDump& sdmbin::DataDump::operator= ( const DataDump a)

Assignement operatator.

float sdmbin::DataDump::scaleFactor ( uint32_t  nbb,
uint32_t  nspw 
)
float sdmbin::DataDump::scaleFactor ( uint32_t  ndd)
uint32_t sdmbin::DataDump::setContextUsingProjectPath ( std::string  projectPathUri)
uint32_t sdmbin::DataDump::setIntegration ( uint32_t  integNum)
void sdmbin::DataDump::setScaleFactor ( std::vector< std::vector< float > >  vv_scaleFactor)
uint32_t sdmbin::DataDump::setSubintegration ( uint32_t  integNum,
uint32_t  subintegNum 
)
DataDump sdmbin::DataDump::spectralAverage ( )
DataDump sdmbin::DataDump::spectralAverage ( uint32_t  startIndex,
uint32_t  endIndex 
)
uint32_t sdmbin::DataDump::subintegrationNum ( )
DataDump sdmbin::DataDump::subtractRef ( const DataDump )
uint64_t sdmbin::DataDump::time ( ) const
uint64_t sdmbin::DataDump::timeCentroid ( ) const
const float* sdmbin::DataDump::zeroLags ( ) const

Member Data Documentation

const float* sdmbin::DataDump::cfloatAutoDataPtr_
protected

Definition at line 905 of file Integration.h.

const float* sdmbin::DataDump::cfloatCrossDataPtr_
protected

Definition at line 908 of file Integration.h.

const float* sdmbin::DataDump::cfloatWeightsPtr_
protected

Definition at line 903 of file Integration.h.

const float* sdmbin::DataDump::cfloatZeroLagsPtr_
protected

Definition at line 904 of file Integration.h.

const int* sdmbin::DataDump::cintCrossDataPtr_
protected

Definition at line 907 of file Integration.h.

const int64_t* sdmbin::DataDump::clonlonActualDurationsPtr_
protected

Definition at line 902 of file Integration.h.

const int64_t* sdmbin::DataDump::clonlonActualTimesPtr_
protected

Definition at line 901 of file Integration.h.

const short int* sdmbin::DataDump::cshortCrossDataPtr_
protected

Definition at line 906 of file Integration.h.

const uint32_t* sdmbin::DataDump::cuintFlagsPtr_
protected

Definition at line 900 of file Integration.h.

EnumSet<AxisNameMod::AxisName> sdmbin::DataDump::es_actualDurationsAxes_
protected

Definition at line 883 of file Integration.h.

EnumSet<AxisNameMod::AxisName> sdmbin::DataDump::es_actualTimesAxes_
protected

Definition at line 882 of file Integration.h.

EnumSet<AxisNameMod::AxisName> sdmbin::DataDump::es_autoDataAxes_
protected

Definition at line 886 of file Integration.h.

EnumSet<AxisNameMod::AxisName> sdmbin::DataDump::es_crossDataAxes_
protected

Definition at line 887 of file Integration.h.

EnumSet<AxisNameMod::AxisName> sdmbin::DataDump::es_flagsAxes_
protected

Definition at line 881 of file Integration.h.

EnumSet<AxisNameMod::AxisName> sdmbin::DataDump::es_weightsAxes_
protected

Definition at line 884 of file Integration.h.

EnumSet<AxisNameMod::AxisName> sdmbin::DataDump::es_zeroLagsAxes_
protected

Definition at line 885 of file Integration.h.

uint64_t sdmbin::DataDump::exposure_
protected

Definition at line 879 of file Integration.h.

float* sdmbin::DataDump::floatAutoDataPtr_
protected

Definition at line 915 of file Integration.h.

float* sdmbin::DataDump::floatCrossDataPtr_
protected

Definition at line 918 of file Integration.h.

float* sdmbin::DataDump::floatWeightsPtr_
protected

Definition at line 913 of file Integration.h.

float* sdmbin::DataDump::floatZeroLagsPtr_
protected

Definition at line 914 of file Integration.h.

int* sdmbin::DataDump::intCrossDataPtr_
protected

Definition at line 917 of file Integration.h.

uint32_t sdmbin::DataDump::integrationNum_
protected

DataDump binSequence(vector<const DataDump &>); see Subscan.

Definition at line 874 of file Integration.h.

uint64_t sdmbin::DataDump::interval_
protected

Definition at line 878 of file Integration.h.

int64_t* sdmbin::DataDump::lonlonActualDurationsPtr_
protected

Definition at line 912 of file Integration.h.

int64_t* sdmbin::DataDump::lonlonActualTimesPtr_
protected

Definition at line 911 of file Integration.h.

uint32_t sdmbin::DataDump::numActualDurations_
protected

Definition at line 891 of file Integration.h.

uint32_t sdmbin::DataDump::numActualTimes_
protected

Definition at line 890 of file Integration.h.

uint32_t sdmbin::DataDump::numAutoData_
protected

Definition at line 894 of file Integration.h.

uint32_t sdmbin::DataDump::numCrossData_
protected

Definition at line 895 of file Integration.h.

uint32_t sdmbin::DataDump::numFlags_
protected

Definition at line 889 of file Integration.h.

uint32_t sdmbin::DataDump::numWeights_
protected

Definition at line 892 of file Integration.h.

uint32_t sdmbin::DataDump::numZeroLags_
protected

Definition at line 893 of file Integration.h.

short int* sdmbin::DataDump::shortCrossDataPtr_
protected

Definition at line 916 of file Integration.h.

uint32_t sdmbin::DataDump::subintegrationNum_
protected

Definition at line 875 of file Integration.h.

uint64_t sdmbin::DataDump::time_
protected

Definition at line 876 of file Integration.h.

uint64_t sdmbin::DataDump::timeCentroid_
protected

Definition at line 877 of file Integration.h.

uint32_t* sdmbin::DataDump::uintFlagsPtr_
protected

Definition at line 910 of file Integration.h.

std::vector<float> sdmbin::DataDump::v_scaleFactor_
protected

Definition at line 898 of file Integration.h.

std::vector<std::vector<float> > sdmbin::DataDump::vv_scaleFactor_
protected

Definition at line 897 of file Integration.h.


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