diff --git a/Common/util_eddies.py b/Common/util_eddies.py index 2dabadbfdfb15a676744291c81d19293f4597c26..734e18050531795fabdd4f250e1c6b97e3c49466 100644 --- a/Common/util_eddies.py +++ b/Common/util_eddies.py @@ -95,6 +95,11 @@ class SHPC_class: return self._n_dates[i_slice] def get_ishape_last(self, i_slice, orientation): + """Can return None if ishape_last.txt does not exist and cannot be + created. + + """ + if self._ishape_last[i_slice][orientation] is None: fname = path.join(self.dir, f"Slice_{i_slice}", orientation, "ishape_last.txt") @@ -140,6 +145,8 @@ class SHPC_class: return self._n_shapes[i_slice][orientation] def _create_ishape_last(self, i_slice, orientation): + """Can fail if it cannot get a reader.""" + last_date = self.d_init[i_slice] date_ishape = [] # list of tuples (date, ishape) reader = self.get_reader(i_slice, "extremum", orientation) diff --git a/Inst_eddies/Documentation_texfol/documentation.tex b/Inst_eddies/Documentation_texfol/documentation.tex index 39a9ae86249ca7968e8813884ba0fda72b8d5c72..bae4f3bd0e362077ca00a34c1ae9372fb9cbd4b2 100644 --- a/Inst_eddies/Documentation_texfol/documentation.tex +++ b/Inst_eddies/Documentation_texfol/documentation.tex @@ -249,8 +249,12 @@ index of the array be a date present in the slice. We have : \begin{equation*} l(d) = \sum_{d' = d_0} ^d e_\mathrm{max}(d') - 1 \end{equation*} -$e_\mathrm{max}(d) = 0$ if $d$ is not in the slice. So the shape index -$i$ of the eddy with eddy index $e$ at date $d$ is: +$e_\mathrm{max}(d) = 0$ if $d$ is not in the slice. So, if; +\begin{equation*} + 1 \le e \le e_\mathrm{max}(d) +\end{equation*} +then the shape index $i$ of the eddy with eddy index $e$ at date $d$ +is: \begin{equation*} i = \begin{array}{|ll}