casa
$Rev:20696$
|
#include <Calibrater.h>
Public Member Functions | |
Calibrater () | |
Default constructor. | |
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 | 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) |
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 | corrupt () |
Apply all setapply'd calibration components to MODEL_DATA and deposit in the MODEL_DATA column. | |
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, SolvableVisCal::fluxScaleStruct &oFluxScaleFactor, Vector< Int > &tranidx, const String &oListFile, const Bool &incremental, const Int &fitorder) |
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, SolvableVisCal::fluxScaleStruct &oFluxScaleFactor, const String &oListFile, const Bool &incremental, const Int &fitorder) |
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) |
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 () |
void | writeHistory (LogIO &os, Bool cliCommand=False) |
Method to update MS HISTORY Table. | |
CorrectorVp * | getCorrectorVp () |
Static Public Member Functions | |
static Bool | updateCalTable (const String &caltable) |
Handle caltable backward compatibility. | |
Private Member Functions | |
LogIO & | logSink () |
String | timerString () |
Time functions and variables. | |
VisibilityIterator::DataColumn | configureForCorrection () |
Bool | correctUsingVpf () |
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) |
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 |
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. | |
Friends | |
class | CorrectorVp |
Definition at line 55 of file Calibrater.h.
Default constructor.
casa::Calibrater::Calibrater | ( | const Calibrater & | ) |
Copy constructor and assignment operator.
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::calWt | ( | ) | [private] |
Query apply types to see if we need to calibrate the weights.
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::correctUsingVpf | ( | ) | [private] |
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 String & | refFields, | ||
const Vector< Int > & | refSpwMap, | ||
const String & | tranFields, | ||
const Bool & | append, | ||
SolvableVisCal::fluxScaleStruct & | oFluxScaleFactor, | ||
Vector< Int > & | tranidx, | ||
const String & | oListFile, | ||
const Bool & | incremental, | ||
const Int & | fitorder | ||
) |
Fluxscale (using MSSelection syntax for fields)
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, | ||
SolvableVisCal::fluxScaleStruct & | oFluxScaleFactor, | ||
const String & | oListFile, | ||
const Bool & | incremental, | ||
const Int & | fitorder | ||
) |
Fluxscale (via field indices)
Bool casa::Calibrater::genericGatherAndSolve | ( | ) | [private] |
The standard solving mechanism.
Record& casa::Calibrater::getActRec | ( | ) | [inline] |
Definition at line 254 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::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 & | ) |
Reset the calibrator object.
void casa::Calibrater::selectChannel | ( | const String & | spw | ) | [private] |
Select on channel using MSSelection.
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::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 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::setapply | ( | const String & | type, |
const Record & | applypar | ||
) |
Bool casa::Calibrater::setmodel | ( | const String & | modelImage | ) |
Bool casa::Calibrater::setModel | ( | const Vector< Double > & | stokes | ) |
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 |
||
) |
Arrange to solve (using MSSelection syntax)
Bool casa::Calibrater::setsolve | ( | const String & | type, |
const Record & | solvepar | ||
) |
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.
Solve for a given calibration component.
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 | ||
) |
Generate cal table from specified values.
Report apply/solve state.
Bool casa::Calibrater::summarize_uncalspws | ( | const Vector< Bool > & | uncalspw, |
const String & | origin | ||
) | [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.
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.
void casa::Calibrater::writeHistory | ( | LogIO & | os, |
Bool | cliCommand = False |
||
) |
Method to update MS HISTORY Table.
friend class CorrectorVp [friend] |
Definition at line 58 of file Calibrater.h.
Record casa::Calibrater::actRec_ [private] |
PtrBlock<Vector<Bool>*> casa::Calibrater::chanmask_ [private] |
channel masking
Definition at line 351 of file Calibrater.h.
String casa::Calibrater::dataMode_p [private] |
MeasurementSet selection parameters.
Definition at line 337 of file Calibrater.h.
Int casa::Calibrater::dataNchan_p [private] |
Definition at line 338 of file Calibrater.h.
Int casa::Calibrater::dataStart_p [private] |
Definition at line 338 of file Calibrater.h.
Int casa::Calibrater::dataStep_p [private] |
Definition at line 338 of file Calibrater.h.
MSHistoryHandler* casa::Calibrater::hist_p [private] |
Definition at line 347 of file Calibrater.h.
Int casa::Calibrater::histLockCounter_p [private] |
Used to update the MS HISTORY Table.
Definition at line 346 of file Calibrater.h.
Table casa::Calibrater::historytab_p [private] |
Definition at line 348 of file Calibrater.h.
Definition at line 339 of file Calibrater.h.
MRadialVelocity casa::Calibrater::mDataStep_p [private] |
Definition at line 339 of file Calibrater.h.
MeasurementSet* casa::Calibrater::ms_p [private] |
Definition at line 323 of file Calibrater.h.
String casa::Calibrater::msname_p [private] |
Input MeasurementSet and derived selected MeasurementSet.
Definition at line 322 of file Calibrater.h.
MeasurementSet* casa::Calibrater::mssel_p [private] |
Definition at line 324 of file Calibrater.h.
MeasurementSet* casa::Calibrater::msselRaw_p [private] |
Definition at line 325 of file Calibrater.h.
Double casa::Calibrater::phasewrap_p [private] |
Spline phase wrapping helper params.
Definition at line 342 of file Calibrater.h.
VisSet* casa::Calibrater::rawvs_p [private] |
Definition at line 329 of file Calibrater.h.
LogIO casa::Calibrater::sink_p [private] |
Log functions and variables.
Definition at line 269 of file Calibrater.h.
Int casa::Calibrater::splinepoint_p [private] |
Definition at line 343 of file Calibrater.h.
SolvableVisCal* casa::Calibrater::svc_p [private] |
Definition at line 334 of file Calibrater.h.
Timer casa::Calibrater::timer_p [private] |
Definition at line 274 of file Calibrater.h.
PtrBlock<VisCal*> casa::Calibrater::vc_p [private] |
VisCals for applying and solving:
Definition at line 333 of file Calibrater.h.
VisEquation* casa::Calibrater::ve_p [private] |
Definition at line 330 of file Calibrater.h.
VisSet* casa::Calibrater::vs_p [private] |
VisSet and VisEquation derived from the input MeasurementSet.
Definition at line 328 of file Calibrater.h.