SolvableVisJones.h

Classes

SolvableVisJones -- SolvableVisJones: Model solvable, time-variable multiplicative errors for the VisEquation (full description)
GJones -- GJones: Model solvable, time-variable multiplicative errors for the VisEquation (full description)
BJones -- (full description)
EVisJones -- EVisJones: Model Gain Curve corrections for the VisEquation (full description)
DJones -- DJones: Model solvable, time-variable multiplicative errors for the VisEquation (full description)
TJones -- TJones: Model solvable, time-variable multiplicative errors for the VisEquation (full description)
TOpac -- TOpac: Model solvable, time-variable multiplicative errors for the VisEquation (full description)
FVisJones -- FVisJones: Model solvable, time-variable multiplicative errors for the VisEquation (full description)

class SolvableVisJones : public TimeVarVisJones

Types

enum FilterType

meanFilter
medianFilter
slidingMean
slidingMedian

enum InterpolaterType

nearestNeighbour
linear
cubic
spline

Interface

Public Members
SolvableVisJones()
SolvableVisJones(VisSet& vs)
SolvableVisJones(const SolvableVisJones& other)
~SolvableVisJones()
virtual void setInterpolation(const Record& interpolation)
virtual void setInterpolationParam(const String& table, const String& select, const Double& interval)
virtual void setSolver(const Record& solver)
virtual void setSolverParam(const String& table, const Double& interval, const Double preavg=0.0, const Int refant=-1, const Bool phaseonly=False)
virtual void setAccumulate(const String& table, const String& select="", const Double& interval=0.0, const Int& refant=-1)
virtual Bool isSolveable()
virtual Double preavg()
virtual Int refant()
virtual VisBuffer& applyGradient(VisBuffer& vb, const Vector<Int>& antenna, Int i, Int j, Int pos)
virtual void initializeGradients()
virtual void finalizeGradients()
virtual void addGradients(const VisBuffer& vb, Int row, const Antenna& a, const Vector<Float>& sumwt, const Vector<Float>& chisq, const Vector<Vector<Complex,2> >& c, const Vector<Vector<Float,2> >& f)
virtual Bool solve (VisEquation& me)
void store(const String& file, const Bool& append)
virtual void filterFrom(SolvableVisJones& other, FilterType filterType=meanFilter, Float timeConstant=0.0, Bool doAmpPhase=True, Float scanGap=FLT_MAX)
virtual void interpolateFrom(SolvableVisJones& other, InterpolaterType interpolaterType=spline, Bool doAmpPhase=True)
virtual void filter(Vector<Double>& inX, Vector<Array<Double> >& inY, Vector<Bool>& inFlags, Vector<Double>& outX, Vector<Array<Double> >& outY, FilterType filterType, Float timeConstant, Float scanGap=300)
virtual void slidingFilter(Vector<Double>& inX, Vector<Array<Double> >& inY, Vector<Bool>& inFlags, Vector<Double>& outX, Vector<Array<Double> >& outY, FilterType filterType, Float timeConstant, Float scanGap=300)
virtual void fluxscale(const Vector<Int>& refFieldIn, const Vector<Int>& tranFieldIn, const Vector<Int>& inRefSpwMap, Matrix<Double>& fluxScaleFactor)
void accumulate(SolvableVisJones& incr, const Vector<Int>& fields)
Protected Members
void initSolveCache()
void deleteSolveCache()
virtual void load(const String& file, const String& select="", const String& type="general")
virtual void updateAntGain()
virtual void keep(const Int& spw,const Int& slot)
virtual void reReference(const Int& refAnt)
virtual LogSink& logSink()
LogIO& logSink2()

Description

Prerequisite

Etymology

SolvableVisJones describes an interface for time variable and solvable multiplicative errors to be used in the VisEquation.

Synopsis

See VisEquation for definition of the Visibility Measurement Equation.

SolvableVisJones performs caching of values to minimize computation.

Values may be loaded from, saved to, and interpolated from a Table.

The following examples illustrate how an SolvableVisJones can be used:

Example

      // Read the VisSet from disk
      VisSet vs("3c84.MS");

      VisEquation ve(vs);

      // Make an VisJones
      GJones gj(vs);

      ve.setVisJones(gj);

      // Correct the visset
      ve.correct();

Motivation

The properties of an multiplicative component must be described for the VisEquation.

To Do

Member Description

enum FilterType

enum InterpolaterType

SolvableVisJones()

SolvableVisJones(VisSet& vs)

From VisSet alone

SolvableVisJones(const SolvableVisJones& other)

Copy

~SolvableVisJones()

Destructor

virtual void setInterpolation(const Record& interpolation)

