ctdproc.helpers.inearby
- ctdproc.helpers.inearby(ibad, inearm, inearp, n)[source]
Find indices left and right of given indices and add them to the index array.
Differs from inearby.m as it breaks up ibad into segments and then finds nearby indices for each segment.
- Parameters:
ibad (np.array) – Array with indices
inearm (int) – Number of elements to include on left side
inearp (int) – Number of elements to include on right side
n (int) – Maximum index in output array and size of array being indexed
- Returns:
k – New array of indices
- Return type:
np.array