Skip to content

Commit 38558d2

Browse files
committed
minor changes
1 parent ef80500 commit 38558d2

File tree

6 files changed

+20
-17
lines changed

6 files changed

+20
-17
lines changed

src/py_eddy_tracker/dataset/grid.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1275,7 +1275,7 @@ def get_step_in_km(self, lat, wave_length):
12751275
min_wave_length = max(step_x_km, step_y_km) * 2
12761276
if wave_length < min_wave_length:
12771277
logger.error(
1278-
"Wavelength too short for resolution, must be > %d km",
1278+
"Wave_length too short for resolution, must be > %d km",
12791279
ceil(min_wave_length),
12801280
)
12811281
raise Exception()
@@ -1315,7 +1315,7 @@ def finalize_kernel(self, kernel, order, half_x_pt, half_y_pt):
13151315

13161316
def kernel_lanczos(self, lat, wave_length, order=1):
13171317
"""Not really operational
1318-
wavelength in km
1318+
wave_length in km
13191319
order must be int
13201320
"""
13211321
order = self.check_order(order)
@@ -1327,7 +1327,7 @@ def kernel_lanczos(self, lat, wave_length, order=1):
13271327
return self.finalize_kernel(kernel, order, half_x_pt, half_y_pt)
13281328

13291329
def kernel_bessel(self, lat, wave_length, order=1):
1330-
"""wavelength in km
1330+
"""wave_length in km
13311331
order must be int
13321332
"""
13331333
order = self.check_order(order)

src/py_eddy_tracker/generic.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ def reverse_index(index, nb):
5757
:return: mask of value selected
5858
:rtype: array
5959
"""
60+
6061
m = ones(nb, dtype=numba_types.bool_)
6162
for i in index:
6263
m[i] = False
@@ -76,6 +77,7 @@ def build_index(groups):
7677
>>> build_index(array((1, 1, 3, 4, 4)))
7778
(array([0, 2, 2, 3]), array([2, 2, 3, 5]), 1)
7879
"""
80+
7981
i0, i1 = groups.min(), groups.max()
8082
amplitude = i1 - i0 + 1
8183
# Index of first observation for each group

src/py_eddy_tracker/gui.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ def __init__(self, *args, **kwargs):
2828

2929
class GUIAxes(PlatCarreAxes):
3030
"""
31-
Axes which will use full space available
31+
Axes that uses full space available
3232
"""
3333

3434
name = "full_axes"

src/py_eddy_tracker/observations/groups.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ def get_missing_indices(
2323
2424
2525
ex : array_time = np.array([67, 68, 70, 71, 74, 75])
26-
array_track= np.array([ 1, 1, 1, 1, 1, 1])
26+
array_track= np.array([ 1, 1, 1, 1, 1, 1])
2727
return : np.array([2, 4, 4])
2828
"""
2929

src/py_eddy_tracker/observations/network.py

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -260,7 +260,7 @@ def correct_close_events(self, nb_days_max=20):
260260
# FIXME : we want to change
261261
# segment A splits from segment B, then x days after segment B merges with A
262262
# to
263-
# segment A splits from segment B the x days after segement A merges with B (B will be longer)
263+
# segment A splits from segment B then x days after segement A merges with B (B will be longer)
264264
# comments are in the wrong way but the example works as wanted
265265

266266
_time = self.time
@@ -321,7 +321,6 @@ def sort(self, order=("track", "segment", "time")):
321321
322322
:param tuple order: order or sorting. Given to :func:`numpy.argsort`
323323
"""
324-
325324
index_order = self.obs.argsort(order=order)
326325
for field in self.elements:
327326
self[field][:] = self[field][index_order]
@@ -497,8 +496,10 @@ def relatives(self, obs, order=2):
497496
"""
498497
Extract the segments at a certain order from multiple observations.
499498
500-
:param iterable,int obs: indexes of observation for relatives computation. Can be one observation (int) or collection of observations (iterable(int))
501-
:param int order: order of relatives wanted. 0 means only observations in obs, 1 means direct relatives (1 interaction event), ...
499+
:param iterable,int obs: indexes of observation for relatives computation.
500+
Can be one observation (int) or collection of observations (iterable(int))
501+
:param int order: order of relatives wanted.
502+
0 means only observations in obs, 1 means direct relatives (1 interaction event), ...
502503
503504
:return: all segments' relatives
504505
:rtype: EddiesObservations
@@ -1206,8 +1207,8 @@ def fully_connected(self):
12061207

