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

#include <CTPatchedInterp.h>

Public Member Functions

 CTPatchedInterp (NewCalTable &ct, VisCalEnum::MatrixType mtype, casacore::Int nPar, const casacore::String &timetype, const casacore::String &freqtype, const casacore::String &fieldtype, casacore::Vector< casacore::Int > spwmap=casacore::Vector< casacore::Int >(), casacore::Vector< casacore::Int > fldmap=casacore::Vector< casacore::Int >(), const CTTIFactoryPtr cttifactoryptr=&CTTimeInterp1::factory)
 From NewCalTable only. More...
 
 CTPatchedInterp (NewCalTable &ct, VisCalEnum::MatrixType mtype, casacore::Int nPar, const casacore::String &timetype, const casacore::String &freqtype, const casacore::String &fieldtype, const casacore::MeasurementSet &ms, casacore::Vector< casacore::Int > spwmap=casacore::Vector< casacore::Int >(), const CTTIFactoryPtr cttifactoryptr=&CTTimeInterp1::factory)
 From NewCalTable and casacore::MS. More...
 
 CTPatchedInterp (NewCalTable &ct, VisCalEnum::MatrixType mtype, casacore::Int nPar, const casacore::String &timetype, const casacore::String &freqtype, const casacore::String &fieldtype, const casacore::ROMSColumns &mscol, casacore::Vector< casacore::Int > spwmap=casacore::Vector< casacore::Int >(), const CTTIFactoryPtr cttifactoryptr=&CTTimeInterp1::factory)
 From NewCalTable and casacore::MSColumns. More...
 
virtual ~CTPatchedInterp ()
 Destructor. More...
 
casacore::Bool interpolate (casacore::Int obs, casacore::Int fld, casacore::Int spw, casacore::Double time, casacore::Double freq=-1.0)
 Interpolate, given input field, spw, timestamp, & (optionally) freq list returns T if new result (anywhere) More...
 
casacore::Bool interpolate (casacore::Int obs, casacore::Int fld, casacore::Int spw, casacore::Double time, const casacore::Vector< casacore::Double > &freq)
 
casacore::Array
< casacore::Float > & 
resultF (casacore::Int obs, casacore::Int fld, casacore::Int spw)
 Access to the result. More...
 
casacore::Array
< casacore::Complex > 
resultC (casacore::Int obs, casacore::Int fld, casacore::Int spw)
 
casacore::Array< casacore::Bool > & rflag (casacore::Int obs, casacore::Int fld, casacore::Int spw)
 
casacore::Array
< casacore::Float > & 
tresultF (casacore::Int obs, casacore::Int fld, casacore::Int spw)
 Temporary public function for testing. More...
 
casacore::Array< casacore::Bool > & tresultFlag (casacore::Int obs, casacore::Int fld, casacore::Int spw)
 
casacore::Bool spwOK (casacore::Int spw) const
 spwOK info for users More...
 
casacore::Bool spwInOK (casacore::Int spw) const
 
void state ()
 Const access to various state TBD. More...
 

Private Member Functions

 CTPatchedInterp ()
 Null ctor does nothing. More...
 
void sliceTable ()
 Setup methods. More...
 
void makeInterpolators ()
 
casacore::Int thisobs (casacore::Int obs)
 
void setDefFldMap ()
 Methods to set up 1:1 patch-panel maps Private for now as not yet ready to control from outside Field default: all 0 (no field-dep yet) More...
 
void setFldMap (const casacore::MSField &msfld)
 
void setFldMap (const casacore::ROMSFieldColumns &fcol)
 
void setFldMap (casacore::Vector< casacore::Int > &fldmap)
 
void calcAltFld ()
 void setFldMap(casacore::Vector<casacore::String>& field); // via name matching void setFldMap(casacore::uInt to, casacore::uInt from); // via single to/from More...
 
void setDefSpwMap ()
 Spw default: indgen (index identity) More...
 
void setSpwMap (casacore::Vector< casacore::Int > &spwmap)
 
void setDefAntMap ()
 void setSpwMap(casacore::Vector<casacore::Double>& refFreqs); // via refFreq matching void setSpwMap(casacore::uInt to, casacore::uInt from); // via single to/from More...
 
