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

DP3 step writing to an MS. More...

#include <MSWriter.h>

Inheritance diagram for dp3::steps::MSWriter:
dp3::steps::OutputStep dp3::steps::Step

Public Member Functions

 MSWriter (const std::string &out_name, const common::ParameterSet &, const std::string &prefix)
 
 ~MSWriter () override
 
void finish () override
 Finish the processing of this step and subsequent steps. More...
 
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::OutputStep
const dp3::common::FieldsGetFieldsToWrite () const
 
common::Fields getProvidedFields () const override
 
virtual void SetFieldsToWrite (const dp3::common::Fields &fields)
 
- 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::string InsertNumberInFilename (const std::string &name, size_t number)
 
static void UpdateBeam (casacore::Table &main_table, const std::string &out_col_name, const base::DPInfo &info)
 
static void UpdateObs (const std::string &out_name, const base::DPInfo &info)
 Update the OBSERVATION table with the correct start and end time. More...
 
static void UpdatePhaseCentre (const std::string &out_name, const casacore::MDirection &new_phase_dir)
 Update the FIELD table with the new phase center. More...
 
static void UpdateSpw (const std::string &out_name, const base::DPInfo &info)
 Update the SPECTRAL_WINDOW table for averaged channels. More...
 
static void WriteHistory (casacore::Table &ms, const common::ParameterSet &parset)
 Write the parset info into the HISTORY table of the MS. More...
 
- 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
virtual void addToMS (const std::string &msName)
 
base::DPInfoGetWritableInfoOut ()
 

Detailed Description

DP3 step writing to an MS.

This class is a Step creating a new MeasurementSet and writing all data in it. Most meta information (subtables and meta columns in main table) is copied from the input MeasurementSet given by the MsReader object.
In principle the new MS uses the same storage managers as used in the input MS, but in case of an MS stored with LofarStMan it will use the optimal storage managers (ISM for slowly varying meta data, TSM for bulk data, SSM for others).

The SPECTRAL_WINDOW table will be changed to reflect the channels being used or averaged. The OBSERVATION table will be updated for the correct start and end time. The HISTORY table gets an entry containing the parset values and the DPPP version.

Constructor & Destructor Documentation

◆ MSWriter()

dp3::steps::MSWriter::MSWriter ( const std::string &  out_name,
const common::ParameterSet ,
const std::string &  prefix 
)
explicit

◆ ~MSWriter()

dp3::steps::MSWriter::~MSWriter ( )
override

Member Function Documentation

◆ finish()

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

Finish the processing of this step and subsequent steps.

Implements dp3::steps::Step.

◆ getRequiredFields()

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

Get the fields required by the current step.

Implements dp3::steps::Step.

◆ InsertNumberInFilename()

static std::string dp3::steps::MSWriter::InsertNumberInFilename ( const std::string &  name,
size_t  number 
)
static

◆ process()

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

Process the next data chunk. It returns false when at the end.

Reimplemented from dp3::steps::Step.

◆ show()

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

Show the step parameters.

Implements dp3::steps::Step.

◆ showTimings()

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

Show the timings.

Reimplemented from dp3::steps::Step.

◆ UpdateBeam()

static void dp3::steps::MSWriter::UpdateBeam ( casacore::Table &  main_table,
const std::string &  out_col_name,
const base::DPInfo info 
)
static

◆ updateInfo()

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

Update the general info.

Reimplemented from dp3::steps::Step.

◆ UpdateObs()

static void dp3::steps::MSWriter::UpdateObs ( const std::string &  out_name,
const base::DPInfo info 
)
static

Update the OBSERVATION table with the correct start and end time.

◆ UpdatePhaseCentre()

static void dp3::steps::MSWriter::UpdatePhaseCentre ( const std::string &  out_name,
const casacore::MDirection &  new_phase_dir 
)
static

Update the FIELD table with the new phase center.

◆ UpdateSpw()

static void dp3::steps::MSWriter::UpdateSpw ( const std::string &  out_name,
const base::DPInfo info 
)
static

Update the SPECTRAL_WINDOW table for averaged channels.

◆ WriteHistory()

static void dp3::steps::MSWriter::WriteHistory ( casacore::Table &  ms,
const common::ParameterSet parset 
)
static

Write the parset info into the HISTORY table of the MS.


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