pybsm.otf.functional.resampled_dimensions

pybsm.otf.functional.resampled_dimensions(*, img_in: ndarray, dx_in: float, dx_out: float) tuple[int, int]

Get the resampled dimension.

Parameters:
  • img – the input image

  • dx_in – sample spacing of the input image (radians)

  • dx_out – sample spacing of the output image (radians)

Returns:

new_x:

Resampled width

new_y:

Resampled height

Raises:
IndexError:

if imigin is not a 2D array

ZeroDivisionError:

if dx_out is 0

ValueError:

if dx_in is 0