RippleContour#

class ripplemapper.classes.RippleContour(*args, image=None)[source]#

Bases: object

Dataclass for ripple contours.

Initialize a RippleContour instance.

Parameters:
  • *args (tuple) – Arguments to initialize the contour. Can be a file path to a contour file, or a numpy array of contour values and a method string.

  • image (optional) – The parent image associated with the contour, by default None.

Raises:

ValueError – If the input is not a valid file path or a values-method pair.

Methods Summary

plot(*args, **kwargs)

Plot the image with contours.

save([fname])

Write the contour to a file.

smooth(**kwargs)

Smooth the contour.

to_physical()

Convert the contour to physical units.

Methods Documentation

plot(*args, **kwargs)[source]#

Plot the image with contours.

Parameters:
  • *args (tuple) – Additional positional arguments for the plot function.

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

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

Write the contour to a file.

Parameters:

fname (str, optional) – File name to save the contour. If not provided, a default name is generated.

smooth(**kwargs)[source]#

Smooth the contour.

Parameters:

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

to_physical()[source]#

Convert the contour to physical units.