Skip to content

Commit f14b2d1

Browse files
authored
Merge pull request #91 from CoriPegliasco/master
- change parameter in particle_candidate
2 parents efb8faa + 918fbf2 commit f14b2d1

File tree

3 files changed

+6
-5
lines changed

3 files changed

+6
-5
lines changed

src/py_eddy_tracker/observations/network.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1464,7 +1464,7 @@ def date2file(julian_day):
14641464
_t,
14651465
i_target_f,
14661466
pct_target_f,
1467-
delta_t=dt_advect,
1467+
n_days=dt_advect,
14681468
)
14691469

14701470
itf_final[slice_track] = i_target_f
@@ -1495,7 +1495,7 @@ def date2file(julian_day):
14951495
_t,
14961496
i_target_b,
14971497
pct_target_b,
1498-
delta_t=-dt_advect,
1498+
n_days=-dt_advect,
14991499
)
15001500

15011501
itb_final[slice_track] = i_target_b

src/py_eddy_tracker/observations/observation.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2056,7 +2056,8 @@ def contains(self, x, y, intern=False):
20562056
xname, yname = self.intern(intern)
20572057
m = ~(isnan(x) + isnan(y))
20582058
i = -ones(x.shape, dtype="i4")
2059-
if x.size != 0:
2059+
2060+
if x.size != 0 and m.any():
20602061
i[m] = poly_indexs(x[m], y[m], self[xname], self[yname])
20612062
return i
20622063

src/py_eddy_tracker/poly.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -854,8 +854,8 @@ def poly_indexs(x_p, y_p, x_c, y_c):
854854
"""
855855
Index of contour for each postion inside a contour, -1 in case of no contour
856856
857-
:param array x_p: longitude to test (must be define, no nan)
858-
:param array y_p: latitude to test (must be define, no nan)
857+
:param array x_p: longitude to test (must be defined, no nan)
858+
:param array y_p: latitude to test (must be defined, no nan)
859859
:param array x_c: longitude of contours
860860
:param array y_c: latitude of contours
861861
"""

0 commit comments

Comments
 (0)