10 #ifndef DP3_STEPS_AOFLAGGERSTEP_H_
11 #define DP3_STEPS_AOFLAGGERSTEP_H_
21 #include <aoflagger.h>
72 bool process(std::unique_ptr<base::DPBuffer> buffer)
override;
78 void addToMS(
const std::string& msName)
override;
85 void show(std::ostream&)
const override;
91 void showTimings(std::ostream&,
double duration)
const override;
96 void flag(
unsigned int rightOverlap);
99 static void formatBytes(std::ostream&,
double);
102 void flagBaseline(
unsigned int leftOverlap,
unsigned int windowSize,
103 unsigned int rightOverlap,
unsigned int bl,
105 aoflagger::QualityStatistics& rfiStats);
108 void addStats(aoflagger::QualityStatistics& rfiStats,
109 const aoflagger::ImageSet& values,
110 const aoflagger::FlagMask& rfiMask,
111 const aoflagger::FlagMask& origMask,
int bl);
114 unsigned int buffer_index_;
115 unsigned int n_times_;
116 std::string strategy_name_;
117 unsigned int window_size_;
118 unsigned int overlap_;
119 double overlap_percentage_;
121 double memory_percentage_;
122 double memory_needed_;
123 bool flag_auto_correlations_;
124 bool collect_statistics_;
125 std::vector<std::unique_ptr<base::DPBuffer>> buffer_;
133 std::vector<double> frequencies_;
134 aoflagger::AOFlagger aoflagger_;
137 aoflagger::QualityStatistics qstats_;
Buffer holding the data of a timeslot/band.
Class to keep counts of nr of flagged points.
General info about DP3 data processing attributes like averaging.
Definition: DPInfo.h:35
Class to keep counts of nr of flagged points.
Definition: FlagCounter.h:35
Implements a map of Key-Value pairs.
Definition: ParameterSet.h:31
DPPP step class to flag using aoflagger's functionality.
Definition: AOFlaggerStep.h:56
void showTimings(std::ostream &, double duration) const override
Show the timings.
~AOFlaggerStep() override
void finish() override
Finish the processing of this step and subsequent steps.
void addToMS(const std::string &msName) override
Write the statistics into the MS.
common::Fields getRequiredFields() const override
Get the fields required by the current step.
Definition: AOFlaggerStep.h:64
bool process(std::unique_ptr< base::DPBuffer > buffer) override
common::Fields getProvidedFields() const override
Definition: AOFlaggerStep.h:68
void showCounts(std::ostream &) const override
Show the flagger counts.
void show(std::ostream &) const override
Show the step parameters.
AOFlaggerStep(const common::ParameterSet &, const std::string &prefix)
void updateInfo(const base::DPInfo &) override
Abstract base class for a DP3 step.
Definition: Step.h:52
static constexpr dp3::common::Fields kDataField
Definition: Step.h:60
static constexpr dp3::common::Fields kFlagsField
Definition: Step.h:62
This file has generic helper routines for testing steps.
Definition: AntennaConfig.h:53