23 #ifndef FlagAgentTimeFreqCrop_H_
24 #define FlagAgentTimeFreqCrop_H_
void fitBaseAndFlag(casacore::String fittype, casacore::String direction, VisMapper &visibilities, FlagMapper &flags)
Read original flags or not.
void lineFit(casacore::Vector< casacore::Float > &data, casacore::Vector< casacore::Bool > &flag, casacore::Vector< casacore::Float > &fit, casacore::uInt lim1, casacore::uInt lim2)
Fit a line to a range of data points.
A top level class defining the data handling interface for the flagging module.
casacore::String winStats_p
Use sliding-window statistics to find additional flags ('none', 'sum', 'std', 'both') ...
casacore::Int halfWin_p
Half width of sliding window to use with 'usewindowstats' (1,2,3 for 3-point, 5-point or 7-point wind...
void polyFit(casacore::Vector< casacore::Float > &data, casacore::Vector< casacore::Bool > &flag, casacore::Vector< casacore::Float > &fit, casacore::uInt lim1, casacore::uInt lim2, casacore::uInt deg)
Fit a polynomial of specified degree to a range of data points.
casacore::String freqFitType_p
Fitting function for the frequency direction ('line' or 'poly')
ABSTRACT CLASSES Deliberately vague to be general enough to allow for many different types of data
casacore::String flagDimension_p
Choose the directions along which to perform flagging ('time', 'freq', 'timefreq', 'freqtime')
A top level class defining the interface for flagging agents.
bool computeAntennaPairFlags(const vi::VisBuffer2 &visBuffer, VisMapper &visibilities, FlagMapper &flags, casacore::Int antenna1, casacore::Int antenna2, std::vector< casacore::uInt > &rows)
Compute flags for a given (time,freq) map.
A hierarchical collection of named fields of various types.
bool Bool
Define the standard types used by Casacore.
casacore::String timeFitType_p
Fitting function for the time direction ('line' or 'poly')
casacore::Float calcVar(casacore::Vector< casacore::Float > &vect, casacore::Vector< casacore::Bool > &flag, casacore::Vector< casacore::Float > &fit)
void fitPiecewisePoly(casacore::Vector< casacore::Float > &data, casacore::Vector< casacore::Bool > &flag, casacore::Vector< casacore::Float > &fit, casacore::uInt maxnpieces, casacore::uInt maxdeg)
Fit a piece-wise polynomial according to the supplied specs.
casacore::Double time_cutoff_p
casacore::Input parameters ///
casacore::Double freq_cutoff_p
Flag threshold in frequency.
casacore::Float calcMean(casacore::Vector< casacore::Float > &vect, casacore::Vector< casacore::Bool > &flag)
Calculate Mean, Variance, Stddev while accounting for flags.
VisBuffer2s encapsulate one chunk of visibility data for processing.
LatticeExprNode mean(const LatticeExprNode &expr)
String: the storage and methods of handling collections of characters.
casacore::Float calcStd(casacore::Vector< casacore::Float > &vect, casacore::Vector< casacore::Bool > &flag, casacore::Vector< casacore::Float > &fit)
void setAgentParameters(casacore::Record config)
Parse configuration parameters.
casacore::Int maxNPieces_p
Maximum number of pieces to allow in the piecewise-polynomial fits (1-9)
FlagAgentTimeFreqCrop(FlagDataHandler *dh, casacore::Record config, casacore::Bool writePrivateFlagCube=false, casacore::Bool flag=true)