Skip to content

Commit 2ef3d9c

Browse files
committed
small correction suggested by lgtm
1 parent 520e7d7 commit 2ef3d9c

File tree

7 files changed

+8
-12
lines changed

7 files changed

+8
-12
lines changed

examples/10_tracking_diagnostics/pet_center_count.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,9 @@
4040

4141
# Count pixel used for each center
4242
g_a = a.grid_count(bins, intern=True, center=True)
43-
m = g_a.display(ax_a, **kwargs_pcolormesh)
43+
g_a.display(ax_a, **kwargs_pcolormesh)
4444
g_c = c.grid_count(bins, intern=True, center=True)
45-
m = g_c.display(ax_c, **kwargs_pcolormesh)
45+
g_c.display(ax_c, **kwargs_pcolormesh)
4646
# Compute a ratio Cyclonic / Anticyclonic
4747
ratio = g_c.vars["count"] / g_a.vars["count"]
4848

examples/10_tracking_diagnostics/pet_pixel_used.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,9 @@
3737

3838
# Count pixel used for each contour
3939
g_a = a.grid_count(bins, intern=True)
40-
m = g_a.display(ax_a, **kwargs_pcolormesh)
40+
g_a.display(ax_a, **kwargs_pcolormesh)
4141
g_c = c.grid_count(bins, intern=True)
42-
m = g_c.display(ax_c, **kwargs_pcolormesh)
42+
g_c.display(ax_c, **kwargs_pcolormesh)
4343
# Compute a ratio Cyclonic / Anticyclonic
4444
ratio = g_c.vars["count"] / g_a.vars["count"]
4545

share/fig.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,6 @@
4848
# 0.02, # step between two isolines of detection (m)
4949
pixel_limit=(5, 2000), # Min and max of pixel can be include in contour
5050
shape_error=55, # Error maximal of circle fitting over contour to be accepted
51-
bbox_surface_min_degree=0.125
52-
** 2, # degrees surface minimal to take in account contour
5351
)
5452
fig = plt.figure(figsize=(15, 7))
5553
ax = fig.add_axes([0.03, 0.03, 0.94, 0.94])

src/py_eddy_tracker/eddy_feature.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,6 @@ def within_amplitude_limits(self):
9191
"""Need update
9292
"""
9393
return self.interval_min <= self.amplitude
94-
return self.eddy.ampmin <= self.amplitude <= self.eddy.ampmax
9594

9695
def all_pixels_below_h0(self, level):
9796
"""

src/py_eddy_tracker/network.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,6 @@ def get_wrap_vertice(x0, y0, x1, y1, i):
5757
x0_, x1_ = x0[i], x1[i]
5858
if abs(x0_[0] - x1_[0]) > 180:
5959
ref = x0_[0] - x0.dtype.type(180)
60-
x1_ = x1[i]
6160
x1_ = (x1[i] - ref) % 360 + ref
6261
return create_vertice(x0_, y0[i]), create_vertice(x1_, y1[i])
6362

src/py_eddy_tracker/observations/tracking.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -327,7 +327,7 @@ def __extract_with_mask(
327327
logger.warning(
328328
"Incompatible option, remove_incomplete option will be remove"
329329
)
330-
remove_incomplete = False
330+
# remove_incomplete = False
331331

332332
if full_path:
333333
if reject_virtual:

src/scripts/EddyTracking

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ from netCDF4 import Dataset
1515
from datetime import datetime
1616
from glob import glob
1717
import logging
18-
import datetime as dt
18+
1919

2020
logger = logging.getLogger("pet")
2121

@@ -189,7 +189,7 @@ if __name__ == "__main__":
189189
DATASET_LIST = DATASET_LIST[:-BLANK_PERIOD]
190190
logger.info("Last %d files will be pop", BLANK_PERIOD)
191191

192-
START_TIME = dt.datetime.now()
192+
START_TIME = datetime.now()
193193
logger.info("Start tracking on %d files", len(DATASET_LIST))
194194

195195
NB_OBS_MIN = int(CONFIG.get("TRACK_DURATION_MIN", 14))
@@ -254,7 +254,7 @@ if __name__ == "__main__":
254254
SHORT_TRACK.filled_by_interpolation(SHORT_TRACK["virtual"] == 1)
255255

256256
# Total running time
257-
FULL_TIME = dt.datetime.now() - START_TIME
257+
FULL_TIME = datetime.now() - START_TIME
258258
logger.info("Mean duration by loop : %s", FULL_TIME / (len(DATASET_LIST) - 1))
259259
logger.info("Duration : %s", FULL_TIME)
260260

0 commit comments

Comments
 (0)