RippleImageSeries#

class ripplemapper.classes.RippleImageSeries(*args)[source]#

Bases: object

Class for a series of ripple images.

Initialize a RippleImageSeries instance.

Parameters:

*args (tuple) – Arguments to initialize the series. Can be a file path to a .rimgs file, or a list of RippleImage objects.

Raises:

ValueError – If the input is not a valid file path or a list of RippleImage objects.

Methods Summary

animate([fig, fname])

Animate the images.

save([fname, save_image_data])

Save the image series to a file.

timeseries([contour])

Plot a timeseries of the same contour.

update(frame, **kwargs)

Update the plot for animation.

Methods Documentation

animate(fig=<Figure size 1200x800 with 0 Axes>, fname: str = None, **kwargs)[source]#

Animate the images.

Parameters:
  • fig (matplotlib.figure.Figure, optional) – The figure to animate, by default plt.figure(figsize=(12,8)).

  • fname (str, optional) – File name to save the animation. If not provided, the animation is not saved.

  • **kwargs (dict) – Additional keyword arguments for the plot function.

Returns:

The created animation.

Return type:

FuncAnimation

save(fname: str = False, save_image_data: bool = False)[source]#

Save the image series to a file.

Parameters:
  • fname (str, optional) – File name to save the image series. If not provided, a default name is generated.

  • save_image_data (bool, optional) – Whether to save the image data, by default False.

Returns:

The file name the image series was saved to.

Return type:

str

timeseries(contour: str | int = 0, **kwargs)[source]#

Plot a timeseries of the same contour.

Parameters:
  • contour (str | int, optional) – The contour identifier to plot the timeseries for, by default 0.

  • **kwargs (dict) – Additional keyword arguments for the plot_timeseries function.

update(frame, **kwargs)[source]#

Update the plot for animation.

Parameters:
  • frame (int) – The frame index to update.

  • **kwargs (dict) – Additional keyword arguments for the plot function.