GridBoth.h

Classes

GridBoth -- An FTMachine for Gridding Single Dish data (full description)

class GridBoth : public FTMachine

Interface

Public Members
GridBoth(MeasurementSet& ms, SkyJones& sj, Int cachesize, Int tilesize, String sdConvType="BOX", String synConvType="SF", Float padding=1.0, Float sdScale=1.0, Float sdWeight=1.0)
GridBoth(MeasurementSet& ms, SkyJones& sj, Int cachesize, Int tilesize, MPosition mLocation, String sdConvType="BOX", String synConvType="SF", Float padding=1.0, Float sdScale=1.0, Float sdWeight=1.0)
GridBoth(MeasurementSet& ms, SkyJones& sj, Int cachesize, Int tilesize, MPosition mLocation, MDirection mTangent, String sdConvType="BOX", String synConvType="SF", Float padding=1.0, Float sdScale=1.0, Float sdWeight=1.0)
GridBoth(const GridBoth &other)
GridBoth &operator=(const GridBoth &other)
~GridBoth()
GridBoth(const RecordInterface& stateRec)
void initializeToVis(ImageInterface<Complex>& image, const Complex& vb)
void finalizeToVis()
void initializeToSky(ImageInterface<Complex>& image, Complex<Float>& weight, const Matrix& vb)
void finalizeToSky()
void get(VisBuffer& vb, Int row=-1)
void put(const VisBuffer& vb, Int row=-1, Bool dopsf=False, FTMachine::Type type=FTMachine::OBSERVED)
ImageInterface<Complex>& getImage(Complex<Float>&, Bool normalize=True)
void getWeightImage(ImageInterface<Float>&, Matrix<Float>&)
virtual Bool toRecord(String& error, RecordInterface& outRec, Bool withImage=False)
virtual Bool fromRecord(String& error, const RecordInterface& inRec)
virtual Bool changed(const VisBuffer& vb)
Private Members
void ok()
void init()

Description

Prerequisite

Etymology

FTMachine is a Machine for Fourier Transforms. GridBoth does Single Dish gridding in a similar way

Synopsis

The SkyEquation needs to be able to perform Fourier transforms on visibility data and to grid single dish data. GridBoth allows efficient Single Dish 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. direction coordinates).

Gridding and degridding in GridBoth are performed using a novel sort-less algorithm. In this approach, the gridded plane is divided into small patches, a cache of which is maintained in memory using a general-purpose LatticeCache class. As the (time-sorted) visibility data move around slowly in the image plane, patches are swapped in and out as necessary. Thus, optimally, one would keep at least one patch per scan line of data.

A grid cache is defined on construction. If the gridded image plane is smaller than this, it is kept entirely in memory and all gridding and degridding is done entirely in memory. Otherwise a cache of tiles is kept an paged in and out as necessary. Optimally the cache should be big enough to hold all polarizations and frequencies for one complete scan line. The paging rate will then be small. As the cache size is reduced below this critical value, paging increases. The algorithm will work for only one patch but it will be very slow!

The gridding and degridding steps are implemented in Fortran for speed. In gridding, the visibilities are added onto the grid points in the neighborhood using a weighting function. In degridding, the value is derived by a weight summ of the same points, using the same weighting function.

Example

See the example for SkyModel.

Motivation

Define an interface to allow efficient processing of chunks of visibility data

To Do