void setElemMap ()
 void setAntMap(casacore::Vector<casacore::Int>& ant); // via ordered index list void setAntMap(casacore::Vector<casacore::String>& ant); // via name/station matching void setAntMap(casacore::uInt to, casacore::uInt from); // via single to/from More...
 
void resampleInFreq (casacore::Matrix< casacore::Float > &fres, casacore::Matrix< casacore::Bool > &fflg, const casacore::Vector< casacore::Double > &fout, casacore::Matrix< casacore::Float > &tres, casacore::Matrix< casacore::Bool > &tflg, const casacore::Vector< casacore::Double > &fin)
 Resample in frequency. More...
 
void resampleFlagsInFreq (casacore::Vector< casacore::Bool > &flgout, const casacore::Vector< casacore::Double > &fout, casacore::Vector< casacore::Bool > &flgin, const casacore::Vector< casacore::Double > &fin)
 
casacore::Int blnidx (const casacore::Int &a1, const casacore::Int &a2, const casacore::Int &nAnt)
 Baseline index from antenna indices: (assumes a1<=a2 !!) More...
 
casacore::InterpolateArray1D
< casacore::Double,
casacore::Float >
::InterpolationMethod 
ftype (casacore::String &strtype)
 Translate freq axis interpolation string. More...
 

Private Attributes

NewCalTable ct_
 PRIVATE DATA: More...
 
VisCalEnum::MatrixType mtype_
 casacore::Matrix type More...
 
casacore::Bool isCmplx_
 Are parameters fundamentally complex? More...
 
casacore::Int nPar_
 The number of (casacore::Float) parameters (per-chan, per-element) More...
 
casacore::Int nFPar_
 
casacore::String timeType_
 Interpolation modes. More...
 
casacore::String freqTypeStr_
 
casacore::Bool relativeFreq_
 Relative-to-center interpolation. More...
 
const INTERPMETHOD freqInterpMethod0_
 
INTERPMETHOD freqInterpMethod_
 
casacore::Vector< INTERPMETHODfreqInterpMethodVec_
 
casacore::Bool byObs_
 Are we slicing caltable by field? More...
 
casacore::Bool byField_
 
casacore::Vector< casacore::IntnChanIn_
 CalTable freq axis info. More...
 
casacore::Vector
< casacore::Vector
< casacore::Double > > 
freqIn_
 
casacore::Int nMSObs_
 Obs, Field, Spw, Ant output (casacore::MS) sizes calibration required for up to this many. More...
 
casacore::Int nMSFld_
 
casacore::Int nMSSpw_
 
casacore::Int nMSAnt_
 
casacore::Int nMSElem_
 
casacore::Vector< casacore::IntaltFld_
 Alternate field indices. More...
 
casacore::Int nCTObs_
 Obs, Field, Spw, Ant input (CalTable) sizes patch panels should not violate these (point to larger indices) More...
 
casacore::Int nCTFld_
 
casacore::Int nCTSpw_
 
casacore::Int nCTAnt_
 
casacore::Int nCTElem_
 
casacore::Vector< casacore::BoolspwInOK_
 OK flag. More...
 
casacore::Vector< casacore::IntfldMap_
 The patch panels Each has length from casacore::MS, values refer to CT. More...
 
casacore::Vector< casacore::IntspwMap_
 
casacore::Vector< casacore::IntantMap_
 
casacore::Vector< casacore::IntelemMap_
 
casacore::Vector< casacore::BoolconjTab_
 Control conjugation of baseline-based solutions when mapping requires. More...
 
casacore::Cube< casacore::Cube
< casacore::Float > > 
timeResult_
 Internal result Arrays. More...
 
casacore::Cube< casacore::Cube
< casacore::Float > > 
freqResult_
 
casacore::Cube< casacore::Cube
< casacore::Bool > > 
timeResFlag_
 
casacore::Cube< casacore::Cube
< casacore::Bool > > 
freqResFlag_
 
casacore::Cube< casacore::Cube
< casacore::Float > > 
result_
 Current interpolation result Arrays These will reference time or freq result, depending on context, and may be referenced by external code. More...
 
