pylbo.testing

Classes

FakeDataSet

Main container for a single Legolas dataset.

MockMouseEvent

MockArtist

MockPickEvent

MockKeyEvent

Functions

pickle_dataseries_to_file(series, filepath)

load_pickled_dataseries(filepath)

Module Contents

pylbo.testing.pickle_dataseries_to_file(series, filepath)
pylbo.testing.load_pickled_dataseries(filepath)
class pylbo.testing.FakeDataSet(datfile, seed=None)

Bases: pylbo.data_containers.LegolasDataSet

Main container for a single Legolas dataset.

Parameters:

datfile (str, PathLike) – Path to the datfile.

header

The datfile header.

Type:

dict

grid

The base grid.

Type:

numpy.ndarray

grid_gauss

The Gaussian grid.

Type:

numpy.ndarray

equilibria

Dictionary containing the equilibrium arrays.

Type:

dict

eigenvalues

Array containing the complex eigenvalues.

Type:

numpy.ndarray

geometry

The geometry.

Type:

str

scale_factor

Array with the scale factor. One for Cartesian geometries, r for cylindrical.

Type:

numpy.ndarray

x_start

Start of the grid.

Type:

float

x_end

End of the grid

Type:

float

gridpoints

The number of base gridpoints.

Type:

int

gauss_gridpoints

The number of Gaussian gridpoints.

Type:

int

matrix_gridpoints

The dimension of the matrix.

Type:

int

ef_gridpoints

The number of eigenfunction gridpoints.

Type:

int

gamma

The ratio of specific heats.

Type:

float

eq_type

The type of equilibrium selected.

Type:

str

cgs

If True, all units are in cgs.

Type:

bool

units

Dictionary containing the unit normalisations.

Type:

dict

eq_names

Array containing the names of the equilibrium arrays.

Type:

numpy.ndarray

_set_test_equilibria()
_set_test_eigenvalues()
class pylbo.testing.MockMouseEvent(button=1, canvas=None, axes=None, x=None, y=None)

Bases: matplotlib.backend_bases.MouseEvent

inaxes = None
button = 1
xdata = None
ydata = None
class pylbo.testing.MockArtist(ds, axes, figure)
dataset
axes
figure
_xdata
_ydata
get_xdata()
get_ydata()
class pylbo.testing.MockPickEvent(ds, mouse_x: float, mouse_y: float, button=1, axes=None, figure=None, ind: List = None)

Bases: matplotlib.backend_bases.PickEvent

ind = None
class pylbo.testing.MockKeyEvent(key, figure=None)

Bases: matplotlib.backend_bases.KeyEvent