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::CLPatchPanel Class Reference

#include <CLPatchPanel.h>

Public Member Functions

 CLPatchPanel (const casacore::String &ctname, const casacore::Record &callib, VisCalEnum::MatrixType mtype, casacore::Int nPar, const CTTIFactoryPtr cttifactoryptr=&CTTimeInterp1::factory)
 From caltable name and casacore::MS shapes. More...
 
 CLPatchPanel (const casacore::String &ctname, const casacore::MeasurementSet &ms, const casacore::Record &callib, VisCalEnum::MatrixType mtype, casacore::Int nPar, const CTTIFactoryPtr cttifactoryptr=&CTTimeInterp1::factory)
 From caltable name and (selected) casacore::MS. More...
 
virtual ~CLPatchPanel ()
 Destructor. More...
 
casacore::Bool calAvailable (casacore::Int obs, casacore::Int fld, casacore::Int ent, casacore::Int spw, casacore::Int ant=-1)
 Is specific calibration explicitly available for a obs,fld,intent,spw,ant combination? More...
 
casacore::Bool MSIndicesOK (casacore::Int obs, casacore::Int fld, casacore::Int ent, casacore::Int spw, casacore::Int ant=-1)
 Are specified indices OK for this CL (i.e., not explicitly marked as expected but absent) Will be calibrated if calAvailable=true, will be ignored if calAvailable()=false. More...
 
casacore::Bool interpolate (casacore::Cube< casacore::Complex > &resultC, casacore::Cube< casacore::Bool > &resFlag, casacore::Int obs, casacore::Int fld, casacore::Int ent, casacore::Int spw, casacore::Double time, casacore::Double freq=-1.0)
 Interpolate, given input obs, field, intent, spw, timestamp, & (optionally) freq returns T if new result (anywhere,anyhow) For casacore::Complex params (calls casacore::Float version) More...
 
casacore::Bool interpolate (casacore::Cube< casacore::Float > &resultR, casacore::Cube< casacore::Bool > &resFlag, casacore::Int obs, casacore::Int fld, casacore::Int ent, casacore::Int spw, casacore::Double time, casacore::Double freq=-1.0)
 For casacore::Float params. More...
 
casacore::Bool interpolate (casacore::Cube< casacore::Complex > &resultC, casacore::Cube< casacore::Bool > &resFlag, casacore::Int obs, casacore::Int fld, casacore::Int ent, casacore::Int spw, casacore::Double time, const casacore::Vector< casacore::Double > &freq)
 Interpolate, given input obs, field, intent, spw, timestamp, & freq list This is for freqdep interpolation context returns T if new result (anywhere,anyhow) For casacore::Complex params (calls casacore::Float version) More...
 
casacore::Bool interpolate (casacore::Cube< casacore::Float > &resultR, casacore::Cube< casacore::Bool > &resFlag, casacore::Int obs, casacore::Int fld, casacore::Int ent, casacore::Int spw, casacore::Double time, const casacore::Vector< casacore::Double > &freq)
 For casacore::Float params. More...
 
casacore::Bool getTresult (casacore::Cube< casacore::Float > &resultR, casacore::Cube< casacore::Bool > &resFlag, casacore::Int obs, casacore::Int fld, casacore::Int ent, casacore::Int spw)
 Const access to various state TBD. More...
 
const casacore::Vector
< casacore::Double > & 
freqIn (casacore::Int spw)
 Access to CalTable's freq info. More...
 
const casacore::Vector
< casacore::Double > & 
refFreqIn ()
 
void listmappings ()
 Report state. More...
 
void state ()
 
casacore::String CTCASAvers ()
 CASA version of the internal caltable. More...
 

Private Member Functions

 CLPatchPanel ()
 Null ctor does nothing. More...
 
void selectOnCTorMS (casacore::Table &ctout, casacore::MSSelectableTable &msst, const casacore::String &obs, const casacore::String &fld, const casacore::String &ent, const casacore::String &spw, const casacore::String &ant, const casacore::String &taql)
 Methods to support layered selection. More...
 
