Skip to content
Snippets Groups Projects
Commit 90bc2a28 authored by Lionel GUEZ's avatar Lionel GUEZ
Browse files

Polish

parent bf2df96c
No related branches found
No related tags found
No related merge requests found
......@@ -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)
......
......@@ -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}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment