casa::VisBufferUtil Class Reference

#include <VisBufferUtil.h>

List of all members.

Public Member Functions

 VisBufferUtil ()
 Empty Constructor.
 VisBufferUtil (const VisBuffer &vb)
 Construct from a VisBuffer (sets a MeasFrame).
 VisBufferUtil (const vi::VisBuffer2 &vb)
 Same as above but with VisBuffer2; It has to be attached to a VisIter2 as the frame is determined that way otherwise use one of the constructors below or the empty constructor above.
 VisBufferUtil (const vi::VisibilityIterator2 &iter)
 Construct with the vi2 to get access to the ms to define frame.
 VisBufferUtil (const MeasFrame &mframe)
void makePSFVisBuffer (VisBuffer &vb)
 Make PSF VisBuffer.
Bool interpolateFrequency (Cube< Complex > &data, Cube< Bool > &flags, const VisBuffer &vb, const Vector< Float > &outFreqGrid, const MS::PredefinedColumns whichCol=MS::DATA, const MFrequency::Types freqFrame=MFrequency::LSRK, const InterpolateArray1D< Float, Complex >::InterpolationMethod interp=(InterpolateArray1D< Float, Complex >::nearestNeighbour))
 Regrid the data on a new frequency grid (defined by outFreqGrid) , on the frequency frame (defined by freqFrame).
void convertFrequency (Vector< Double > &outFreq, const VisBuffer &vb, const MFrequency::Types freqFrame)
 Converts the frequency in this visbuffer to the frame requested.
void convertFrequency (Vector< Double > &outFreq, const vi::VisBuffer2 &vb, const MFrequency::Types freqFrame)
 This one is just to test VisBuffer2 internal conversions.
void toVelocity (Vector< Double > &outVel, const VisBuffer &vb, const MFrequency::Types freqFrame, const MVFrequency restFreq, const MDoppler::Types veldef)
 Converts the frequency in this VisBuffer to velocity in the frame/def requested.
void toVelocity (Vector< Double > &outVel, const vi::VisBuffer2 &vb, const MFrequency::Types freqFrame, const MVFrequency restFreq, const MDoppler::Types veldef, const Int row=0)
 Converts the frequencies on given row of VisBuffer2 to velocity in the frame/def requested.
void toVelocity (Vector< Double > &outVel, const vi::VisBuffer2 &vb, const vi::VisibilityIterator2 &iter, const MFrequency::Types freqFrame, const MVFrequency restFreq, const MDoppler::Types veldef, const Int row=0)
 same as above but can be a detached Visbuffer ...the iterator is used explicitly to get some info like direction from field table and frame from spectral window table
get the velocity values for
the frequencies passed in
*void 
toVelocity (Vector< Double > &outVel, const MFrequency::Types outfreqFrame, const Vector< Double > &inFreq, const MFrequency::Types inFreqFrame, const MEpoch &ep, const MDirection &dir, const MVFrequency restFreq, const MDoppler::Types veldef)
 for the epoch and direction.
Bool rotateUVW (const vi::VisBuffer2 &vb, const MDirection &desiredDir, Matrix< Double > &uvw, Vector< Double > &dphase)
 Rotate the uvw in the vb along with giving the phase needed to convert the visibilities to a new phasecenter will return a False if it is a NoOP...don't need then to waste time applying the phasor etc.
MDirection getPointingDir (const VisBuffer &vb, const Int antid, const Int row)
 get the pointing direction for a given integration and antenna id will cache it for large pointing table specially so that it can be reused pronto

Static Public Member Functions

static void getFreqRange (Double &freqMin, Double &freqMax, vi::VisibilityIterator2 &vi, MFrequency::Types freqFrame)
 This is a helper function as vi2 does not have a get Freq range for the data selected.

Private Member Functions

void swapyz (Cube< Bool > &out, const Cube< Bool > &in)
void swapyz (Cube< Complex > &out, const Cube< Complex > &in)
void rejectConsecutive (const Vector< Double > &t, Vector< Double > &retval)

Private Attributes

MeasFrame mframe_
 A MeasFrame for conversions.
Int oldMSId_p
Vector< std::map< String, Int > > timeAntIndex_p
Vector< Vector< MDirection > > cachedPointingDir_p

Detailed Description

Etymology

Synopsis

Example

Motivation

Definition at line 67 of file VisBufferUtil.h.


Constructor & Destructor Documentation

casa::VisBufferUtil::VisBufferUtil (  ) 

Empty Constructor.

casa::VisBufferUtil::VisBufferUtil ( const VisBuffer vb  ) 

Construct from a VisBuffer (sets a MeasFrame).

casa::VisBufferUtil::VisBufferUtil ( const vi::VisBuffer2 vb  ) 

Same as above but with VisBuffer2; It has to be attached to a VisIter2 as the frame is determined that way otherwise use one of the constructors below or the empty constructor above.

casa::VisBufferUtil::VisBufferUtil ( const vi::VisibilityIterator2 iter  ) 