void selectOnMS (casacore::MeasurementSet &msout, const casacore::MeasurementSet &msin, const casacore::String &obs, const casacore::String &fld, const casacore::String &ent, const casacore::String &spw, const casacore::String &ant)
 
void selectOnCT (NewCalTable &ctout, const NewCalTable &ctin, const casacore::String &obs, const casacore::String &fld, const casacore::String &spw, const casacore::String &ant1)
 
casacore::Vector< casacore::IntgetCLuniqueObsIds (NewCalTable &ct)
 Extract unique indices from caltables. More...
 
casacore::Vector< casacore::IntgetCLuniqueFldIds (NewCalTable &ct)
 
casacore::Vector< casacore::IntgetCLuniqueSpwIds (NewCalTable &ct)
 
casacore::Vector< casacore::IntgetCLuniqueIds (NewCalTable &ct, casacore::String vcol)
 
casacore::Vector< casacore::IntgetMSuniqueIds (casacore::MeasurementSet &ms, casacore::String vcol)
 Extract unique indices (net selected) from MS. 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, casacore::String finterp)
 Set generic antenna/baseline map void setElemMap();. 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::String finterp)
 
casacore::InterpolateArray1D
< casacore::Double,
casacore::Float >
::InterpolationMethod 
ftype (casacore::String &strtype)
 Baseline index from antenna indices: (assumes a1<=a2 !!) inline casacore::Int blnidx(const casacore::Int& a1, const casacore::Int& a2, const casacore::Int& nAnt) { return a1*nAnt-a1*(a1+1)/2+a2; };. More...
 
void recordBadMSIndices (const casacore::Vector< casacore::Int > &obs, const casacore::Vector< casacore::Int > &fld, const casacore::Vector< casacore::Int > &ent, const casacore::Vector< casacore::Int > &spw)
 

Private Attributes

NewCalTable ct_
 PRIVATE DATA: More...
 
NewCalTable ctasms_
 
casacore::MeasurementSet ms_
 Associated (selected) MS. 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::Vector< casacore::IntnChanIn_
 casacore::InterpolateArray1D<casacore::Double,casacore::Float>::InterpolationMethod ia1dmethod_; More...
 
casacore::Vector
< casacore::Vector
< casacore::Double > > 
freqIn_
 
casacore::Vector
< casacore::Double
refFreqIn_
 
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::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_
 
std::map< CTCalPatchKey,
CLPPResult
clTres_
 Maps. More...
 
std::map< CTCalPatchKey,
casacore::String
ciname_
 
std::map< CTCalPatchKey,
CTTimeInterp1 * > 
ci_
 
std::map< MSCalPatchKey,
CLPPResult
msTres_
 
std::map< MSCalPatchKey,
CLPPResult
msFres_
 
std::map< MSCalPatchKey,
casacore::String
msciname_
 
std::map< MSCalPatchKey,
casacore::String
badmsciname_
 
std::map< MSCalPatchKey,
casacore::Int
ctspw_
 
std::map< MSCalPatchKey,
casacore::String
finterp_
 
std::map< MSCalPatchKey,
CTTimeInterp1 * > 
msci_
 
casacore::Vector
< casacore::Float * > 
lastresadd_
 Keep track of last cal result address (per spw) More...
 
casacore::Cube< casacore::Floatresult_
 Control conjugation of baseline-based solutions when mapping requires casacore::Vector<casacore::Bool> conjTab_;. More...
 
casacore::Cube< casacore::BoolresFlag_
 
casacore::LogIO logsink_
 
CTTIFactoryPtr cttifactoryptr_
 The factory to use to create CTTimeInterp1s. More...
 

Detailed Description

Definition at line 220 of file CLPatchPanel.h.

Constructor & Destructor Documentation

casa::CLPatchPanel::CLPatchPanel ( const casacore::String ctname,
const casacore::Record callib,
VisCalEnum::MatrixType  mtype,
casacore::Int  nPar,
const CTTIFactoryPtr  cttifactoryptr = &CTTimeInterp1::factory 
)

From caltable name and casacore::MS shapes.

