Skip to content

Commit

Permalink
issue #207 change speed compute formula to avoid mask shrinking
Browse files Browse the repository at this point in the history
  • Loading branch information
AntSimi committed Sep 27, 2023
1 parent e659c50 commit 73b017c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/py_eddy_tracker/dataset/grid.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
round_,
sin,
sinc,
sqrt,
where,
zeros,
)
Expand Down Expand Up @@ -1919,7 +1920,8 @@ def speed_coef_mean(self, contour):

def init_speed_coef(self, uname="u", vname="v"):
"""Draft"""
self._speed_ev = (self.grid(uname) ** 2 + self.grid(vname) ** 2) ** 0.5
u, v = self.grid(uname), self.grid(vname)
self._speed_ev = sqrt(u * u + v * v)

def display(self, ax, name, factor=1, ref=None, **kwargs):
"""
Expand Down

0 comments on commit 73b017c

Please sign in to comment.