get_final_index_range

jwst.wfs_combine.wfs_combine.get_final_index_range(offset, length)[source]

Get the initial and final indices for the given offset and array length.

  • For offset less than or equal to 0:
    • i = 0

    • f = length - abs(offset)

  • For offset greater than 0:
    • i = offset

    • f = length

Parameters:
offsetint

Offset

lengthint

Length of (1D) array

Returns:
iint

Initial index

fint

Final index