good_indices

acstools.utils_findsat_mrt.good_indices(inds, shape)

Ensures indices are within bounds of array.

Parameters:
  • inds (list of tuples) – A list of tuples of the format of [(y_min, y_max), (x_min, x_max)] for a 2D array.

  • shape (tuple of int) – Shape of the array under consideration, e.g., (ny, nx).

Returns:

fixed_inds – Same format as input inds, but truncated to fall inside array dimensions.

Return type:

array of tuples