C++ BufferSet
-
class BufferSet
Subclassed by idg::api::BufferSetImpl
Public Functions
-
virtual void init(size_t width, float cellsize, float max_w, float shiftl, float shiftm, options_type &options) = 0
Initialize bufferset for the image properties.
- Parameters:
width – [in]
cellsize – [in]
max_w – [in]
shiftl – [in]
shiftm – [in]
options – [in] Map from strings to Values, specifying additional options The following options are recognized: “aterm_kernel_size” “max_threads” “max_nr_w_layers” “padded_size” “padding”
-
virtual void init_buffers(size_t bufferTimesteps, std::vector<std::vector<double>> bands, int nr_stations, float max_baseline, options_type &options, BufferSetType buffer_set_type) = 0
Initialize buffers for the data to be processed.
- Parameters:
bufferTimesteps – Size of the buffers in number of timesteps
bands – Vector of frequency bands. Each band is a vector of channels frequencies (floats). For each band a buffer is allocated.
nr_stations – Number of stations
max_baseline – unused
options – unused
buffer_set_type – Type of buffer to allocate
-
virtual const BulkDegridder *get_bulk_degridder(int i) = 0
Get the bulk degridder object for a given frequency band.
- Parameters:
i – Buffer Id, (DataDescId in Measurement Set)
- Returns:
const BulkDegridder*
-
virtual DegridderBuffer *get_degridder(int i) = 0
Get the degridder buffer for a given frequency band.
- Parameters:
i – Buffer Id, (DataDescId in Measurement Set)
- Returns:
DegridderBuffer*
-
virtual GridderBuffer *get_gridder(int i) = 0
Get the gridder buffer for a given frequency band.
- Parameters:
i – Buffer Id, (DataDescId in Measurement Set)
- Returns:
GridderBuffer*
-
virtual void set_image(const double *image, bool do_scale = false) = 0
Fourier tranform the image and keep the resulting grid.
Running this function is required to set the model image before starting degridding.
- Parameters:
image – [in] Pointer to image data. Image properties must already have been set by a call to init()
do_scale – [in] If true, scale image from apparent to intrinsic flux. Default: false
-
virtual void get_image(double *image) = 0
Fourier transform the grid and copy the resulting image to the output parameter.
Running this function is required to get the image after gridding.
- Parameters:
image – [out] Pointer to image data. Image properties must already have been set by a call to init()
-
virtual void finished() = 0
Free memory after gridding/degridding has finished.
-
virtual size_t get_subgridsize() const = 0
Get the current subgridsize.
- Returns:
Size of the subgrid in pixels in one dimension
-
virtual float get_subgrid_pixelsize() const = 0
Get the current subgrid pixelsize.
- Returns:
Size of a subgrid pixel in radians
-
virtual void set_apply_aterm(bool do_apply) = 0
Set the application of aterms on or off.
- Parameters:
do_apply – Apply aterms or not?
-
virtual void init_compute_avg_beam(compute_flags flag) = 0
Initialize the computation of the average beam.
The actual computation of the average beam happens along gridding
- Parameters:
flag –
-
virtual void finalize_compute_avg_beam() = 0
Finalize the computation of the average beam.
The resulting (inverse) beams are stored as members that can be retrieved through the get_scalar_beam() and get_matrix_inverse_beam() functions.
-
virtual std::shared_ptr<std::vector<float>> get_scalar_beam() const = 0
Get the scalar beam object.
-
virtual std::shared_ptr<std::vector<std::complex<float>>> get_matrix_inverse_beam() const = 0
Get the matrix inverse beam object.
Set the scalar beam object.
Set the matrix inverse beam object.
The matrix inverse beam is applied while gridding
-
virtual void init(size_t width, float cellsize, float max_w, float shiftl, float shiftm, options_type &options) = 0