29 #ifndef _SYNTHESIS_SKY_CAL_H_
30 #define _SYNTHESIS_SKY_CAL_H_
139 template<
class DataType,
class CalDataType>
212 constexpr
size_t nPolCal = 2;
216 for (
size_t i = 0; i <
nchan_; ++i) {
217 auto const iData = i *
npol_;
218 auto const iMat = i * nPolCal;
219 for (
size_t j = 0; j <
npol_; ++j) {
221 data[iData+j] = (data[iData+j] -
m_[iMat+j]) /
m_[iMat+j];
242 constexpr
size_t nPolCal = 2;
245 for (
size_t i = 0; i <
nchan_; ++i) {
246 vflag[i] |= (!
ok_[i*nPolCal]);
250 for (
size_t i = 0; i <
nchan_; ++i) {
251 for (
size_t j = 0; j <
npol_; ++j) {
252 vflag[i] |= !(
ok_[i*nPolCal + j]);
260 constexpr
size_t nPolCal = 2;
264 for (
size_t i = 0; i <
nchan_; ++i) {
265 auto const iData = i *
npol_;
266 auto const iMat = i * nPolCal;
267 for (
size_t j = 0; j <
npol_; ++j) {
268 data[iData+j] |= (!
ok_[iMat+j]);
CalDataType * m0_
Pointer to origin.
void operator++()
Increment to next vector (according to len) In practice, this operator increments row index...
casacore::Bool scalardata_
const CalDataType cOne_
casacore::Complex unity, zero (for use in invert and similar methods)
void putStorage(T *&storage, Bool deleteAndCopy)
putStorage() is normally called after a call to getStorage() (cf).
const IPosition & shape() const
The length of each axis of the Matrix.
void apply(casacore::Matrix< DataType > &out, casacore::Matrix< casacore::Bool > &outFlag, const casacore::Matrix< DataType > &in, const casacore::Matrix< casacore::Bool > &inFlag)
Multiply onto a vis VisVector, preserving input (copy then in-place apply)
void setNumChannel(casacore::uInt n)
void flag(casacore::Matrix< casacore::Bool > &v)
void invert()
In-place invert.
void setNumPolarization(casacore::uInt n)
A 2-D Specialization of the Array class.
SkyCal()
all the member functions are inline
casacore::uInt typesize() const
stride In Mueller series, typesize is defined as "number of polarizations" while SkyCal definition is...
ABSTRACT CLASSES Deliberately vague to be general enough to allow for many different types of data
T * getStorage(Bool &deleteIt)
Generally use of this should be shunned, except to use a FORTRAN routine or something similar...
void sync(CalDataType &mat, casacore::Bool &ok)
void applyFlag(casacore::Vector< casacore::Bool > &vflag)
Apply only flags according to cal flags.
void apply(casacore::Matrix< DataType > &v, casacore::Matrix< casacore::Bool > &f, casacore::Vector< casacore::Bool > &vflag)
casacore::uInt npol_
print it out unused
void apply(casacore::Matrix< DataType > &v, casacore::Matrix< casacore::Bool > &f)
In-place multiply onto a data with flag information apply implements position switch calibration: (ON...
bool Bool
Define the standard types used by Casacore.
CalDataType * m_
Moving pointer.
void setScalarData(casacore::Bool scalardata) const
Set scalardata_ TBD: Handle this better; for now, we need to set this from an external call so we han...
Base class for all Casacore library errors.
void sync(CalDataType &mat)
Synchronize with leading element in external array.
void advance(const casacore::Int &step)
Advance step matrices forward (according to len)
void origin()
Reset to origin.
void setMatByOk()
Set matrix elements according to ok flag (so we don't have to check ok flags atomically in apply) ...