Controls the solution of calibration components (Jones Matrices). More...
#include <Calibrater.h>
Public Member Functions | |
| Calibrater () | |
| Default constructor. | |
| Calibrater (String msname) | |
| Simple MS-only ctor. | |
| Calibrater (const Calibrater &) | |
| Copy constructor and assignment operator. | |
| Calibrater & | operator= (const Calibrater &) |
| ~Calibrater () | |
| Destructor. | |
| void | selectvis (const String &time="", const String &spw="", const String &scan="", const String &field="", const String &intent="", const String &obsIDs="", const String &baseline="", const String &uvrange="", const String &chanmode="none", const Int &nchan=1, const Int &start=0, const Int &step=1, const MRadialVelocity &mStart=MRadialVelocity(), const MRadialVelocity &mStep=MRadialVelocity(), const String &msSelect="") |
| Set uv-data selection via MSSelection. | |
| Bool | setapply (const String &type, const Double &t, const String &table, const String &spw, const String &field, const String &interp, const Bool &calwt, const Vector< Int > &spwmap, const Vector< Double > &opacity) |
| Set up to apply calibration (using MSSelection syntax). | |
| Bool | setapply (const String &type, const Record &applypar) |
| Bool | setcallib (Record callib) |
| Set up apply-able calibration via a Cal Library. | |
| Bool | setcallib2 (Record callib) |
| Bool | validatecallib (Record callib) |
| Bool | setmodel (const String &modelImage) |
| Bool | setModel (const Vector< Double > &stokes) |
| Bool | setsolve (const String &type, const String &solint, const String &table, const Bool append, const Double preavg, const String &apmode="AP", const Int minblperant=4, const String &refant="", const Bool solnorm=False, const Float minsnr=0.0f, const String &combine="", const Int fillgaps=0, const String &cfcache="", const Double painc=360.0, const Int fitorder=0, const Float fraction=0.1, const Int numedge=-1, const String &radius="", const Bool smooth=True) |
| Arrange to solve (using MSSelection syntax). | |
| Bool | setsolvebandpoly (const String &table, const Bool &append, const String &solint, const String &combine, const Vector< Int > °ree, const Bool &visnorm, const Bool &solnorm, const Int &maskcenter, const Float &maskedge, const String &refant) |
| Arrange to solve for BPOLY (using MSSelection syntax). | |
| Bool | setsolvegainspline (const String &table, const Bool &append, const String &mode, const Double &splinetime, const Double &preavg, const Int &numpoint, const Double &phasewrap, const String &refant) |
| Arrange to solve for GSPLINE (using MSSelection syntax). | |
| Bool | setsolve (const String &type, const Record &solvepar) |
| Bool | unsetapply (const Int &which=-1) |
| Unset all (default) or one apply calibration component. | |
| Bool | unsetsolve () |
| TBD: Bool unsetapply(const String& type); // by type? | |
| Bool | reset (const Bool &apply=True, const Bool &solve=True) |
| Reset the calibrator object. | |
| Bool | correct (String mode="calflag") |
| Apply all setapply'd calibration components to DATA and deposit in the CORRECTED_DATA column. | |
| Bool | correct2 (String mode="calflag") |
| Bool | corrupt () |
| Apply all setapply'd calibration components to MODEL_DATA and deposit in the MODEL_DATA column. | |
| Bool | initWeights (String wtmode, Bool dowtsp=False) |
| Initialize sigma/weight, and possibly weight_spectrum. | |
| Bool | initWeights (Bool doBT=True, Bool dowtsp=False) |
| Bool | initWeightsWithTsys (String wtmode, Bool dowtsp=False, String tsystable="", String gainfield="", String interp="linear", Vector< Int > spwmap=Vector< Int >()) |
| Bool | solve () |
| Solve for a given calibration component. | |
| Vector< Double > | modelfit (const Int &iter, const String &stype, const Vector< Double > &par, const Vector< Bool > &vary, const String &file) |
| Modelfit. | |
| void | fluxscale (const String &infile, const String &outfile, const String &refFields, const Vector< Int > &refSpwMap, const String &tranFields, const Bool &append, const Float &inGainThres, const String &antSel, const String &timerangeSel, const String &scanSel, SolvableVisCal::fluxScaleStruct &oFluxScaleFactor, Vector< Int > &tranidx, const String &oListFile, const Bool &incremental, const Int &fitorder, const Bool &display) |
| Fluxscale (using MSSelection syntax for fields). | |
| void | fluxscale (const String &infile, const String &outfile, const Vector< Int > &refField, const Vector< Int > &refSpwMap, const Vector< Int > &tranField, const Bool &append, const Float &inGainThres, const String &antSel, const String &timerangeSel, const String &scanSel, SolvableVisCal::fluxScaleStruct &oFluxScaleFactor, const String &oListFile, const Bool &incremental, const Int &fitorder, const Bool &display) |
| Fluxscale (via field indices). | |
| void | accumulate (const String &intab, const String &incrtab, const String &outtab, const String &fields, const String &calFields, const String &interp="linear", const Double &t=-1.0, const Vector< Int > &spwmap=Vector< Int >(1,-1)) |
| Accumulate (using MSSelection syntax). | |
| void | specifycal (const String &type, const String &caltable, const String &time, const String &spw, const String &antenna, const String &pol, const Vector< Double > ¶meter, const String &infile) |
| Generate cal table from specified values. | |
| Bool | smooth (const String &infile, String &outfile, const String &smoothtype, const Double &smoothtime, const String &fields) |
| Smooth calibration (using MSSelection syntax. | |
| Bool | listCal (const String &infile, const String &field, const String &antenna, const String &spw, const String &listfile="", const Int &pagerows=50) |
| List a calibration table. | |
| Bool | initialize (MeasurementSet &inputMS, Bool compress=True, Bool addScratch=True, Bool addModel=True) |
| Initialize the calibrator object from an input MeasurementSet. | |
| Bool | initCalSet (const Int &calSet) |
| Re-initialize the calibration scratch columns. | |
| Bool | state () |
| Report apply/solve state. | |
| Bool | applystate () |
| Bool | solvestate () |
| Record & | getActRec () |
| Bool | cleanup () |
| VisEquation * | ve () |
| Return access to the VisEquation. | |
Static Public Member Functions | |
| static Bool | updateCalTable (const String &caltable) |
| Handle caltable backward compatibility. | |
Private Member Functions | |
| LogIO & | logSink () |
| void | writeHistory (LogIO &os, Bool cliCommand=False) |
| Method to update MS HISTORY Table. | |
| String | timerString () |
| Time functions and variables. | |
| VisibilityIterator::DataColumn | configureForCorrection () |
| void | selectChannel (const String &spw) |
| Select on channel using MSSelection. | |
| void | initChanMask () |
| Channel mask services. | |
| void | selectChannel (const String &mode, const Int &nchan, const Int &start, const Int &step, const MRadialVelocity &mStart, const MRadialVelocity &mStep) |
| Select on channel in the VisSet. | |
| Vector< Int > | getRefantIdxList (const String &refant) |
| Interpret refant index. | |
| Vector< Int > | getAntIdx (const String &antenna) |
| Vector< Int > | getFieldIdx (const String &fields) |
| Interpret field indices (MSSelection). | |
| Vector< Int > | getSpwIdx (const String &spws) |
| Interpret spw indices (MSSelection). | |
| Matrix< Int > | getChanIdx (const String &spws) |
| Interpret spw indices (MSSelection). | |
| Bool | calWt () |
| Query apply types to see if we need to calibrate the weights. | |
| Bool | ok () |
| Returns True if calibrator object is in a valid state. | |
| Bool | summarize_uncalspws (const Vector< Bool > &uncalspw, const String &origin, Bool strictflag=False) |
| Given a (supplied) list of uncalibrated spws, determines and returns if there were any, and if so sends them as a warning message to the logger. | |
| void | getRawPhaseVisSet (Vector< Int > &spwid) |
| Create a VisSet for raw phase transfer if needed. | |
| Bool | genericGatherAndSolve () |
| The standard solving mechanism. | |
Private Attributes | |
| LogIO | sink_p |
| Log functions and variables. | |
| Timer | timer_p |
| String | msname_p |
| Input MeasurementSet and derived selected MeasurementSet. | |
| MeasurementSet * | ms_p |
| MeasurementSet * | mssel_p |
| MeasurementSet * | msselRaw_p |
| MSSelection * | mss_p |
| MSSelection object. | |
| vi::FrequencySelections * | frequencySelections_p |
| VisSet * | vs_p |
| VisSet and VisEquation derived from the input MeasurementSet. | |
| VisSet * | rawvs_p |
| VisEquation * | ve_p |
| PtrBlock< VisCal * > | vc_p |
| VisCals for applying and solving:. | |
| SolvableVisCal * | svc_p |
| String | dataMode_p |
| MeasurementSet selection parameters. | |
| Int | dataNchan_p |
| Int | dataStart_p |
| Int | dataStep_p |
| MRadialVelocity | mDataStart_p |
| MRadialVelocity | mDataStep_p |
| Double | phasewrap_p |
| Spline phase wrapping helper params. | |
| Int | splinepoint_p |
| Int | histLockCounter_p |
| Used to update the MS HISTORY Table. | |
| MSHistoryHandler * | hist_p |
| Table | historytab_p |
| PtrBlock< Vector< Bool > * > | chanmask_ |
| channel masking | |
| Record | actRec_ |
| Activity record. | |
Controls the solution of calibration components (Jones Matrices).
Definition at line 51 of file Calibrater.h.
| casa::Calibrater::Calibrater | ( | ) |
Default constructor.
| casa::Calibrater::Calibrater | ( | String | msname | ) |
Simple MS-only ctor.
| casa::Calibrater::Calibrater | ( | const Calibrater & | ) |
Copy constructor and assignment operator.
| casa::Calibrater::~Calibrater | ( | ) |
Destructor.
| void casa::Calibrater::accumulate | ( | const String & | intab, | |
| const String & | incrtab, | |||
| const String & | outtab, | |||
| const String & | fields, | |||
| const String & | calFields, | |||
| const String & | interp = "linear", |
|||
| const Double & | t = -1.0, |
|||
| const Vector< Int > & | spwmap = Vector< Int >(1,-1) | |||
| ) |
Accumulate (using MSSelection syntax).
| Bool casa::Calibrater::applystate | ( | ) |
| Bool casa::Calibrater::calWt | ( | ) | [private] |
Query apply types to see if we need to calibrate the weights.
| Bool casa::Calibrater::cleanup | ( | ) |
| VisibilityIterator::DataColumn casa::Calibrater::configureForCorrection | ( | ) | [private] |
| Bool casa::Calibrater::correct | ( | String | mode = "calflag" |
) |
Apply all setapply'd calibration components to DATA and deposit in the CORRECTED_DATA column.
| Bool casa::Calibrater::correct2 | ( | String | mode = "calflag" |
) |
| Bool casa::Calibrater::corrupt | ( | ) |
Apply all setapply'd calibration components to MODEL_DATA and deposit in the MODEL_DATA column.
| void casa::Calibrater::fluxscale | ( | const String & | infile, | |
| const String & | outfile, | |||
| const Vector< Int > & | refField, | |||
| const Vector< Int > & | refSpwMap, | |||
| const Vector< Int > & | tranField, | |||
| const Bool & | append, | |||
| const Float & | inGainThres, | |||
| const String & | antSel, | |||
| const String & | timerangeSel, | |||
| const String & | scanSel, | |||
| SolvableVisCal::fluxScaleStruct & | oFluxScaleFactor, | |||
| const String & | oListFile, | |||
| const Bool & | incremental, | |||
| const Int & | fitorder, | |||
| const Bool & | display | |||
| ) |
Fluxscale (via field indices).
| void casa::Calibrater::fluxscale | ( | const String & | infile, | |
| const String & | outfile, | |||
| const String & | refFields, | |||
| const Vector< Int > & | refSpwMap, | |||
| const String & | tranFields, | |||
| const Bool & | append, | |||
| const Float & | inGainThres, | |||
| const String & | antSel, | |||
| const String & | timerangeSel, | |||
| const String & | scanSel, | |||
| SolvableVisCal::fluxScaleStruct & | oFluxScaleFactor, | |||
| Vector< Int > & | tranidx, | |||
| const String & | oListFile, | |||
| const Bool & | incremental, | |||
| const Int & | fitorder, | |||
| const Bool & | display | |||
| ) |
Fluxscale (using MSSelection syntax for fields).
| Bool casa::Calibrater::genericGatherAndSolve | ( | ) | [private] |
The standard solving mechanism.
| Record& casa::Calibrater::getActRec | ( | ) | [inline] |
Definition at line 279 of file Calibrater.h.
References actRec_.
| Vector<Int> casa::Calibrater::getAntIdx | ( | const String & | antenna | ) | [private] |
| Matrix<Int> casa::Calibrater::getChanIdx | ( | const String & | spws | ) | [private] |
Interpret spw indices (MSSelection).
| Vector<Int> casa::Calibrater::getFieldIdx | ( | const String & | fields | ) | [private] |
Interpret field indices (MSSelection).
| void casa::Calibrater::getRawPhaseVisSet | ( | Vector< Int > & | spwid | ) | [private] |
Create a VisSet for raw phase transfer if needed.
| Vector<Int> casa::Calibrater::getRefantIdxList | ( | const String & | refant | ) | [private] |
Interpret refant index.
| Vector<Int> casa::Calibrater::getSpwIdx | ( | const String & | spws | ) | [private] |
Interpret spw indices (MSSelection).
| Bool casa::Calibrater::initCalSet | ( | const Int & | calSet | ) |
Re-initialize the calibration scratch columns.
| void casa::Calibrater::initChanMask | ( | ) | [private] |
Channel mask services.
| Bool casa::Calibrater::initialize | ( | MeasurementSet & | inputMS, | |
| Bool | compress = True, |
|||
| Bool | addScratch = True, |
|||
| Bool | addModel = True | |||
| ) |
Initialize the calibrator object from an input MeasurementSet.
Optional compression of the calibration columns (MODEL_DATA, and CORRECTED_DATA) is supported. if addScratch=True, optionally one can just add CORRECTED_DATA by setting addModel to False
| Bool casa::Calibrater::initWeights | ( | Bool | doBT = True, |
|
| Bool | dowtsp = False | |||
| ) |
| Bool casa::Calibrater::initWeights | ( | String | wtmode, | |
| Bool | dowtsp = False | |||
| ) |
Initialize sigma/weight, and possibly weight_spectrum.
| Bool casa::Calibrater::initWeightsWithTsys | ( | String | wtmode, | |
| Bool | dowtsp = False, |
|||
| String | tsystable = "", |
|||
| String | gainfield = "", |
|||
| String | interp = "linear", |
|||
| Vector< Int > | spwmap = Vector< Int >() | |||
| ) |
| Bool casa::Calibrater::listCal | ( | const String & | infile, | |
| const String & | field, | |||
| const String & | antenna, | |||
| const String & | spw, | |||
| const String & | listfile = "", |
|||
| const Int & | pagerows = 50 | |||
| ) |
List a calibration table.
| LogIO& casa::Calibrater::logSink | ( | ) | [private] |
| Vector<Double> casa::Calibrater::modelfit | ( | const Int & | iter, | |
| const String & | stype, | |||
| const Vector< Double > & | par, | |||
| const Vector< Bool > & | vary, | |||
| const String & | file | |||
| ) |
Modelfit.
| Bool casa::Calibrater::ok | ( | ) | [private] |
Returns True if calibrator object is in a valid state.
| Calibrater& casa::Calibrater::operator= | ( | const Calibrater & | ) |
| Bool casa::Calibrater::reset | ( | const Bool & | apply = True, |
|
| const Bool & | solve = True | |||
| ) |
Reset the calibrator object.
| void casa::Calibrater::selectChannel | ( | const String & | mode, | |
| const Int & | nchan, | |||
| const Int & | start, | |||
| const Int & | step, | |||
| const MRadialVelocity & | mStart, | |||
| const MRadialVelocity & | mStep | |||
| ) | [private] |
Select on channel in the VisSet.
| void casa::Calibrater::selectChannel | ( | const String & | spw | ) | [private] |
Select on channel using MSSelection.
| void casa::Calibrater::selectvis | ( | const String & | time = "", |
|
| const String & | spw = "", |
|||
| const String & | scan = "", |
|||
| const String & | field = "", |
|||
| const String & | intent = "", |
|||
| const String & | obsIDs = "", |
|||
| const String & | baseline = "", |
|||
| const String & | uvrange = "", |
|||
| const String & | chanmode = "none", |
|||
| const Int & | nchan = 1, |
|||
| const Int & | start = 0, |
|||
| const Int & | step = 1, |
|||
| const MRadialVelocity & | mStart = MRadialVelocity(), |
|||
| const MRadialVelocity & | mStep = MRadialVelocity(), |
|||
| const String & | msSelect = "" | |||
| ) |
Set uv-data selection via MSSelection.
| Bool casa::Calibrater::setapply | ( | const String & | type, | |
| const Record & | applypar | |||
| ) |
| Bool casa::Calibrater::setapply | ( | const String & | type, | |
| const Double & | t, | |||
| const String & | table, | |||
| const String & | spw, | |||
| const String & | field, | |||
| const String & | interp, | |||
| const Bool & | calwt, | |||
| const Vector< Int > & | spwmap, | |||
| const Vector< Double > & | opacity | |||
| ) |
Set up to apply calibration (using MSSelection syntax).
| Bool casa::Calibrater::setcallib | ( | Record | callib | ) |
Set up apply-able calibration via a Cal Library.
| Bool casa::Calibrater::setcallib2 | ( | Record | callib | ) |
| Bool casa::Calibrater::setModel | ( | const Vector< Double > & | stokes | ) |
| Bool casa::Calibrater::setmodel | ( | const String & | modelImage | ) |
| Bool casa::Calibrater::setsolve | ( | const String & | type, | |
| const Record & | solvepar | |||
| ) |
| Bool casa::Calibrater::setsolve | ( | const String & | type, | |
| const String & | solint, | |||
| const String & | table, | |||
| const Bool | append, | |||
| const Double | preavg, | |||
| const String & | apmode = "AP", |
|||
| const Int | minblperant = 4, |
|||
| const String & | refant = "", |
|||
| const Bool | solnorm = False, |
|||
| const Float | minsnr = 0.0f, |
|||
| const String & | combine = "", |
|||
| const Int | fillgaps = 0, |
|||
| const String & | cfcache = "", |
|||
| const Double | painc = 360.0, |
|||
| const Int | fitorder = 0, |
|||
| const Float | fraction = 0.1, |
|||
| const Int | numedge = -1, |
|||
| const String & | radius = "", |
|||
| const Bool | smooth = True | |||
| ) |
Arrange to solve (using MSSelection syntax).
| Bool casa::Calibrater::setsolvebandpoly | ( | const String & | table, | |
| const Bool & | append, | |||
| const String & | solint, | |||
| const String & | combine, | |||
| const Vector< Int > & | degree, | |||
| const Bool & | visnorm, | |||
| const Bool & | solnorm, | |||
| const Int & | maskcenter, | |||
| const Float & | maskedge, | |||
| const String & | refant | |||
| ) |
Arrange to solve for BPOLY (using MSSelection syntax).
| Bool casa::Calibrater::setsolvegainspline | ( | const String & | table, | |
| const Bool & | append, | |||
| const String & | mode, | |||
| const Double & | splinetime, | |||
| const Double & | preavg, | |||
| const Int & | numpoint, | |||
| const Double & | phasewrap, | |||
| const String & | refant | |||
| ) |
Arrange to solve for GSPLINE (using MSSelection syntax).
| Bool casa::Calibrater::smooth | ( | const String & | infile, | |
| String & | outfile, | |||
| const String & | smoothtype, | |||
| const Double & | smoothtime, | |||
| const String & | fields | |||
| ) |
Smooth calibration (using MSSelection syntax.
| Bool casa::Calibrater::solve | ( | ) |
Solve for a given calibration component.
| Bool casa::Calibrater::solvestate | ( | ) |
| void casa::Calibrater::specifycal | ( | const String & | type, | |
| const String & | caltable, | |||
| const String & | time, | |||
| const String & | spw, | |||
| const String & | antenna, | |||
| const String & | pol, | |||
| const Vector< Double > & | parameter, | |||
| const String & | infile | |||
| ) |
Generate cal table from specified values.
| Bool casa::Calibrater::state | ( | ) |
Report apply/solve state.
| Bool casa::Calibrater::summarize_uncalspws | ( | const Vector< Bool > & | uncalspw, | |
| const String & | origin, | |||
| Bool | strictflag = False | |||
| ) | [private] |
Given a (supplied) list of uncalibrated spws, determines and returns if there were any, and if so sends them as a warning message to the logger.
| String casa::Calibrater::timerString | ( | ) | [private] |
Time functions and variables.
| Bool casa::Calibrater::unsetapply | ( | const Int & | which = -1 |
) |
Unset all (default) or one apply calibration component.
| Bool casa::Calibrater::unsetsolve | ( | ) |
TBD: Bool unsetapply(const String& type); // by type?
Unset the solved-for calibration component
| static Bool casa::Calibrater::updateCalTable | ( | const String & | caltable | ) | [static] |
Handle caltable backward compatibility.
| Bool casa::Calibrater::validatecallib | ( | Record | callib | ) |
| VisEquation* casa::Calibrater::ve | ( | ) | [inline] |
| void casa::Calibrater::writeHistory | ( | LogIO & | os, | |
| Bool | cliCommand = False | |||
| ) | [private] |
Method to update MS HISTORY Table.
Record casa::Calibrater::actRec_ [private] |
PtrBlock<Vector<Bool>*> casa::Calibrater::chanmask_ [private] |
channel masking
Definition at line 381 of file Calibrater.h.
String casa::Calibrater::dataMode_p [private] |
MeasurementSet selection parameters.
Definition at line 367 of file Calibrater.h.
Int casa::Calibrater::dataNchan_p [private] |
Definition at line 368 of file Calibrater.h.
Int casa::Calibrater::dataStart_p [private] |
Definition at line 368 of file Calibrater.h.
Int casa::Calibrater::dataStep_p [private] |
Definition at line 368 of file Calibrater.h.
Definition at line 355 of file Calibrater.h.
MSHistoryHandler* casa::Calibrater::hist_p [private] |
Definition at line 377 of file Calibrater.h.
Int casa::Calibrater::histLockCounter_p [private] |
Used to update the MS HISTORY Table.
Definition at line 376 of file Calibrater.h.
Table casa::Calibrater::historytab_p [private] |
Definition at line 378 of file Calibrater.h.
MRadialVelocity casa::Calibrater::mDataStart_p [private] |
Definition at line 369 of file Calibrater.h.
MRadialVelocity casa::Calibrater::mDataStep_p [private] |
Definition at line 369 of file Calibrater.h.
MeasurementSet* casa::Calibrater::ms_p [private] |
Definition at line 349 of file Calibrater.h.
String casa::Calibrater::msname_p [private] |
Input MeasurementSet and derived selected MeasurementSet.
Definition at line 348 of file Calibrater.h.
MSSelection* casa::Calibrater::mss_p [private] |
MSSelection object.
Definition at line 354 of file Calibrater.h.
MeasurementSet* casa::Calibrater::mssel_p [private] |
Definition at line 350 of file Calibrater.h.
MeasurementSet* casa::Calibrater::msselRaw_p [private] |
Definition at line 351 of file Calibrater.h.
Double casa::Calibrater::phasewrap_p [private] |
Spline phase wrapping helper params.
Definition at line 372 of file Calibrater.h.
VisSet* casa::Calibrater::rawvs_p [private] |
Definition at line 359 of file Calibrater.h.
LogIO casa::Calibrater::sink_p [private] |
Log functions and variables.
Definition at line 287 of file Calibrater.h.
Int casa::Calibrater::splinepoint_p [private] |
Definition at line 373 of file Calibrater.h.
SolvableVisCal* casa::Calibrater::svc_p [private] |
Definition at line 364 of file Calibrater.h.
Timer casa::Calibrater::timer_p [private] |
Definition at line 300 of file Calibrater.h.
PtrBlock<VisCal*> casa::Calibrater::vc_p [private] |
VisCals for applying and solving:.
Definition at line 363 of file Calibrater.h.
VisEquation* casa::Calibrater::ve_p [private] |
Definition at line 360 of file Calibrater.h.
Referenced by ve().
VisSet* casa::Calibrater::vs_p [private] |
VisSet and VisEquation derived from the input MeasurementSet.
Definition at line 358 of file Calibrater.h.
1.6.1