DP3
Public Member Functions | Static Public Member Functions | List of all members
dp3::steps::StationAdder Class Reference

DP3 step class to add stations as a superstation. More...

#include <StationAdder.h>

Inheritance diagram for dp3::steps::StationAdder:
dp3::steps::Step

Public Member Functions

 StationAdder (const common::ParameterSet &, const std::string &prefix)
 
 ~StationAdder () override
 
void addToMS (const std::string &msName) override
 Add new meta info to the MS. More...
 
void finish () override
 Finish the processing of this step and subsequent steps. More...
 
common::Fields getProvidedFields () const override
 
common::Fields getRequiredFields () const override
 Get the fields required by the current step. More...
 
bool process (std::unique_ptr< base::DPBuffer > buffer) override
 
void show (std::ostream &) const override
 Show the step parameters. More...
 
void showTimings (std::ostream &, double duration) const override
 Show the timings. More...
 
void updateInfo (const base::DPInfo &) override
 Update the general info. More...
 
- Public Member Functions inherited from dp3::steps::Step
 Step ()
 
virtual ~Step ()
 
virtual bool accepts (MsType dt) const
 Boolean if this step can process this type of data. More...
 
const base::DPInfogetInfoIn () const
 Get access to the info of the input. More...
 
const base::DPInfogetInfoOut () const
 Get access to the info of the output. More...
 
const Step::ShPtrgetNextStep () const
 Get the next step. More...
 
StepgetPrevStep () const
 Get the previous step. More...
 
virtual MsType outputs () const
 Return which datatype this step outputs. More...
 
virtual bool process (std::unique_ptr< base::BdaBuffer >)
 
void setInfo (const base::DPInfo &)
 
virtual void setNextStep (Step::ShPtr nextStep)
 Set the next step. More...
 
void setPrevStep (Step *prevStep)
 Set the previous step. More...
 
virtual void showCounts (std::ostream &) const
 

Static Public Member Functions

static std::vector< int > GetMatchingStations (const std::vector< std::string > &antenna_names, const std::vector< std::string > &patterns)
 
- Static Public Member Functions inherited from dp3::steps::Step
static void SetThreadingIsInitialized ()
 

Additional Inherited Members

- Public Types inherited from dp3::steps::Step
enum class  MsType { kRegular , kBda }
 To check compatibility between steps before running. More...
 
typedef std::shared_ptr< StepShPtr
 
- Static Public Attributes inherited from dp3::steps::Step
static constexpr dp3::common::Fields kDataField
 
static constexpr dp3::common::Fields kFlagsField
 
static constexpr dp3::common::Fields kUvwField
 
static constexpr dp3::common::Fields kWeightsField
 
- Protected Member Functions inherited from dp3::steps::Step
base::DPInfoGetWritableInfoOut ()
 

Detailed Description

DP3 step class to add stations as a superstation.

This class is a Step class summing stations to a superstation.

It is possible to define one or more groups of stations to be summed. Each group has a name which is the name of the new station. The complex values of baselines are added for which one station occurs in only one group. A baseline is not added if no or both stations are member of a summing group.
The summation is done in a weighted way, where the weight of a new station is the sum of the original weights. Optionally weights 1 can be used instead of the original weights.

Only unflagged data points are used. If too few data points are unflagged, the output data point is flagged.

Questions:

  1. check if phases do not differ too much? Flag if too much?
  2. must all stations exist or possible that some don't?

Constructor & Destructor Documentation

◆ StationAdder()

dp3::steps::StationAdder::StationAdder ( const common::ParameterSet ,
const std::string &  prefix 
)

Construct the object. Parameters are obtained from the parset using the given prefix.

◆ ~StationAdder()

dp3::steps::StationAdder::~StationAdder ( )
override

Member Function Documentation

◆ addToMS()

void dp3::steps::StationAdder::addToMS ( const std::string &  msName)
overridevirtual

Add new meta info to the MS.

Reimplemented from dp3::steps::Step.

◆ finish()

void dp3::steps::StationAdder::finish ( )
overridevirtual

Finish the processing of this step and subsequent steps.

Implements dp3::steps::Step.

◆ GetMatchingStations()

static std::vector<int> dp3::steps::StationAdder::GetMatchingStations ( const std::vector< std::string > &  antenna_names,
const std::vector< std::string > &  patterns 
)
static

Return the indices of the stations in antenna_names matching the pattern list. The patterns are processed from left to right. A pattern can start with ! or ^ meaning that the the matches are discarded. In this way first a broad pattern can be given, which can be narrowed down. A warning is given if a pattern does not match any station name.

◆ getProvidedFields()

common::Fields dp3::steps::StationAdder::getProvidedFields ( ) const
inlineoverridevirtual

Get the fields provided (modified and/or created) by the current step. The returned fields thus should not include (required) fields that are forwarded without modifications.

Implements dp3::steps::Step.

◆ getRequiredFields()

common::Fields dp3::steps::StationAdder::getRequiredFields ( ) const
inlineoverridevirtual

Get the fields required by the current step.

Implements dp3::steps::Step.

◆ process()

bool dp3::steps::StationAdder::process ( std::unique_ptr< base::DPBuffer buffer)
overridevirtual

Process the data. It keeps the data. When processed, it invokes the process function of the next step.

Reimplemented from dp3::steps::Step.

◆ show()

void dp3::steps::StationAdder::show ( std::ostream &  ) const
overridevirtual

Show the step parameters.

Implements dp3::steps::Step.

◆ showTimings()

void dp3::steps::StationAdder::showTimings ( std::ostream &  ,
double  duration 
) const
overridevirtual

Show the timings.

Reimplemented from dp3::steps::Step.

◆ updateInfo()

void dp3::steps::StationAdder::updateInfo ( const base::DPInfo )
overridevirtual

Update the general info.

Reimplemented from dp3::steps::Step.


The documentation for this class was generated from the following file: