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