Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
indexes -> indices
  • Loading branch information
CoriPegliasco committed Apr 7, 2021
commit 6d04163d4180246e575bf4499f0b50bf3d7573a5
2 changes: 1 addition & 1 deletion src/py_eddy_tracker/dataset/grid.py
Original file line number Diff line number Diff line change
Expand Up @@ -1275,7 +1275,7 @@ def get_step_in_km(self, lat, wave_length):
min_wave_length = max(step_x_km, step_y_km) * 2
if wave_length < min_wave_length:
logger.error(
"Wave_length too short for resolution, must be > %d km",
"wave_length too short for resolution, must be > %d km",
ceil(min_wave_length),
)
raise Exception()
Expand Down
2 changes: 1 addition & 1 deletion src/py_eddy_tracker/generic.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ def count_consecutive(mask):
@njit(cache=True)
def reverse_index(index, nb):
"""
Compute a list of indexes, which are not in index.
Compute a list of indices, which are not in index.

:param array index: index of group which will be set to False
:param array nb: Count for each group
Expand Down
8 changes: 4 additions & 4 deletions src/py_eddy_tracker/observations/network.py
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ def find_segments_relative(self, obs, stopped=None, order=1):
return nw.relatives([i_obs, i_stopped], order=order)

def get_missing_indices(self, dt):
"""Find indexes where observations are missing.
"""Find indices where observations are missing.

As network have all untracked observation in tracknumber `self.NOGROUP`,
we don't compute them
Expand Down Expand Up @@ -215,7 +215,7 @@ def longer_than(self, nb_day_min=-1, nb_day_max=-1):
@classmethod
def from_split_network(cls, group_dataset, indexs, **kwargs):
"""
Build a NetworkObservations object with Group dataset and indexes
Build a NetworkObservations object with Group dataset and indices

:param TrackEddiesObservations group_dataset: Group dataset
:param indexs: result from split_network
Expand Down Expand Up @@ -346,7 +346,7 @@ def find_link(self, i_observations, forward=True, backward=False):
where water from obs `i_observation` could come from

:param int,iterable(int) i_observation:
indexes of observation. Can be
indices of observation. Can be
int, or iterable of int.
:param bool forward, backward:
if forward, search observations after obs.
Expand Down Expand Up @@ -496,7 +496,7 @@ def relatives(self, obs, order=2):
"""
Extract the segments at a certain order from multiple observations.

:param iterable,int obs: indexes of observation for relatives computation.
:param iterable,int obs: indices of observation for relatives computation.
Can be one observation (int) or collection of observations (iterable(int))
:param int order: order of relatives wanted.
0 means only observations in obs, 1 means direct relatives (1 interaction event), ...
Expand Down
6 changes: 3 additions & 3 deletions src/py_eddy_tracker/observations/observation.py
Original file line number Diff line number Diff line change
Expand Up @@ -594,7 +594,7 @@ def iter_on(self, xname, bins=None):

def align_on(self, other, var_name="time", **kwargs):
"""
Align the time indexes of two datasets.
Align the time indices of two datasets.

.. minigallery:: py_eddy_tracker.EddiesObservations.align_on
"""
Expand Down Expand Up @@ -1135,7 +1135,7 @@ def match(
:param bool intern: if True, speed contour is used (default = effective contour)
:param float cmin: 0 < cmin < 1, return only couples with score >= cmin
:param dict kwargs: look at :py:meth:`vertice_overlap`
:return: return the indexes of the eddies in self coupled with eddies in
:return: return the indices of the eddies in self coupled with eddies in
other and their associated score
:rtype: (array(int), array(int), array(float))

Expand Down Expand Up @@ -1166,7 +1166,7 @@ def re_reference_index(index, ref):
:param array,int index: local index to re ref
:param slice,array ref:
reference could be a slice in this case we juste add start to index
or could be indexes and in this case we need to translate
or could be indices and in this case we need to translate
"""
if isinstance(ref, slice):
return index + ref.start
Expand Down
4 changes: 2 additions & 2 deletions src/py_eddy_tracker/observations/tracking.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ def iter_track(self):
yield self.index(slice(i0, i0 + nb))

def get_missing_indices(self, dt):
"""Find indexes where observations are missing.
"""Find indices where observations are missing.

:param int,float dt: theorical delta time between 2 observations
"""
Expand Down Expand Up @@ -618,7 +618,7 @@ def split_network(self, intern=True, **kwargs):
# Initialisation
# To store the id of the segments, the backward and forward cost associations
ids["track"], ids["previous_cost"], ids["next_cost"] = 0, 0, 0
# To store the indexes of the backward and forward observations associated
# To store the indices of the backward and forward observations associated
ids["previous_obs"], ids["next_obs"] = -1, -1
# At the end, ids["previous_obs"] == -1 means the start of a non-split segment
# and ids["next_obs"] == -1 means the end of a non-merged segment
Expand Down