27 #ifndef SYNTHESIS_CALIBRATER_H
28 #define SYNTHESIS_CALIBRATER_H
53 class MSMetaInfoForCal;
OldCalibrater & operator=(const OldCalibrater &)
virtual casacore::Bool genericGatherAndSolve()
The standard solving mechanism.
Calibrater & operator=(const Calibrater &)
void fluxscale(const casacore::String &infile, const casacore::String &outfile, const casacore::String &refFields, const casacore::Vector< casacore::Int > &refSpwMap, const casacore::String &tranFields, const casacore::Bool &append, const casacore::Float &inGainThres, const casacore::String &antSel, const casacore::String &timerangeSel, const casacore::String &scanSel, SolvableVisCal::fluxScaleStruct &oFluxScaleFactor, casacore::Vector< casacore::Int > &tranidx, const casacore::String &oListFile, const casacore::Bool &incremental, const casacore::Int &fitorder, const casacore::Bool &display)
Fluxscale (using casacore::MSSelection syntax for fields)
virtual casacore::Bool ok()
Returns true if calibrator object is in a valid state.
virtual casacore::Bool initCalSet(const casacore::Int &)
Re-initialize the calibration scratch columns.
MSMetaInfoForCal * msmc_p
Meta-info server for calibration.
Calibrater()
Default constructor.
virtual void fluxscale(const casacore::String &infile, const casacore::String &outfile, const casacore::Vector< casacore::Int > &refField, const casacore::Vector< casacore::Int > &refSpwMap, const casacore::Vector< casacore::Int > &tranField, const casacore::Bool &append, const casacore::Float &inGainThres, const casacore::String &antSel, const casacore::String &timerangeSel, const casacore::String &scanSel, SolvableVisCal::fluxScaleStruct &oFluxScaleFactor, const casacore::String &oListFile, const casacore::Bool &incremental, const casacore::Int &fitorder, const casacore::Bool &display)
Fluxscale (via field indices) NB: uses *vs_p to make SVCs.
virtual void selectvis(const casacore::String &time="", const casacore::String &spw="", const casacore::String &scan="", const casacore::String &field="", const casacore::String &intent="", const casacore::String &obsIDs="", const casacore::String &baseline="", const casacore::String &uvrange="", const casacore::String &chanmode="none", const casacore::Int &nchan=1, const casacore::Int &start=0, const casacore::Int &step=1, const casacore::MRadialVelocity &mStart=casacore::MRadialVelocity(), const casacore::MRadialVelocity &mStep=casacore::MRadialVelocity(), const casacore::String &msSelect="")
Set uv-data selection via MSSelection.
casacore::Bool setmodel(const casacore::String &modelImage)
casacore::Bool state()
Report apply/solve state.
virtual void specifycal(const casacore::String &type, const casacore::String &caltable, const casacore::String &time, const casacore::String &spw, const casacore::String &antenna, const casacore::String &pol, const casacore::Vector< casacore::Double > ¶meter, const casacore::String &infile, const casacore::Bool &uniform)
Generate cal table from specified values.
virtual casacore::Bool reRefant(const casacore::String &infile, casacore::String &outfile, const casacore::String &refantmode, const casacore::String &refant)
Apply new reference antenna to calibration.
Main interface class to a read/write table.
casacore::Bool unsetsolve()
TBD: casacore::Bool unsetapply(const casacore::String& type); // by type?
virtual casacore::Bool genericGatherAndSolve()
The standard solving mechanism (VI2/SDB version)
void getRawPhaseVisSet(casacore::Vector< casacore::Int > &spwid)
Create a VisSet for raw phase transfer if needed.
casacore::Bool unsetapply(const casacore::Int &which=-1)
Unset all (default) or one apply calibration component.
casacore::Vector< casacore::Int > getRefantIdxList(const casacore::String &refant)
Interpret refant index.
const Double degree
degree
casacore::Bool cleanupVisSet()
void apply(const Jones &j1, VisVector &v, const Jones &j2)
Apply a pair of Jones to a VisVector:
casacore::Record calFilterConfig_p
configuration for calibration dependent data filter
virtual casacore::Bool listCal(const casacore::String &infile, const casacore::String &field, const casacore::String &antenna, const casacore::String &spw, const casacore::String &listfile="", const casacore::Int &pagerows=50)
casacore::List a calibration table
virtual void selectvis(const casacore::String &time="", const casacore::String &spw="", const casacore::String &scan="", const casacore::String &field="", const casacore::String &intent="", const casacore::String &obsIDs="", const casacore::String &baseline="", const casacore::String &uvrange="", const casacore::String &chanmode="none", const casacore::Int &nchan=1, const casacore::Int &start=0, const casacore::Int &step=1, const casacore::MRadialVelocity &mStart=casacore::MRadialVelocity(), const casacore::MRadialVelocity &mStep=casacore::MRadialVelocity(), const casacore::String &msSelect="")
Set uv-data selection via MSSelection.
virtual Type type()
Return the type enum.
virtual ~Calibrater()
Destructor.
std::shared_ptr< vi::FrequencySelections > frequencySelections_p
casacore::Bool setsolve(const casacore::String &type, const casacore::String &solint, const casacore::String &table, const casacore::Bool append, const casacore::Double preavg, const casacore::String &apmode="AP", const casacore::Int minblperant=4, const casacore::String &refant="", const casacore::String &refantmode="flex", const casacore::Bool solnorm=false, const casacore::String &normtype="mean", const casacore::Float minsnr=0.0f, const casacore::String &combine="", const casacore::Int fillgaps=0, const casacore::String &cfcache="", const casacore::Double painc=360.0, const casacore::Int fitorder=0, const casacore::Float fraction=0.1, const casacore::Int numedge=-1, const casacore::String &radius="", const casacore::Bool smooth=true, const casacore::Bool zerorates=false, const casacore::Bool globalsolve=true, const casacore::Int niter=100, const casacore::Vector< casacore::Double > &delaywindow=casacore::Vector< casacore::Double >(), const casacore::Vector< casacore::Double > &ratewindow=casacore::Vector< casacore::Double >(), const casacore::String &solmode="", const casacore::Vector< casacore::Double > &rmsthresh=casacore::Vector< casacore::Double >())
Arrange to solve (using casacore::MSSelection syntax)
virtual casacore::Bool correct(casacore::String)
Apply all setapply'd calibration components to DATA and deposit in the CORRECTED_DATA column...
casacore::Bool usingCalLibrary_
ABSTRACT TOOL CLASSES A PlotTool is a higher level event handler for a PlotCanvas The idea is to take common tasks which may require multiple events and put them in one place PlotTools also provide additional functionality in that they can be active and blocking non blocking The PlotCanvas will only send events to active and will not send events to later tools or event handlers if the latest tool was blocking In this way a single tool can be used to handle ALL user interaction via the GUI at one time
VisEquation * ve_p
VisEquation derived from the input MeasurementSet.
casacore::Bool initWeights(casacore::String wtmode, casacore::Bool dowtsp=false)
Initialize sigma/weight, and possibly weight_spectrum.
virtual void specifycal(const casacore::String &type, const casacore::String &caltable, const casacore::String &time, const casacore::String &spw, const casacore::String &antenna, const casacore::String &pol, const casacore::Vector< casacore::Double > ¶meter, const casacore::String &infile, const casacore::Bool &uniform)
Generate cal table from specified values NB: creates VCs with *vs_p.
ostream-like interface to creating log messages.
A Measure: radial velocity.
casacore::MSHistoryHandler * hist_p
virtual casacore::Bool ok()
Returns true if calibrator object is in a valid state.
virtual casacore::Vector< casacore::Double > modelfit(const casacore::Int &iter, const casacore::String &stype, const casacore::Vector< casacore::Double > &par, const casacore::Vector< casacore::Bool > &vary, const casacore::String &file)
Modelfit.
virtual void selectChannel(const casacore::String &spw)
Select on channel using MSSelection.
virtual casacore::Bool initCalSet(const casacore::Int &calSet)
Re-initialize the calibration scratch columns.
casacore::Int dataStart_p
casacore::LogIO & logSink()
casacore::Bool setapply(const casacore::String &type, const casacore::Double &t, const casacore::String &table, const casacore::String &spw, const casacore::String &field, const casacore::String &interp, const casacore::Bool &calwt, const casacore::Vector< casacore::Int > &spwmap, const casacore::Vector< casacore::Double > &opacity)
Set up to apply calibration (using casacore::MSSelection syntax)
const vi::SimpleSimVi2Parameters ssvp_p
casacore::Vector< casacore::Int > getFieldIdx(const casacore::String &fields)
Interpret field indices (casacore::MSSelection)
virtual casacore::Bool solve()
Solve for a given calibration component.
virtual casacore::Bool solve()
Solve for a given calibration component.
casacore::Int histLockCounter_p
Used to update the casacore::MS HISTORY Table.
virtual casacore::Bool setcallib2(casacore::Record callib, const casacore::MeasurementSet *ms=0)
casacore::PtrBlock< VisCal * > vc_p
VisCals for applying and solving:
casacore::Bool setsolvebandpoly(const casacore::String &table, const casacore::Bool &append, const casacore::String &solint, const casacore::String &combine, const casacore::Vector< casacore::Int > °ree, const casacore::Bool &visnorm, const casacore::Bool &solnorm, const casacore::Int &maskcenter, const casacore::Float &maskedge, const casacore::String &refant)
Arrange to solve for BPOLY (using casacore::MSSelection syntax)
casacore::Record & getActRec()
casacore::Int dataNchan_p
casacore::Double phasewrap_p
Spline phase wrapping helper params.
virtual casacore::Bool setapply(const casacore::String &type, const casacore::Record &applypar)
casacore::Int splinepoint_p
casacore::MeasurementSet * mssel_p
virtual casacore::Bool setcallib2(casacore::Record callib, const casacore::MeasurementSet *ms=0)
casacore::MeasurementSet * ms_p
void setCalFilterConfiguration(casacore::String const &type, casacore::Record const &config)
casacore::MRadialVelocity mDataStart_p
virtual casacore::Bool initWeightsWithTsys(casacore::String wtmode, casacore::Bool dowtsp=false, casacore::String tsystable="", casacore::String gainfield="", casacore::String interp="linear", casacore::Vector< casacore::Int > spwmap=casacore::Vector< casacore::Int >())
VisEquation * ve()
Return access to the VisEquation.
casacore::Record actRec_
Activity record.
virtual void selectChannel(const casacore::String &spw)
Select on channel using MSSelection.
casacore::Bool setModel(const casacore::Vector< casacore::Double > &stokes)
virtual casacore::Bool initialize(casacore::MeasurementSet &inputMS, casacore::Bool compress=true, casacore::Bool addScratch=true, casacore::Bool addModel=true)
Initialize the calibrator object from an input MeasurementSet.
OldCalibrater()
Default constructor.
MSSelection: Class to represent a selection on an MS.
casacore::Bool setsolvegainspline(const casacore::String &table, const casacore::Bool &append, const casacore::String &mode, const casacore::Double &splinetime, const casacore::Double &preavg, const casacore::Int &numpoint, const casacore::Double &phasewrap, const casacore::String &refant)
Arrange to solve for GSPLINE (using casacore::MSSelection syntax)
A hierarchical collection of named fields of various types.
bool Bool
Define the standard types used by Casacore.
virtual casacore::Bool setsolve(const casacore::String &type, const casacore::Record &solvepar)
Uses *vs_p to ctor the SolvableVisCal.
virtual ~OldCalibrater()
Destructor.
casacore::Bool calWt()
Query apply types to see if we need to calibrate the weights.
casacore::Vector< casacore::Int > getSpwIdx(const casacore::String &spws)
Interpret spw indices (casacore::MSSelection)
virtual casacore::Bool setcallib(casacore::Record)
Set up apply-able calibration via a Cal Library.
measure the time it takes to execute parts of a program
static casacore::Bool updateCalTable(const casacore::String &caltable)
Handle caltable backward compatibility.
casacore::LogIO sink_p
Log functions and variables.
casacore::String msname_p
casacore::Input casacore::MeasurementSet and derived selected MeasurementSet
const bool simdata_p
Simulated-data/testing context info.
virtual casacore::Vector< casacore::Double > modelfit(const casacore::Int &, const casacore::String &, const casacore::Vector< casacore::Double > &, const casacore::Vector< casacore::Bool > &, const casacore::String &)
Modelfit.
casacore::PtrBlock< casacore::Vector< casacore::Bool > * > chanmask_
channel masking
casacore::MRadialVelocity mDataStep_p
A drop-in replacement for Block<T*>.
virtual casacore::Bool correct(casacore::String mode="calflag")
Apply all setapply'd calibration components to DATA and deposit in the CORRECTED_DATA column...
virtual void initChanMask()
Channel mask services.
virtual Origin origin() const =0
ABSTRACT METHODS //.
A Table intended to hold astronomical data (a set of Measurements).
casacore::Bool correct2(casacore::String mode="calflag")
virtual casacore::Bool setcallib(casacore::Record callib)
Set up apply-able calibration via a Cal Library.
casacore::String timerString()
casacore::Time functions and variables
A class to provide a simple interface to history writing.
casacore::Bool validatecallib(casacore::Record callib)
virtual casacore::Bool initWeightsWithTsys(casacore::String wtmode, casacore::Bool dowtsp=false, casacore::String tsystable="", casacore::String gainfield="", casacore::String interp="linear", casacore::Vector< casacore::Int > spwmap=casacore::Vector< casacore::Int >())
Initialize sigma/weight, and possibly weight_spectrum Tsys-specific version (SD)
virtual void accumulate(const casacore::String &, const casacore::String &, const casacore::String &, const casacore::String &, const casacore::String &, const casacore::String &, const casacore::Double &, const casacore::Vector< casacore::Int > &)
Accumulate (using casacore::MSSelection syntax)
Base class for all Casacore library errors.
casacore::Bool solvestate()
void writeHistory(casacore::LogIO &os, casacore::Bool cliCommand=false)
Method to update casacore::MS HISTORY Table.
virtual casacore::Bool smooth(const casacore::String &infile, casacore::String &outfile, const casacore::String &smoothtype, const casacore::Double &smoothtime, const casacore::String &fields)
casacore::Smooth calibration (using casacore::MSSelection syntax NB: uses *vs_p to create SVC ...
casacore::String dataMode_p
casacore::MeasurementSet selection parameters
casacore::Bool reset(const casacore::Bool &apply=true, const casacore::Bool &solve=true)
Reset the VisCal lists in the Calibrator object.
casacore::Bool summarize_uncalspws(const casacore::Vector< casacore::Bool > &uncalspw, const casacore::String &origin, casacore::Bool strictflag=false)
Given a (supplied) list of uncalibrated spws, determines and returns if there were any...
casacore::MSSelection * mss_p
casacore::MSSelection object
VisSet * vs_p
VisSet that hosts an old VI.
casacore::Vector< casacore::Int > getAntIdx(const casacore::String &antenna)
String: the storage and methods of handling collections of characters.
virtual VisibilityIterator::DataColumn configureForCorrection()
Organize sort columns for correction.
casacore::MeasurementSet * msselRaw_p
virtual casacore::Bool initialize(casacore::MeasurementSet &inputMS, casacore::Bool compress=true, casacore::Bool addScratch=true, casacore::Bool addModel=true)
Initialize the calibrator object from an input MeasurementSet.
virtual casacore::Bool listCal(const casacore::String &infile, const casacore::String &field, const casacore::String &antenna, const casacore::String &spw, const casacore::String &listfile="", const casacore::Int &pagerows=50)
casacore::List a calibration table
Preserve old-fashioned Calibrater here:
virtual casacore::Bool corrupt()
Apply all setapply'd calibration components to MODEL_DATA and deposit in the MODEL_DATA column...
virtual void accumulate(const casacore::String &intab, const casacore::String &incrtab, const casacore::String &outtab, const casacore::String &fields, const casacore::String &calFields, const casacore::String &interp="linear", const casacore::Double &t=-1.0, const casacore::Vector< casacore::Int > &spwmap=casacore::Vector< casacore::Int >(1,-1))
Accumulate (using casacore::MSSelection syntax)
casacore::Table historytab_p
casacore::Matrix< casacore::Int > getChanIdx(const casacore::String &spws)
Interpret spw indices (casacore::MSSelection)
virtual casacore::Bool corrupt()
Apply all setapply'd calibration components to MODEL_DATA and deposit in the MODEL_DATA column...
casacore::Bool corrupt2()
virtual casacore::Bool smooth(const casacore::String &infile, casacore::String &outfile, const casacore::String &smoothtype, const casacore::Double &smoothtime, const casacore::String &fields)
casacore::Smooth calibration (using casacore::MSSelection syntax
casacore::Bool applystate()
static Calibrater * factory(casacore::Bool old=true)
Calibrater factories.
Defines nreal time structures used by the VLA table filler.