Skip to content

Commit 1633dfa

Browse files
committed
Add option to add circle contour only for virtual observation
1 parent f72b9a6 commit 1633dfa

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/py_eddy_tracker/observations/observation.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -319,7 +319,7 @@ def add_rotation_type(self):
319319
new.observations["type_cyc"] = self.sign_type
320320
return new
321321

322-
def circle_contour(self):
322+
def circle_contour(self, only_virtual=False):
323323
"""
324324
Set contour as a circle with radius and center data
325325
@@ -330,6 +330,8 @@ def circle_contour(self):
330330
radius_s = "contour_lon_s" in self.obs.dtype.names
331331
radius_e = "contour_lon_e" in self.obs.dtype.names
332332
for i, obs in enumerate(self):
333+
if only_virtual and not obs["virtual"]:
334+
continue
333335
x, y = obs["lon"], obs["lat"]
334336
if radius_s:
335337
r_s = obs["radius_s"]

0 commit comments

Comments
 (0)