29 #ifndef MS_MSFLAGGER_H
30 #define MS_MSFLAGGER_H
32 #include <casacore/casa/aips.h>
33 #include <casacore/casa/Arrays/ArrayFwd.h>
34 #include <casacore/casa/Containers/Record.h>
void setMSSelector(MSSelector &msSel)
Change or Set the MS this MSFlagger refers to.
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 ...
Bool saveFlags(Bool newLevel)
Save the current flags to the FLAG_HISTORY.
Bool restoreFlags(Int level=-1)
Apply the flags in the FLAG_HISTORY column to the FLAG and FLAG_ROW columns.
Bool writeDataBufferFlags()
Write the flags in the buffer back to the table.
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 findHypercubeId(String &hyperCubeId, const String &column, const Table &tab)
find the HypercubeId column for a tiled column (if any)
void applyRowFlags(Array< Bool > &flag, Array< Bool > &flagRow)
apply the row flags to the data flags and v.v.
Bool createFlagHistory(Int nHis=2)
Create the FLAG_HISTORY column and initialize it from the FLAG_ROW and FLAG columns.
void addStats(Record &buf, const Array< Bool > &flag, const Array< Bool > flagRow, const Array< Float > &data)
add the statistics to a buffer
void fillFlagHist(Int nHis, Int numCorr, Int numChan, Table &tab)
fill the FLAG_HISTORY column from the FLAG and FLAG_ROW column
Bool check()
check if we are attached to an MSSelector
void saveToFlagHist(Int level, Table &tab)
copy the flags to the flag history
MSFlagger & operator=(const MSFlagger &other)
Assignment.
MSFlagger(const MSFlagger &other)
Copy constructor.
MSFlagger(MSSelector &msSel)
construct from an MSSelector object
Bool clearDataBuffer()
Clear the internal data buffer, reclaiming memory.
void applyFlagHist(Int level, Table &tab)
copy the flag history back to the flags
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...
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.
Int flagLevel()
Return the current flaglevel (value of FLAG_LEVEL keyword)
void reorderFlagRow(Array< Bool > &flagRow)
reorder from 2d to 1d (removing ifr axis)
Record getDataBuffer()
Return the contents of the internal data buffer, including the flags as a Record.
Bool clipDataBuffer(Float pixelLevel, Float timeLevel, Float channelLevel)
Clip the data buffer at a specified level by setting the corresponding flags in the buffer.
Bool setDataBufferFlags(const Record &flags)
Replace the flags in the buffer with those in the supplied record.
String: the storage and methods of handling collections of characters.
this file contains all the compiler specific defines
bool Bool
Define the standard types used by Casacore.