casa
$Rev:20696$
|
WB Clean Image Sky Model: Image Sky Model implementing a Wide-Band multi frequency synthesis algorithm. More...
#include <WBCleanImageSkyModel.h>
Public Member Functions | |
WBCleanImageSkyModel () | |
Create a WBCleanImageSkyModel - default scale size = 1 pixel. | |
WBCleanImageSkyModel (const Int ntaylor, const Int nscales, const Double reffreq) | |
WBCleanImageSkyModel (const Int ntaylor, const Vector< Float > &userScaleSizes, const Double reffreq) | |
~WBCleanImageSkyModel () | |
destructor | |
Bool | solve (SkyEquation &se) |
Solve for this SkyModel. | |
Bool | solveResiduals (SkyEquation &se, Bool modelToMS=False) |
Int add(ImageInterface<Float>& iimage, const Int maxNumXfr=100); Bool addResidual(Int thismodel, ImageInterface<Float>& iresidual); void initializeGradients();. | |
Bool | makeNewtonRaphsonStep (SkyEquation &se, Bool incremental=False, Bool modelToMS=False) |
Make Newton Raphson step internally. | |
Int | numberOfTaylorTerms () |
MFS : Number of taylor terms per model. | |
Double | getReferenceFrequency () |
MFS : Reference Frequency. | |
Int | getModelIndex (uInt model, uInt taylor) |
Major axis for ordering : Taylor. | |
Int | getTaylorIndex (uInt index) |
Int | getFieldIndex (uInt index) |
Bool | calculateCoeffResiduals () |
MFS : In-place coefficient residual calculations. | |
Bool | calculateAlphaBeta (const Vector< String > &restoredNames, const Vector< String > &residualNames) |
MFS : Calculate restored alpha and beta. | |
Public Attributes | |
Int | ntaylor_p |
Bool copyLatToImInt(TempLattice<Float>& lat, ImageInterface<Float>& im); Bool copyImIntToLat(TempLattice<Float>& lat, ImageInterface<Float>& im);. | |
Int | nscales_p |
Int nfields_p; // Number of image fields/pointings. | |
Double | refFrequency_p |
Vector< String > | imageNames |
Major axis for ordering : Models inline Int getModelIndex(uInt model, uInt taylor){return model * (ntaylor_p) + (taylor);}; inline Int getPSFModelIndex(uInt model, uInt taylor){return model * (2*ntaylor_p-1) + (taylor);}; inline Int getTaylorIndex(uInt index){return indexntaylor_p;}; inline Int getFieldIndex(uInt index){return index/ntaylor_p;};. | |
Private Member Functions | |
void | initVars () |
Bool | checkParameters () |
Int | storeAsImg (String fileName, ImageInterface< Float > &theImg) |
Bool | mergeDataError (ImageInterface< Float > &data, ImageInterface< Float > &error, const String &outImg) |
Int storeTLAsImg(String fileName, TempLattice<Float> &TL, ImageInterface<Float>& theImg); Int storeTLAsImg(String fileName, TempLattice<Complex> &TL, ImageInterface<Float>& theImg);. | |
Bool | createMask (LatticeExpr< Bool > &lemask, ImageInterface< Float > &outimage) |
Bool | resizeWorkArrays (Int length) |
Int | makeSpectralPSFs (SkyEquation &se, Bool writeToDisk) |
Int | writeResultsToDisk () |
Int addTo(Lattice<Float>& to, const Lattice<Float>& add, Float multiplier);. | |
Float | computeFluxLimit (Float &fractionOfPsf) |
void | blankOverlappingModels () |
void | restoreOverlappingModels () |
Float | saveCurrentModels () |
Private Attributes | |
Block< MultiTermMatrixCleaner > | lc_p |
PtrBlock<MultiTermLatticeCleaner<Float>* > lc_p;. | |
Vector< Float > | scaleSizes_p |
Vector< Float > | scaleBias_p |
Float | maxPsf_p |
IPosition | gip |
IPosition | imshape |
Bool | donePSF_p |
If PSF is done..should not redo it. | |
Bool | doneMTMCinit_p |
Int | nx |
Int | ny |
Int | numbermajorcycles_p |
Float | previous_maxresidual_p |
Double | memoryMB_p |
Memory to be allocated per TempLattice. | |
LogIO | os |
Timer | tmr1 |
Timer | tmr2 |
Int | adbg |
Int | tdbg |
Int | ddbg |
WB Clean Image Sky Model: Image Sky Model implementing a Wide-Band multi frequency synthesis algorithm.
Public interface
WBCleanImageSkyModel implements the Wide Band Clean algorithm. It is derived from SkyModel .
The WB Clean is the multi-frequency synthesis deconvolution algorithm. It decomposes an image into a linear compbination of models convolved with spectral dirty beams of various order. A multiscale variant can be invoked by supplying a user vector of scale sizes. Default is 1, corresponding to a scale insensitive mfs deconvolution.
Masking is optionally performed using a mask image: only points where the mask is non-zero are searched for Gaussian components. This can cause some difficulty, as the different Gaussian scale sizes will extend beyond the mask by different amounts. If no mask is specified all points in the inner quarter of the image are cleaned.
See the example for SkyModel .
Definition at line 91 of file WBCleanImageSkyModel.h.
Create a WBCleanImageSkyModel - default scale size = 1 pixel.
casa::WBCleanImageSkyModel::WBCleanImageSkyModel | ( | const Int | ntaylor, |
const Int | nscales, | ||
const Double | reffreq | ||
) |
casa::WBCleanImageSkyModel::WBCleanImageSkyModel | ( | const Int | ntaylor, |
const Vector< Float > & | userScaleSizes, | ||
const Double | reffreq | ||
) |
destructor
void casa::WBCleanImageSkyModel::blankOverlappingModels | ( | ) | [private] |
Bool casa::WBCleanImageSkyModel::calculateAlphaBeta | ( | const Vector< String > & | , |
const Vector< String > & | |||
) | [virtual] |
MFS : Calculate restored alpha and beta.
Reimplemented from casa::ImageSkyModel.
Bool casa::WBCleanImageSkyModel::calculateCoeffResiduals | ( | ) | [virtual] |
MFS : In-place coefficient residual calculations.
Reimplemented from casa::ImageSkyModel.
Bool casa::WBCleanImageSkyModel::checkParameters | ( | ) | [private] |
Float casa::WBCleanImageSkyModel::computeFluxLimit | ( | Float & | fractionOfPsf | ) | [private] |
Bool casa::WBCleanImageSkyModel::createMask | ( | LatticeExpr< Bool > & | lemask, |
ImageInterface< Float > & | outimage | ||
) | [private] |
Int casa::WBCleanImageSkyModel::getFieldIndex | ( | uInt | index | ) | [inline] |
Definition at line 126 of file WBCleanImageSkyModel.h.
References casa::ImageSkyModel::nfields_p.
Int casa::WBCleanImageSkyModel::getModelIndex | ( | uInt | model, |
uInt | taylor | ||
) | [inline, virtual] |
Major axis for ordering : Taylor.
Reimplemented from casa::ImageSkyModel.
Definition at line 124 of file WBCleanImageSkyModel.h.
References casa::ImageSkyModel::nfields_p.
Double casa::WBCleanImageSkyModel::getReferenceFrequency | ( | ) | [inline, virtual] |
MFS : Reference Frequency.
Reimplemented from casa::ImageSkyModel.
Definition at line 121 of file WBCleanImageSkyModel.h.
References refFrequency_p.
Int casa::WBCleanImageSkyModel::getTaylorIndex | ( | uInt | index | ) | [inline] |
Definition at line 125 of file WBCleanImageSkyModel.h.
References casa::ImageSkyModel::nfields_p.
void casa::WBCleanImageSkyModel::initVars | ( | ) | [private] |
Bool casa::WBCleanImageSkyModel::makeNewtonRaphsonStep | ( | SkyEquation & | se, |
Bool | incremental = False , |
||
Bool | modelToMS = False |
||
) |
Make Newton Raphson step internally.
This is really an implementation detail: it is useful for derived classes. The modelToMS parameter is for committing to MODEL_DATA column of the MS the predicted visibilities.
Reimplemented from casa::ImageSkyModel.
Int casa::WBCleanImageSkyModel::makeSpectralPSFs | ( | SkyEquation & | se, |
Bool | writeToDisk | ||
) | [private] |
Bool casa::WBCleanImageSkyModel::mergeDataError | ( | ImageInterface< Float > & | data, |
ImageInterface< Float > & | error, | ||
const String & | outImg | ||
) | [private] |
Int storeTLAsImg(String fileName, TempLattice<Float> &TL, ImageInterface<Float>& theImg); Int storeTLAsImg(String fileName, TempLattice<Complex> &TL, ImageInterface<Float>& theImg);.
Int casa::WBCleanImageSkyModel::numberOfTaylorTerms | ( | ) | [inline, virtual] |
MFS : Number of taylor terms per model.
Reimplemented from casa::ImageSkyModel.
Definition at line 120 of file WBCleanImageSkyModel.h.
References ntaylor_p.
Bool casa::WBCleanImageSkyModel::resizeWorkArrays | ( | Int | length | ) | [private] |
void casa::WBCleanImageSkyModel::restoreOverlappingModels | ( | ) | [private] |
Float casa::WBCleanImageSkyModel::saveCurrentModels | ( | ) | [private] |
Bool casa::WBCleanImageSkyModel::solve | ( | SkyEquation & | se | ) | [virtual] |
Solve for this SkyModel.
Reimplemented from casa::ImageSkyModel.
Bool casa::WBCleanImageSkyModel::solveResiduals | ( | SkyEquation & | se, |
Bool | modelToMS = False |
||
) |
Int add(ImageInterface<Float>& iimage, const Int maxNumXfr=100); Bool addResidual(Int thismodel, ImageInterface<Float>& iresidual); void initializeGradients();.
Reimplemented from casa::ImageSkyModel.
Int casa::WBCleanImageSkyModel::storeAsImg | ( | String | fileName, |
ImageInterface< Float > & | theImg | ||
) | [private] |
Int casa::WBCleanImageSkyModel::writeResultsToDisk | ( | ) | [private] |
Int addTo(Lattice<Float>& to, const Lattice<Float>& add, Float multiplier);.
Int casa::WBCleanImageSkyModel::adbg [private] |
Definition at line 186 of file WBCleanImageSkyModel.h.
Int casa::WBCleanImageSkyModel::ddbg [private] |
Definition at line 188 of file WBCleanImageSkyModel.h.
Definition at line 151 of file WBCleanImageSkyModel.h.
Bool casa::WBCleanImageSkyModel::donePSF_p [private] |
If PSF is done..should not redo it.
Reimplemented from casa::ImageSkyModel.
Definition at line 150 of file WBCleanImageSkyModel.h.
IPosition casa::WBCleanImageSkyModel::gip [private] |
Definition at line 149 of file WBCleanImageSkyModel.h.
Major axis for ordering : Models inline Int getModelIndex(uInt model, uInt taylor){return model * (ntaylor_p) + (taylor);}; inline Int getPSFModelIndex(uInt model, uInt taylor){return model * (2*ntaylor_p-1) + (taylor);}; inline Int getTaylorIndex(uInt index){return indexntaylor_p;}; inline Int getFieldIndex(uInt index){return index/ntaylor_p;};.
Definition at line 138 of file WBCleanImageSkyModel.h.
IPosition casa::WBCleanImageSkyModel::imshape [private] |
Definition at line 149 of file WBCleanImageSkyModel.h.
PtrBlock<MultiTermLatticeCleaner<Float>* > lc_p;.
Definition at line 143 of file WBCleanImageSkyModel.h.
Float casa::WBCleanImageSkyModel::maxPsf_p [private] |
Definition at line 147 of file WBCleanImageSkyModel.h.
Double casa::WBCleanImageSkyModel::memoryMB_p [private] |
Memory to be allocated per TempLattice.
Definition at line 158 of file WBCleanImageSkyModel.h.
Int nfields_p; // Number of image fields/pointings.
Definition at line 110 of file WBCleanImageSkyModel.h.
Bool copyLatToImInt(TempLattice<Float>& lat, ImageInterface<Float>& im); Bool copyImIntToLat(TempLattice<Float>& lat, ImageInterface<Float>& im);.
Int nmodels_p; // Number of image models = nfields * ntaylor
Definition at line 108 of file WBCleanImageSkyModel.h.
Referenced by numberOfTaylorTerms().
Definition at line 154 of file WBCleanImageSkyModel.h.
Int casa::WBCleanImageSkyModel::nx [private] |
Definition at line 152 of file WBCleanImageSkyModel.h.
Int casa::WBCleanImageSkyModel::ny [private] |
Definition at line 152 of file WBCleanImageSkyModel.h.
LogIO casa::WBCleanImageSkyModel::os [private] |
Definition at line 160 of file WBCleanImageSkyModel.h.
Definition at line 155 of file WBCleanImageSkyModel.h.
Definition at line 112 of file WBCleanImageSkyModel.h.
Referenced by getReferenceFrequency().
Vector<Float> casa::WBCleanImageSkyModel::scaleBias_p [private] |
Definition at line 146 of file WBCleanImageSkyModel.h.
Vector<Float> casa::WBCleanImageSkyModel::scaleSizes_p [private] |
Definition at line 145 of file WBCleanImageSkyModel.h.
Int casa::WBCleanImageSkyModel::tdbg [private] |
Definition at line 187 of file WBCleanImageSkyModel.h.
Timer casa::WBCleanImageSkyModel::tmr1 [private] |
Definition at line 185 of file WBCleanImageSkyModel.h.
Timer casa::WBCleanImageSkyModel::tmr2 [private] |
Definition at line 185 of file WBCleanImageSkyModel.h.