ess.imaging.tools.resolution.maximum_resolution_achievable#
- ess.imaging.tools.resolution.maximum_resolution_achievable(events, coarse_x_bin_edges, coarse_y_bin_edges, time_bin_edges, max_tries=10, max_pixels_x=2048, max_pixels_y=2048, raise_if_not_maximum=False)[source]#
Estimates the maximum resolution achievable given a desired binning in time. The maximum achievable resolution is defined as the resolution in
xy
such that there is at least one event in everyxyt
pixel.- Parameters:
events (
DataArray
) – 1D DataArray containing events with associated x, y, and t coordinates. The names of the coordinates must not be x, y and t, the names of the coordinates are taken from the providedbin_edges
for each respective dimension.coarse_x_bin_edges (
Variable
) – Minimum acceptable resolution inx
.coarse_y_bin_edges (
Variable
) – Minimum acceptable resolution iny
.time_bin_edges (
Variable
) – Desired resolution int
.max_tries (
int
, default:10
) – The maximum number of iterations before giving up.max_pixels_x (
int
, default:2048
) – The maximum number of pixels inx
.max_pixels_y (
int
, default:2048
) – The maximum number of pixels iny
.raise_if_not_maximum (
bool
, default:False
) – Often it is not important to find the exact maximum resolution. Therefore this parameter isFalse
by default, and the function returns an estimate of the maximum resolution. If you want the returned resolution to be exactly the maximum resolution, set the value of this parameter toTrue
.
- Returns:
The bin edges in x respectively y that define the maximum achievable resolution.