casa  $Rev:20696$
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes | Friends
casa::Calibrater Class Reference

#include <Calibrater.h>

List of all members.

Public Member Functions

 Calibrater ()
 Default constructor.
 Calibrater (const Calibrater &)
 Copy constructor and assignment operator.
Calibrateroperator= (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 > &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 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< Doublemodelfit (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 > &parameter)
 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 ()
RecordgetActRec ()
Bool cleanup ()
void writeHistory (LogIO &os, Bool cliCommand=False)
 Method to update MS HISTORY Table.
CorrectorVpgetCorrectorVp ()

Static Public Member Functions

static Bool updateCalTable (const String &caltable)
 Handle caltable backward compatibility.

Private Member Functions

LogIOlogSink ()
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< IntgetRefantIdxList (const String &refant)
 Interpret refant index.
Vector< IntgetAntIdx (const String &antenna)
Vector< IntgetFieldIdx (const String &fields)
 Interpret field indices (MSSelection)
Vector< IntgetSpwIdx (const String &spws)
 Interpret spw indices (MSSelection)
Matrix< IntgetChanIdx (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.
MeasurementSetms_p
MeasurementSetmssel_p
MeasurementSetmsselRaw_p
VisSetvs_p
 VisSet and VisEquation derived from the input MeasurementSet.
VisSetrawvs_p
VisEquationve_p
PtrBlock< VisCal * > vc_p
 VisCals for applying and solving:
SolvableVisCalsvc_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.
MSHistoryHandlerhist_p
Table historytab_p
PtrBlock< Vector< Bool > * > chanmask_
 channel masking
Record actRec_
 Activity record.

Friends

class CorrectorVp

Detailed Description

Definition at line 55 of file Calibrater.h.


Constructor & Destructor Documentation

Default constructor.

Copy constructor and assignment operator.

Destructor.


Member Function Documentation

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 = VectorInt >(1,-1) 
)

Accumulate (using MSSelection syntax)

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.

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)

The standard solving mechanism.

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.

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 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.

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.


Friends And Related Function Documentation

friend class CorrectorVp [friend]

Definition at line 58 of file Calibrater.h.


Member Data Documentation

Activity record.

Definition at line 354 of file Calibrater.h.

Referenced by getActRec().

channel masking

Definition at line 351 of file Calibrater.h.

MeasurementSet selection parameters.

Definition at line 337 of file Calibrater.h.

Definition at line 338 of file Calibrater.h.

Definition at line 338 of file Calibrater.h.

Definition at line 338 of file Calibrater.h.

Definition at line 347 of file Calibrater.h.

Used to update the MS HISTORY Table.

Definition at line 346 of file Calibrater.h.

Definition at line 348 of file Calibrater.h.

Definition at line 339 of file Calibrater.h.

Definition at line 339 of file Calibrater.h.

Definition at line 323 of file Calibrater.h.

Input MeasurementSet and derived selected MeasurementSet.

Definition at line 322 of file Calibrater.h.

Definition at line 324 of file Calibrater.h.

Definition at line 325 of file Calibrater.h.

Spline phase wrapping helper params.

Definition at line 342 of file Calibrater.h.

Definition at line 329 of file Calibrater.h.

Log functions and variables.

Definition at line 269 of file Calibrater.h.

Definition at line 343 of file Calibrater.h.

Definition at line 334 of file Calibrater.h.

Definition at line 274 of file Calibrater.h.

VisCals for applying and solving:

Definition at line 333 of file Calibrater.h.

Definition at line 330 of file Calibrater.h.

VisSet and VisEquation derived from the input MeasurementSet.

Definition at line 328 of file Calibrater.h.


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