Skip to content

Commit

Permalink
Extended tutorial somewhat with rimgs visualisation
Browse files Browse the repository at this point in the history
  • Loading branch information
alasdairwilson committed Jul 11, 2024
1 parent f138dbe commit 1dceff9
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 1 deletion.
19 changes: 19 additions & 0 deletions docs/tutorial/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,27 @@ All of these functions also work with `RippleImageSeries` objects, e.g.
series.images[0].plot()
plt.show()
Note, here we have passed the overwrite keyword since those contour methods already exist.

For a more detailed explanation of how to use these functions, see the :ref:`reference` section.

Visualising an Image Series
****************************

We have multiple methods attached to rimg and rimgs that help visualise the interface.

First we can produce animated .gif files easily:

.. code-block:: python
series.animate("example_series.gif")
We can also produce a timeseries plot of any of the contours in our series:

.. code-block:: python
series.timeseries("Upper Boundary")
Saving and loading data
************************

Expand Down
2 changes: 1 addition & 1 deletion ripplemapper/classes.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ def get_contour(self, contour: str | int):
return self.contours[contour]
elif isinstance(contour, str):
for cont in self.contours:
if contour in cont.method:
if contour.lower() in cont.method.lower():
return cont
else:
raise ValueError("Invalid input, expected an integer or method string")
Expand Down

0 comments on commit 1dceff9

Please sign in to comment.