39 #ifndef _SYNTHESIS_SINGLEDISH_SKY_CAL_H_
40 #define _SYNTHESIS_SINGLEDISH_SKY_CAL_H_
291 template<
class ScalingScheme>
309 template<
class Accessor>
344 std::map<std::pair<casacore::Int, casacore::Int>, std::map<casacore::Int, casacore::Matrix<casacore::Double> > >
wtScaleData_;
virtual casacore::Bool useGenericGatherForSolve()
Use generic data gathering mechanism for solve.
casacore::Float fraction_
Edge detection parameters for otf mode.
const casacore::MeasurementSet & msSel_
casacore::MeasurementSet filtered with user-specified selection
virtual casacore::MeasurementSet selectMS(casacore::MeasurementSet const &ms)=0
arrange data selection according to calibration mode
std::map< std::pair< casacore::Int, casacore::Int >, std::map< casacore::Int, casacore::Matrix< casacore::Double > > > wtScaleData_
list of timestamps and intervals for each observation, spw, and antenna as a nested map with key obsI...
virtual casacore::Int nPar()
Number of pars per ant/bln virtual casacore::Int nPar() { return nCorr_[currSpw()]; }...
virtual ~SingleDishPositionSwitchCal()
Destructor.
virtual Type type()
Return the type of this calibration matrix (actual type of derived class).
virtual casacore::MeasurementSet selectMS(casacore::MeasurementSet const &ms)
data selection specific to otfraster mode
virtual casacore::Int nCalMat()
Number of Calibration matrices on ant/bln axis.
casacore::Vector< casacore::Double > interval_
void updateWt2(casacore::Matrix< casacore::Float > &weight, const casacore::Int &antenna1)
void apply(const Jones &j1, VisVector &v, const Jones &j2)
Apply a pair of Jones to a VisVector:
virtual casacore::MeasurementSet selectMS(casacore::MeasurementSet const &ms)
casacore::Data selection specific to otf mode
void traverseMS(casacore::MeasurementSet const &ms)
Fill caltable by traversing MS Accessor is responsible for accessing data stored either in DATA or FL...
virtual casacore::String longTypeName()
SingleDishPositionSwitchCal(VisSet &vs)
Constructor.
CalVisBuffer extends VisBuffer to support storage and recall of associated residual and differentiate...
SingleDishRasterCal(VisSet &vs)
Constructor.
void calcWtScale()
Perform weight scale calculation (specializable)
virtual casacore::String longTypeName()
casacore::PtrBlock< casacore::Cube< casacore::Bool > * > currentSkyOK_
virtual void diffSrc(VisBuffer &vb, casacore::Array< casacore::Complex > &dV)
Differentiate VB model w.r.t.
virtual void selfGatherAndSolve(VisSet &vs, VisEquation &ve)
Self- gather and/or solve prototypes (triggered by useGenericGatherForSolve=F or useGenericSolveOne=F...
SingleDishOtfCal(VisSet &vs)
Constructor.
virtual casacore::String longTypeName()
virtual void setApply()
Set the application parameters.
virtual casacore::MeasurementSet selectMS(casacore::MeasurementSet const &ms)
data selection for position switch calibration
virtual void listCal(const casacore::Vector< casacore::Int > ufldids, const casacore::Vector< casacore::Int > uantids, const casacore::Matrix< casacore::Int > uchanids, const casacore::String &listfile="", const casacore::Int &pagerows=50)
Report state:
virtual casacore::String typeName()
Return type name as string (ditto)
VisVector & V()
Access to matrix renderings of Visibilities.
virtual casacore::String typeName()
Return type name as string (ditto)
virtual void guessPar(VisBuffer &vb)
Hazard a guess at the parameters (solveCPar) given the data.
casacore::PtrBlock< casacore::Cube< casacore::Complex > * > currentSky_
Current Sky spectra.
SkyCal< casacore::Float, casacore::Float > & engineF()
virtual void differentiate(CalVisBuffer &cvb)
Differentiate VB model w.r.t.
SingleDishSkyCal(VisSet &vs)
Constructor.
virtual void applyCal(VisBuffer &vb, casacore::Cube< casacore::Complex > &Vout, casacore::Bool trial=false)
Row-by-row apply to a casacore::Cube<casacore::Complex> (generic)
struct casa::SolvableVisCal::fluxScaleStruct fluxScaleStruct
virtual VisCalEnum::VCParType parType()
Return the parameter type so far single dish calibration is real.
virtual void applyCal2(vi::VisBuffer2 &vb, casacore::Cube< casacore::Complex > &Vout, casacore::Cube< casacore::Float > &Wout, casacore::Bool trial=false)
casacore::PtrBlock< SkyCal< casacore::Complex, casacore::Complex > * > engineC_
Single Dish Calibration algebra wrapper (per Spw)
Type
Allowed types of VisCal matrices - 'correct' order enum Type{UVMOD,Mf,M,K,B,G,D,C,E,P,T,EP,F}; enum Type{Test=0,ANoise,M,KAntPos,K,B,G,J,D,X,C,P,E,T,F,A,ALL};.
virtual casacore::Bool normalizable()
Does normalization by MODEL_DATA commute with this VisCal? (if so, permits pre-solve time-averaging) ...
virtual casacore::String typeName()
Return type name as string (ditto)
LatticeExprNode amp(const LatticeExprNode &left, const LatticeExprNode &right)
This function finds sqrt(left^2+right^2).
virtual void keepNCT()
New CalTable handling.
A hierarchical collection of named fields of various types.
bool Bool
Define the standard types used by Casacore.
casacore::Cube< casacore::Bool > & currentSkyOK()
virtual ~SingleDishSkyCal()
Destructor.
casacore::Float pixel_scale_
virtual Mueller::MuellerType muellerType()
Mueller matrix type (must be implemented in Mueller specializations!)
virtual void syncWtScale()
Synchronize weight scale factors.
casacore::Int & currSpw()
Current in-focus spw.
casacore::PtrBlock< SkyCal< casacore::Float, casacore::Float > * > engineF_
virtual ~SingleDishRasterCal()
Destructor.
A drop-in replacement for Block<T*>.
casacore::Int currAnt_
current antenna
virtual VisCalEnum::MatrixType matrixType()
Return casacore::Matrix type single dish calibration is antenna-based.
SkyCal< casacore::Complex, casacore::Complex > & engineC()
A Table intended to hold astronomical data (a set of Measurements).
virtual void syncMeta2(const vi::VisBuffer2 &vb)
overwride syncMeta2
casacore::Vector< casacore::Int > nCorr_
number of correlations per spw
virtual casacore::Bool freqDepPar()
In general, we are freq-dep.
virtual void reReference()
Apply refant (implemented in SVJ)
virtual ~SingleDishOtfCal()
SingleDishOtfCal(const MSMetaInfoForCal& msmc); // preferred ctor ****ctor needs an MS! Renaud: disab...
virtual void fluxscale(const casacore::String &outfile, const casacore::Vector< casacore::Int > &refFieldIn, const casacore::Vector< casacore::Int > &tranFieldIn, const casacore::Vector< casacore::Int > &inRefSpwMap, const casacore::Vector< casacore::String > &fldNames, const casacore::Float &inGainThres, const casacore::String &antSel, const casacore::String &timerangeSel, const casacore::String &scanSel, fluxScaleStruct &oFluxScaleStruct, const casacore::String &oListFile, const casacore::Bool &incremental, const casacore::Int &fitorder, const casacore::Bool &display)
Determine and apply flux density scaling.
virtual casacore::String longTypeName()
VisBuffer2s encapsulate one chunk of visibility data for processing.
casacore::Cube< casacore::Complex > & currentSky()
access to current calibration data
virtual void invalidateCalMat()
Invalidate cal matrices generically.
const MSMetaInfoForCal & msmc() const
Access to the MSMetaInfoForCal (throws if none)
casacore::Vector< T > solve(const casacore::Matrix< T > &A, const casacore::Vector< T > &y, double &ferr, double &berr)
Given a matrix "A", and given some vector "y" which is the right hand side of the equation "Ax=y"...
String: the storage and methods of handling collections of characters.
VisBuffers encapsulate one chunk of visibility data for processing.
virtual casacore::Bool trivialMuellerElem()
Are the parameters the matrix elements? (or is a non-trivial calculation required?) (Must be implemented in specializations!)
casacore::Float fraction_
edge detection parameter for otfraster mode
virtual void setSolve()
Set the solving parameters.
virtual casacore::Int nTotalPar()
Total number of (complex) parameters per solve (specialize to jive with ant- or bln-basedness, etc.)
virtual void accumulate(SolvableVisCal *incr, const casacore::Vector< casacore::Int > &fields)
Accumulate another VisCal onto this one.
virtual void syncCalMat(const casacore::Bool &doInv=false)
Sync matrices generically for current meta data.
virtual void syncDiffMat()
Synchronize the differentiated calibration.
virtual casacore::Int & nElem()
The number of sets of parameters under consideration This states size of third axis of SolveAllRPar...
virtual casacore::Float calcPowerNorm(casacore::Array< casacore::Float > &, const casacore::Array< casacore::Bool > &ok)
Normalize a (complex) solution array (generic)
virtual void invalidateDiffCalMat()
Invalidate diff cal matrices generically.
virtual void initSolvePar()
Initialize solve parameters (shape)
virtual casacore::String typeName()
Return type name as string (ditto)