#include <SkyEquation.h>
Inheritance diagram for casa::SkyEquation:


Definition at line 132 of file SkyEquation.h.
Public Member Functions | |
| SkyEquation (SkyModel &sm, VisSet &vs, FTMachine &ft) | |
| Define a SkyEquation linking a VisSet vs with a SkyModel sm using an FTMachine ft for transforms in both directions. | |
| SkyEquation (SkyModel &sm, VisSet &vs, FTMachine &ft, ComponentFTMachine &cft, Bool noModelcol=False) | |
| 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. | |
| SkyEquation (SkyModel &sm, VisSet &vs, FTMachine &ft, FTMachine &ift) | |
| Define a SkyEquation linking a VisSet vs with a SkyModel sm using an FTMachine ft for Sky->Vis and ift for Vis->Sky. | |
| SkyEquation (SkyModel &sm, VisSet &vs, FTMachine &ft, FTMachine &ift, ComponentFTMachine &cft) | |
| 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. | |
| SkyModel & | skyModel () |
| Return the SkyModel used by this SkyEquation. | |
| VisSet & | visSet () |
| Return the VisSet used by this SkyEquation. | |
| FTMachine & | fTMachine () |
| Return the (Sky->Vis) FTMachine used by this SkyEquation. | |
| FTMachine & | iFTMachine () |
| Return the (Vis->Sky) FTMachine used by this SkyEquation. | |
| ComponentFTMachine & | componentFTMachine () |
| Return the (Sky->Vis) ComponentFTMachine used by this SkyEquation. | |
| virtual | ~SkyEquation () |
| Destructor. | |
| SkyEquation & | operator= (const SkyEquation &other) |
| Assignment operator. | |
| SkyEquation (const SkyEquation &other) | |
| Copy constructor. | |
| void | setSkyJones (SkyJones &j) |
| Add Jones matrices to be used for Gain calculations. | |
| virtual void | makeApproxPSF (Int model, ImageInterface< Float > &PSF) |
| Make an approximate PSF for each model. | |
| virtual void | makeApproxPSF (PtrBlock< TempImage< Float > * > &PSFs) |
| make all the approx psfs in one go | |
| virtual void | makeComplexXFRs () |
| Make complex XFRs needed for incrementGradientChiSquared. | |
| virtual void | predict (Bool incremental=False) |
| Predict model coherence for the SkyModel. | |
| 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 () |
| virtual String | associatedMSName () |
| Return the name of the underlying MeasurementSet. | |
| virtual void | gradientsChiSquared (const Matrix< Bool > &required, SkyJones &sj) |
| Find sum of weights, Chi-squared, and the first and second derivatives by transforming to the measurements. | |
| virtual void | gradientsChiSquared (Bool incremental, Bool commitToMS=False) |
| virtual Bool | solveSkyModel () |
| Solve for variables. | |
| virtual Bool | solveSkyJones (SkyJones &sj) |
Protected Member Functions | |
| virtual void | incrementGradientsChiSquared () |
| Increment gradientsChiSquared. | |
| virtual void | fullGradientsChiSquared (Bool incremental=False) |
| 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) |
| SkyEquation () | |
| Bool | ok () |
| Check for validity. | |
| virtual Bool | changedSkyJonesBuffer (const VisBuffer &vb, Int row1, Int &row2) |
| Do the Sky Jones change in this Visbuffer, starting from row1? Returns row2, the last row with the same skyJones. | |
| virtual void | resetSkyJones () |
| virtual void | assertSkyJones (const VisBuffer &vb, Int row) |
| virtual ImageInterface< Complex > & | applySkyJones (const VisBuffer &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 | fixImageScale () |
| Modify the ggS and Create the imageScale. | |
| virtual void | checkVisIterNumRows (ROVisibilityIterator &vi) |
| Check the VisIter chunck size. | |
| virtual void | predictComponents (Bool &incremental, Bool &initialized) |
| LogSink & | logSink () |
| virtual void | initializeGet (const VisBuffer &vb, Int row, Int model, Bool incremental) |
| Apply Sky Jones to an image, also adjoint operation. | |
| virtual void | initializeGet (const VisBuffer &vb, Int row, Int model, Array< Complex > &griddedVis, Vector< Double > &uvscale, UVWMachine *&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) |
| 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). | |
| virtual Bool | changedSkyJones (const VisBuffer &vb, Int row) |
| Have the SkyJones changed since their last application? | |
| virtual Bool | changedFTMachine (const VisBuffer &vb) |
| Has the FTMachine changed since last application? | |
| virtual Bool | changedIFTMachine (const VisBuffer &vb) |
| virtual void | initializePutXFR (const VisBuffer &vb, Int model, Int numXFR) |
| Puts for calculating the complex XFRs. | |
| 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) |
| Puts for calculating the complex convolutions. | |
| 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) |
| Get, etc. | |
| virtual VisBuffer & | get (VisBuffer &vb, const ComponentList &components) |
| virtual Bool | get (VisBuffer &vb, PtrBlock< Array< Complex > * > &griddedVis, Cube< Complex > &modelVis, Block< Vector< Double > > &uvscale, PtrBlock< UVWMachine * > &uvwMachines, Bool &incremental) |
| Do the sum of the gets for all the models for this visbuffer. | |
| SkyComponent & | applySkyJones (SkyComponent &corruptedComponent, const VisBuffer &vb, Int row) |
| virtual void | scaleImage (Int model, Bool incremental) |
| Deal with scaling or unscaling image or deltaImage. | |
| 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) |
Protected Attributes | |
| SkyModel * | sm_ |
| SkyModel. | |
| VisSet * | vs_ |
| VisSet. | |
| LogSink | logSink_p |
| Int | iDebug_p |
| VisBuffer | vb_p |
| Previous VisBuffer, used to determine how to apply SkyJones; Set in initializePut and initializePutXFR, Used in finalizePut and finalizePutXFR. | |
| Float | minPB_p |
| Float | constPB_p |
| String | scaleType_p |
| Bool | isPSFWork_p |
| Bool | noModelCol_p |
| Vector< Bool > | modelIsEmpty_p |
| Bool | isBeginingOfSkyJonesCache_p |
| SkyJones::changed returns a True the first time its called We have to ignore this at the very begining and first call to 'changed' and not call finalizePut. | |
| FTMachine * | ft_ |
| FTMachine objects. | |
| FTMachine * | ift_ |
| ComponentFTMachine * | cft_ |
| SkyJones * | ej_ |
| List of terms in left to right order. | |
| SkyJones * | dj_ |
| SkyJones * | tj_ |
| SkyJones * | fj_ |
| Float | chisq |
| Workspace. | |
| Float | sumwt |
| Matrix< Float > | sggS |
Define a SkyEquation linking a VisSet vs with a SkyModel sm using an FTMachine ft for transforms in both directions.
| casa::SkyEquation::SkyEquation | ( | SkyModel & | sm, | |
| VisSet & | vs, | |||
| FTMachine & | ft, | |||
| ComponentFTMachine & | cft, | |||
| Bool | noModelcol = False | |||
| ) |
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.
| casa::SkyEquation::SkyEquation | ( | SkyModel & | sm, | |
| VisSet & | vs, | |||
| FTMachine & | ft, | |||
| FTMachine & | ift, | |||
| ComponentFTMachine & | cft | |||
| ) |
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.
| virtual casa::SkyEquation::~SkyEquation | ( | ) | [virtual] |
Destructor.
| casa::SkyEquation::SkyEquation | ( | const SkyEquation & | other | ) |
Copy constructor.
| casa::SkyEquation::SkyEquation | ( | ) | [inline, protected] |
Definition at line 242 of file SkyEquation.h.
| SkyModel& casa::SkyEquation::skyModel | ( | ) | [inline] |
Return the SkyModel used by this SkyEquation.
Definition at line 158 of file SkyEquation.h.
References sm_.
| VisSet& casa::SkyEquation::visSet | ( | ) | [inline] |
Return the VisSet used by this SkyEquation.
Definition at line 161 of file SkyEquation.h.
References vs_.
| FTMachine& casa::SkyEquation::fTMachine | ( | ) | [inline] |
Return the (Sky->Vis) FTMachine used by this SkyEquation.
Definition at line 164 of file SkyEquation.h.
References ft_.
| FTMachine& casa::SkyEquation::iFTMachine | ( | ) | [inline] |
Return the (Vis->Sky) FTMachine used by this SkyEquation.
Definition at line 167 of file SkyEquation.h.
References ift_.
| ComponentFTMachine& casa::SkyEquation::componentFTMachine | ( | ) | [inline] |
Return the (Sky->Vis) ComponentFTMachine used by this SkyEquation.
Definition at line 170 of file SkyEquation.h.
References cft_.
| SkyEquation& casa::SkyEquation::operator= | ( | const SkyEquation & | other | ) |
Assignment operator.
| void casa::SkyEquation::setSkyJones | ( | SkyJones & | j | ) |
| virtual void casa::SkyEquation::makeApproxPSF | ( | Int | model, | |
| ImageInterface< Float > & | PSF | |||
| ) | [virtual] |
Make an approximate PSF for each model.
The PSF is approximate in the sense that it is a shift-invariant approximation
make all the approx psfs in one go
| virtual void casa::SkyEquation::makeComplexXFRs | ( | ) | [virtual] |
Make complex XFRs needed for incrementGradientChiSquared.
Predict model coherence for the SkyModel.
If this is incremental then the model visibilities are not reset but are simply added to
| virtual void casa::SkyEquation::gradientsChiSquared | ( | const Matrix< Bool > & | required, | |
| SkyJones & | sj | |||
| ) | [virtual] |
Find sum of weights, Chi-squared, and the first and second derivatives by transforming to the measurements.
| virtual void casa::SkyEquation::gradientsChiSquared | ( | Bool | incremental, | |
| Bool | commitToMS = False | |||
| ) | [virtual] |
| virtual Bool casa::SkyEquation::solveSkyModel | ( | ) | [virtual] |
| void casa::SkyEquation::setImagePlaneWeighting | ( | const String & | type, | |
| const Float | minPB, | |||
| const Float | constPB | |||
| ) | [inline] |
Set image plane weighting.
Definition at line 215 of file SkyEquation.h.
References constPB_p, minPB_p, scaleType_p, and casa::type().
| virtual void casa::SkyEquation::lock | ( | ) | [virtual] |
Lock and unlock the underlying MeasurementSet.
| virtual void casa::SkyEquation::unlock | ( | ) | [virtual] |
| virtual String casa::SkyEquation::associatedMSName | ( | ) | [virtual] |
Return the name of the underlying MeasurementSet.
| virtual void casa::SkyEquation::incrementGradientsChiSquared | ( | ) | [protected, virtual] |
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.
| virtual void casa::SkyEquation::fullGradientsChiSquared | ( | Bool | incremental = False |
) | [protected, virtual] |
Do the full calculation - this must be called if the FTMachine cannot be represented by a Fourier transform.
| virtual void casa::SkyEquation::fullGradientsChiSquared | ( | Bool | incremental, | |
| Bool | useCorrectedData | |||
| ) | [protected, virtual] |
| Bool casa::SkyEquation::ok | ( | ) | [protected] |
Check for validity.
| virtual void casa::SkyEquation::initializeGet | ( | const VisBuffer & | vb, | |
| Int | row, | |||
| Int | model, | |||
| Bool | incremental | |||
| ) | [protected, virtual] |
Apply Sky Jones to an image, also adjoint operation.
| virtual void casa::SkyEquation::initializeGet | ( | const VisBuffer & | vb, | |
| Int | row, | |||
| Int | model, | |||
| Array< Complex > & | griddedVis, | |||
| Vector< Double > & | uvscale, | |||
| UVWMachine *& | uvwMachine, | |||
| Bool | incremental | |||
| ) | [protected, virtual] |
| virtual VisBuffer& casa::SkyEquation::get | ( | VisBuffer & | vb, | |
| Int | model, | |||
| Bool | incremental | |||
| ) | [protected, virtual] |
| virtual void casa::SkyEquation::finalizeGet | ( | ) | [protected, virtual] |
| virtual void casa::SkyEquation::initializePut | ( | const VisBuffer & | vb, | |
| Int | model | |||
| ) | [protected, virtual] |
| virtual void casa::SkyEquation::initializePut | ( | const VisBuffer & | vb, | |
| Int | model, | |||
| Vector< Double > & | uvscale, | |||
| UVWMachine *& | uvwMachine | |||
| ) | [protected, virtual] |
| virtual void casa::SkyEquation::put | ( | const VisBuffer & | vb, | |
| Int | model, | |||
| Bool | dopsf = False, |
|||
| FTMachine::Type | col = FTMachine::OBSERVED | |||
| ) | [protected, virtual] |
| virtual void casa::SkyEquation::put | ( | const VisBuffer & | vb, | |
| Int | model, | |||
| Vector< Double > & | scale, | |||
| UVWMachine * | uvwMachine, | |||
| Bool | dopsf = False | |||
| ) | [protected, virtual] |
| virtual void casa::SkyEquation::finalizePut | ( | const VisBuffer & | vb, | |
| Int | Model | |||
| ) | [protected, virtual] |
| virtual void casa::SkyEquation::finalizePut | ( | const VisBuffer & | vb, | |
| Int | Model, | |||
| Bool & | isCopy | |||
| ) | [protected, virtual] |
| virtual void casa::SkyEquation::changedSkyJonesLogic | ( | const VisBuffer & | vb, | |
| Bool & | firstOneChanges, | |||
| Bool & | internalChanges | |||
| ) | [protected, virtual] |
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.
| virtual Bool casa::SkyEquation::changedSkyJones | ( | const VisBuffer & | vb, | |
| Int | row | |||
| ) | [protected, virtual] |
Have the SkyJones changed since their last application?
Has the FTMachine changed since last application?
| virtual Bool casa::SkyEquation::changedSkyJonesBuffer | ( | const VisBuffer & | vb, | |
| Int | row1, | |||
| Int & | row2 | |||
| ) | [protected, virtual] |
Do the Sky Jones change in this Visbuffer, starting from row1? Returns row2, the last row with the same skyJones.
| virtual void casa::SkyEquation::resetSkyJones | ( | ) | [protected, virtual] |
| virtual void casa::SkyEquation::assertSkyJones | ( | const VisBuffer & | vb, | |
| Int | row | |||
| ) | [protected, virtual] |
| virtual ImageInterface<Complex>& casa::SkyEquation::applySkyJones | ( | const VisBuffer & | vb, | |
| Int | row, | |||
| ImageInterface< Float > & | in, | |||
| ImageInterface< Complex > & | out | |||
| ) | [protected, virtual] |
| virtual void casa::SkyEquation::applySkyJonesInv | ( | const VisBuffer & | vb, | |
| Int | row, | |||
| ImageInterface< Complex > & | in, | |||
| ImageInterface< Float > & | work, | |||
| ImageInterface< Float > & | out | |||
| ) | [protected, virtual] |
| virtual void casa::SkyEquation::applySkyJonesSquare | ( | const VisBuffer & | vb, | |
| Int | row, | |||
| Matrix< Float > & | weights, | |||
| ImageInterface< Float > & | work, | |||
| ImageInterface< Float > & | ggS | |||
| ) | [protected, virtual] |
| virtual void casa::SkyEquation::initializePutXFR | ( | const VisBuffer & | vb, | |
| Int | model, | |||
| Int | numXFR | |||
| ) | [protected, virtual] |
Puts for calculating the complex XFRs.
| virtual void casa::SkyEquation::putXFR | ( | const VisBuffer & | vb, | |
| Int | model, | |||
| Int & | numXFR | |||
| ) | [protected, virtual] |
| virtual void casa::SkyEquation::finalizePutXFR | ( | const VisBuffer & | vb, | |
| Int | Model, | |||
| Int | numXFR | |||
| ) | [protected, virtual] |
| virtual void casa::SkyEquation::initializePutConvolve | ( | const VisBuffer & | vb, | |
| Int | model, | |||
| Int | numXFR | |||
| ) | [protected, virtual] |
Puts for calculating the complex convolutions.
| virtual void casa::SkyEquation::putConvolve | ( | const VisBuffer & | vb, | |
| Int | model, | |||
| Int & | numXFR | |||
| ) | [protected, virtual] |
| virtual void casa::SkyEquation::finalizePutConvolve | ( | const VisBuffer & | vb, | |
| Int | Model, | |||
| Int | numXFR | |||
| ) | [protected, virtual] |
| virtual VisBuffer& casa::SkyEquation::get | ( | VisBuffer & | vb, | |
| const SkyComponent & | component | |||
| ) | [protected, virtual] |
Get, etc.
for a SkyComponent is much simpler
| virtual VisBuffer& casa::SkyEquation::get | ( | VisBuffer & | vb, | |
| const ComponentList & | components | |||
| ) | [protected, virtual] |
| virtual Bool casa::SkyEquation::get | ( | VisBuffer & | vb, | |
| PtrBlock< Array< Complex > * > & | griddedVis, | |||
| Cube< Complex > & | modelVis, | |||
| Block< Vector< Double > > & | uvscale, | |||
| PtrBlock< UVWMachine * > & | uvwMachines, | |||
| Bool & | incremental | |||
| ) | [protected, virtual] |
Do the sum of the gets for all the models for this visbuffer.