Module sleplet.plotting

Classes to create plots on the sphere or mesh.

Classes

class PlotMesh (*args: Any, **kwargs: Any)

Create surface mesh plot via plotly.

Class variables

var amplitude : float | None

Whether to customise the amplitude range of the colour bar.

var f : numpy.ndarray[typing.Any, numpy.dtype[numpy.complex128 | numpy.float64]]

The field value sampled on the mesh.

var filename : str

The output filename of the plot.

var meshMesh

The given mesh object.

var normalise : bool

Whether to normalise the plot or not.

var region : bool

Whether to set the field values outside of the region to zero.

Methods

def execute(self: Self, colour: matplotlib.colors.LinearSegmentedColormap = <matplotlib.colors.LinearSegmentedColormap object>) ‑> None

Perform the plot.

Args

colour
From the cmocean.cm module
class PlotSphere (*args: Any, **kwargs: Any)

Create surface sphere plot via plotly.

Class variables

var L : int

The spherical harmonic bandlimit.

var amplitude : float | None

Whether to customise the amplitude range of the colour bar.

var annotations : list[dict[str, float | int]]

Whether to display any annotations on the surface plot or not.

var f : numpy.ndarray[typing.Any, numpy.dtype[numpy.complex128 | numpy.float64]]

The field value sampled on the sphere.

var filename : str

The output filename of the plot.

var normalise : bool

Whether to normalise the plot or not.

var plot_type : str

Whether to display the real, imag, abs or sum value of the field.

var reality : bool

Whether the given signal is real or not.

var regionRegion | None

Whether to set the field values outside of a given region to zero.

var spin : int

Spin value.

var upsample : bool

Whether to upsample the current field.

Methods

def execute(self: Self) ‑> None

Perform the plot.