Weighting functions
C/C++
-
void sdp_weighting_briggs(const sdp_Mem *uvw, const sdp_Mem *freq_hz, double max_abs_uv, const double robust_param, sdp_Mem *weight_grid_uv, sdp_Mem *input_weights, sdp_Mem *output_weights, sdp_Error *status)
Calculate the number of hits per UV cell and use the inverse of this as the weight.
Array dimensions are as follows, from slowest to fastest varying:
uvw
is 3D and real-valued, with shape:[ num_times, num_baselines, 3 ]
freq_hz
is 1D and real-valued, with shape:[ num_channels ]
grid_uv
is 2D and real-valued (should be zero-initialised), with shape:[ num_cells_v, num_cells_u ]
weights
is 4D and real-valued, with shape:[ num_times, num_baselines, num_channels, num_pols ]
- Parameters:
uvw – Baseline (u,v,w) coordinates, in metres. Dimensions as above.
freq_hz – Channel frequencies, in Hz. Dimensions as above.
max_abs_uv – Maximum absolute value of UV coordinates in wavelength units.
weight_grid_uv – Output number of hits per grid cell. Dimensions as above.
input_weights – Input weights for the visibilities. Dimensions as above.
output_weights – Output of the function including the weights for each grid cell. Dimensions as above.
weighting_type – Weighting type defined by the user for matching the uv function. Enum Type.
robust_param – Input parameter by the user to determine robustness of the weighting. Integer value between -2 and 2.
status – Error status.
Python
- ska_sdp_func.visibility.weighting.get_uv_range(uvw, freq_hz)
Calculate uv-range in wavelength units given UVW-coordinates and frequency array.
- Parameters:
uvw (numpy.ndarray) – List of UVW coordinates in metres, real-valued. Dimensions are [num_times, num_baselines, 3]
freq_hz (numpy.ndarray) – List of frequencies in Hz, real-valued. Dimension is [num_channels]
- Returns max_abs_uv:
Maximum absolute value of UV coordinates in wavelength units, real-valued
- ska_sdp_func.visibility.weighting.uniform_weights(uvw, freq_hz, max_abs_uv, grid_uv, input_weights, output_weights)
Calculate the number of hits per UV cell and use the inverse of this as the weight.
- Parameters:
uvw (numpy.ndarray) – List of UVW coordinates in metres, real-valued. Dimensions are [num_times, num_baselines, 3]
freq_hz (numpy.ndarray) – List of frequencies in Hz, real-valued. Dimension is [num_channels]
max_abs_uv (float) – Maximum absolute value of UV coordinates in wavelength units, real-valued.
grid_uv (numpy.ndarray) – A initially zero-valued 2D UV grid array. Returns the number of hits per UV cell.
weights (numpy.ndarray) – A real-valued 4D array, returns the weights. Dimensions are [num_times, num_baselines, num_channels, num_pols]