Space#
- class uvex_transients.phase_space.space.Space(axes: Sequence[Axis])[source]#
The ordered axes of a phase-space map, and the moves between physical points and the unit cube.
A point of the space is a length-
ndimarray in the coordinates of the axes. Functions take any number of leading axes, so a single point, a batch of them and a grid all work, as long as the last axis has lengthndim.- Parameters:
axes (
sequenceofAxis) – The axes, in order. At least one, with distinct names.- Raises:
ValueError – If there are no axes or two have the same name.
Methods
contains(x)Return whether points lie inside the ranges of the axes, edges included.
from_dict(data)Rebuild a space from
to_dict().from_unit(u)Rescale points from the unit cube to the ranges of the axes.
grid(size[, bounds])Lay out a regular grid of points, with the first axis varying slowest.
index(name)Return the position of an axis.
sobol(n[, seed])Draw a scrambled Sobol design over the unit cube.
to_dict()Return the space as plain types, which an ECSV header can hold.
to_unit(x)Rescale points from the ranges of the axes to the unit cube.
with_bounds(bounds)Return a space of the same axes over other ranges.
Attributes