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


Part of API
FTMachine is a Machine for Fourier Transforms
The SkyEquation needs to be able to perform Fourier transforms on visibility data. FTMachine allows efficient Fourier Transform processing using a VisBuffer which encapsulates a chunk of visibility (typically all baselines for one time) together with all the information needed for processing (e.g. UVW coordinates).
A simple example of a FTMachine is found in GridFT . See the example for SkyModel .
Define an interface to allow efficient processing of chunks of visibility data
Note that the image must be Complex. It must contain the Complex Stokes values (e.g. RR,RL,LR,LL). FTMachine uses the image coordinate system to determine mappings between the polarization and frequency values in the PagedImage and in the VisBuffer.
Definition at line 98 of file FTMachine.h.
Public Types | |
| enum | Type |
| Types of known Images that may be made using the makeImage method. More... | |
Public Member Functions | |
| FTMachine () | |
| FTMachine (const FTMachine &other) | |
| FTMachine & | operator= (const FTMachine &other) |
| virtual | ~FTMachine () |
| virtual void | initializeToVis (ImageInterface< Complex > &image, const VisBuffer &vb)=0 |
| Initialize transform to Visibility plane. | |
| virtual void | initializeToVis (ImageInterface< Complex > &image, const VisBuffer &vb, Array< Complex > &griddedVis, Vector< Double > &uvscale, UVWMachine *&uvwMachine) |
| virtual void | finalizeToVis ()=0 |
| Finalize transform to Visibility plane. | |
| virtual void | initializeToSky (ImageInterface< Complex > &image, Matrix< Float > &weight, const VisBuffer &vb)=0 |
| Initialize transform to Sky plane. | |
| virtual void | initializeToSky (ImageInterface< Complex > &image, Matrix< Float > &weight, const VisBuffer &vb, Vector< Double > &uvscale, UVWMachine *&uvwmachine) |
| virtual void | finalizeToSky ()=0 |
| Finalize transform to Sky plane. | |
| virtual void | finalizeToSky (ImageInterface< Complex > &iimage) |
| virtual void | get (VisBuffer &vb, Int row=-1)=0 |
| Get actual coherence from grid. | |
| virtual void | get (VisBuffer &vb, Cube< Complex > °rid, Array< Complex > &griddedVis, Vector< Double > &scale, UVWMachine *uvwMachine, Int row=-1) |
| Get the coherence from modelImage return it in the degrid cube. | |
| virtual void | put (const VisBuffer &vb, Int row=-1, Bool dopsf=False, FTMachine::Type type=FTMachine::OBSERVED)=0 |
| Put coherence to grid. | |
| virtual void | put (const VisBuffer &vb, TempImage< Complex > &image, Vector< Double > &scale, Int row=-1, UVWMachine *uvwMachine=0, Bool dopsf=False) |
| virtual ImageInterface< Complex > & | getImage (Matrix< Float > &, Bool normalize=True)=0 |
| Get the final image. | |
| virtual void | getWeightImage (ImageInterface< Float > &, Matrix< Float > &)=0 |
| Get the final weights image. | |
| virtual void | makeImage (FTMachine::Type type, VisSet &vs, ImageInterface< Complex > &image, Matrix< Float > &weight) |
| Make the entire image. | |
| void | rotateUVW (Matrix< Double > &uvw, Vector< Double > &dphase, const VisBuffer &vb) |
| Rotate the uvw from the observed phase center to the desired phase center. | |
| void | refocus (Matrix< Double > &uvw, const Vector< Int > &ant1, const Vector< Int > &ant2, Vector< Double > &dphase, const VisBuffer &vb) |
| Refocus on a finite distance. | |
| virtual Bool | toRecord (String &error, RecordInterface &outRecord, Bool withImage=False) |
| Save and restore the FTMachine to and from a record. | |
| virtual Bool | fromRecord (String &error, const RecordInterface &inRecord) |
| virtual Bool | changed (const VisBuffer &vb) |
| Has this operator changed since the last application? | |
| virtual Bool | isFourier () |
| Can this FTMachine be represented by Fourier convolutions? | |
| Bool | setSpw (Vector< Int > &spw, Bool validFrame) |
| set spw for cube that will be used; | |
| virtual void | setNoPadding (Bool nopad) |
| To make sure no padding is used in certain gridders. | |
| virtual String | name () |
| Return the name of the machine. | |
| void | setLocation (const MPosition &loc) |
| set and get the location used for frame | |
| MPosition & | getLocation () |
| virtual void | setMovingSource (const String &sourcename) |
| set a moving source aka planets or comets => adjust phase center on the fly for gridding | |
| virtual void | setMovingSource (const MDirection &mdir) |
Protected Member Functions | |
| LogIO & | logIO () |
| void | initMaps (const VisBuffer &vb) |
| virtual void | ok () |
| virtual void | gridOk (Int gridsupport) |
| check if image is big enough for gridding | |
| Bool | matchChannel (const Int &spw, const VisBuffer &vb) |
| Bool | matchAllSpwChans (const VisBuffer &vb) |
| redo all spw chan match especially if ms has changed underneath | |
Protected Attributes | |
| LogIO | logIO_p |
| ImageInterface< Complex > * | image |
| UVWMachine * | uvwMachine_p |
| MeasFrame | mFrame_p |
| Bool | tangentSpecified_p |
| Direction of desired tangent plane. | |
| MDirection | mTangent_p |
| MDirection | mImage_p |
| MDirection | movingDir_p |
| moving source stuff | |
| Bool | fixMovingSource_p |
| MDirection | firstMovingDir_p |
| Double | distance_p |
| uInt | nAntenna_p |
| Int | lastFieldId_p |
| Int | lastMSId_p |
| Matrix< Double > | sumWeight |
| Sum of weights per polarization and per chan. | |
| Int | nx |
| Sizes. | |
| Int | ny |
| Int | npol |
| Int | nchan |
| Int | nvischan |
| Int | nvispol |
| Vector< Int > | chanMap |
| Maps of channels and polarization. | |
| Vector< Int > | polMap |
| Bool | isIOnly |
| Is Stokes I only? iso XX,XY,YX,YY or LL,LR,RL,RR. | |
| MPosition | mLocation_p |
| Default Position used for phase rotations. | |
| Bool | doUVWRotation_p |
| Set if uvwrotation is necessary. | |
| Block< Vector< Int > > | multiChanMap_p |
| setup multiple spectral window for cubes | |
| Vector< Int > | selectedSpw_p |
| Vector< Int > | nVisChan_p |
| SpectralCoordinate | spectralCoord_p |
| Private variables needed for spectral frame conversion. | |
| Vector< Bool > | doConversion_p |
| Bool | freqFrameValid_p |
Types of known Images that may be made using the makeImage method.
Definition at line 103 of file FTMachine.h.
| casa::FTMachine::FTMachine | ( | ) |
| casa::FTMachine::FTMachine | ( | const FTMachine & | other | ) |
| virtual casa::FTMachine::~FTMachine | ( | ) | [virtual] |
| virtual void casa::FTMachine::initializeToVis | ( | ImageInterface< Complex > & | image, | |
| const VisBuffer & | vb | |||
| ) | [pure virtual] |
Initialize transform to Visibility plane.
| virtual void casa::FTMachine::initializeToVis | ( | ImageInterface< Complex > & | image, | |
| const VisBuffer & | vb, | |||
| Array< Complex > & | griddedVis, | |||
| Vector< Double > & | uvscale, | |||
| UVWMachine *& | uvwMachine | |||
| ) | [inline, virtual] |
Definition at line 127 of file FTMachine.h.
| virtual void casa::FTMachine::finalizeToVis | ( | ) | [pure virtual] |
Finalize transform to Visibility plane.
| virtual void casa::FTMachine::initializeToSky | ( | ImageInterface< Complex > & | image, | |
| Matrix< Float > & | weight, | |||
| const VisBuffer & | vb | |||
| ) | [pure virtual] |
Initialize transform to Sky plane.
| virtual void casa::FTMachine::initializeToSky | ( | ImageInterface< Complex > & | image, | |
| Matrix< Float > & | weight, | |||
| const VisBuffer & | vb, | |||
| Vector< Double > & | uvscale, | |||
| UVWMachine *& | uvwmachine | |||
| ) | [inline, virtual] |
Definition at line 137 of file FTMachine.h.
| virtual void casa::FTMachine::finalizeToSky | ( | ) | [pure virtual] |
Finalize transform to Sky plane.
| virtual void casa::FTMachine::finalizeToSky | ( | ImageInterface< Complex > & | iimage | ) | [inline, virtual] |
Definition at line 144 of file FTMachine.h.
Get actual coherence from grid.
| virtual void casa::FTMachine::get | ( | VisBuffer & | vb, | |
| Cube< Complex > & | degrid, | |||
| Array< Complex > & | griddedVis, | |||
| Vector< Double > & | scale, | |||
| UVWMachine * | uvwMachine, | |||
| Int | row = -1 | |||
| ) | [inline, virtual] |
Get the coherence from modelImage return it in the degrid cube.
Is to be used especially when scratch columns are not present in ms and/or if memory is available to support such non non-disk operations.
Definition at line 153 of file FTMachine.h.
| virtual void casa::FTMachine::put | ( | const VisBuffer & | vb, | |
| Int | row = -1, |
|||
| Bool | dopsf = False, |
|||
| FTMachine::Type | type = FTMachine::OBSERVED | |||
| ) | [pure virtual] |
Put coherence to grid.
| virtual void casa::FTMachine::put | ( | const VisBuffer & | vb, | |
| TempImage< Complex > & | image, | |||
| Vector< Double > & | scale, | |||
| Int | row = -1, |
|||
| UVWMachine * | uvwMachine = 0, |
|||
| Bool | dopsf = False | |||
| ) | [inline, virtual] |
Definition at line 162 of file FTMachine.h.
| virtual ImageInterface<Complex>& casa::FTMachine::getImage | ( | Matrix< Float > & | , | |
| Bool | normalize = True | |||
| ) | [pure virtual] |
Get the final image.
| virtual void casa::FTMachine::getWeightImage | ( | ImageInterface< Float > & | , | |
| Matrix< Float > & | ||||
| ) | [pure virtual] |
Get the final weights image.
| virtual void casa::FTMachine::makeImage | ( | FTMachine::Type | type, | |
| VisSet & | vs, | |||
| ImageInterface< Complex > & | image, | |||
| Matrix< Float > & | weight | |||
| ) | [virtual] |
Make the entire image.
| void casa::FTMachine::rotateUVW | ( | Matrix< Double > & | uvw, | |
| Vector< Double > & | dphase, | |||
| const VisBuffer & | vb | |||
| ) |
Rotate the uvw from the observed phase center to the desired phase center.
| void casa::FTMachine::refocus | ( | Matrix< Double > & | uvw, | |
| const Vector< Int > & | ant1, | |||
| const Vector< Int > & | ant2, | |||
| Vector< Double > & | dphase, | |||
| const VisBuffer & | vb | |||
| ) |
Refocus on a finite distance.
| virtual Bool casa::FTMachine::toRecord | ( | String & | error, | |
| RecordInterface & | outRecord, | |||
| Bool | withImage = False | |||
| ) | [virtual] |
Save and restore the FTMachine to and from a record.
| virtual Bool casa::FTMachine::fromRecord | ( | String & | error, | |
| const RecordInterface & | inRecord | |||
| ) | [virtual] |
Has this operator changed since the last application?
| virtual Bool casa::FTMachine::isFourier | ( | ) | [inline, virtual] |
Can this FTMachine be represented by Fourier convolutions?
Definition at line 198 of file FTMachine.h.
References casa::False.
set spw for cube that will be used;
| virtual void casa::FTMachine::setNoPadding | ( | Bool | nopad | ) | [inline, virtual] |
| virtual String casa::FTMachine::name | ( | ) | [inline, virtual] |
| void casa::FTMachine::setLocation | ( | const MPosition & | loc | ) |
set and get the location used for frame
| MPosition& casa::FTMachine::getLocation | ( | ) |
| virtual void casa::FTMachine::setMovingSource | ( | const String & | sourcename | ) | [virtual] |
set a moving source aka planets or comets => adjust phase center on the fly for gridding
| virtual void casa::FTMachine::setMovingSource | ( | const MDirection & | mdir | ) | [virtual] |
| LogIO& casa::FTMachine::logIO | ( | ) | [protected] |
| void casa::FTMachine::initMaps | ( | const VisBuffer & | vb | ) | [protected] |
| virtual void casa::FTMachine::ok | ( | ) | [protected, virtual] |
| virtual void casa::FTMachine::gridOk | ( | Int | gridsupport | ) | [protected, virtual] |
check if image is big enough for gridding
redo all spw chan match especially if ms has changed underneath
LogIO casa::FTMachine::logIO_p [protected] |
Definition at line 221 of file FTMachine.h.
ImageInterface<Complex>* casa::FTMachine::image [protected] |
Definition at line 225 of file FTMachine.h.
UVWMachine* casa::FTMachine::uvwMachine_p [protected] |
Definition at line 227 of file FTMachine.h.
MeasFrame casa::FTMachine::mFrame_p [protected] |
Definition at line 229 of file FTMachine.h.
Bool casa::FTMachine::tangentSpecified_p [protected] |
MDirection casa::FTMachine::mTangent_p [protected] |
Definition at line 233 of file FTMachine.h.
MDirection casa::FTMachine::mImage_p [protected] |
Definition at line 235 of file FTMachine.h.
MDirection casa::FTMachine::movingDir_p [protected] |
Bool casa::FTMachine::fixMovingSource_p [protected] |
Definition at line 239 of file FTMachine.h.
MDirection casa::FTMachine::firstMovingDir_p [protected] |
Definition at line 240 of file FTMachine.h.
Double casa::FTMachine::distance_p [protected] |
Definition at line 243 of file FTMachine.h.
uInt casa::FTMachine::nAntenna_p [protected] |
Definition at line 245 of file FTMachine.h.
Int casa::FTMachine::lastFieldId_p [protected] |
Definition at line 247 of file FTMachine.h.
Int casa::FTMachine::lastMSId_p [protected] |
Definition at line 248 of file FTMachine.h.
Matrix<Double> casa::FTMachine::sumWeight [protected] |
Int casa::FTMachine::nx [protected] |
Int casa::FTMachine::ny [protected] |
Definition at line 258 of file FTMachine.h.
Int casa::FTMachine::npol [protected] |
Definition at line 258 of file FTMachine.h.
Int casa::FTMachine::nchan [protected] |
Definition at line 258 of file FTMachine.h.
Int casa::FTMachine::nvischan [protected] |
Definition at line 258 of file FTMachine.h.
Int casa::FTMachine::nvispol [protected] |
Definition at line 258 of file FTMachine.h.
Vector<Int> casa::FTMachine::chanMap [protected] |
Vector<Int> casa::FTMachine::polMap [protected] |
Bool casa::FTMachine::isIOnly [protected] |
MPosition casa::FTMachine::mLocation_p [protected] |
Bool casa::FTMachine::doUVWRotation_p [protected] |
Block<Vector <Int> > casa::FTMachine::multiChanMap_p [protected] |
Vector<Int> casa::FTMachine::selectedSpw_p [protected] |
Definition at line 280 of file FTMachine.h.
Vector<Int> casa::FTMachine::nVisChan_p [protected] |
Definition at line 281 of file FTMachine.h.
SpectralCoordinate casa::FTMachine::spectralCoord_p [protected] |
Vector<Bool> casa::FTMachine::doConversion_p [protected] |
Definition at line 291 of file FTMachine.h.
Bool casa::FTMachine::freqFrameValid_p [protected] |
Definition at line 292 of file FTMachine.h.
1.5.1