casacore
Public Member Functions | Private Member Functions | Private Attributes | List of all members
AFTimeBlockEncoder Class Reference

#include <aftimeblockencoder.h>

Public Member Functions

 AFTimeBlockEncoder (size_t nPol, size_t nChannels, bool fitToMaximum)
 
virtual ~AFTimeBlockEncoder () override
 
virtual void EncodeWithDithering (const dyscostman::StochasticEncoder< float > &gausEncoder, FBuffer &buffer, float *metaBuffer, symbol_t *symbolBuffer, size_t antennaCount, std::mt19937 &rnd) final override
 
virtual void EncodeWithoutDithering (const dyscostman::StochasticEncoder< float > &gausEncoder, FBuffer &buffer, float *metaBuffer, symbol_t *symbolBuffer, size_t antennaCount) final override
 
virtual void InitializeDecode (const float *metaBuffer, size_t nRow, size_t nAntennae) final override
 
virtual void Decode (const dyscostman::StochasticEncoder< float > &gausEncoder, FBuffer &buffer, const symbol_t *symbolBuffer, size_t blockRow, size_t antenna1, size_t antenna2) final override
 
virtual size_t SymbolCount (size_t nRow, size_t nPol, size_t nChannels) const final override
 
virtual size_t SymbolCount (size_t nRow) const final override
 
virtual size_t SymbolsPerRow () const final override
 
virtual size_t MetaDataCount (size_t, size_t nPol, size_t nChannels, size_t nAntennae) const final override
 
void Normalize (const dyscostman::StochasticEncoder< float > &gausEncoder, TimeBlockBuffer< std::complex< float >> &buffer, size_t antennaCount)
 
- Public Member Functions inherited from TimeBlockEncoder
virtual ~TimeBlockEncoder ()
 

Private Member Functions

void calculateAntennaeRMS (const std::vector< DBufferRow > &data, size_t polIndex, size_t antennaCount)
 
template<bool UseDithering>
void encode (const dyscostman::StochasticEncoder< float > &gausEncoder, const FBuffer &buffer, float *metaBuffer, symbol_t *symbolBuffer, size_t antennaCount, std::mt19937 *rnd)
 
void changeAntennaFactor (std::vector< DBufferRow > &data, float *metaBuffer, size_t antennaIndex, size_t antennaCount, size_t polIndex, double factor)
 
void changeChannelFactor (std::vector< DBufferRow > &data, float *metaBuffer, size_t visIndex, double factor)
 
void fitToMaximum (std::vector< DBufferRow > &data, float *metaBuffer, const dyscostman::StochasticEncoder< float > &gausEncoder, size_t antennaCount)
 

Private Attributes

size_t _nPol
 
size_t _nChannels
 
bool _fitToMaximum
 
ao::uvector< double > _rmsPerChannel
 
ao::uvector< double > _rmsPerAntenna
 
std::uniform_int_distribution< unsigned > _ditherDist
 

Additional Inherited Members

- Public Types inherited from TimeBlockEncoder
typedef TimeBlockBuffer< std::complex< float > > FBuffer
 
typedef TimeBlockBuffer< std::complex< float > >::DataRow FBufferRow
 
typedef TimeBlockBuffer< std::complex< double > > DBuffer
 
typedef TimeBlockBuffer< std::complex< double > >::DataRow DBufferRow
 
typedef unsigned symbol_t
 
- Protected Member Functions inherited from TimeBlockEncoder
 TimeBlockEncoder ()
 

Detailed Description

Definition at line 14 of file aftimeblockencoder.h.

Constructor & Destructor Documentation

◆ AFTimeBlockEncoder()

AFTimeBlockEncoder::AFTimeBlockEncoder ( size_t  nPol,
size_t  nChannels,
bool  fitToMaximum 
)

◆ ~AFTimeBlockEncoder()

virtual AFTimeBlockEncoder::~AFTimeBlockEncoder ( )
overridevirtual

Member Function Documentation

◆ calculateAntennaeRMS()

void AFTimeBlockEncoder::calculateAntennaeRMS ( const std::vector< DBufferRow > &  data,
size_t  polIndex,
size_t  antennaCount 
)
private

◆ changeAntennaFactor()

void AFTimeBlockEncoder::changeAntennaFactor ( std::vector< DBufferRow > &  data,
float *  metaBuffer,
size_t  antennaIndex,
size_t  antennaCount,
size_t  polIndex,
double  factor 
)
private

◆ changeChannelFactor()

void AFTimeBlockEncoder::changeChannelFactor ( std::vector< DBufferRow > &  data,
float *  metaBuffer,
size_t  visIndex,
double  factor 
)
private

◆ Decode()