12071208
def remove_trash(self):
12081209
"""
1209-
Remove the lonely eddies (only 1 obs in segment, associated segment number is 0)"""
1210-
1210+
Remove the lonely eddies (only 1 obs in segment, associated segment number is 0)
1211+
"""
12111212
return self.extract_with_mask(self.track != 0)
12121213

12131214
def plot(self, ax, ref=None, color_cycle=None, **kwargs):

src/py_eddy_tracker/observations/observation.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -745,7 +745,7 @@ def load_from_zarr(
745745
:param bool raw_data: If true load data without scale_factor and add_offset
746746
:param None,list(str) remove_vars: List of variable name that will be not loaded
747747
:param None,list(str) include_vars: If defined only this variable will be loaded
748-
:param None,dict indexs: Indexs to laod only a slice of data
748+
:param None,dict indexs: Indexes to load only a slice of data
749749
:param int buffer_size: Size of buffer used to load zarr data
750750
:param class_kwargs: argument to set up observations class
751751
:return: Obsevations selected
@@ -885,7 +885,7 @@ def load_from_netcdf(
885885
:param bool raw_data: If true load data without apply scale_factor and add_offset
886886
:param None,list(str) remove_vars: List of variable name which will be not loaded
887887
:param None,list(str) include_vars: If defined only this variable will be loaded
888-
:param None,dict indexs: Indexs to laod only a slice of data
888+
:param None,dict indexs: Indexes to load only a slice of data
889889
:param class_kwargs: argument to set up observations class
890890
:return: Obsevations selected
891891
:return type: class
@@ -1054,7 +1054,7 @@ def propagate(
10541054
self, previous_obs, current_obs, obs_to_extend, dead_track, nb_next, model
10551055
):
10561056
"""
1057-
Filled virtual obs (C).
1057+
Fill virtual obs (C).
10581058
10591059
:param previous_obs: previous obs from current (A)
10601060
:param current_obs: previous obs from virtual (B)
@@ -1166,7 +1166,7 @@ def re_reference_index(index, ref):
11661166
:param array,int index: local index to re ref
11671167
:param slice,array ref:
11681168
reference could be a slice in this case we juste add start to index
1169-
or could be indexs and in this case we need to translate
1169+
or could be indexes and in this case we need to translate
11701170
"""
11711171
if isinstance(ref, slice):
11721172
return index + ref.start
@@ -1341,7 +1341,7 @@ def solve_simultaneous(cost):
13411341
eddies_merge = 1 < other_links
13421342
test = eddies_separation.any() or eddies_merge.any()
13431343
if test:
1344-
# We extract matrix that contains concflict
1344+
# We extract matrix that contains conflict
13451345
obs_linking_to_self = mask[eddies_separation].any(axis=0)
13461346
obs_linking_to_other = mask[:, eddies_merge].any(axis=1)
13471347
i_self_keep = where(obs_linking_to_other + eddies_separation)[0]
@@ -1370,7 +1370,7 @@ def solve_simultaneous(cost):
13701370
security_increment += 1
13711371
i_min_value = cost_reduce.argmin()
13721372
i, j = floor(i_min_value / shape[1]).astype(int), i_min_value % shape[1]
1373-
# Set to False all link
1373+
# Set to False all links
13741374
mask[i_self_keep[i]] = False
13751375
mask[:, i_other_keep[j]] = False
13761376
cost_reduce.mask[i] = True

0 commit comments

Comments
 (0)