casacore::Cube< casacore::Cube
< casacore::Bool > > 
resFlag_
 
casacore::Array< NewCalTable * > ctSlices_
 The CalTable slices. More...
 
casacore::Array< CTTimeInterp1 * > tI_
 The pre-patched casacore::Time interpolation engines These are populated by the available caltables slices. More...
 
casacore::Array< casacore::BooltIdel_
 
casacore::Vector< casacore::IntlastFld_
 
casacore::Vector< casacore::IntlastObs_
 
CTTIFactoryPtr cttifactoryptr_
 Pointer to the factory to use to create CTTimeInterp1s (or specializations) More...
 

Detailed Description

Definition at line 52 of file CTPatchedInterp.h.

Constructor & Destructor Documentation

casa::CTPatchedInterp::CTPatchedInterp ( NewCalTable ct,
VisCalEnum::MatrixType  mtype,
casacore::Int  nPar,
const casacore::String timetype,
const casacore::String freqtype,
const casacore::String fieldtype,
casacore::Vector< casacore::Int spwmap = casacore::Vectorcasacore::Int >(),
casacore::Vector< casacore::Int fldmap = casacore::Vectorcasacore::Int >(),
const CTTIFactoryPtr  cttifactoryptr = &CTTimeInterp1::factory 
)

From NewCalTable only.

casa::CTPatchedInterp::CTPatchedInterp ( NewCalTable ct,
VisCalEnum::MatrixType  mtype,
casacore::Int  nPar,
const casacore::String timetype,
const casacore::String freqtype,
const casacore::String fieldtype,
const casacore::MeasurementSet ms,
casacore::Vector< casacore::Int spwmap = casacore::Vectorcasacore::Int >(),
const CTTIFactoryPtr  cttifactoryptr = &CTTimeInterp1::factory 
)
casa::CTPatchedInterp::CTPatchedInterp ( NewCalTable ct,
VisCalEnum::MatrixType  mtype,
casacore::Int  nPar,
const casacore::String timetype,
const casacore::String freqtype,
const casacore::String fieldtype,
const casacore::ROMSColumns mscol,
casacore::Vector< casacore::Int spwmap = casacore::Vectorcasacore::Int >(),
const CTTIFactoryPtr  cttifactoryptr = &CTTimeInterp1::factory 
)
virtual casa::CTPatchedInterp::~CTPatchedInterp ( )
virtual

Destructor.

casa::CTPatchedInterp::CTPatchedInterp ( )
inlineprivate

Null ctor does nothing.

Definition at line 120 of file CTPatchedInterp.h.

Member Function Documentation

casacore::Int casa::CTPatchedInterp::blnidx ( const casacore::Int a1,
const casacore::Int a2,
const casacore::Int nAnt 
)
inlineprivate

Baseline index from antenna indices: (assumes a1<=a2 !!)

Definition at line 168 of file CTPatchedInterp.h.

void casa::CTPatchedInterp::calcAltFld ( )
private

void setFldMap(casacore::Vector<casacore::String>& field); // via name matching void setFldMap(casacore::uInt to, casacore::uInt from); // via single to/from

Calculate fldmap redundancy, enabling reuse

casacore::InterpolateArray1D<casacore::Double,casacore::Float>::InterpolationMethod casa::CTPatchedInterp::ftype ( casacore::String strtype)
private

Translate freq axis interpolation string.

casacore::Bool casa::CTPatchedInterp::interpolate ( casacore::Int  obs,
casacore::Int  fld,
casacore::Int  spw,
casacore::Double  time,
casacore::Double  freq = -1.0 
)

Interpolate, given input field, spw, timestamp, & (optionally) freq list returns T if new result (anywhere)