Assignment virtual SolvableVisJones& operator=(const SolvableVisJones& other);

Setup apply context

virtual void setInterpolationParam(const String& table, const String& select, const Double& interval)

virtual void setSolver(const Record& solver)

Setup solve context

virtual void setSolverParam(const String& table, const Double& interval, const Double preavg=0.0, const Int refant=-1, const Bool phaseonly=False)

virtual void setAccumulate(const String& table, const String& select="", const Double& interval=0.0, const Int& refant=-1)

virtual Bool isSolveable()

Is this solveable?

virtual Double preavg()

Return the pre-averaging interval for the solution

virtual Int refant()

Return the referent antenna for the solution

virtual VisBuffer& applyGradient(VisBuffer& vb, const Vector<Int>& antenna, Int i, Int j, Int pos)

virtual void initializeGradients()

Initialize for gradient search

virtual void finalizeGradients()

virtual void addGradients(const VisBuffer& vb, Int row, const Antenna& a, const Vector<Float>& sumwt, const Vector<Float>& chisq, const Vector<Vector<Complex,2> >& c, const Vector<Vector<Float,2> >& f)

Add to Gradient Chisq

virtual Bool solve (VisEquation& me)

Solve

void store(const String& file, const Bool& append)

Store the time-variable gains, fits and status as a table.

virtual void filterFrom(SolvableVisJones& other, FilterType filterType=meanFilter, Float timeConstant=0.0, Bool doAmpPhase=True, Float scanGap=FLT_MAX)

Filter this from the other. timeConstant is the filter time constant, and scanGap is the gap in time between scans. Both are in seconds.

virtual void interpolateFrom(SolvableVisJones& other, InterpolaterType interpolaterType=spline, Bool doAmpPhase=True)

Interpolate this from the other.

virtual void filter(Vector<Double>& inX, Vector<Array<Double> >& inY, Vector<Bool>& inFlags, Vector<Double>& outX, Vector<Array<Double> >& outY, FilterType filterType, Float timeConstant, Float scanGap=300)

timeConstant and scanGap are in seconds.

virtual void slidingFilter(Vector<Double>& inX, Vector<Array<Double> >& inY, Vector<Bool>& inFlags, Vector<Double>& outX, Vector<Array<Double> >& outY, FilterType filterType, Float timeConstant, Float scanGap=300)

virtual void fluxscale(const Vector<Int>& refFieldIn, const Vector<Int>& tranFieldIn, const Vector<Int>& inRefSpwMap, Matrix<Double>& fluxScaleFactor)

void accumulate(SolvableVisJones& incr, const Vector<Int>& fields)

Accumulate another onto this one

void initSolveCache()

Initialize solve cache

void deleteSolveCache()

Delete solve cache

virtual void load(const String& file, const String& select="", const String& type="general")

The type string specifies whether to load "general", "diagonal" or "scalar" 2x2 Jones matrices.

virtual void updateAntGain()

Update the antenna gains from the gradients.

virtual void keep(const Int& spw,const Int& slot)

