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 every xyt 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 provided bin_edges for each respective dimension.

  • coarse_x_bin_edges (Variable) – Minimum acceptable resolution in x.

  • coarse_y_bin_edges (Variable) – Minimum acceptable resolution in y.

  • time_bin_edges (Variable) – Desired resolution in t.

  • max_tries (int, default: 10) – The maximum number of iterations before giving up.

  • max_pixels_x (int, default: 2048) – The maximum number of pixels in x.

  • max_pixels_y (int, default: 2048) – The maximum number of pixels in y.

  • raise_if_not_maximum (bool, default: False) – Often it is not important to find the exact maximum resolution. Therefore this parameter is False 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 to True.

Returns:

The bin edges in x respectively y that define the maximum achievable resolution.