casacore::Bool casa::CTPatchedInterp::interpolate ( casacore::Int  obs,
casacore::Int  fld,
casacore::Int  spw,
casacore::Double  time,
const casacore::Vector< casacore::Double > &  freq 
)
void casa::CTPatchedInterp::makeInterpolators ( )
private
void casa::CTPatchedInterp::resampleFlagsInFreq ( casacore::Vector< casacore::Bool > &  flgout,
const casacore::Vector< casacore::Double > &  fout,
casacore::Vector< casacore::Bool > &  flgin,
const casacore::Vector< casacore::Double > &  fin 
)
private
void casa::CTPatchedInterp::resampleInFreq ( casacore::Matrix< casacore::Float > &  fres,
casacore::Matrix< casacore::Bool > &  fflg,
const casacore::Vector< casacore::Double > &  fout,
casacore::Matrix< casacore::Float > &  tres,
casacore::Matrix< casacore::Bool > &  tflg,
const casacore::Vector< casacore::Double > &  fin 
)
private

Resample in frequency.

casacore::Array<casacore::Complex> casa::CTPatchedInterp::resultC ( casacore::Int  obs,
casacore::Int  fld,
casacore::Int  spw 
)
inline

Definition at line 100 of file CTPatchedInterp.h.

References casa::RIorAPArray::c(), result_, and thisobs().

casacore::Array<casacore::Float>& casa::CTPatchedInterp::resultF ( casacore::Int  obs,
casacore::Int  fld,
casacore::Int  spw 
)
inline

Access to the result.

Definition at line 99 of file CTPatchedInterp.h.

References result_, and thisobs().

casacore::Array<casacore::Bool>& casa::CTPatchedInterp::rflag ( casacore::Int  obs,
casacore::Int  fld,
casacore::Int  spw 
)
inline

Definition at line 101 of file CTPatchedInterp.h.

References resFlag_, and thisobs().

void casa::CTPatchedInterp::setDefAntMap ( )
inlineprivate

void setSpwMap(casacore::Vector<casacore::Double>& refFreqs); // via refFreq matching void setSpwMap(casacore::uInt to, casacore::uInt from); // via single to/from

Antenna default: indgen (index identity)

Definition at line 153 of file CTPatchedInterp.h.

References antMap_, casacore::indgen(), nMSAnt_, and casacore::Vector< T >::resize().

void casa::CTPatchedInterp::setDefFldMap ( )
inlineprivate

Methods to set up 1:1 patch-panel maps Private for now as not yet ready to control from outside Field default: all 0 (no field-dep yet)

Definition at line 134 of file CTPatchedInterp.h.

References fldMap_, nMSFld_, casacore::Vector< T >::resize(), and casacore::Array< T >::set().

void casa::CTPatchedInterp::setDefSpwMap ( )
inlineprivate

Spw default: indgen (index identity)

Definition at line 146 of file CTPatchedInterp.h.

References casacore::indgen(), nMSSpw_, casacore::Vector< T >::resize(), and spwMap_.

void casa::CTPatchedInterp::setElemMap ( )
private

void setAntMap(casacore::Vector<casacore::Int>& ant); // via ordered index list void setAntMap(casacore::Vector<casacore::String>& ant); // via name/station matching void setAntMap(casacore::uInt to, casacore::uInt from); // via single to/from

Set generic antenna/baseline map

void casa::CTPatchedInterp::setFldMap ( const casacore::MSField msfld)
private
void casa::CTPatchedInterp::setFldMap ( const casacore::ROMSFieldColumns fcol)
private
void casa::CTPatchedInterp::setFldMap ( casacore::Vector< casacore::Int > &  fldmap)
private
void casa::CTPatchedInterp::setSpwMap ( casacore::Vector< casacore::Int > &  spwmap)
private
void casa::CTPatchedInterp::sliceTable ( )
private

Setup methods.

casacore::Bool casa::CTPatchedInterp::spwInOK ( casacore::Int  spw) const
casacore::Bool casa::CTPatchedInterp::spwOK ( casacore::Int  spw) const

spwOK info for users

void casa::CTPatchedInterp::state ( )

Const access to various state TBD.

Report state

casacore::Int casa::CTPatchedInterp::thisobs ( casacore::Int  obs)
inlineprivate

Definition at line 128 of file CTPatchedInterp.h.

References byObs_.

Referenced by resultC(), resultF(), rflag(), tresultF(), and tresultFlag().

