9 #ifndef DP3_STEPS_AVERAGER_H_
10 #define DP3_STEPS_AVERAGER_H_
14 #include <xtensor/containers/xtensor.hpp>
15 #include <aocommon/staticfor.h>
51 Averager(
const std::string& stepname,
unsigned int nchanAvg,
52 unsigned int ntimeAvg);
53 Averager(
const std::string& stepname,
double freq_resolution,
54 double time_resolution);
65 bool process(std::unique_ptr<base::DPBuffer> buffer)
override;
74 void show(std::ostream&)
const override;
77 void showTimings(std::ostream&,
double duration)
const override;
81 static double getFreqHz(
const std::string& freqstr);
88 std::unique_ptr<base::DPBuffer> itsBuf;
89 xt::xtensor<int, 3> itsNPoints;
90 xt::xtensor<std::complex<float>, 3> itsAvgAll;
91 xt::xtensor<float, 3> itsWeightAll;
92 double itsFreqResolution;
93 double itsTimeResolution;
94 unsigned int itsNChanAvg;
95 unsigned int itsNTimeAvg;
96 unsigned int itsMinNPoint;
98 unsigned int itsNTimes;
99 double itsOriginalTimeInterval;
Buffer holding the data of a timeslot/band.
Class to hold code for virtual base class for Flaggers in DP3.
General info about DP3 data processing attributes like averaging.
Definition: DPInfo.h:35
Implements a map of Key-Value pairs.
Definition: ParameterSet.h:31
DP3 step class to average in time and/or freq.
Definition: Averager.h:39
Averager(const common::ParameterSet &, const std::string &prefix)
void updateInfo(const base::DPInfo &) override
Update the general info.
static const common::Fields kProvidedFields
Definition: Averager.h:44
Averager(const std::string &stepname, unsigned int nchanAvg, unsigned int ntimeAvg)
Construct the object using the given parameters.
void showTimings(std::ostream &, double duration) const override
Show the timings.
static double getFreqHz(const std::string &freqstr)
void show(std::ostream &) const override
Show the step parameters.
bool process(std::unique_ptr< base::DPBuffer > buffer) override
static const common::Fields kRequiredFields
Definition: Averager.h:43
common::Fields getProvidedFields() const override
Definition: Averager.h:60
Averager(const std::string &stepname, double freq_resolution, double time_resolution)
void finish() override
Finish the processing of this step and subsequent steps.
common::Fields getRequiredFields() const override
Get the fields required by the current step.
Definition: Averager.h:58
Abstract base class for a DP3 step.
Definition: Step.h:52
This file has generic helper routines for testing steps.
Definition: AntennaConfig.h:53