casa::FTMachine Class Reference
[MeasurementComponents]

#include <FTMachine.h>

Inheritance diagram for casa::FTMachine:

Inheritance graph
[legend]
Collaboration diagram for casa::FTMachine:

Collaboration graph
[legend]
List of all members.

Detailed Description

defines interface for the Fourier Transform Machine

Intended use:

Part of API

Prerequisite

Etymology

FTMachine is a Machine for Fourier Transforms

Synopsis

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

Example

A simple example of a FTMachine is found in GridFT . See the example for SkyModel .

Motivation

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.

To Do

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)
FTMachineoperator= (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 > &degrid, 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
MPositiongetLocation ()
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

LogIOlogIO ()
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
UVWMachineuvwMachine_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< DoublesumWeight
 Sum of weights per polarization and per chan.
Int nx
 Sizes.
Int ny
Int npol
Int nchan
Int nvischan
Int nvispol
Vector< IntchanMap
 Maps of channels and polarization.
Vector< IntpolMap
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< IntselectedSpw_p
Vector< IntnVisChan_p
SpectralCoordinate spectralCoord_p
 Private variables needed for spectral frame conversion.
Vector< BooldoConversion_p
Bool freqFrameValid_p


Member Enumeration Documentation

enum casa::FTMachine::Type

Types of known Images that may be made using the makeImage method.

Definition at line 103 of file FTMachine.h.


Constructor & Destructor Documentation

casa::FTMachine::FTMachine (  ) 

casa::FTMachine::FTMachine ( const FTMachine other  ) 

virtual casa::FTMachine::~FTMachine (  )  [virtual]


Member Function Documentation

FTMachine& casa::FTMachine::operator= ( const FTMachine other  ) 

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.

virtual void casa::FTMachine::get ( VisBuffer vb,
Int  row = -1 
) [pure virtual]

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]

virtual Bool casa::FTMachine::changed ( const VisBuffer vb  )  [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.

Bool casa::FTMachine::setSpw ( Vector< Int > &  spw,
Bool  validFrame 
)

set spw for cube that will be used;

virtual void casa::FTMachine::setNoPadding ( Bool  nopad  )  [inline, virtual]

To make sure no padding is used in certain gridders.

Definition at line 204 of file FTMachine.h.

virtual String casa::FTMachine::name (  )  [inline, virtual]

Return the name of the machine.

Definition at line 208 of file FTMachine.h.

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

Bool casa::FTMachine::matchChannel ( const Int spw,
const VisBuffer vb 
) [protected]

Bool casa::FTMachine::matchAllSpwChans ( const VisBuffer vb  )  [protected]

redo all spw chan match especially if ms has changed underneath


Member Data Documentation

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]

Direction of desired tangent plane.

Definition at line 232 of file FTMachine.h.

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]

moving source stuff

Definition at line 238 of file FTMachine.h.

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]

Sum of weights per polarization and per chan.

Definition at line 255 of file FTMachine.h.

Int casa::FTMachine::nx [protected]

Sizes.

Definition at line 258 of file FTMachine.h.

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]

Maps of channels and polarization.

Definition at line 261 of file FTMachine.h.

Vector<Int> casa::FTMachine::polMap [protected]

Definition at line 261 of file FTMachine.h.

Referenced by casa::nPBWProjectFT::getPolMap().

Bool casa::FTMachine::isIOnly [protected]

Is Stokes I only? iso XX,XY,YX,YY or LL,LR,RL,RR.

Definition at line 264 of file FTMachine.h.

MPosition casa::FTMachine::mLocation_p [protected]

Default Position used for phase rotations.

Definition at line 267 of file FTMachine.h.

Bool casa::FTMachine::doUVWRotation_p [protected]

Set if uvwrotation is necessary.

Definition at line 271 of file FTMachine.h.

Block<Vector <Int> > casa::FTMachine::multiChanMap_p [protected]

setup multiple spectral window for cubes

Definition at line 279 of file FTMachine.h.

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]

Private variables needed for spectral frame conversion.

Definition at line 290 of file FTMachine.h.

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.


The documentation for this class was generated from the following file:
Generated on Tue Aug 26 22:36:15 2008 for NRAOCASA by  doxygen 1.5.1