casa::sdfiller::DataChunk Class Reference

#include <DataAccumulator.h>

List of all members.

Public Member Functions

 DataChunk (String const &poltype)
virtual ~DataChunk ()
String getPolType () const
void resetPolType (String const &poltype)
uInt getNumPol () const
void initialize (size_t num_chan)
void clear ()
bool readyToWrite ()
bool accumulate (DataRecord const &record)
bool get (MSDataRecord &record)

Public Attributes

friend DataAccumulator

Private Member Functions

bool isFullPol () const
bool isDualPol () const
bool isSinglePol0 () const
bool isSinglePol1 () const
bool judgePol (unsigned char const pol) const
bool isValidRecord (DataRecord const &record)
void setPolType (String const &poltype)
void setTsys2 (MSDataRecord &record)
void setTcal2 (MSDataRecord &record)
void setTsys1 (ssize_t start_src, MSDataRecord &record)
void setTcal1 (ssize_t start_src, MSDataRecord &record)
bool getLinear (MSDataRecord &record)
bool getCircular (MSDataRecord &record)
bool getStokes (MSDataRecord &record)
bool getLinpol (MSDataRecord &record)
uInt getNumPolLinear () const
uInt getNumPolCircular () const
uInt getNumPolStokes () const
uInt getNumPolLinpol () const

Static Private Member Functions

static constexpr unsigned char NoData ()
static constexpr unsigned char SinglePol0 ()
static constexpr unsigned char SinglePol1 ()
static constexpr unsigned char SinglePol2 ()
static constexpr unsigned char SinglePol3 ()
static constexpr unsigned char DualPol ()
static constexpr unsigned char FullPol ()

Private Attributes

size_t const num_pol_max_
size_t num_chan_
Matrix< Float > data_
Matrix< Bool > flag_
Vector< Bool > flag_row_
Matrix< Float > tsys_
Matrix< Float > tcal_
Vector< Float > weight_
Vector< Float > sigma_
String poltype_
Vector< Int > corr_type_
unsigned char filled_
bool(DataChunk::* get_chunk_ )(MSDataRecord &record)
uInt(DataChunk::* get_num_pol_ )() const

Detailed Description

Definition at line 173 of file DataAccumulator.h.


Constructor & Destructor Documentation

casa::sdfiller::DataChunk::DataChunk ( String const &  poltype  )  [inline]

Definition at line 177 of file DataAccumulator.h.

References POST_END, and POST_START.

virtual casa::sdfiller::DataChunk::~DataChunk (  )  [inline, virtual]

Definition at line 190 of file DataAccumulator.h.


Member Function Documentation

bool casa::sdfiller::DataChunk::accumulate ( DataRecord const &  record  )  [inline]

std::cout << "tsys is not empty: " << record.tsys << std::endl;

std::cout << "tcal is not empty: " << record.tcal << std::endl;

data_.column(polid) = data;

flag_.column(polid) = flag;

tsys_.column(polid) = tsys;

tcal_.column(polid) = tcal;

Definition at line 227 of file DataAccumulator.h.

References casacore::Vector< T >::assign(), casa::sdfiller::DataRecord::data, casa::data, casacore::ArrayBase::empty(), casa::sdfiller::DataRecord::flag, casa::sdfiller::DataRecord::flag_row, casa::isValidRecord(), casacore::ArrayBase::nelements(), casa::sdfiller::DataRecord::polno, POST_START, casacore::Vector< T >::shape(), casacore::ArrayBase::size(), casa::sdfiller::DataRecord::tcal, and casa::sdfiller::DataRecord::tsys.

void casa::sdfiller::DataChunk::clear (  )  [inline]

Definition at line 218 of file DataAccumulator.h.

static constexpr unsigned char casa::sdfiller::DataChunk::DualPol (  )  [inline, static, private]

Definition at line 309 of file DataAccumulator.h.

static constexpr unsigned char casa::sdfiller::DataChunk::FullPol (  )  [inline, static, private]

Definition at line 312 of file DataAccumulator.h.

bool casa::sdfiller::DataChunk::get ( MSDataRecord record  )  [inline]

Definition at line 288 of file DataAccumulator.h.

bool casa::sdfiller::DataChunk::getCircular ( MSDataRecord record  )  [inline, private]

Definition at line 556 of file DataAccumulator.h.

Referenced by setPolType().

bool casa::sdfiller::DataChunk::getLinear ( MSDataRecord record  )  [inline, private]

POL 0, 1, 2, and 3 std::cout << "set data/flag" << std::endl;

std::cout << "weight = " << record.weight << std::endl;

std::cout << "set tsys" << std::endl;

std::cout << "set tcal " << tcal_ << std::endl;

POL 0 and 1 std::cout << "set data/flag" << std::endl;

std::cout << "weight = " << record.weight << std::endl;

std::cout << "set tsys" << std::endl;

std::cout << "set tcal " << tcal_ << std::endl;

only POL 0 std::cout << "set data/flag (pol 0)" << std::endl;

std::cout << "set tcal " << tcal_ << std::endl;

only POL 1 std::cout << "set data/flag (pol 1)" << std::endl;

std::cout << "set tcal " << tcal_ << std::endl;

std::cout << "DataChunk is not ready for get" << std::endl;

Definition at line 470 of file DataAccumulator.h.

References casacore::anyEQ(), casa::sdfiller::MSDataRecord::complex_data, casa::sdfiller::MSDataRecord::corr_type, casa::sdfiller::MSDataRecord::flag, casa::sdfiller::MSDataRecord::flag_row, casa::sdfiller::MSDataRecord::float_data, casa::sdfiller::MSDataRecord::num_pol, POST_END, POST_START, casa::sdfiller::MSDataRecord::setComplex(), casa::sdfiller::MSDataRecord::setDataSize(), casa::sdfiller::MSDataRecord::setFloat(), and casacore::True.

