DP3
Public Member Functions | List of all members
dp3::ddecal::SolutionResampler Class Reference

Class for resampling the solution into a square multi-dimensional array. More...

#include <SolutionResampler.h>

Public Member Functions

 SolutionResampler (const std::vector< size_t > &n_solutions_per_direction, size_t n_antennas, size_t solution_interval)
 
 ~SolutionResampler ()=default
 
size_t GetNrSubSteps () const
 Get the number of substeps per solution interval. More...
 
std::pair< size_t, size_t > MapResampledToOriginal (size_t time_index, size_t antenna_index, size_t direction_index, size_t pol_index, size_t n_pol) const
 Map index in upsampled solutions vector to the matching index in the original solution vector. More...
 
std::vector< std::vector< std::vector< ConstraintResult > > > Upsample (const std::vector< std::vector< std::vector< ConstraintResult >>> &solutions) const
 
std::vector< std::vector< std::vector< std::complex< double > > > > Upsample (const std::vector< std::vector< std::vector< std::complex< double >>>> &solutions, size_t n_pol) const
 Compute the upsampled solutions for dd interval solutions. More...
 

Detailed Description

Class for resampling the solution into a square multi-dimensional array.

Constructor & Destructor Documentation

◆ SolutionResampler()

dp3::ddecal::SolutionResampler::SolutionResampler ( const std::vector< size_t > &  n_solutions_per_direction,
size_t  n_antennas,
size_t  solution_interval 
)
Parameters
solution_intervalThe number of data timesteps in one solution (coming from the solint parset key).

◆ ~SolutionResampler()

dp3::ddecal::SolutionResampler::~SolutionResampler ( )
default

Member Function Documentation

◆ GetNrSubSteps()

size_t dp3::ddecal::SolutionResampler::GetNrSubSteps ( ) const
inline

Get the number of substeps per solution interval.

NOTE: the current implementation for computing the number of substeps assumes that the solution interval is an integer multiple of the values in the number of solutions per direction.

◆ MapResampledToOriginal()

std::pair<size_t, size_t> dp3::ddecal::SolutionResampler::MapResampledToOriginal ( size_t  time_index,
size_t  antenna_index,
size_t  direction_index,
size_t  pol_index,
size_t  n_pol 
) const

Map index in upsampled solutions vector to the matching index in the original solution vector.

◆ Upsample() [1/2]

std::vector<std::vector<std::vector<ConstraintResult> > > dp3::ddecal::SolutionResampler::Upsample ( const std::vector< std::vector< std::vector< ConstraintResult >>> &  solutions) const

◆ Upsample() [2/2]

std::vector<std::vector<std::vector<std::complex<double> > > > dp3::ddecal::SolutionResampler::Upsample ( const std::vector< std::vector< std::vector< std::complex< double >>>> &  solutions,
size_t  n_pol 
) const

Compute the upsampled solutions for dd interval solutions.

Dimension of returned vector is [n_times * n_substeps, n_channel_blocks, n_antenna * n_directions * n_pol].

Parameters
solutionsOriginal solutions.
Returns
Upsampled solutions.

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