casacore::Array<casacore::Float>& casa::CTPatchedInterp::tresultF ( casacore::Int  obs,
casacore::Int  fld,
casacore::Int  spw 
)
inline

Temporary public function for testing.

Definition at line 104 of file CTPatchedInterp.h.

References thisobs(), and timeResult_.

casacore::Array<casacore::Bool>& casa::CTPatchedInterp::tresultFlag ( casacore::Int  obs,
casacore::Int  fld,
casacore::Int  spw 
)
inline

Definition at line 105 of file CTPatchedInterp.h.

References thisobs(), and timeResFlag_.

Member Data Documentation

casacore::Vector<casacore::Int> casa::CTPatchedInterp::altFld_
private

Alternate field indices.

Definition at line 213 of file CTPatchedInterp.h.

casacore::Vector<casacore::Int> casa::CTPatchedInterp::antMap_
private

Definition at line 224 of file CTPatchedInterp.h.

Referenced by setDefAntMap().

casacore::Bool casa::CTPatchedInterp::byField_
private

Definition at line 201 of file CTPatchedInterp.h.

casacore::Bool casa::CTPatchedInterp::byObs_
private

Are we slicing caltable by field?

Definition at line 201 of file CTPatchedInterp.h.

Referenced by thisobs().

casacore::Vector<casacore::Bool> casa::CTPatchedInterp::conjTab_
private

Control conjugation of baseline-based solutions when mapping requires.

Definition at line 227 of file CTPatchedInterp.h.

NewCalTable casa::CTPatchedInterp::ct_
private

PRIVATE DATA:

The Caltable

Definition at line 177 of file CTPatchedInterp.h.

casacore::Array<NewCalTable*> casa::CTPatchedInterp::ctSlices_
private

The CalTable slices.

Definition at line 240 of file CTPatchedInterp.h.

CTTIFactoryPtr casa::CTPatchedInterp::cttifactoryptr_
private

Pointer to the factory to use to create CTTimeInterp1s (or specializations)

Definition at line 250 of file CTPatchedInterp.h.

casacore::Vector<casacore::Int> casa::CTPatchedInterp::elemMap_
private

Definition at line 224 of file CTPatchedInterp.h.

casacore::Vector<casacore::Int> casa::CTPatchedInterp::fldMap_
private

The patch panels Each has length from casacore::MS, values refer to CT.

Definition at line 224 of file CTPatchedInterp.h.

Referenced by setDefFldMap().

casacore::Vector<casacore::Vector<casacore::Double> > casa::CTPatchedInterp::freqIn_
private

Definition at line 205 of file CTPatchedInterp.h.

const INTERPMETHOD casa::CTPatchedInterp::freqInterpMethod0_
private

Definition at line 196 of file CTPatchedInterp.h.

INTERPMETHOD casa::CTPatchedInterp::freqInterpMethod_
private

Definition at line 197 of file CTPatchedInterp.h.

casacore::Vector<INTERPMETHOD> casa::CTPatchedInterp::freqInterpMethodVec_
private

Definition at line 198 of file CTPatchedInterp.h.

casacore::Cube<casacore::Cube<casacore::Bool> > casa::CTPatchedInterp::freqResFlag_
private

Definition at line 231 of file CTPatchedInterp.h.

casacore::Cube<casacore::Cube<casacore::Float> > casa::CTPatchedInterp::freqResult_
private

Definition at line 230 of file CTPatchedInterp.h.

casacore::String casa::CTPatchedInterp::freqTypeStr_
private

Definition at line 189 of file CTPatchedInterp.h.

casacore::Bool casa::CTPatchedInterp::isCmplx_
private

Are parameters fundamentally complex?

Definition at line 183 of file CTPatchedInterp.h.

casacore::Vector<casacore::Int> casa::CTPatchedInterp::lastFld_
private

Definition at line 247 of file CTPatchedInterp.h.

casacore::Vector<casacore::Int> casa::CTPatchedInterp::lastObs_
private

Definition at line 247 of file CTPatchedInterp.h.

VisCalEnum::MatrixType casa::CTPatchedInterp::mtype_
private

casacore::Matrix type

