casa
5.7.0-16
|
#include <VisBufferUtil.h>
Public Member Functions | |
VisBufferUtil () | |
Empty Constructor. More... | |
VisBufferUtil (const VisBuffer &vb) | |
Construct from a VisBuffer (sets a casacore::MeasFrame) More... | |
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. More... | |
VisBufferUtil (const vi::VisibilityIterator2 &iter) | |
Construct with the vi2 to get access to the ms to define frame. More... | |
VisBufferUtil (const casacore::MeasFrame &mframe) | |
void | makePSFVisBuffer (VisBuffer &vb) |
Make PSF VisBuffer. More... | |
casacore::Bool | interpolateFrequency (casacore::Cube< casacore::Complex > &data, casacore::Cube< casacore::Bool > &flags, const VisBuffer &vb, const casacore::Vector< casacore::Float > &outFreqGrid, const casacore::MS::PredefinedColumns whichCol=casacore::MS::DATA, const casacore::MFrequency::Types freqFrame=casacore::MFrequency::LSRK, const casacore::InterpolateArray1D< casacore::Float, casacore::Complex >::InterpolationMethod interp=(casacore::InterpolateArray1D< casacore::Float, casacore::Complex >::nearestNeighbour)) |
Regrid the data on a new frequency grid (defined by outFreqGrid), on the frequency frame (defined by freqFrame). More... | |
void | convertFrequency (casacore::Vector< casacore::Double > &outFreq, const VisBuffer &vb, const casacore::MFrequency::Types freqFrame) |
Converts the frequency in this visbuffer to the frame requested. More... | |
void | convertFrequency (casacore::Vector< casacore::Double > &outFreq, const vi::VisBuffer2 &vb, const casacore::MFrequency::Types freqFrame) |
This one is just to test VisBuffer2 internal conversions. More... | |
void | toVelocity (casacore::Vector< casacore::Double > &outVel, const VisBuffer &vb, const casacore::MFrequency::Types freqFrame, const casacore::MVFrequency restFreq, const casacore::MDoppler::Types veldef) |
Converts the frequency in this VisBuffer to velocity in the frame/def requested. More... | |
void | toVelocity (casacore::Vector< casacore::Double > &outVel, const vi::VisBuffer2 &vb, const casacore::MFrequency::Types freqFrame, const casacore::MVFrequency restFreq, const casacore::MDoppler::Types veldef, const casacore::Int row=0) |
Converts the frequencies on given row of VisBuffer2 to velocity in the frame/def requested. More... | |
void | toVelocity (casacore::Vector< casacore::Double > &outVel, const vi::VisBuffer2 &vb, const vi::VisibilityIterator2 &iter, const casacore::MFrequency::Types freqFrame, const casacore::MVFrequency restFreq, const casacore::MDoppler::Types veldef, const casacore::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 More... | |
get the velocity values for the frequencies passed in *void | toVelocity (casacore::Vector< casacore::Double > &outVel, const casacore::MFrequency::Types outfreqFrame, const casacore::Vector< casacore::Double > &inFreq, const casacore::MFrequency::Types inFreqFrame, const casacore::MEpoch &ep, const casacore::MDirection &dir, const casacore::MVFrequency restFreq, const casacore::MDoppler::Types veldef) |
for the epoch and direction. More... | |
casacore::Bool | rotateUVW (const vi::VisBuffer2 &vb, const casacore::MDirection &desiredDir, casacore::Matrix< casacore::Double > &uvw, casacore::Vector< casacore::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. More... | |
casacore::MDirection | getPointingDir (const VisBuffer &vb, const casacore::Int antid, const casacore::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 More... | |
casacore::MDirection | getPointingDir (const vi::VisBuffer2 &vb, const casacore::Int antid, const casacore::Int row, const casacore::MDirection::Types dirframe=casacore::MDirection::AZELGEO, const casacore::Bool usePointing=true) |
casacore::MDirection | getPhaseCenter (const vi::VisBuffer2 &vb, const casacore::Double time=-1.0) |
get the phaseCenter for a given time..cached so that it does not need to do small read every time of access time -ve means use the first time in the vb More... | |
casacore::MDirection | getEphemDir (const vi::VisBuffer2 &vb, const casacore::Double time=-1.0) |
Get the ephemeris direction of a source fieldid of vb at time given. More... | |
Static Public Member Functions | |
static void | getFreqRange (casacore::Double &freqMin, casacore::Double &freqMax, vi::VisibilityIterator2 &vi, casacore::MFrequency::Types freqFrame) |
This is a helper function as vi2 does not have a get Freq range for the data selected. More... | |
static casacore::Bool | getFreqRangeFromRange (casacore::Double &outfreqMin, casacore::Double &outfreqMax, const casacore::MFrequency::Types inFreqFrame, const casacore::Double infreqMin, const casacore::Double infreqMax, vi::VisibilityIterator2 &vi, casacore::MFrequency::Types outFreqFrame) |
Get the freqRange from in Frame to range it represents in outFrame for all the fields and time selected in the vi Returns False if failed to do any conversion. More... | |
Private Member Functions | |
void | swapyz (casacore::Cube< casacore::Bool > &out, const casacore::Cube< casacore::Bool > &in) |
void | swapyz (casacore::Cube< casacore::Complex > &out, const casacore::Cube< casacore::Complex > &in) |
void | rejectConsecutive (const casacore::Vector< casacore::Double > &t, casacore::Vector< casacore::Double > &retval) |
void | rejectConsecutive (const casacore::Vector< casacore::Double > &t, casacore::Vector< casacore::Double > &retval, casacore::Vector< casacore::Int > &indx) |
void | pointingIndex (casacore::Double *&timecol, casacore::Int *&antcol, casacore::Double *&intervalcol, const casacore::Int nrow, const casacore::Int antenna, const casacore::Int ntimes, casacore::Double *&ptime, casacore::Vector< casacore::Int > &indices) |
A quicker pointing index finder void pointingIndex(const casacore::MSPointing& pcols, const casacore::Int antenna, const casacore::Int ntimes, casacore::Double*& ptime, casacore::Vector<casacore::Int>& indices,casacore::Vector<casacore::MDirection>& direction);. More... | |
casacore::MDirection | getEphemBasedPhaseDir (const vi::VisBuffer2 &vb, const casacore::String &ephemPath, const casacore::MDirection &refDir, const casacore::Double t) |
get ephemeris based direction corrected for parallax for the position in the frame More... | |
Private Attributes | |
casacore::MeasFrame | mframe_ |
A casacore::MeasFrame for conversions. More... | |
casacore::Int | oldMSId_p |
casacore::Int | oldPCMSId_p |
casacore::Vector< std::map < std::pair< double, int > , int > > | timeAntIndex_p |
casacore::Vector < casacore::Vector < casacore::MDirection > > | cachedPointingDir_p |
casacore::Vector< std::map < casacore::Double, casacore::MDirection > > | cachedPhaseCenter_p |
casa::VisBufferUtil::VisBufferUtil | ( | ) |
Empty Constructor.
casa::VisBufferUtil::VisBufferUtil | ( | const VisBuffer & | vb | ) |
Construct from a VisBuffer (sets a casacore::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 casacore::MeasFrame & | mframe | ) |
void casa::VisBufferUtil::convertFrequency | ( | casacore::Vector< casacore::Double > & | outFreq, |
const VisBuffer & | vb, | ||
const casacore::MFrequency::Types | freqFrame | ||
) |
Converts the frequency in this visbuffer to the frame requested.
void casa::VisBufferUtil::convertFrequency | ( | casacore::Vector< casacore::Double > & | outFreq, |
const vi::VisBuffer2 & | vb, | ||
const casacore::MFrequency::Types | freqFrame | ||
) |
This one is just to test VisBuffer2 internal conversions.
|
private |
get ephemeris based direction corrected for parallax for the position in the frame
casacore::MDirection casa::VisBufferUtil::getEphemDir | ( | const vi::VisBuffer2 & | vb, |
const casacore::Double | time = -1.0 |
||
) |
Get the ephemeris direction of a source fieldid of vb at time given.
or the first time in the visBuffer
|
static |
This is a helper function as vi2 does not have a get Freq range for the data selected.
|
static |
Get the freqRange from in Frame to range it represents in outFrame for all the fields and time selected in the vi Returns False if failed to do any conversion.
casacore::MDirection casa::VisBufferUtil::getPhaseCenter | ( | const vi::VisBuffer2 & | vb, |
const casacore::Double | time = -1.0 |
||
) |
get the phaseCenter for a given time..cached so that it does not need to do small read every time of access time -ve means use the first time in the vb
casacore::MDirection casa::VisBufferUtil::getPointingDir | ( | const VisBuffer & | vb, |
const casacore::Int | antid, | ||
const casacore::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
casacore::MDirection casa::VisBufferUtil::getPointingDir | ( | const vi::VisBuffer2 & | vb, |
const casacore::Int | antid, | ||
const casacore::Int | row, | ||
const casacore::MDirection::Types | dirframe = casacore::MDirection::AZELGEO , |
||
const casacore::Bool | usePointing = true |
||
) |
casacore::Bool casa::VisBufferUtil::interpolateFrequency | ( | casacore::Cube< casacore::Complex > & | data, |
casacore::Cube< casacore::Bool > & | flags, | ||
const VisBuffer & | vb, | ||
const casacore::Vector< casacore::Float > & | outFreqGrid, | ||
const casacore::MS::PredefinedColumns | whichCol = casacore::MS::DATA , |
||
const casacore::MFrequency::Types | freqFrame = casacore::MFrequency::LSRK , |
||
const casacore::InterpolateArray1D< casacore::Float, casacore::Complex >::InterpolationMethod | interp = (casacore::InterpolateArray1D< casacore::Float, casacore::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
|
private |
A quicker pointing index finder void pointingIndex(const casacore::MSPointing& pcols, const casacore::Int antenna, const casacore::Int ntimes, casacore::Double*& ptime, casacore::Vector<casacore::Int>& indices,casacore::Vector<casacore::MDirection>& direction);.
|
private |
|
private |
casacore::Bool casa::VisBufferUtil::rotateUVW | ( | const vi::VisBuffer2 & | vb, |
const casacore::MDirection & | desiredDir, | ||
casacore::Matrix< casacore::Double > & | uvw, | ||
casacore::Vector< casacore::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.
|
private |
|
private |
void casa::VisBufferUtil::toVelocity | ( | casacore::Vector< casacore::Double > & | outVel, |
const VisBuffer & | vb, | ||
const casacore::MFrequency::Types | freqFrame, | ||
const casacore::MVFrequency | restFreq, | ||
const casacore::MDoppler::Types | veldef | ||
) |
Converts the frequency in this VisBuffer to velocity in the frame/def requested.
void casa::VisBufferUtil::toVelocity | ( | casacore::Vector< casacore::Double > & | outVel, |
const vi::VisBuffer2 & | vb, | ||
const casacore::MFrequency::Types | freqFrame, | ||
const casacore::MVFrequency | restFreq, | ||
const casacore::MDoppler::Types | veldef, | ||
const casacore::Int | row = 0 |
||
) |
Converts the frequencies on given row of VisBuffer2 to velocity in the frame/def requested.
void casa::VisBufferUtil::toVelocity | ( | casacore::Vector< casacore::Double > & | outVel, |
const vi::VisBuffer2 & | vb, | ||
const vi::VisibilityIterator2 & | iter, | ||
const casacore::MFrequency::Types | freqFrame, | ||
const casacore::MVFrequency | restFreq, | ||
const casacore::MDoppler::Types | veldef, | ||
const casacore::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 casa::VisBufferUtil::toVelocity | ( | casacore::Vector< casacore::Double > & | outVel, |
const casacore::MFrequency::Types | outfreqFrame, | ||
const casacore::Vector< casacore::Double > & | inFreq, | ||
const casacore::MFrequency::Types | inFreqFrame, | ||
const casacore::MEpoch & | ep, | ||
const casacore::MDirection & | dir, | ||
const casacore::MVFrequency | restFreq, | ||
const casacore::MDoppler::Types | veldef | ||
) |
for the epoch and direction.
If rest frequency is -ve then the middle channel is used as the rest value
|
private |
Definition at line 190 of file VisBufferUtil.h.
|
private |
Definition at line 189 of file VisBufferUtil.h.
|
private |
A casacore::MeasFrame for conversions.
Definition at line 185 of file VisBufferUtil.h.
|
private |
Definition at line 186 of file VisBufferUtil.h.
|
private |
Definition at line 187 of file VisBufferUtil.h.
|
private |
Definition at line 188 of file VisBufferUtil.h.