ProxyC.h
Functions
- void Proxy_gridding (struct Proxy *p, int kernel_size, int subgrid_size, int nr_channels, int nr_baselines, int nr_timesteps, int nr_correlations, int nr_timeslots, int nr_stations, float *frequencies, float complex *visibilities, float *uvw, unsigned int *baselines, float complex *aterms, unsigned int *aterm_offsets, float *taper)
Grid visibilities
This wrapper creates a Plan, and Arrays from the raw data pointers and then passes these on to the gridding method of
p- Parameters:
p – Pointer to Proxy object, previously obtained by one of the create_<proxy_name>() functions.
kernel_size – Size of the kernel, see the documentation on Kernel size and subgrid size
subgrid_size – Size of the subgrids
nr_channels – Number of channels
nr_baselines – Number of baselines
nr_timesteps – Number of time steps
nr_correlations – Number of correlations
nr_timeslots – Number of a-term time slots see the documentation on A-terms
nr_stations – Number of stations
frequencies – Pointer to
nr_channelsfrequencies (floats)visibilities – Pointer to
nr_baselines*nr_timesteps*nr_correlationsvisibilities (complex float*)uvw – Pointer to
nr_baselines*nr_timestepsu,v,w triplets (floats)baselines – Pointer to
nr_baselinespairs of station indices (ints)aterms – Pointer to
nr_timeslotsxnr_stationsx 2 x 2 Jones matrix entries (float complex*) see A-termsaterm_offsets – Pointer to
nr_timesteps+ 1 time step indices, see the documentation on A-termstaper – Pointer to
subgrid_sizexsubgrid_sizefloats, see the documentation on Taper
- void Proxy_degridding (struct Proxy *p, int kernel_size, int subgrid_size, int nr_channels, int nr_baselines, int nr_timesteps, int nr_correlations, int nr_timeslots, int nr_stations, float *frequencies, float complex *visibilities, float *uvw, unsigned int *baselines, float complex *aterms, unsigned int *aterm_offsets, float *taper)
Degrid visibilities
This wrapper creates a Plan for the given uvw coordinates, and Arrays from the raw data pointers and then passes these on to the degridding method of
p- Parameters:
p[in] – Pointer to Proxy object, previously obtained by one of the create_<proxy_name>() functions.
kernel_size[in] – Size of the kernel, see the documentation on Kernel size and subgrid size
subgrid_size[in] – Size of the subgrids
nr_channels[in] – Number of channels
nr_baselines[in] – Number of baselines
nr_timesteps[in] – Number of time steps
nr_correlations[in] – Number of correlations
nr_timeslots[in] – Number of a-term time slots see the documentation on A-terms
nr_stations[in] – Number of stations
frequencies[in] – Pointer to
nr_channelsfrequencies (floats)visibilities – [out] Pointer to
nr_baselines*nr_timesteps*nr_correlationsvisibilities (complex float*)uvw[in] – Pointer to
nr_baselines*nr_timestepsu,v,w triplets (floats)baselines[in] – Pointer to
nr_baselinespairs of station indices (ints)aterms[in] – Pointer to
nr_timeslotsxnr_stationsx 2 x 2 Jones matrix entries (float complex*) see A-termsaterm_offsets[in] – Pointer to
nr_timesteps+ 1 time step indices, see the documentation on A-termstaper[in] – Pointer to
subgrid_sizexsubgrid_sizefloats, see the documentation on Taper
-
void Proxy_init_cache(struct Proxy *p, unsigned int subgrid_size, const float cell_size, float w_step, float *shift)
Initialize the cache
Call is forwarded to the init_cache method of
.- Parameters:
p – pointer to Proxy object
subgrid_size – size of the subgrids in pixels in one dimension
cell_size – size of a cell (pixel) in radians
w_step – distance between w-layers in wavelengths
shift – l,m pointing offset (facet position) in radians
- void Proxy_calibrate_init (struct Proxy *p, unsigned int kernel_size, unsigned int subgrid_size, unsigned int nr_channel_blocks, unsigned int nr_channels_per_block, unsigned int nr_baselines, unsigned int nr_timesteps, unsigned int nr_timeslots, float *frequencies, float complex *visibilities, float *weights, float *uvw, unsigned int *baselines, unsigned int *aterm_offsets, float *taper)
Initialize calibration
This wrapper creates Arrays from the raw data pointers and then forwards the call to the calibrate_init method of
p- Parameters:
p – Pointer to Proxy object, previously obtained by one of the create_<proxy_name>() functions.
kernel_size – Size of the kernel, see the documentation on Kernel size and subgrid size
subgrid_size – Size of the subgrids
nr_channels – Number of channels
nr_baselines – Number of baselines
nr_timesteps – Number of time steps
nr_timeslots – Number of a-term time slots see the documentation on A-terms
frequencies – Pointer to
nr_channelsfrequencies (floats)visibilities – Pointer to
nr_baselines*nr_timesteps*nr_correlationsvisibilities (complex float*)weights –
uvw – Pointer to
nr_baselines*nr_timestepsu,v,w triplets (floats)baselines – Pointer to
nr_baselinespairs of station indices (ints)aterm_offsets – Pointer to
nr_timesteps+ 1 time step indices, see the documentation on A-termstaper – Pointer to
subgrid_sizexsubgrid_sizefloats, see the documentation on Taper
- void Proxy_calibrate_update (struct Proxy *p, const unsigned int antenna_nr, const unsigned int nr_channel_blocks, const unsigned int subgrid_size, const unsigned int nr_stations, const unsigned int nr_time_slots, const unsigned int nr_terms, float complex *aterms, float complex *aterm_derivatives, double *hessian, double *gradient, double *residual)
Calibration update step.
Computes Hessian, gradient and residual for the current working point This wrapper creates Arrays from the raw data pointers and then forwards the call to the calibrate_update method of
p- Parameters:
p[in] – Pointer to Proxy object, previously obtained by one of the create_<proxy_name>() functions.
antenna_nr – [in] Antenna for which the update is computed
subgrid_size – [in] Size of the subgrid
nr_stations – [in] Number of stations
nr_timeslots[in] – Number of a-term time slots see the documentation on :doc:`aterms`*
nr_terms – [in] Number of unknowns
aterms[in] – Pointer to
nr_timeslotsxnr_stationsx 2 x 2 Jones matrix entries (float complex*) see A-termsaterm_derivatives – [in] Pointer to
nr_timeslotsxnr_termsxsubgrid_sizex @subgrid_size x 2 x 2 derivative Jones matrix entries (float complex*)hessian – [out]
gradient – [out]
residual – [out]
-
void Proxy_calibrate_finish(struct Proxy *p)
Finish calibration, free internal buffers
Call is forwarded to the calibrate_finish method of
p- Parameters:
p –
-
void Proxy_transform(struct Proxy *p, int direction)
Fourier transformation
Applies the Fourier transform to the grid that has been set previously through the Proxy_set_grid method Call is forwarded to the transform method of
p- Parameters:
p –
direction –
-
void Proxy_destroy(struct Proxy *p)
Destroy proxy.
Call the destructor of p, and deallocates memory
- Parameters:
p –
-
void *Proxy_allocate_grid(struct Proxy *p, unsigned int nr_correlations, unsigned int grid_size)
- void Proxy_set_grid (struct Proxy *p, float complex *grid_ptr, unsigned int nr_w_layers, unsigned int nr_correlations, unsigned int height, unsigned int width)
Set the grid to be used in subsequent data processing calls.
Call is forwarded to the set_grid method of
p- Parameters:
p – pointer to proxy
grid_ptr – pointer to grid data
nr_w_layers – number of w layers in grid
nr_correlations – number of correlations in grid
height – height of grid
width – width of grid
-
void Proxy_get_final_grid(struct Proxy *p, std::complex<float> *grid_ptr, unsigned int nr_w_layers, unsigned int nr_correlations, unsigned int height, unsigned int width)
Get the final grid after gridding.
This call flushes any pending operations
Call is forwarded to the get_final_grid method of
p- Parameters:
p – pointer to proxy
grid_ptr – pointer to grid data
nr_w_layers – number of w layers in grid
nr_correlations – number of correlations in grid
height – height of grid
width – width of grid