SkyEquation.h
Classes
- SkyEquation -- (full description)
Interface
- Public Members
- SkyEquation(SkyModel& sm, VisSet& vs, FTMachine& ft)
- SkyEquation(SkyModel& sm, VisSet& vs, FTMachine& ft, ComponentFTMachine& cft, Bool noModelcol=False)
- SkyEquation(SkyModel& sm, VisSet& vs, FTMachine& ft, FTMachine& ift)
- SkyEquation(SkyModel& sm, VisSet& vs, FTMachine& ft, FTMachine& ift, ComponentFTMachine& cft)
- SkyModel& skyModel()
- VisSet& visSet()
- FTMachine& fTMachine()
- FTMachine& iFTMachine()
- ComponentFTMachine& componentFTMachine()
- virtual ~SkyEquation()
- SkyEquation& operator=(const SkyEquation& other)
- SkyEquation(const SkyEquation& other)
- void setSkyJones(SkyJones& j)
- virtual void makeApproxPSF(Int model, ImageInterface<Float>& PSF)
- virtual void makeComplexXFRs()
- virtual void predict(Bool incremental=False)
- virtual void gradientsChiSquared(const Matrix<Bool>& required, SkyJones& sj)
- virtual void gradientsChiSquared(Bool incremental, Bool commitToMS=False)
- virtual Bool solveSkyModel()
- virtual Bool solveSkyJones(SkyJones& sj)
- void setImagePlaneWeighting(const String& type, const Float minPB, const Float constPB)
- virtual void lock()
- virtual void unlock()
- virtual String associatedMSName()
- Protected Members
- virtual void incrementGradientsChiSquared()
- virtual void fullGradientsChiSquared(Bool incremental=False)
- virtual void fullGradientsChiSquared(Bool incremental, Bool useCorrectedData)
- SkyEquation()
- Bool ok()
- virtual void initializeGet(const VisBuffer& vb, Int row, Int model, Bool incremental)
- virtual void initializeGet(const VisBuffer& vb, Int row, Int model, Array<Complex>& griddedVis, Vector<Double>& uvscale, Vector* & uvwMachine, Bool incremental)
- virtual VisBuffer& get(VisBuffer& vb, Int model, Bool incremental)
- virtual void finalizeGet()
- virtual void initializePut(const VisBuffer &vb, Int model)
- virtual void initializePut(const VisBuffer &vb, Int model, Vector<Double>& uvscale, UVWMachine* & uvwMachine)
- virtual void put(const VisBuffer& vb, Int model, Bool dopsf=False, FTMachine::Type col=FTMachine::OBSERVED)
- virtual void put(const VisBuffer& vb, Int model, Vector<Double>& scale, UVWMachine *uvwMachine, Bool dopsf=False)
- virtual void finalizePut(const VisBuffer& vb, Int Model)
- virtual void finalizePut(const VisBuffer& vb, Int Model, Bool& isCopy)
- virtual void changedSkyJonesLogic(const VisBuffer& vb, Bool& firstOneChanges, Bool& internalChanges)
- virtual Bool changedSkyJones(const VisBuffer& vb, Int row)
- virtual Bool changedFTMachine(const VisBuffer& vb)
- virtual Bool changedIFTMachine(const VisBuffer& vb)
- virtual Bool changedSkyJonesBuffer(const VisBuffer& vb, Int row1, Int& row2)
- virtual void resetSkyJones()
- virtual void assertSkyJones(const VisBuffer& vb, Int row)
- virtual ImageInterface<Complex>& applySkyJones(const Complex& vb, Int row, ImageInterface<Float>& in, ImageInterface<Complex>& out)
- virtual void applySkyJonesInv(const VisBuffer& vb, Int row, ImageInterface<Complex>& in, ImageInterface<Float>& work, ImageInterface<Float>& out)
- virtual void applySkyJonesSquare(const VisBuffer& vb, Int row, Matrix<Float>& weights, ImageInterface<Float>& work, ImageInterface<Float>& ggS)
- virtual void initializePutXFR(const VisBuffer &vb, Int model, Int numXFR)
- virtual void putXFR(const VisBuffer& vb, Int model, Int& numXFR)
- virtual void finalizePutXFR(const VisBuffer& vb, Int Model, Int numXFR)
- virtual void initializePutConvolve(const VisBuffer &vb, Int model, Int numXFR)
- virtual void putConvolve(const VisBuffer& vb, Int model, Int& numXFR)
- virtual void finalizePutConvolve(const VisBuffer& vb, Int Model, Int numXFR)
- virtual VisBuffer& get(VisBuffer& vb, const SkyComponent& component)
- virtual VisBuffer& get(VisBuffer& vb, const ComponentList& components)
- virtual Bool get(VisBuffer& vb, PtrBlock< Array<Complex> *>& griddedVis, Cube<Complex>& modelVis, Cube< Block<Double> >& uvscale, PtrBlock<Vector *>& uvwMachines, Bool& incremental)
- SkyComponent& applySkyJones(SkyComponent& corruptedComponent, const VisBuffer& vb, Int row)
- virtual void fixImageScale()
- virtual void scaleImage(Int model, Bool incremental)
- virtual void unScaleImage(Int model, Bool incremental)
- virtual void scaleImage(Int model=0)
- virtual void unScaleImage(Int model=0)
- virtual void scaleDeltaImage(Int model=0)
- virtual void unScaleDeltaImage(Int model=0)
- LogSink& logSink()
Member Description
Define a SkyEquation linking a VisSet vs with a SkyModel sm
using an FTMachine ft for transforms in both directions
Define a SkyEquation linking a VisSet vs with a SkyModel sm
using an FTMachine ft for transforms in both directions and
a ComponentFTMachine for the component lists
Define a SkyEquation linking a VisSet vs with a SkyModel sm
using an FTMachine ft for Sky->Vis and ift for Vis->Sky
Define a SkyEquation linking a VisSet vs with a SkyModel sm
using an FTMachine ft for Sky->Vis and ift for Vis->Sky and
a ComponentFTMachine for the component lists
Default make use of MODEL_DATA Column of ms
Return the SkyModel used by this SkyEquation
Return the VisSet used by this SkyEquation
Return the (Sky->Vis) FTMachine used by this SkyEquation
Return the (Vis->Sky) FTMachine used by this SkyEquation
Return the (Sky->Vis) ComponentFTMachine used by this SkyEquation
Destructor
SkyEquation& operator=(const SkyEquation& other)
Assignment operator
SkyEquation(const SkyEquation& other)
Copy constructor
Add Jones matrices to be used for Gain calculations. Each SkyJones
knows what type it is and therefore where to slot in.
virtual void makeApproxPSF(Int model, ImageInterface<Float>& PSF)
Make an approximate PSF for each model. The PSF is approximate
in the sense that it is a shift-invariant approximation
Make complex XFRs needed for incrementGradientChiSquared
virtual void predict(Bool incremental=False)
Predict model coherence for the SkyModel. If this is
incremental then the model visibilities are not reset
but are simply added to
Find sum of weights, Chi-squared, and the first and second derivatives
by transforming to the measurements.
Solve for variables. Both the SkyModel and the SkyJones can in
principle be solved for.
void setImagePlaneWeighting(const String& type, const Float minPB, const Float constPB)
Set image plane weighting
virtual void lock()
Lock and unlock the underlying MeasurementSet
virtual void unlock()
Return the name of the underlying MeasurementSet
Increment gradientsChiSquared. The image of SkyModel must contain
the increment to the image. For each model, a collection of
complex transfer functions are used to avoid gridding and
degridding all the visibilities.
Do the full calculation - this must be called if the FTMachine
cannot be represented by a Fourier transform
virtual void fullGradientsChiSquared(Bool incremental, Bool useCorrectedData)
Bool ok()
Check for validity
virtual void changedSkyJonesLogic(const VisBuffer& vb, Bool& firstOneChanges, Bool& internalChanges)
Apply Sky Jones to an image, also adjoint operation
This encapsulates all of the change logic we should have to deal
with (short of returning a range of rows that has the same
SkyJones). First we look to see if the first row of the VB
requires a new SkyJones; then we determine if there are
internal SkyJones changes in the VB which require going
row by row in the get/put formalism.
Apply Sky Jones to an image, also adjoint operation
Have the SkyJones changed since their last application?
Apply Sky Jones to an image, also adjoint operation
Has the FTMachine changed since last application?
virtual void initializeGet(const VisBuffer& vb, Int row, Int model, Bool incremental)
virtual void initializeGet(const VisBuffer& vb, Int row, Int model, Array<Complex>& griddedVis, Vector<Double>& uvscale, Vector* & uvwMachine, Bool incremental)
virtual VisBuffer& get(VisBuffer& vb, Int model, Bool incremental)
virtual void finalizeGet()
virtual void initializePut(const VisBuffer &vb, Int model)
virtual void initializePut(const VisBuffer &vb, Int model, Vector<Double>& uvscale, UVWMachine* & uvwMachine)
virtual void put(const VisBuffer& vb, Int model, Bool dopsf=False, FTMachine::Type col=FTMachine::OBSERVED)
virtual void put(const VisBuffer& vb, Int model, Vector<Double>& scale, UVWMachine *uvwMachine, Bool dopsf=False)
virtual void finalizePut(const VisBuffer& vb, Int Model)
virtual void finalizePut(const VisBuffer& vb, Int Model, Bool& isCopy)
virtual Bool changedSkyJonesBuffer(const VisBuffer& vb, Int row1, Int& row2)
virtual void resetSkyJones()
virtual void assertSkyJones(const VisBuffer& vb, Int row)
virtual ImageInterface<Complex>& applySkyJones(const Complex& vb, Int row, ImageInterface<Float>& in, ImageInterface<Complex>& out)
virtual void applySkyJonesInv(const VisBuffer& vb, Int row, ImageInterface<Complex>& in, ImageInterface<Float>& work, ImageInterface<Float>& out)
virtual void applySkyJonesSquare(const VisBuffer& vb, Int row, Matrix<Float>& weights, ImageInterface<Float>& work, ImageInterface<Float>& ggS)
Apply Sky Jones to an image, also adjoint operation
virtual void initializePutXFR(const VisBuffer &vb, Int model, Int numXFR)
virtual void putXFR(const VisBuffer& vb, Int model, Int& numXFR)
virtual void finalizePutXFR(const VisBuffer& vb, Int Model, Int numXFR)
Puts for calculating the complex XFRs
Puts for calculating the complex convolutions
virtual Bool get(VisBuffer& vb, PtrBlock< Array<Complex> *>& griddedVis, Cube<Complex>& modelVis, Cube< Block<Double> >& uvscale, PtrBlock<Vector *>& uvwMachines, Bool& incremental)
Get, etc. for a SkyComponent is much simpler
Do the sum of the gets for all the models for this visbuffer
Get, etc. for a SkyComponent is much simpler
Modify the ggS and Create the imageScale
virtual void scaleImage(Int model, Bool incremental)
virtual void unScaleImage(Int model, Bool incremental)
virtual void scaleImage(Int model=0)
virtual void unScaleImage(Int model=0)
virtual void scaleDeltaImage(Int model=0)
virtual void unScaleDeltaImage(Int model=0)
Workspace