casa::CLPatchPanel::CLPatchPanel ( const casacore::String ctname,
const casacore::MeasurementSet ms,
const casacore::Record callib,
VisCalEnum::MatrixType  mtype,
casacore::Int  nPar,
const CTTIFactoryPtr  cttifactoryptr = &CTTimeInterp1::factory 
)

From caltable name and (selected) casacore::MS.

virtual casa::CLPatchPanel::~CLPatchPanel ( )
virtual

Destructor.

casa::CLPatchPanel::CLPatchPanel ( )
inlineprivate

Null ctor does nothing.

Definition at line 293 of file CLPatchPanel.h.

Member Function Documentation

casacore::Bool casa::CLPatchPanel::calAvailable ( casacore::Int  obs,
casacore::Int  fld,
casacore::Int  ent,
casacore::Int  spw,
casacore::Int  ant = -1 
)

Is specific calibration explicitly available for a obs,fld,intent,spw,ant combination?

casacore::String casa::CLPatchPanel::CTCASAvers ( )
inline

CASA version of the internal caltable.

Definition at line 288 of file CLPatchPanel.h.

References casa::NewCalTable::CASAvers(), and ct_.

const casacore::Vector<casacore::Double>& casa::CLPatchPanel::freqIn ( casacore::Int  spw)
inline

Access to CalTable's freq info.

Definition at line 280 of file CLPatchPanel.h.

References freqIn_.

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

Baseline index from antenna indices: (assumes a1<=a2 !!) inline casacore::Int blnidx(const casacore::Int& a1, const casacore::Int& a2, const casacore::Int& nAnt) { return a1*nAnt-a1*(a1+1)/2+a2; };.

Translate freq axis interpolation string

casacore::Vector<casacore::Int> casa::CLPatchPanel::getCLuniqueFldIds ( NewCalTable ct)
inlineprivate

Definition at line 313 of file CLPatchPanel.h.

References getCLuniqueIds().

casacore::Vector<casacore::Int> casa::CLPatchPanel::getCLuniqueIds ( NewCalTable ct,
casacore::String  vcol 
)
private
casacore::Vector<casacore::Int> casa::CLPatchPanel::getCLuniqueObsIds ( NewCalTable ct)
inlineprivate

Extract unique indices from caltables.

Definition at line 312 of file CLPatchPanel.h.

References getCLuniqueIds().

casacore::Vector<casacore::Int> casa::CLPatchPanel::getCLuniqueSpwIds ( NewCalTable ct)
inlineprivate

Definition at line 314 of file CLPatchPanel.h.

References getCLuniqueIds().

casacore::Vector<casacore::Int> casa::CLPatchPanel::getMSuniqueIds ( casacore::MeasurementSet ms,
casacore::String  vcol 
)
private

Extract unique indices (net selected) from MS.

casacore::Bool casa::CLPatchPanel::getTresult ( casacore::Cube< casacore::Float > &  resultR,
casacore::Cube< casacore::Bool > &  resFlag,
casacore::Int  obs,
casacore::Int  fld,
casacore::Int  ent,
casacore::Int  spw 
)

Const access to various state TBD.

casacore::Bool casa::CLPatchPanel::interpolate ( casacore::Cube< casacore::Complex > &  resultC,
casacore::Cube< casacore::Bool > &  resFlag,
casacore::Int  obs,
casacore::Int  fld,
casacore::Int  ent,
casacore::Int  spw,
casacore::Double  time,
casacore::Double  freq = -1.0 
)

Interpolate, given input obs, field, intent, spw, timestamp, & (optionally) freq returns T if new result (anywhere,anyhow) For casacore::Complex params (calls casacore::Float version)

casacore::Bool casa::CLPatchPanel::interpolate ( casacore::Cube< casacore::Float > &  resultR,
casacore::Cube< casacore::Bool > &  resFlag,
casacore::Int  obs,
casacore::Int  fld,
casacore::Int  ent,
casacore::Int  spw,
casacore::Double  time,
casacore::Double  freq = -1.0 
)

For casacore::Float params.

