#include <FlagAgentTimeFreqCrop.h>
Public Member Functions | |
| FlagAgentTimeFreqCrop (FlagDataHandler *dh, Record config, Bool writePrivateFlagCube=false, Bool flag=true) | |
| ~FlagAgentTimeFreqCrop () | |
Protected Member Functions | |
| bool | computeAntennaPairFlags (const vi::VisBuffer2 &visBuffer, VisMapper &visibilities, FlagMapper &flags, Int antenna1, Int antenna2, vector< uInt > &rows) |
| Compute flags for a given (time,freq) map. | |
| void | setAgentParameters (Record config) |
| Parse configuration parameters. | |
Private Member Functions | |
| void | fitBaseAndFlag (String fittype, String direction, VisMapper &visibilities, FlagMapper &flags) |
| Read original flags or not. | |
| Float | calcMean (Vector< Float > &vect, Vector< Bool > &flag) |
| Calculate Mean, Variance, Stddev while accounting for flags. | |
| Float | calcVar (Vector< Float > &vect, Vector< Bool > &flag, Vector< Float > &fit) |
| Float | calcStd (Vector< Float > &vect, Vector< Bool > &flag, Vector< Float > &fit) |
| Float | calcStd (Vector< Float > &vect, Vector< Bool > &flag, Float mean) |
| void | fitPiecewisePoly (Vector< Float > &data, Vector< Bool > &flag, Vector< Float > &fit, uInt maxnpieces, uInt maxdeg) |
| Fit a piece-wise polynomial according to the supplied specs. | |
| void | polyFit (Vector< Float > &data, Vector< Bool > &flag, Vector< Float > &fit, uInt lim1, uInt lim2, uInt deg) |
| Fit a polynomial of specified degree to a range of data points. | |
| void | lineFit (Vector< Float > &data, Vector< Bool > &flag, Vector< Float > &fit, uInt lim1, uInt lim2) |
| Fit a line to a range of data points. | |
Private Attributes | |
| Double | time_cutoff_p |
| Input parameters ///. | |
| Double | freq_cutoff_p |
| Flag threshold in frequency. | |
| Int | maxNPieces_p |
| Maximum number of pieces to allow in the piecewise-polynomial fits (1-9). | |
| String | timeFitType_p |
| Fitting function for the time direction ('line' or 'poly'). | |
| String | freqFitType_p |
| Fitting function for the frequency direction ('line' or 'poly'). | |
| String | flagDimension_p |
| Choose the directions along which to perform flagging ('time', 'freq', 'timefreq', 'freqtime'). | |
| Int | halfWin_p |
| Half width of sliding window to use with 'usewindowstats' (1,2,3 for 3-point, 5-point or 7-point window sizes). | |
| String | winStats_p |
| Use sliding-window statistics to find additional flags ('none', 'sum', 'std', 'both' ). | |
Definition at line 30 of file FlagAgentTimeFreqCrop.h.
| casa::FlagAgentTimeFreqCrop::FlagAgentTimeFreqCrop | ( | FlagDataHandler * | dh, | |
| Record | config, | |||
| Bool | writePrivateFlagCube = false, |
|||
| Bool | flag = true | |||
| ) |
| casa::FlagAgentTimeFreqCrop::~FlagAgentTimeFreqCrop | ( | ) |
| Float casa::FlagAgentTimeFreqCrop::calcMean | ( | Vector< Float > & | vect, | |
| Vector< Bool > & | flag | |||
| ) | [private] |
Calculate Mean, Variance, Stddev while accounting for flags.
| Float casa::FlagAgentTimeFreqCrop::calcStd | ( | Vector< Float > & | vect, | |
| Vector< Bool > & | flag, | |||
| Float | mean | |||
| ) | [private] |
| Float casa::FlagAgentTimeFreqCrop::calcStd | ( | Vector< Float > & | vect, | |
| Vector< Bool > & | flag, | |||
| Vector< Float > & | fit | |||
| ) | [private] |
| Float casa::FlagAgentTimeFreqCrop::calcVar | ( | Vector< Float > & | vect, | |
| Vector< Bool > & | flag, | |||
| Vector< Float > & | fit | |||
| ) | [private] |
| bool casa::FlagAgentTimeFreqCrop::computeAntennaPairFlags | ( | const vi::VisBuffer2 & | visBuffer, | |
| VisMapper & | visibilities, | |||
| FlagMapper & | flags, | |||
| Int | antenna1, | |||
| Int | antenna2, | |||
| vector< uInt > & | rows | |||
| ) | [protected, virtual] |
Compute flags for a given (time,freq) map.
Reimplemented from casa::FlagAgentBase.
| void casa::FlagAgentTimeFreqCrop::fitBaseAndFlag | ( | String | fittype, | |
| String | direction, | |||
| VisMapper & | visibilities, | |||
| FlagMapper & | flags | |||
| ) | [private] |
Read original flags or not.
Note : original flags are those in the MS (and not those generated by agents) True/False Bool usePreFlags_p;
/// TFCROP functions
Average the data, fit a piecewise polynomial, divide it out, flag outliers.
| void casa::FlagAgentTimeFreqCrop::fitPiecewisePoly | ( | Vector< Float > & | data, | |
| Vector< Bool > & | flag, | |||
| Vector< Float > & | fit, | |||
| uInt | maxnpieces, | |||
| uInt | maxdeg | |||
| ) | [private] |
Fit a piece-wise polynomial according to the supplied specs.
| void casa::FlagAgentTimeFreqCrop::lineFit | ( | Vector< Float > & | data, | |
| Vector< Bool > & | flag, | |||
| Vector< Float > & | fit, | |||
| uInt | lim1, | |||
| uInt | lim2 | |||
| ) | [private] |
Fit a line to a range of data points.
| void casa::FlagAgentTimeFreqCrop::polyFit | ( | Vector< Float > & | data, | |
| Vector< Bool > & | flag, | |||
| Vector< Float > & | fit, | |||
| uInt | lim1, | |||
| uInt | lim2, | |||
| uInt | deg | |||
| ) | [private] |
Fit a polynomial of specified degree to a range of data points.
| void casa::FlagAgentTimeFreqCrop::setAgentParameters | ( | Record | config | ) | [protected, virtual] |
Parse configuration parameters.
Reimplemented from casa::FlagAgentBase.
String casa::FlagAgentTimeFreqCrop::flagDimension_p [private] |
Choose the directions along which to perform flagging ('time', 'freq', 'timefreq', 'freqtime').
Definition at line 63 of file FlagAgentTimeFreqCrop.h.
Double casa::FlagAgentTimeFreqCrop::freq_cutoff_p [private] |
Flag threshold in frequency.
(flag all data-points further than N-stddev from the fit).
Definition at line 54 of file FlagAgentTimeFreqCrop.h.
String casa::FlagAgentTimeFreqCrop::freqFitType_p [private] |
Fitting function for the frequency direction ('line' or 'poly').
Definition at line 60 of file FlagAgentTimeFreqCrop.h.
Int casa::FlagAgentTimeFreqCrop::halfWin_p [private] |
Half width of sliding window to use with 'usewindowstats' (1,2,3 for 3-point, 5-point or 7-point window sizes).
Definition at line 66 of file FlagAgentTimeFreqCrop.h.
Int casa::FlagAgentTimeFreqCrop::maxNPieces_p [private] |
Maximum number of pieces to allow in the piecewise-polynomial fits (1-9).
Definition at line 56 of file FlagAgentTimeFreqCrop.h.
Double casa::FlagAgentTimeFreqCrop::time_cutoff_p [private] |
Input parameters ///.
Flag threshold in time. (flag all data-points further than N-stddev from the fit).
Definition at line 51 of file FlagAgentTimeFreqCrop.h.
String casa::FlagAgentTimeFreqCrop::timeFitType_p [private] |
Fitting function for the time direction ('line' or 'poly').
Definition at line 58 of file FlagAgentTimeFreqCrop.h.
String casa::FlagAgentTimeFreqCrop::winStats_p [private] |
Use sliding-window statistics to find additional flags ('none', 'sum', 'std', 'both' ).
Definition at line 69 of file FlagAgentTimeFreqCrop.h.
1.6.1