Referenced by setPolType().

bool casa::sdfiller::DataChunk::getLinpol ( MSDataRecord record  )  [inline, private]
uInt casa::sdfiller::DataChunk::getNumPol (  )  const [inline]

Definition at line 202 of file DataAccumulator.h.

uInt casa::sdfiller::DataChunk::getNumPolCircular (  )  const [inline, private]

Definition at line 633 of file DataAccumulator.h.

Referenced by setPolType().

uInt casa::sdfiller::DataChunk::getNumPolLinear (  )  const [inline, private]

Definition at line 621 of file DataAccumulator.h.

Referenced by setPolType().

uInt casa::sdfiller::DataChunk::getNumPolLinpol (  )  const [inline, private]

Definition at line 647 of file DataAccumulator.h.

Referenced by setPolType().

uInt casa::sdfiller::DataChunk::getNumPolStokes (  )  const [inline, private]

Definition at line 637 of file DataAccumulator.h.

Referenced by setPolType().

String casa::sdfiller::DataChunk::getPolType (  )  const [inline]

Definition at line 193 of file DataAccumulator.h.

bool casa::sdfiller::DataChunk::getStokes ( MSDataRecord record  )  [inline, private]
void casa::sdfiller::DataChunk::initialize ( size_t  num_chan  )  [inline]

Definition at line 206 of file DataAccumulator.h.

References casacore::shape().

bool casa::sdfiller::DataChunk::isDualPol (  )  const [inline, private]

Definition at line 318 of file DataAccumulator.h.

bool casa::sdfiller::DataChunk::isFullPol (  )  const [inline, private]

Definition at line 315 of file DataAccumulator.h.

bool casa::sdfiller::DataChunk::isSinglePol0 (  )  const [inline, private]

Definition at line 321 of file DataAccumulator.h.

bool casa::sdfiller::DataChunk::isSinglePol1 (  )  const [inline, private]

Definition at line 324 of file DataAccumulator.h.

bool casa::sdfiller::DataChunk::isValidRecord ( DataRecord const &  record  )  [inline, private]
bool casa::sdfiller::DataChunk::judgePol ( unsigned char const   pol  )  const [inline, private]

Definition at line 327 of file DataAccumulator.h.

static constexpr unsigned char casa::sdfiller::DataChunk::NoData (  )  [inline, static, private]

Definition at line 294 of file DataAccumulator.h.

bool casa::sdfiller::DataChunk::readyToWrite (  )  [inline]

Definition at line 223 of file DataAccumulator.h.

void casa::sdfiller::DataChunk::resetPolType ( String const &  poltype  )  [inline]

Definition at line 197 of file DataAccumulator.h.

void casa::sdfiller::DataChunk::setPolType ( String const &  poltype  )  [inline, private]
void casa::sdfiller::DataChunk::setTcal1 ( ssize_t  start_src,
MSDataRecord record 
) [inline, private]

should be spectral Tsys

record.tsys = -1;

record.tsys.row(0) = tsys_.column(0);

scalar Tsys

Definition at line 452 of file DataAccumulator.h.

References casa::sdfiller::MSDataRecord::setTcalSize(), and casa::sdfiller::MSDataRecord::tcal.

void casa::sdfiller::DataChunk::setTcal2 ( MSDataRecord record  )  [inline, private]
void casa::sdfiller::DataChunk::setTsys1 ( ssize_t  start_src,
MSDataRecord record 
) [inline, private]

should be spectral Tsys

record.tsys = -1;

record.tsys.row(0) = tsys_.column(0);

scalar Tsys

Definition at line 434 of file DataAccumulator.h.

References casa::sdfiller::MSDataRecord::setTsysSize(), and casa::sdfiller::MSDataRecord::tsys.

void casa::sdfiller::DataChunk::setTsys2 ( MSDataRecord record  )  [inline, private]
static constexpr unsigned char casa::sdfiller::DataChunk::SinglePol0 (  )  [inline, static, private]

Definition at line 297 of file DataAccumulator.h.

static constexpr unsigned char casa::sdfiller::DataChunk::SinglePol1 (  )  [inline, static, private]

Definition at line 300 of file DataAccumulator.h.

static constexpr unsigned char casa::sdfiller::DataChunk::SinglePol2 (  )  [inline, static, private]

Definition at line 303 of file DataAccumulator.h.

static constexpr unsigned char casa::sdfiller::DataChunk::SinglePol3 (  )  [inline, static, private]

Definition at line 306 of file DataAccumulator.h.


Member Data Documentation

Definition at line 383 of file DataAccumulator.h.

Definition at line 375 of file DataAccumulator.h.

Definition at line 175 of file DataAccumulator.h.

unsigned char casa::sdfiller::DataChunk::filled_ [private]

Definition at line 384 of file DataAccumulator.h.

Definition at line 376 of file DataAccumulator.h.

Definition at line 377 of file DataAccumulator.h.

bool(DataChunk::* casa::sdfiller::DataChunk::get_chunk_)(MSDataRecord &record) [private]
uInt(DataChunk::* casa::sdfiller::DataChunk::get_num_pol_)() const [private]

Definition at line 374 of file DataAccumulator.h.

Definition at line 373 of file DataAccumulator.h.

Definition at line 382 of file DataAccumulator.h.

Definition at line 381 of file DataAccumulator.h.

Definition at line 379 of file DataAccumulator.h.

Definition at line 378 of file DataAccumulator.h.

Definition at line 380 of file DataAccumulator.h.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated on 31 Aug 2016 for casa by  doxygen 1.6.1