casacore::Bool casa::CLPatchPanel::interpolate ( casacore::Cube< casacore::Complex > &  resultC,
casacore::Cube< casacore::Bool > &  resFlag,
casacore::Int  obs,
casacore::Int  fld,
casacore::Int  ent,
casacore::Int  spw,
casacore::Double  time,
const casacore::Vector< casacore::Double > &  freq 
)

Interpolate, given input obs, field, intent, spw, timestamp, & freq list This is for freqdep interpolation context returns T if new result (anywhere,anyhow) For casacore::Complex params (calls casacore::Float version)

casacore::Bool casa::CLPatchPanel::interpolate ( casacore::Cube< casacore::Float > &  resultR,
casacore::Cube< casacore::Bool > &  resFlag,
casacore::Int  obs,
casacore::Int  fld,
casacore::Int  ent,
casacore::Int  spw,
casacore::Double  time,
const casacore::Vector< casacore::Double > &  freq 
)

For casacore::Float params.

void casa::CLPatchPanel::listmappings ( )

Report state.

casacore::Bool casa::CLPatchPanel::MSIndicesOK ( casacore::Int  obs,
casacore::Int  fld,
casacore::Int  ent,
casacore::Int  spw,
casacore::Int  ant = -1 
)

Are specified indices OK for this CL (i.e., not explicitly marked as expected but absent) Will be calibrated if calAvailable=true, will be ignored if calAvailable()=false.

void casa::CLPatchPanel::recordBadMSIndices ( const casacore::Vector< casacore::Int > &  obs,
const casacore::Vector< casacore::Int > &  fld,
const casacore::Vector< casacore::Int > &  ent,
const casacore::Vector< casacore::Int > &  spw 
)
private
const casacore::Vector<casacore::Double>& casa::CLPatchPanel::refFreqIn ( )
inline

Definition at line 281 of file CLPatchPanel.h.

References refFreqIn_.

void casa::CLPatchPanel::resampleFlagsInFreq ( casacore::Vector< casacore::Bool > &  flgout,
const casacore::Vector< casacore::Double > &  fout,
casacore::Vector< casacore::Bool > &  flgin,
const casacore::Vector< casacore::Double > &  fin,
casacore::String  finterp 
)
private
void casa::CLPatchPanel::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,
casacore::String  finterp 
)
private

Set generic antenna/baseline map void setElemMap();.

Resample in frequency

void casa::CLPatchPanel::selectOnCT ( NewCalTable ctout,
const NewCalTable ctin,
const casacore::String obs,
const casacore::String fld,
const casacore::String spw,
const casacore::String ant1 
)
private
void casa::CLPatchPanel::selectOnCTorMS ( casacore::Table ctout,
casacore::MSSelectableTable msst,
const casacore::String obs,
const casacore::String fld,
const casacore::String ent,
const casacore::String spw,
const casacore::String ant,
const casacore::String taql 
)
private

Methods to support layered selection.

void casa::CLPatchPanel::selectOnMS ( casacore::MeasurementSet msout,
const casacore::MeasurementSet msin,
const casacore::String obs,
const casacore::String fld,
const casacore::String ent,
const casacore::String spw,
const casacore::String ant 
)
private
void casa::CLPatchPanel::state ( )

Member Data Documentation

std::map<MSCalPatchKey,casacore::String> casa::CLPatchPanel::badmsciname_
private

Definition at line 383 of file CLPatchPanel.h.

std::map<CTCalPatchKey,CTTimeInterp1*> casa::CLPatchPanel::ci_
private

Definition at line 378 of file CLPatchPanel.h.

std::map<CTCalPatchKey,casacore::String> casa::CLPatchPanel::ciname_
private

Definition at line 377 of file CLPatchPanel.h.

std::map<CTCalPatchKey,CLPPResult> casa::CLPatchPanel::clTres_
private

Maps.

Definition at line 376 of file CLPatchPanel.h.

NewCalTable casa::CLPatchPanel::ct_
private

PRIVATE DATA:

The Caltable

Definition at line 346 of file CLPatchPanel.h.

Referenced by CTCASAvers().

NewCalTable casa::CLPatchPanel::ctasms_
private

