From ea0375b15deff9b15d4b211ee0a5dae1f4a226ee Mon Sep 17 00:00:00 2001 From: Lionel GUEZ <guez@lmd.ens.fr> Date: Fri, 7 Apr 2023 23:07:52 +0200 Subject: [PATCH] Polish --- Common/util_eddies.py | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/Common/util_eddies.py b/Common/util_eddies.py index c823856e..5dc3a41e 100644 --- a/Common/util_eddies.py +++ b/Common/util_eddies.py @@ -183,7 +183,11 @@ class SHPC_class: return i_slice def comp_ishape(self, date, eddy_index, i_slice, orientation): - """Compute the location in the shapefiles.""" + """Compute the location in the shapefiles. Returns None if ishape_last + was not found and could not be created. Crashes if date is not + in i_slice. Crashes if eddy_index is out of range. + + """ ishape_last = self.get_ishape_last(i_slice, orientation) @@ -203,6 +207,11 @@ class SHPC_class: return ishape def ishape_range(self, date, i_slice, orientation): + """Returns an empty list if ishape_last was not found and could not be + created. Crashes if date is not in i_slice. + + """ + ishape_start = self.comp_ishape(date, 1, i_slice, orientation) if ishape_start is None: -- GitLab