Construct with the vi2 to get access to the ms to define frame.

casa::VisBufferUtil::VisBufferUtil ( const MeasFrame &  mframe  ) 

Member Function Documentation

void casa::VisBufferUtil::convertFrequency ( Vector< Double > &  outFreq,
const vi::VisBuffer2 vb,
const MFrequency::Types  freqFrame 
)

This one is just to test VisBuffer2 internal conversions.

void casa::VisBufferUtil::convertFrequency ( Vector< Double > &  outFreq,
const VisBuffer vb,
const MFrequency::Types  freqFrame 
)

Converts the frequency in this visbuffer to the frame requested.

static void casa::VisBufferUtil::getFreqRange ( Double &  freqMin,
Double &  freqMax,
vi::VisibilityIterator2 vi,
MFrequency::Types  freqFrame 
) [static]

This is a helper function as vi2 does not have a get Freq range for the data selected.

MDirection casa::VisBufferUtil::getPointingDir ( const VisBuffer vb,
const Int  antid,
const Int  row 
)

get the pointing direction for a given integration and antenna id will cache it for large pointing table specially so that it can be reused pronto

Bool casa::VisBufferUtil::interpolateFrequency ( Cube< Complex > &  data,
Cube< Bool > &  flags,
const VisBuffer vb,
const Vector< Float > &  outFreqGrid,
const MS::PredefinedColumns  whichCol = MS::DATA,
const MFrequency::Types  freqFrame = MFrequency::LSRK,
const InterpolateArray1D< Float, Complex >::InterpolationMethod  interp = (InterpolateArray1D< Float, Complex >::nearestNeighbour) 
)

Regrid the data on a new frequency grid (defined by outFreqGrid) , on the frequency frame (defined by freqFrame).

It will pass back the interpolated data and flags

void casa::VisBufferUtil::makePSFVisBuffer ( VisBuffer vb  ) 

Make PSF VisBuffer.

void casa::VisBufferUtil::rejectConsecutive ( const Vector< Double > &  t,
Vector< Double > &  retval 
) [private]
Bool casa::VisBufferUtil::rotateUVW ( const vi::VisBuffer2 vb,
const MDirection &  desiredDir,
Matrix< Double > &  uvw,
Vector< Double > &  dphase 
)

Rotate the uvw in the vb along with giving the phase needed to convert the visibilities to a new phasecenter will return a False if it is a NoOP...don't need then to waste time applying the phasor etc.

void casa::VisBufferUtil::swapyz ( Cube< Complex > &  out,
const Cube< Complex > &  in 
) [private]
void casa::VisBufferUtil::swapyz ( Cube< Bool > &  out,
const Cube< Bool > &  in 
) [private]
get the velocity values for the frequencies passed in* void casa::VisBufferUtil::toVelocity ( Vector< Double > &  outVel,
const MFrequency::Types  outfreqFrame,
const Vector< Double > &  inFreq,
const MFrequency::Types  inFreqFrame,
const MEpoch &  ep,
const MDirection &  dir,
const MVFrequency  restFreq,
const MDoppler::Types  veldef 
)

for the epoch and direction.

If rest frequency is -ve then the middle channel is used as the rest value

void casa::VisBufferUtil::toVelocity ( Vector< Double > &  outVel,
const vi::VisBuffer2 vb,
const vi::VisibilityIterator2 iter,
const MFrequency::Types  freqFrame,
const MVFrequency  restFreq,
const MDoppler::Types  veldef,
const Int  row = 0 
)

same as above but can be a detached Visbuffer ...the iterator is used explicitly to get some info like direction from field table and frame from spectral window table

void casa::VisBufferUtil::toVelocity ( Vector< Double > &  outVel,
const vi::VisBuffer2 vb,
const MFrequency::Types  freqFrame,
const MVFrequency  restFreq,
const MDoppler::Types  veldef,
const Int  row = 0 
)

Converts the frequencies on given row of VisBuffer2 to velocity in the frame/def requested.

void casa::VisBufferUtil::toVelocity ( Vector< Double > &  outVel,
const VisBuffer vb,
const MFrequency::Types  freqFrame,
const MVFrequency  restFreq,
const MDoppler::Types  veldef 
)

Converts the frequency in this VisBuffer to velocity in the frame/def requested.


Member Data Documentation

Vector<Vector<MDirection> > casa::VisBufferUtil::cachedPointingDir_p [private]

Definition at line 169 of file VisBufferUtil.h.

MeasFrame casa::VisBufferUtil::mframe_ [private]

A MeasFrame for conversions.

Definition at line 166 of file VisBufferUtil.h.

Definition at line 167 of file VisBufferUtil.h.

Vector<std::map<String, Int> > casa::VisBufferUtil::timeAntIndex_p [private]

Definition at line 168 of file VisBufferUtil.h.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated on 31 Aug 2016 for casa by  doxygen 1.6.1