Libration Services

Services for libration point objects in the Hiten framework.

Libration Persistence Service

_LibrationPersistenceService()

Handle persistence for libration point objects.

class hiten.algorithms.types.services.libration._LibrationPersistenceService[source]

Bases: _PersistenceServiceBase

Encapsulate libration point IO helpers for testability.

Parameters:
  • save_fn (Callable[..., Any]) – The function to save the object.

  • load_fn (Callable[..., Any]) – The function to load the object.

  • load_inplace_fn (Callable[..., Any]) – The function to load the object in place.

Libration Dynamics Service

_LibrationDynamicsService()

Provide stability analysis and geometry helpers for libration points.

class hiten.algorithms.types.services.libration._LibrationDynamicsService(point)[source]

Bases: _DynamicsServiceBase

Provide stability analysis and geometry helpers for libration points.

Parameters:

point (LibrationPoint) – The libration point.

generator

The stability pipeline.

Type:

StabilityPipeline

property generator: StabilityPipeline

The stability pipeline.

property system: System

The system.

property mu: float

The mass parameter.

property dynsys: _DynamicalSystem

The dynamical system.

property var_dynsys: _DynamicalSystem

The variational equations system.

hamsys(degree, form='center_manifold_real')[source]

Get the Hamiltonian system for the given form and degree.

Parameters:
  • degree (int) – The maximum degree of the Hamiltonian expansion.

  • form (str) – The Hamiltonian form to get coefficients for. Default is “center_manifold_real”.

Returns:

The Hamiltonian system instance.

Return type:

_HamiltonianSystem

property jacobian_dynsys: _DynamicalSystem

The Jacobian evaluation system.

property is_stable: bool

The stability of the libration point.

property eigenvalues: Tuple[ndarray, ndarray, ndarray]

The eigenvalues of the libration point.

property eigenvectors: Tuple[ndarray, ndarray, ndarray]

The eigenvectors of the libration point.

property energy: float

The energy of the libration point.

Returns:

The mechanical energy in nondimensional units.

Return type:

float

property jacobi: float

Compute the Jacobi constant of the libration point.

Returns:

The Jacobi constant in nondimensional units.

Return type:

float

compute_stability(*, delta=1e-06, tol=1e-08)[source]

Compute the stability of the libration point.

Parameters:
  • delta (float) – The delta parameter.

  • tol (float) – The tolerance parameter.

Returns:

The stability pipeline.

Return type:

StabilityPipeline

center_manifold(degree)[source]

Get or create a center manifold of the specified degree.

Parameters:

degree (int) – The maximum degree of the center manifold expansion.

Returns:

The center manifold instance.

Return type:

CenterManifold

hamiltonian(max_deg, form='center_manifold_real')[source]

Return a Hamiltonian object from the associated CenterManifold.

Parameters:
  • max_deg (int) – The maximum degree of the Hamiltonian expansion.

  • form (str) – The Hamiltonian form to get coefficients for. Default is “center_manifold_real”. Available forms: ‘physical’, ‘real_normal’, ‘complex_normal’, ‘normalized’, ‘center_manifold_complex’, ‘center_manifold_real’.

Returns:

The Hamiltonian object with the specified form and degree.

Return type:

Hamiltonian

hamiltonians(max_deg)[source]

Return all Hamiltonian representations from the associated CenterManifold.

Parameters:

max_deg (int) – The maximum degree of the Hamiltonian expansion.

Returns:

Dictionary with keys: ‘physical’, ‘real_normal’, ‘complex_normal’, ‘normalized’, ‘center_manifold_complex’, ‘center_manifold_real’. Each value is a Hamiltonian object.

Return type:

dict[str, Hamiltonian]

generating_functions(max_deg)[source]

Return the Lie-series generating functions from CenterManifold.

Parameters:

max_deg (int) – The maximum degree of the generating function expansion.

Returns:

List of LieGeneratingFunction objects.

Return type:

list[LieGeneratingFunction]

create_orbit(family, /, **kwargs)[source]

Create a periodic orbit family anchored at this libration point.

The helper transparently instantiates the appropriate concrete subclass of PeriodicOrbit and returns it. The mapping is based on the family string or directly on a subclass type:

L1 = system.get_libration_point(1)
orb1 = L1.create_orbit("halo", amplitude_z=0.03, zenith="northern")
orb2 = L1.create_orbit("lyapunov", amplitude_x=0.05)
Parameters:
  • family (str or PeriodicOrbit subclass) – Identifier of the orbit family or an explicit subclass type. Accepted strings (case-insensitive): “halo”, “lyapunov”, “vertical_lyapunov” and “generic”. If a subclass is passed, it is instantiated directly.

  • **kwargs – Forwarded verbatim to the underlying orbit constructor.

Returns:

  • PeriodicOrbit

  • GenericOrbit
  • HaloOrbit
  • LyapunovOrbit
  • VerticalOrbit – Newly created orbit instance.

Return type:

PeriodicOrbit

abstract property sign: int

Sign convention (+-1) used for local <-> synodic transformations.

Returns:

The sign convention for coordinate transformations.

Return type:

int

abstract property a: float

Offset a used in frame changes for triangular points.

Returns:

The offset value a (dimensionless).

Return type:

float

property position: ndarray

Calculate the position of the triangular libration point.

Returns:

Position vector [x, y, z] in nondimensional units.

Return type:

numpy.ndarray, shape (3,)

property linear_data

Get the linear data for the collinear libration point.

Returns:

(lambda1, omega1, omega2, None, C, Cinv) Object containing the linear data for the libration point.

Return type:

tuple

property linear_modes: Tuple[float, float, float | None]

