Skip to content

Commit

Permalink
Fix tuto cbox
Browse files Browse the repository at this point in the history
  • Loading branch information
paugier committed Nov 18, 2022
1 parent d771b88 commit 34ca4fb
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions docs/tuto_cbox.md
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ print("\n".join(lines[:index_step2+20]))
```{code-cell} ipython3
index_final_step = 0
for line in lines[::-1]:
if line.startswith(" Final time step ="):
if line.startswith("Step") and ", t= " in line:
break
index_final_step -= 1
print("\n".join(lines[index_final_step-10:]))
Expand Down Expand Up @@ -159,7 +159,11 @@ indices_maxima = argrelmax(signal)
times_maxima = times[indices_maxima]
signal_maxima = signal[indices_maxima]
ax.plot(times_maxima, signal_maxima, "xr")
cond = signal_maxima > 0
times_maxima = times_maxima[cond]
signal_maxima = signal_maxima[cond]
ax.plot(times_maxima, signal_maxima, "xr");
```

Also we can also compute an approximation of the growth rate:
Expand Down

0 comments on commit 34ca4fb

Please sign in to comment.