virtual void AFTimeBlockEncoder::Decode ( const dyscostman::StochasticEncoder< float > &  gausEncoder,
FBuffer buffer,
const symbol_t symbolBuffer,
size_t  blockRow,
size_t  antenna1,
size_t  antenna2 
)
finaloverridevirtual

Implements TimeBlockEncoder.

◆ encode()

template<bool UseDithering>
void AFTimeBlockEncoder::encode ( const dyscostman::StochasticEncoder< float > &  gausEncoder,
const FBuffer buffer,
float *  metaBuffer,
symbol_t symbolBuffer,
size_t  antennaCount,
std::mt19937 *  rnd 
)
private

◆ EncodeWithDithering()

virtual void AFTimeBlockEncoder::EncodeWithDithering ( const dyscostman::StochasticEncoder< float > &  gausEncoder,
FBuffer buffer,
float *  metaBuffer,
symbol_t symbolBuffer,
size_t  antennaCount,
std::mt19937 &  rnd 
)
inlinefinaloverridevirtual

Implements TimeBlockEncoder.

Definition at line 20 of file aftimeblockencoder.h.

◆ EncodeWithoutDithering()

virtual void AFTimeBlockEncoder::EncodeWithoutDithering ( const dyscostman::StochasticEncoder< float > &  gausEncoder,
FBuffer buffer,
float *  metaBuffer,
symbol_t symbolBuffer,
size_t  antennaCount 
)
inlinefinaloverridevirtual

Implements TimeBlockEncoder.

Definition at line 28 of file aftimeblockencoder.h.

◆ fitToMaximum()

void AFTimeBlockEncoder::fitToMaximum ( std::vector< DBufferRow > &  data,
float *  metaBuffer,
const dyscostman::StochasticEncoder< float > &  gausEncoder,
size_t  antennaCount 
)
private

◆ InitializeDecode()

virtual void AFTimeBlockEncoder::InitializeDecode ( const float *  metaBuffer,
size_t  nRow,
size_t  nAntennae 
)
finaloverridevirtual

Implements TimeBlockEncoder.

◆ MetaDataCount()

virtual size_t AFTimeBlockEncoder::MetaDataCount ( size_t  ,
size_t  nPol,
size_t  nChannels,
size_t  nAntennae 
) const
inlinefinaloverridevirtual

Implements TimeBlockEncoder.

Definition at line 57 of file aftimeblockencoder.h.

◆ Normalize()

void AFTimeBlockEncoder::Normalize ( const dyscostman::StochasticEncoder< float > &  gausEncoder,
TimeBlockBuffer< std::complex< float >> &  buffer,
size_t  antennaCount 
)

◆ SymbolCount() [1/2]

virtual size_t AFTimeBlockEncoder::SymbolCount ( size_t  nRow) const
inlinefinaloverridevirtual

Implements TimeBlockEncoder.

Definition at line 49 of file aftimeblockencoder.h.

References _nChannels, and _nPol.

◆ SymbolCount() [2/2]

virtual size_t AFTimeBlockEncoder::SymbolCount ( size_t  nRow,
size_t  nPol,
size_t  nChannels 
) const
inlinefinaloverridevirtual

Implements TimeBlockEncoder.

Definition at line 44 of file aftimeblockencoder.h.

◆ SymbolsPerRow()

virtual size_t AFTimeBlockEncoder::SymbolsPerRow ( ) const
inlinefinaloverridevirtual

Implements TimeBlockEncoder.

Definition at line 53 of file aftimeblockencoder.h.

References _nChannels, and _nPol.

Member Data Documentation

◆ _ditherDist

std::uniform_int_distribution<unsigned> AFTimeBlockEncoder::_ditherDist
private

Definition at line 89 of file aftimeblockencoder.h.

◆ _fitToMaximum

bool AFTimeBlockEncoder::_fitToMaximum
private

Definition at line 86 of file aftimeblockencoder.h.

◆ _nChannels

size_t AFTimeBlockEncoder::_nChannels
private

Definition at line 85 of file aftimeblockencoder.h.

Referenced by SymbolCount(), and SymbolsPerRow().

◆ _nPol

size_t AFTimeBlockEncoder::_nPol
private

Definition at line 85 of file aftimeblockencoder.h.

Referenced by SymbolCount(), and SymbolsPerRow().

◆ _rmsPerAntenna

ao::uvector<double> AFTimeBlockEncoder::_rmsPerAntenna
private

Definition at line 88 of file aftimeblockencoder.h.

◆ _rmsPerChannel

ao::uvector<double> AFTimeBlockEncoder::_rmsPerChannel
private

Definition at line 88 of file aftimeblockencoder.h.


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