29 #ifndef MSVIS_VBCONTINUUMSUBTRACTOR_H
30 #define MSVIS_VBCONTINUUMSUBTRACTOR_H
47 class VisBuffGroupAcc;
250 return (
maxAnt_p + 1) * ant1 - (ant1 * (ant1 - 1)) / 2 + ant2 - ant1;
A Vector of integers, for indexing into Array<T> objects.
casacore::Int getOrder() const
These are provided for the calibration framework so that a VBContinuumSubtractor can be c'ted from a ...
void setScalingFreqs(casacore::Double lof, casacore::Double hif)
Low (lof) and high (hif) frequencies, in Hz, used for renormalizing frequencies in the polynomials...
casacore::Int fitorder_p
VisBuffGroupAcc& vbga_p; // Holds the VisBuffers.
casacore::Bool checkSize(casacore::Cube< casacore::Complex > &coeffs, casacore::Cube< casacore::Bool > &coeffsOK) const
casacore::uInt totnumchan_p
casacore::Double getLowFreq() const
casacore::Bool apply(VisBuffer &vb, const casacore::MS::PredefinedColumns whichcol, const casacore::Cube< casacore::Complex > &coeffs, const casacore::Cube< casacore::Bool > &coeffsOK, const casacore::Bool doSubtraction=true, const casacore::Bool squawk=true)
Apply the continuum estimate in coeffs (from fit) to vb.
const IPosition & shape() const
The length of each axis of the cube.
void setTVIDebug(bool debug)
static void getMinMaxFreq(VisBuffer &vb, casacore::Double &minfreq, casacore::Double &maxfreq, const casacore::Bool initialize=true)
Fills minfreq and maxfreq with the minimum and maximum frequencies (in Hz, acc.
casacore::Int getMaxAntNum() const
the casacore::MS def'n v.2.
ostream-like interface to creating log messages.
void resize(casacore::Cube< casacore::Complex > &coeffs, casacore::Cube< casacore::Bool > &coeffsOK) const
A convenience function for prepping coeffs and coeffsOK to hold the polynomial coefficients and their...
casacore::Double lofreq_p
PredefinedColumns
The Main table colums with predefined meaning.
casacore::Double calcFreqScale() const
casacore::uInt getTotNumChan() const
The total number of input channels that will be looked at (including masked ones!) ...
casacore::PtrBlock< casacore::Vector< casacore::Bool > * > chanmask_p
casacore::Bool doShapesMatch(VisBuffer &vb, casacore::LogIO &os, const casacore::Bool squawk=true) const
Can the fit be applied to vb? If not and squawk is true, send a severe message to os...
casacore::uInt hashFunction(const casacore::Int ant1, const casacore::Int ant2)
Compute baseline (row) index in coeffs_p for (ant1, ant2).
VBContinuumSubtractor & operator=(VBContinuumSubtractor &other)
Disable default copying, and assignment.
bool Bool
Define the standard types used by Casacore.
casacore::Bool areFreqsInBounds(VisBuffer &vb, const casacore::Bool squawk) const
Returns whether or not vb's frequencies are within the bounds used for the continuum fit...
void setNAnt(const casacore::uInt nAnt)
Set the maximum number of antennas (actually, 1 + the maximum antenna number).
A class to group separately averaged VisBuffers.
casacore::Double midfreq_p
A drop-in replacement for Block<T*>.
casacore::Bool apply2(vi::VisBuffer2 &vb, casacore::Cube< casacore::Complex > &Vout, const casacore::Cube< casacore::Complex > &coeffs, const casacore::Cube< casacore::Bool > &coeffsOK, const casacore::Bool doSubtraction=true, const casacore::Bool squawk=true)
casacore::Double freqscale_p
void fit(VisBuffGroupAcc &vbga, const casacore::Int fitorder, casacore::MS::PredefinedColumns whichcol, casacore::Cube< casacore::Complex > &coeffs, casacore::Cube< casacore::Bool > &coeffsOK, const casacore::Bool doInit=false, const casacore::Bool doResize=false, const casacore::Bool squawk=true)
Makes the continuum estimate by fitting a frequency polynomial of order fitorder to the data in vbga...
casacore::uInt nHashes_p
used with the fits.
VisBuffer2s encapsulate one chunk of visibility data for processing.
void setTotNumChan(const casacore::uInt tnc)
Set the total number of input channels that will be looked at (including masked ones!) ...
casacore::Double getHighFreq() const
casacore::Double hifreq_p
Fits and optionally subtracts the continuum in visibility spectra.
void init(const casacore::IPosition &shp, const casacore::uInt maxAnt, const casacore::uInt totnumchan, const casacore::Double lof, const casacore::Double hif)
Set the # of correlations and fitorder from shp, the total number of input channels to look at (inclu...
VisBuffers encapsulate one chunk of visibility data for processing.
casacore::Bool initFromVBGA(VisBuffGroupAcc &vbga)
Set the low and high frequencies, and #s of correlations, antennas, and channels from vbga...
#define casacore
<X11/Intrinsic.h> #defines true, false, casacore::Bool, and String.