FTMachine.h

Classes

FTMachine -- defines interface for the Fourier Transform Machine (full description)

class FTMachine

Types

enum Type

OBSERVED = 0
MODEL
From OBSERVED visibility data (default)
CORRECTED
From MODEL visibility data
RESIDUAL
From CORRECTED visibility data
PSF
From RESIDUAL (OBSERVED-MODEL) visibility data
COVERAGE
POINT SPREAD FUNCTION
N_types
COVERAGE (SD only)
DEFAULT = OBSERVED
Number of types

Interface

Public Members
FTMachine()
FTMachine(const FTMachine& other)
FTMachine& operator=(const FTMachine& other)
virtual ~FTMachine()
virtual void initializeToVis(ImageInterface<Complex>& image, const Complex& vb) = 0
virtual void initializeToVis(ImageInterface<Complex>& image, const Complex& vb, VisBuffer<Complex>& griddedVis, Array<Double>& uvscale, Vector* &uvwMachine)
virtual void finalizeToVis() = 0
virtual void initializeToSky(ImageInterface<Complex>& image, Complex<Float>& weight, const Matrix& vb) = 0
virtual void initializeToSky(ImageInterface<Complex>& image, Complex<Float>& weight, const Matrix& vb, VisBuffer<Double>& uvscale, Vector* &uvwmachine)
virtual void finalizeToSky() = 0
virtual void finalizeToSky(ImageInterface<Complex>& iimage)
virtual void get(VisBuffer& vb, Int row=-1) = 0
virtual void get(VisBuffer& vb, Cube<Complex>& degrid, Array<Complex>& griddedVis, Array<Double>& scale, Vector *uvwMachine, Int row=-1)
virtual void put(const VisBuffer& vb, Int row=-1, Bool dopsf=False, FTMachine::Type type= FTMachine::OBSERVED) = 0
virtual void put(const VisBuffer& vb, TempImage<Complex>& image, Vector<Double>& scale, Int row=-1, Vector *uvwMachine=0, Bool dopsf=False)
virtual ImageInterface<Complex>& getImage(Complex<Float>&, Bool normalize=True) = 0
virtual void getWeightImage(ImageInterface<Float>&, Matrix<Float>&) = 0
virtual void makeImage(FTMachine::Type type, VisSet& vs, ImageInterface<Complex>& image, Complex<Float>& weight)
void rotateUVW(Matrix<Double>& uvw, Vector<Double>& dphase, const VisBuffer& vb)
void refocus(Matrix<Double>& uvw, const Vector<Int>& ant1, const Vector<Int>& ant2, Vector<Double>& dphase, const VisBuffer& vb)
virtual Bool toRecord(String& error, RecordInterface& outRecord, Bool withImage=False)
virtual Bool fromRecord(String& error, const RecordInterface& inRecord)
virtual Bool changed(const VisBuffer& vb)
virtual Bool isFourier()
Bool setSpw(Vector<Int>& spw, Bool validFrame)
virtual void setNoPadding(Bool nopad)
virtual String name()
Protected Members
LogIO& logIO()
void initMaps(const VisBuffer& vb)
virtual void ok()
virtual void gridOk (Int gridsupport)
Bool matchChannel(const Int& spw, const VisBuffer& vb)

Description

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

Member Description

enum Type

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

FTMachine()

FTMachine(const FTMachine& other)

FTMachine& operator=(const FTMachine& other)

virtual ~FTMachine()

virtual void initializeToVis(ImageInterface<Complex>& image, const Complex& vb) = 0

Initialize transform to Visibility plane

virtual void initializeToVis(ImageInterface<Complex>& image, const Complex& vb, VisBuffer<Complex>& griddedVis, Array<Double>& uvscale, Vector* &uvwMachine)

virtual void finalizeToVis() = 0

Finalize transform to Visibility plane

virtual void initializeToSky(ImageInterface<Complex>& image, Complex<Float>& weight, const Matrix& vb) = 0

Initialize transform to Sky plane

virtual void initializeToSky(ImageInterface<Complex>& image, Complex<Float>& weight, const Matrix& vb, VisBuffer<Double>& uvscale, Vector* &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, Array<Double>& scale, Vector *uvwMachine, Int row=-1)

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.

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, Vector *uvwMachine=0, Bool dopsf=False)

virtual ImageInterface<Complex>& getImage(Complex<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, Complex<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

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)