Temporary method for copying solved-for matrix into "parameterized" storage (eventually, we'll use the parameterized storage directly in solve)

virtual void reReference(const Int& refAnt)

Re-reference the gain solutions

virtual LogSink& logSink()

LogIO& logSink2()


class GJones : public SolvableVisJones

Interface

Public Members
GJones()
GJones(VisSet& vs)
~GJones()
virtual Type type()

Description

******************************************************************** ******************************************************************** ********************************************************************

Specialized non-solvable types: ******************************

Prerequisite

Etymology

GJones describes an interface for time variable and solvable multiplicative errors to be used in the VisEquation.

Synopsis

See VisEquation for definition of the Visibility Measurement Equation.

GJones performs caching of values to minimize computation. The elements of GJones are only non-zero on the diagonal. The two diagonal elements are different. If you need them to be the same, use TJones.

Motivation

The properties of an multiplicative component must be described for the VisEquation.

To Do

Member Description

GJones()

Null constructor

GJones(VisSet& vs)

~GJones()

virtual Type type()


class BJones : public GJones

Interface

BJones()
BJones(VisSet& vs)
~BJones()
virtual Bool freqDep()
virtual Type type()

Description

******************************************************************** ********************************************************************

Member Description

BJones()

Null constructor

BJones(VisSet& vs)

~BJones()

virtual Bool freqDep()

virtual Type type()


class EVisJones : public SolvableVisJones

Interface

EVisJones()
EVisJones(VisSet& vs)
~EVisJones()
virtual Type type()
virtual void setInterpolation(const Record& interpolation)
virtual void calcAntGainPar(const VisBuffer& vb)
virtual void calcJonesPar(const Int& spw,const Double& time,const Int& field=-1)

Description

******************************************************************** ********************************************************************

Prerequisite

Etymology

EVisJones describes an interface for describing gain curves. E is the generic Jones type for forward gain, and this is the VisJones (i.e., not instantaneously direction dependent) component. Note that the gain curve is direction-dependent as an antenna slews, and is therfore time-dependent.

Synopsis

See VisEquation for definition of the Visibility Measurement Equation.

The elements of EVisJones are only non-zero on the diagonal.

Motivation

The properties of an multiplicative component must be described for the VisEquation.

To Do

Member Description

EVisJones()

Null constructor

EVisJones(VisSet& vs)

~EVisJones()

virtual Type type()

virtual void setInterpolation(const Record& interpolation)

virtual void calcAntGainPar(const VisBuffer& vb)

Get gain curve by calculation

virtual void calcJonesPar(const Int& spw,const Double& time,const Int& field=-1)


class DJones : public SolvableVisJones

Interface

DJones(VisSet& vs)
~DJones()
virtual Type type()
virtual void calcAntGainMat(mjJones2& mat, Vector<Complex>& par)
virtual void calcJonesMat(mjJones2& mat, Vector<Complex>& par)
virtual void keep(const Int& spw,const Int& slot)

Description

******************************************************************** ********************************************************************

Prerequisite

Etymology

DJones describes an interface for time variable and solvable multiplicative errors to be used in the VisEquation.

Synopsis

See VisEquation for definition of the Visibility Measurement Equation.

DJones performs caching of values to minimize computation. The elements of DJones are potentially all If you need only the diagonal use TJones or use GJones.

Motivation

The properties of an multiplicative component must be described for the VisEquation.

To Do

Member Description

DJones(VisSet& vs)

~DJones()

virtual Type type()

virtual void calcAntGainMat(mjJones2& mat, Vector<Complex>& par)

virtual void calcJonesMat(mjJones2& mat, Vector<Complex>& par)

virtual void keep(const Int& spw,const Int& slot)

Temporary method for copying solved-for matrix into "parameterized" storage (eventually, we'll use the parameterized storage directly in solve)


class TJones : public SolvableVisJones

Interface

TJones()
TJones(VisSet& vs)
~TJones()
virtual Type type()
virtual void updateAntGain()

Description

******************************************************************** ********************************************************************

Prerequisite

Etymology

TJones describes an interface for time variable and solvable multiplicative errors to be used in the VisEquation.

Synopsis

See VisEquation for definition of the Visibility Measurement Equation.

TJones performs caching of values to minimize computation. The elements of TJones are only non-zero on the diagonal and are the same. If you need them to be different, use GJones.

Motivation

The properties of an multiplicative component must be described for the VisEquation.

To Do

Member Description

TJones()

Null constructor

TJones(VisSet& vs)

~TJones()

virtual Type type()

virtual void updateAntGain()

Update the antenna gains from the gradients.

class TOpac : public TJones

Interface

TOpac()
TOpac(VisSet& vs)
~TOpac()
virtual Type type()
virtual void setInterpolation(const Record& interpolation)
virtual void calcAntGainPar(const VisBuffer& vb)
virtual void calcJonesPar(const Int& spw,const Double& time,const Int& field=-1)

Description

******************************************************************** ********************************************************************

Prerequisite

Etymology

TOpac describes an interface for TJones parameterized by one or more opacity values for the VisEquation.

Synopsis

See VisEquation for definition of the Visibility Measurement Equation.

The elements of TOpac are only non-zero on the diagonal and are the same.

Motivation

The properties of an multiplicative component must be described for the VisEquation.

To Do

Member Description

TOpac()

Null constructor

TOpac(VisSet& vs)

~TOpac()

virtual Type type()

virtual void setInterpolation(const Record& interpolation)

virtual void calcAntGainPar(const VisBuffer& vb)

Get opacity gain by calculation

virtual void calcJonesPar(const Int& spw,const Double& time,const Int& field=-1)


class FVisJones : public SolvableVisJones

Interface

FVisJones()
FVisJones(VisSet& vs)
~FVisJones()
virtual Type type()
virtual void updateAntGain()

Description

******************************************************************** ********************************************************************

Prerequisite

Etymology

FVisJones describes an interface for time variable and solvable multiplicative errors to be used in the VisEquation.

Synopsis

See VisEquation for definition of the Visibility Measurement Equation.

FVisJones performs caching of values to minimize computation.

Motivation

The properties of an multiplicative component must be described for the VisEquation.

To Do

Member Description

FVisJones()

Null constructor

FVisJones(VisSet& vs)

~FVisJones()

virtual Type type()

virtual void updateAntGain()

Update the antenna gains from the gradients.