Definition at line 180 of file CTPatchedInterp.h.

casacore::Vector<casacore::Int> casa::CTPatchedInterp::nChanIn_
private

CalTable freq axis info.

Definition at line 204 of file CTPatchedInterp.h.

casacore::Int casa::CTPatchedInterp::nCTAnt_
private

Definition at line 217 of file CTPatchedInterp.h.

casacore::Int casa::CTPatchedInterp::nCTElem_
private

Definition at line 217 of file CTPatchedInterp.h.

casacore::Int casa::CTPatchedInterp::nCTFld_
private

Definition at line 217 of file CTPatchedInterp.h.

casacore::Int casa::CTPatchedInterp::nCTObs_
private

Obs, Field, Spw, Ant input (CalTable) sizes patch panels should not violate these (point to larger indices)

Definition at line 217 of file CTPatchedInterp.h.

casacore::Int casa::CTPatchedInterp::nCTSpw_
private

Definition at line 217 of file CTPatchedInterp.h.

casacore::Int casa::CTPatchedInterp::nFPar_
private

Definition at line 186 of file CTPatchedInterp.h.

casacore::Int casa::CTPatchedInterp::nMSAnt_
private

Definition at line 210 of file CTPatchedInterp.h.

Referenced by setDefAntMap().

casacore::Int casa::CTPatchedInterp::nMSElem_
private

Definition at line 210 of file CTPatchedInterp.h.

casacore::Int casa::CTPatchedInterp::nMSFld_
private

Definition at line 210 of file CTPatchedInterp.h.

Referenced by setDefFldMap().

casacore::Int casa::CTPatchedInterp::nMSObs_
private

Obs, Field, Spw, Ant output (casacore::MS) sizes calibration required for up to this many.

Definition at line 210 of file CTPatchedInterp.h.

casacore::Int casa::CTPatchedInterp::nMSSpw_
private

Definition at line 210 of file CTPatchedInterp.h.

Referenced by setDefSpwMap().

casacore::Int casa::CTPatchedInterp::nPar_
private

The number of (casacore::Float) parameters (per-chan, per-element)

Definition at line 186 of file CTPatchedInterp.h.

casacore::Bool casa::CTPatchedInterp::relativeFreq_
private

Relative-to-center interpolation.

Definition at line 192 of file CTPatchedInterp.h.

casacore::Cube<casacore::Cube<casacore::Bool> > casa::CTPatchedInterp::resFlag_
private

Definition at line 237 of file CTPatchedInterp.h.

Referenced by rflag().

casacore::Cube<casacore::Cube<casacore::Float> > casa::CTPatchedInterp::result_
private

Current interpolation result Arrays These will reference time or freq result, depending on context, and may be referenced by external code.

Definition at line 236 of file CTPatchedInterp.h.

Referenced by resultC(), and resultF().

casacore::Vector<casacore::Bool> casa::CTPatchedInterp::spwInOK_
private

OK flag.

Definition at line 220 of file CTPatchedInterp.h.

casacore::Vector<casacore::Int> casa::CTPatchedInterp::spwMap_
private

Definition at line 224 of file CTPatchedInterp.h.

Referenced by setDefSpwMap().

casacore::Array<CTTimeInterp1*> casa::CTPatchedInterp::tI_
private

The pre-patched casacore::Time interpolation engines These are populated by the available caltables slices.

Definition at line 244 of file CTPatchedInterp.h.

casacore::Array<casacore::Bool> casa::CTPatchedInterp::tIdel_
private

Definition at line 245 of file CTPatchedInterp.h.

casacore::Cube<casacore::Cube<casacore::Bool> > casa::CTPatchedInterp::timeResFlag_
private

Definition at line 231 of file CTPatchedInterp.h.

Referenced by tresultFlag().

casacore::Cube<casacore::Cube<casacore::Float> > casa::CTPatchedInterp::timeResult_
private

Internal result Arrays.

Definition at line 230 of file CTPatchedInterp.h.

Referenced by tresultF().

casacore::String casa::CTPatchedInterp::timeType_
private

Interpolation modes.

Definition at line 189 of file CTPatchedInterp.h.


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