29 #ifndef MS_MSFLAGGER_H
30 #define MS_MSFLAGGER_H
Record diffDataBuffer(const String &direction, Int window=1, Bool doMedian=False)
Difference the data, subtracting the average over a window of specified width and taking the absolute...
Bool createFlagHistory(Int nHis=2)
Create the FLAG_HISTORY column and initialize it from the FLAG_ROW and FLAG columns.
void reorderFlagRow(Array< Bool > &flagRow)
reorder from 2d to 1d (removing ifr axis)
Int flagLevel()
Return the current flaglevel (value of FLAG_LEVEL keyword)
void fillFlagHist(Int nHis, Int numCorr, Int numChan, Table &tab)
fill the FLAG_HISTORY column from the FLAG and FLAG_ROW column
void setMSSelector(MSSelector &msSel)
Change or Set the MS this MSFlagger refers to.
MSFlagger & operator=(const MSFlagger &other)
Assignment.
Main interface class to a read/write table.
Bool check()
check if we are attached to an MSSelector
Bool writeDataBufferFlags()
Write the flags in the buffer back to the table.
Bool restoreFlags(Int level=-1)
Apply the flags in the FLAG_HISTORY column to the FLAG and FLAG_ROW columns.
Bool saveFlags(Bool newLevel)
Save the current flags to the FLAG_HISTORY.
void applyRowFlags(Array< Bool > &flag, Array< Bool > &flagRow)
apply the row flags to the data flags and v.v.
void applyFlagHist(Int level, Table &tab)
copy the flag history back to the flags
Bool findHypercubeId(String &hyperCubeId, const String &column, const Table &tab)
find the HypercubeId column for a tiled column (if any)
void saveToFlagHist(Int level, Table &tab)
copy the flags to the flag history
Bool setDataBufferFlags(const Record &flags)
Replace the flags in the buffer with those in the supplied record.
A hierarchical collection of named fields of various types.
bool Bool
Define the standard types used by Casacore.
void diffMedian(Array< Float > &out, const Array< Float > &in, Int axis, const Array< Bool > &flag)
collapse array "in" (with absolute differences) along specified axis by taking medians by profile tak...
Bool clearDataBuffer()
Clear the internal data buffer, reclaiming memory.
void addStats(Record &buf, const Array< Bool > &flag, const Array< Bool > flagRow, const Array< Float > &data)
add the statistics to a buffer
Bool clipDataBuffer(Float pixelLevel, Float timeLevel, Float channelLevel)
Clip the data buffer at a specified level by setting the corresponding flags in the buffer...
Record getDataBuffer()
Return the contents of the internal data buffer, including the flags as a Record. ...
String: the storage and methods of handling collections of characters.
void getStats(Array< Float > &medTF, Array< Float > &adTF, Array< Float > &medT, Array< Float > &medFmedT, Array< Float > &adT, Array< Float > &medF, Array< Float > &medTmedF, Array< Float > &adF, const Array< Float > &diff, const Array< Bool > &flag, const Array< Bool > &flagRow)
get buffer statistics - med=median, ad=average absolute deviation, T=Time, F=Frequency.
MSSelector specifies selections on a MeasurementSet.
MSFlagger specifies selections on a MeasurementSet.
Bool fillDataBuffer(const String &item, Bool ifrAxis)
Fill an internal buffer with the data item requested, similar to getData except that the data is not ...