RelativeOrbitKS

Overview

class orbithunter.RelativeOrbitKS(state=None, basis=None, parameters=None, discretization=None, constraints=None, frame='comoving', **kwargs)[source]

Methods

Note

See also Orbit and OrbitKS.

Initialization

RelativeOrbitKS.__init__([state, basis, …])

Same as OrbitKS except for setting the ‘frame’ attribute.

RelativeOrbitKS.populate([attr])

Randomly initialize parameters which are currently zero.

RelativeOrbitKS._populate_state(**kwargs)

Initialize a set of random spatiotemporal Fourier modes

RelativeOrbitKS._populate_parameters(**kwargs)

Should only be accessed through Orbit.populate()

Special Methods

“Special” methods also known as “magic” or “dunder” (double underscore) methods account for most basic Math operations and other operations pertaining to NumPy arrays.

Note

See Orbit for all definitions.

Properties

RelativeOrbitKS.shape

Current state array’s shape

RelativeOrbitKS.size

Current state array’s dimensionality

RelativeOrbitKS.ndim

Current state array’s number of dimensions

Discretization and Dimensions

RelativeOrbitKS.shapes()

State array shapes in different bases; determined by symmetry selection rules.

RelativeOrbitKS.dimensions()

Tile dimensions.

RelativeOrbitKS.glue_dimensions(…[, …])

Strategy for combining tile dimensions in gluing; default is arithmetic averaging.

RelativeOrbitKS.dimension_based_discretization(…)

Return discretization size according to orbithunter conventions for the KSe.

RelativeOrbitKS.plotting_dimensions()

Dimensions according to plot labels; used in clipping.

Math Functions

RelativeOrbitKS.orbit_vector()

Vector representation of Orbit instance; constants all variables required to define the Orbit instance.

RelativeOrbitKS.abs()

Orbit instance with absolute value of state.

RelativeOrbitKS.dot(other)

Return the L_2 inner product of two orbits

RelativeOrbitKS.norm([order])

Norm of spatiotemporal state via numpy.linalg.norm

RelativeOrbitKS.dx(**kwargs)

Spatial derivative of the current state.

RelativeOrbitKS.dt([order, array])

A time derivative of the current state.

RelativeOrbitKS.eqn(**kwargs)

Instance whose state is the Kuramoto-Sivashinsky equation evaluated at the current state

RelativeOrbitKS.matvec(other, **kwargs)

Extension of parent class method

RelativeOrbitKS.rmatvec(other, **kwargs)

Matrix-vector product with the adjoint of the Jacobian

RelativeOrbitKS.precondition(**kwargs)

Rescale a vector with the inverse (absolute value) of linear spatial terms

RelativeOrbitKS.jacobian(**kwargs)

Jacobian matrix evaluated at the current state.

RelativeOrbitKS.calculate_spatial_shift(**kwargs)

Calculate the phase difference between the spatial modes at t=0 and t=T

Visualization

RelativeOrbitKS.plot([show, save, padding, …])

Plot the velocity field as a 2-d density plot using matplotlib’s imshow

RelativeOrbitKS.mode_plot([show, save, scale])

Plot the spatiotemporal Fourier spectrum as a 2-d density plot using matplotlib’s imshow

State Transformations

RelativeOrbitKS.transform([to, array, inplace])

Transform current state to a different basis.

RelativeOrbitKS.resize(*new_discretization, …)

Rediscretize the current state typically via zero padding or interpolation.

RelativeOrbitKS.reflection([axis, signed])

Reflect the velocity field about the spatial midpoint

RelativeOrbitKS.roll(shift[, axis])

Apply numpy roll along specified axis.

RelativeOrbitKS.cell_shift(n_cell[, axis])

Rotate by fraction of the period in either axis; nearest discrete approximate is taken.

RelativeOrbitKS.rotate(distance[, axis, units])

Rotate the velocity field in either space or time.

RelativeOrbitKS.shift_reflection()

Return a OrbitKS with shift-reflected velocity field

RelativeOrbitKS.to_fundamental_domain()

Placeholder/signature for possible symmetry subclasses.

RelativeOrbitKS.from_fundamental_domain()

Placeholder/signature for possible symmetry subclasses.

RelativeOrbitKS.change_reference_frame(frame)

Transform to (or from) the co-moving frame depending on the current reference frame

RelativeOrbitKS._pad(size[, axis])

Checks if in comoving frame then pads.

RelativeOrbitKS._truncate(size[, axis])

Checks if in comoving frame then truncates.

Static

RelativeOrbitKS.bases_labels()

Labels of the different bases produced by transforms.

RelativeOrbitKS.minimal_shape()

The smallest possible compatible discretization to have full functionality.

RelativeOrbitKS.minimal_shape_increments()

The smallest valid increment to change the discretization by.

RelativeOrbitKS.discretization_labels()

Strings to use to label dimensions/periods

RelativeOrbitKS.parameter_labels()

Labels of all parameters

RelativeOrbitKS.dimension_labels()

Strings to use to label dimensions/periods.

RelativeOrbitKS.positive_indexing()

Indicates whether numpy indexing corresponds to increasing or decreasing values configuration space variable

Other

RelativeOrbitKS.periodic_dimensions() is not ‘static’, unlike its parent; this is due to unavoidable symmetry specific considerations. For this reason, the staticmethod decorator was not used.

RelativeOrbitKS.copy()

Return an instance with copies of copy-able attributes.

RelativeOrbitKS.mask(masking_array[, invert])

Return an Orbit instance with a numpy masked array state

RelativeOrbitKS.constrain(*labels)

Set self constraints based on labels provided.

RelativeOrbitKS.preprocess()

Check whether the orbit converged to an equilibrium or close-to-zero solution

RelativeOrbitKS.periodic_dimensions()

Bools indicating whether or not dimension is periodic for persistent homology calculations.

Defaults

RelativeOrbitKS.defaults()

Dict of default values for constraints, parameter ranges, sizes, etc.

RelativeOrbitKS._default_shape()

The default array shape when dimensions are not specified.

RelativeOrbitKS._default_parameter_ranges()

Default parameter ranges.

RelativeOrbitKS._default_constraints()

Defaults for whether or not parameters are constrained.

Reading and Writing Data

RelativeOrbitKS.filename([extension, …])

Method for convenience and consistent/conventional file naming.

RelativeOrbitKS.to_h5([filename, dataname, …])

Export current state information to HDF5 file.