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

#include <IDGPredict.h>

Inheritance diagram for dp3::steps::IDGPredict:
dp3::steps::ModelDataStep dp3::steps::Step

Public Member Functions

 IDGPredict (const common::ParameterSet &, const std::string &prefix)
 
 IDGPredict (const common::ParameterSet &parset, const std::string &prefix, const std::vector< aocommon::FitsReader > &readers, std::vector< schaapcommon::facets::Facet > &&facets, const std::string &ds9_regions_file="")
 
void finish () override
 Finish the processing of this step and subsequent steps. More...
 
void flush ()
 
size_t GetBufferSize () const
 
base::Direction GetFirstDirection () const override
 
common::Fields getRequiredFields () const override
 Get the fields required by the current step. More...
 
bool IsStarted () const
 
std::vector< aocommon::xt::UTensor< std::complex< float >, 3 > > Predict (size_t direction)
 
bool process (std::unique_ptr< base::DPBuffer > buffer) override
 
void SetBufferSize (size_t nTimesteps)
 
void show (std::ostream &) const override
 Show the step parameters. More...
 
void showTimings (std::ostream &, double duration) const override
 
void updateInfo (const base::DPInfo &info) override
 
- Public Member Functions inherited from dp3::steps::ModelDataStep
common::Fields getProvidedFields () const override
 
- 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< schaapcommon::facets::Facet > GetFacets (const std::string &ds9_regions_file, const aocommon::FitsReader &reader)
 
static std::vector< schaapcommon::facets::Facet > GetFacets (const std::string &ds9_regions_file, const double ra, const double dec, const double pixel_size_x, const double pixel_size_y, const size_t full_width, const size_t full_height)
 
static std::vector< aocommon::FitsReader > GetReaders (const std::vector< std::string > &fits_model_files)
 Read the fits files (nterms) for the idg prediction. 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 ()
 

Constructor & Destructor Documentation

◆ IDGPredict() [1/2]

dp3::steps::IDGPredict::IDGPredict ( const common::ParameterSet parset,
const std::string &  prefix,
const std::vector< aocommon::FitsReader > &  readers,
std::vector< schaapcommon::facets::Facet > &&  facets,
const std::string &  ds9_regions_file = "" 
)

◆ IDGPredict() [2/2]

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

Member Function Documentation

◆ finish()

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

Finish the processing of this step and subsequent steps.

Implements dp3::steps::Step.

◆ flush()

void dp3::steps::IDGPredict::flush ( )

Process the data in all internal buffers using IDG, and send the results to the next step using its process() function.

◆ GetBufferSize()

size_t dp3::steps::IDGPredict::GetBufferSize ( ) const

◆ GetFacets() [1/2]

static std::vector<schaapcommon::facets::Facet> dp3::steps::IDGPredict::GetFacets ( const std::string &  ds9_regions_file,
const aocommon::FitsReader &  reader 
)
static

Get the facets from a region file and use readers to create the image models.

◆ GetFacets() [2/2]

static std::vector<schaapcommon::facets::Facet> dp3::steps::IDGPredict::GetFacets ( const std::string &  ds9_regions_file,
const double  ra,
const double  dec,
const double  pixel_size_x,
const double  pixel_size_y,
const size_t  full_width,
const size_t  full_height 
)
static

Get the facets from a region file and create the image models with the given image size

◆ GetFirstDirection()

base::Direction dp3::steps::IDGPredict::GetFirstDirection ( ) const
overridevirtual
Returns
The direction of the first patch.

Implements dp3::steps::ModelDataStep.

◆ GetReaders()

static std::vector<aocommon::FitsReader> dp3::steps::IDGPredict::GetReaders ( const std::vector< std::string > &  fits_model_files)
static

Read the fits files (nterms) for the idg prediction.

◆ getRequiredFields()

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

Get the fields required by the current step.

Implements dp3::steps::Step.

◆ IsStarted()

bool dp3::steps::IDGPredict::IsStarted ( ) const

◆ Predict()

std::vector<aocommon::xt::UTensor<std::complex<float>, 3> > dp3::steps::IDGPredict::Predict ( size_t  direction)

Predict visibilities for added buffers in a given direction.

Parameters
directionIndex for the requested direction.
Returns
Buffers with the predicted visibilities. For each buffer added with process(), there is one corresponding output buffer.

◆ process()

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

Add a buffer to the IDG predictor, for use in Predict(), later. Calls flush if the buffer is full.

Reimplemented from dp3::steps::Step.

◆ SetBufferSize()

void dp3::steps::IDGPredict::SetBufferSize ( size_t  nTimesteps)

◆ show()

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

Show the step parameters.

Implements dp3::steps::Step.

◆ showTimings()

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

Show the timings. The default implementation does nothing.

Reimplemented from dp3::steps::Step.

◆ updateInfo()

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

Update the general info (called by setInfo). The default implementation copies the info.

Reimplemented from dp3::steps::Step.


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