Definition at line 346 of file CLPatchPanel.h.

std::map<MSCalPatchKey,casacore::Int> casa::CLPatchPanel::ctspw_
private

Definition at line 384 of file CLPatchPanel.h.

CTTIFactoryPtr casa::CLPatchPanel::cttifactoryptr_
private

The factory to use to create CTTimeInterp1s.

Definition at line 401 of file CLPatchPanel.h.

std::map<MSCalPatchKey,casacore::String> casa::CLPatchPanel::finterp_
private

Definition at line 385 of file CLPatchPanel.h.

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

Definition at line 364 of file CLPatchPanel.h.

Referenced by freqIn().

casacore::Bool casa::CLPatchPanel::isCmplx_
private

Are parameters fundamentally complex?

Definition at line 355 of file CLPatchPanel.h.

casacore::Vector<casacore::Float*> casa::CLPatchPanel::lastresadd_
private

Keep track of last cal result address (per spw)

Definition at line 389 of file CLPatchPanel.h.

casacore::LogIO casa::CLPatchPanel::logsink_
private

Definition at line 398 of file CLPatchPanel.h.

casacore::MeasurementSet casa::CLPatchPanel::ms_
private

Associated (selected) MS.

Definition at line 349 of file CLPatchPanel.h.

std::map<MSCalPatchKey,CTTimeInterp1*> casa::CLPatchPanel::msci_
private

Definition at line 386 of file CLPatchPanel.h.

std::map<MSCalPatchKey,casacore::String> casa::CLPatchPanel::msciname_
private

Definition at line 382 of file CLPatchPanel.h.

std::map<MSCalPatchKey,CLPPResult> casa::CLPatchPanel::msFres_
private

Definition at line 381 of file CLPatchPanel.h.

std::map<MSCalPatchKey,CLPPResult> casa::CLPatchPanel::msTres_
private

Definition at line 381 of file CLPatchPanel.h.

VisCalEnum::MatrixType casa::CLPatchPanel::mtype_
private

casacore::Matrix type

Definition at line 352 of file CLPatchPanel.h.

casacore::Vector<casacore::Int> casa::CLPatchPanel::nChanIn_
private
casacore::Int casa::CLPatchPanel::nCTAnt_
private

Definition at line 373 of file CLPatchPanel.h.

casacore::Int casa::CLPatchPanel::nCTElem_
private

Definition at line 373 of file CLPatchPanel.h.

casacore::Int casa::CLPatchPanel::nCTFld_
private

Definition at line 373 of file CLPatchPanel.h.

casacore::Int casa::CLPatchPanel::nCTObs_
private

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

Definition at line 373 of file CLPatchPanel.h.

casacore::Int casa::CLPatchPanel::nCTSpw_
private

Definition at line 373 of file CLPatchPanel.h.

casacore::Int casa::CLPatchPanel::nFPar_
private

Definition at line 358 of file CLPatchPanel.h.

casacore::Int casa::CLPatchPanel::nMSAnt_
private

Definition at line 369 of file CLPatchPanel.h.

casacore::Int casa::CLPatchPanel::nMSElem_
private

Definition at line 369 of file CLPatchPanel.h.

casacore::Int casa::CLPatchPanel::nMSFld_
private

Definition at line 369 of file CLPatchPanel.h.

casacore::Int casa::CLPatchPanel::nMSObs_
private

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

Definition at line 369 of file CLPatchPanel.h.

casacore::Int casa::CLPatchPanel::nMSSpw_
private

Definition at line 369 of file CLPatchPanel.h.

casacore::Int casa::CLPatchPanel::nPar_
private

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

Definition at line 358 of file CLPatchPanel.h.

casacore::Vector<casacore::Double> casa::CLPatchPanel::refFreqIn_
private

Definition at line 365 of file CLPatchPanel.h.

Referenced by refFreqIn().

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

Definition at line 396 of file CLPatchPanel.h.

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

Control conjugation of baseline-based solutions when mapping requires casacore::Vector<casacore::Bool> conjTab_;.

Definition at line 395 of file CLPatchPanel.h.


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