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)
GJonesDelayRateSB -- GJonesDelayRateSB: Model solvable, time-variable multiplicative errors for the VisEquation (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 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)
Protected Members
void initSolveCache()
void deleteSolveCache()
virtual void load(const String& file, const String& select="", const String& type="general")
virtual void updateAntGain(Int slot)
virtual void getAntGain(Matrix<mjJones2>& ag, Vector<Bool> &agOK, const Vector& vb, const Double& time)
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 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 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(Int slot)

Update the antenna gains from the gradients.

virtual void getAntGain(Matrix<mjJones2>& ag, Vector<Bool> &agOK, const Vector& vb, const Double& time)

Get antenna gain from store. To be defined in derived class.

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 GJonesDelayRateSB : public GJones

Interface

GJonesDelayRateSB(VisSet& vs, Double interval=DBL_MAX, Double preavg=DBL_MAX, Double deltat=1.0, Int refant=-1)
~GJonesDelayRateSB()
virtual Bool freqDep()
virtual Bool solve (VisEquation& me)

Description

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

Prerequisite

Etymology

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

GJonesDelayRateSB performs caching of values to minimize computation. The elements of GJonesDelayRateSB 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

GJonesDelayRateSB(VisSet& vs, Double interval=DBL_MAX, Double preavg=DBL_MAX, Double deltat=1.0, Int refant=-1)

~GJonesDelayRateSB()

GJonesDelayRateSB(VisSet& vs, String file, const String& select);

virtual Bool freqDep()

Frequency dependent

virtual Bool solve (VisEquation& me)

Solve

class EVisJones : public SolvableVisJones

Interface

EVisJones()
EVisJones(VisSet& vs)
~EVisJones()
virtual Type type()
virtual void setInterpolation(const Record& interpolation)
virtual void getAntGain(Matrix<mjJones2>& ag, Vector<Bool> &agOK, const Vector& vb, const Double& time)

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 getAntGain(Matrix<mjJones2>& ag, Vector<Bool> &agOK, const Vector& vb, const Double& time)

Get opacity gain by calculation


class DJones : public SolvableVisJones

Interface

DJones(VisSet& vs)
~DJones()
virtual Type type()

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()


class TJones : public SolvableVisJones

Interface

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

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(Int slot)

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 getAntGain(Matrix<mjJones2>& ag, Vector<Bool> &agOK, const Vector& vb, const Double& time)

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 getAntGain(Matrix<mjJones2>& ag, Vector<Bool> &agOK, const Vector& vb, const Double& time)

Get opacity gain by calculation


class FVisJones : public SolvableVisJones

Interface

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

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(Int slot)

Update the antenna gains from the gradients.