Compute the linear modes (lambda1, omega1, omega2) for the collinear libration point.

Returns:

(lambda1, omega1, omega2) values in nondimensional units.

Return type:

tuple

property normal_form_transform: Tuple[ndarray, ndarray]

The normal form transform for the collinear libration point.

abstractmethod scale_factor(lambda1, omega1)[source]

Compute the scale factor for the collinear libration point.

Returns:

(s1, s2) scale factors for the hyperbolic and elliptic components.

Return type:

tuple

Parameters:
property eigendecomposition_config: _EigenDecompositionConfig

The eigen decomposition configuration for the collinear libration point.

Collinear Dynamics Service

_CollinearDynamicsService()

Provide stability analysis and geometry helpers for collinear libration points.

class hiten.algorithms.types.services.libration._CollinearDynamicsService(point)[source]

Bases: _LibrationDynamicsService

Provide stability analysis and geometry helpers for collinear libration points.

Parameters:

point (CollinearPoint) – The collinear libration point.

property position: ndarray

Calculate the position of the collinear libration point.

Returns:

Position vector [x, y, z] in nondimensional units.

Return type:

numpy.ndarray, shape (3,)

abstract property won: Tuple[int, float]

Get the won value for the collinear libration point.

Returns:

(sign, won) where sign is the sign convention and won is the won value.

Return type:

tuple

property gamma: float

The gamma value for the collinear libration point.

Returns:

The gamma value (dimensionless).

Return type:

float

scale_factor(lambda1, omega1)[source]

The scale factor for the collinear libration point.

Returns:

(s1, s2) scale factors for the hyperbolic and elliptic components.

Return type:

tuple

Parameters:
cn(n)[source]

The cn coefficient for the collinear libration point.

Parameters:

n (int) – The coefficient index (must be non-negative).

Returns:

The cn coefficient value (dimensionless).

Return type:

float

L1 Dynamics Service

_L1DynamicsService()

Provide stability analysis and geometry helpers for L1 libration points.

class hiten.algorithms.types.services.libration._L1DynamicsService(point)[source]

Bases: _CollinearDynamicsService

Provide stability analysis and geometry helpers for L1 libration points.

Parameters:

point (L1Point)

property sign: int

The sign convention for L1 libration points.

property a: float

The offset along the x-axis used in frame changes for L1 libration points.

property won: Tuple[int, float]

The won value for L1 libration points.

L2 Dynamics Service

_L2DynamicsService()

Provide stability analysis and geometry helpers for L2 libration points.

class hiten.algorithms.types.services.libration._L2DynamicsService(point)[source]

Bases: _CollinearDynamicsService

Provide stability analysis and geometry helpers for L2 libration points.

Parameters:

point (L2Point)

property sign: int

The sign convention for L2 libration points.

property a: float

The offset along the x-axis used in frame changes for L2 libration points.

property won: Tuple[int, float]

The won value for L2 libration points.

L3 Dynamics Service

_L3DynamicsService()

Provide stability analysis and geometry helpers for L3 libration points.

class hiten.algorithms.types.services.libration._L3DynamicsService(point)[source]

Bases: _CollinearDynamicsService

Provide stability analysis and geometry helpers for L3 libration points.

Parameters:

point (L3Point)

property sign: int

The sign convention for L3 libration points.

property a: float

The offset along the x-axis used in frame changes for L3 libration points.

property won: Tuple[int, float]

The won value for L3 libration points.

Triangular Dynamics Service

_TriangularDynamicsService()

Provide stability analysis and geometry helpers for triangular libration points.

class hiten.algorithms.types.services.libration._TriangularDynamicsService(point)[source]

Bases: _LibrationDynamicsService

Provide stability analysis and geometry helpers for triangular libration points.

Parameters:

point (TriangularPoint)

scale_factor(idx)[source]

Compute the scale factor for the collinear libration point.

Returns:

(s1, s2) scale factors for the hyperbolic and elliptic components.

Return type:

tuple

Parameters:

idx (int)

L4 Dynamics Service

_L4DynamicsService()

Provide stability analysis and geometry helpers for L4 libration points.

class hiten.algorithms.types.services.libration._L4DynamicsService(point)[source]

Bases: _TriangularDynamicsService

Provide stability analysis and geometry helpers for L4 libration points.

Parameters:

point (L4Point)

property sign: int

The sign convention for L4 libration points.

property a: float

The offset along the x-axis used in frame changes for L4 libration points.

L5 Dynamics Service

_L5DynamicsService()

Provide stability analysis and geometry helpers for L5 libration points.

class hiten.algorithms.types.services.libration._L5DynamicsService(point)[source]

Bases: _TriangularDynamicsService

Provide stability analysis and geometry helpers for L5 libration points.

Parameters:

point (L5Point)

property sign: int

The sign convention for L5 libration points.

property a: float

The offset along the x-axis used in frame changes for L5 libration points.

Libration Services

_LibrationServices()

Encapsulate services for libration points.

class hiten.algorithms.types.services.libration._LibrationServices(domain_obj, persistence, dynamics)[source]

Bases: _ServiceBundleBase

Provide stability analysis and geometry helpers for libration points

Parameters:
classmethod default(domain_obj)[source]

Create a default service bundle for a libration point.

Parameters:

domain_obj (LibrationPoint) – The libration point.

Returns:

The service bundle.

Return type:

_LibrationServices

classmethod with_shared_dynamics(dynamics)[source]

Create a service bundle with a shared dynamics service.

Parameters:

dynamics (_LibrationDynamicsService) – The dynamics service.

Returns:

The service bundle.

Return type:

_LibrationServices