Orbit Services

Services for orbit objects in the Hiten framework.

Orbit Persistence Service

_OrbitPersistenceService()

Handle persistence for orbit objects.

class hiten.algorithms.types.services.orbits._OrbitPersistenceService[source]

Bases: _PersistenceServiceBase

Thin wrapper around orbit persistence helpers.

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.

Orbit Correction Service

_OrbitCorrectionService()

Provide correction services for orbit objects.

class hiten.algorithms.types.services.orbits._OrbitCorrectionService(domain_obj)[source]

Bases: _DynamicsServiceBase

Drive Newton-based differential correction for periodic orbits.

Parameters:

domain_obj (PeriodicOrbit) – The domain object.

corrector

The corrector.

Type:

CorrectorPipeline

property corrector: CorrectorPipeline

The corrector.

correct(*, overrides=None, **kwargs)[source]

Differential correction wrapper.

Parameters:
  • overrides (Dict[str, Any] or None, optional) – Dictionary of parameter overrides to pass to the corrector.

  • **kwargs – Additional correction parameters that are passed directly to the corrector.

Returns:

The corrected state and period.

Return type:

Tuple[np.ndarray, float]

update_correction(**kwargs)[source]

Update algorithm-level correction parameters for this orbit.

Parameters:

**kwargs – Additional correction parameters that are passed directly to the corrector.

Return type:

None

abstract property correction_config: _OrbitCorrectionConfig

Provides the differential correction configuration for this orbit family.

Orbit Continuation Service

_OrbitContinuationService()

Provide continuation services for orbit objects.

class hiten.algorithms.types.services.orbits._OrbitContinuationService(domain_obj)[source]

Bases: _DynamicsServiceBase

Drive continuation for periodic orbits.

Parameters:

domain_obj (PeriodicOrbit) – The domain object.

generator

The generator.

Type:

ContinuationPipeline

property initial_state: ndarray

The initial state.

property generator: ContinuationPipeline

The continuation pipeline.

generate(*, overrides=None, **kwargs)[source]

Generate a family of periodic orbits.

Parameters:

overrides (Dict[str, Any] or None, optional) – Dictionary of parameter overrides to pass to the generator.

Returns:

The generated state and period.

Return type:

Tuple[np.ndarray, float]

update_continuation(**kwargs)[source]

Update algorithm-level continuation parameters for this orbit.

Parameters:

**kwargs – Additional continuation parameters that are passed directly to the generator.

Return type:

None

abstract property continuation_config: _OrbitContinuationConfig

Default parameter for family continuation (must be overridden).

Orbit Dynamics Service

_OrbitDynamicsService()

Provide dynamics services for orbit objects.

class hiten.algorithms.types.services.orbits._OrbitDynamicsService(orbit)[source]

Bases: _DynamicsServiceBase

Integrate periodic orbits using the system dynamics.

Parameters:

orbit (PeriodicOrbit) – The orbit.

property orbit: PeriodicOrbit

The orbit.

property libration_point: LibrationPoint

The libration point.

property system: System

The system.

property mu: float

The mass ratio.

property is_stable: bool

Check if the orbit is linearly stable.

Returns:

True if all stability indices have magnitude <= 1, False otherwise.

Return type:

bool

property stability_indices: Tuple | None

The stability indices.

property eigenvalues: Tuple | None

The eigenvalues.

property eigenvectors: Tuple | None

The eigenvectors.

property energy: float

Compute the energy of the orbit at the initial state.

Returns:

The energy value in nondimensional units.

Return type:

float

property jacobi_constant: float

Compute the Jacobi constant of the orbit.

Returns:

The Jacobi constant value (dimensionless).

Return type:

float

property dynsys: _DynamicalSystem

Underlying vector field instance.

Returns:

The underlying vector field instance.

Return type:

_DynamicalSystemProtocol

property var_dynsys: _DynamicalSystem

Underlying variational equations system.

Returns:

The underlying variational equations system.

Return type:

_DynamicalSystemProtocol

property jacobian_dynsys: _DynamicalSystem

Underlying Jacobian evaluation system.

Returns:

The underlying Jacobian evaluation system.

Return type:

_DynamicalSystemProtocol

property initial_state: ndarray

The initial state.

property period: float

The period.

property trajectory: Trajectory | None

Get the computed trajectory points.

Returns:

Array of shape (steps, 6) containing state vectors at each time step, or None if the trajectory hasn’t been computed yet.

Return type:

Trajectory or None

property trajectories: List[Trajectory]

Compatibility helper for SynodicMap - returns list with single trajectory.

property monodromy

The monodromy.

propagate(*, steps, method, order)[source]

Propagate the orbit.

Parameters:
  • steps (int) – The number of steps to take.

  • method (str) – The method to use for propagation.

  • order (int) – The order of the method to use for propagation.

Return type:

Trajectory

manifold(stable=True, direction='positive')[source]

Create a manifold for the orbit.

Parameters:
  • stable (bool) – Whether to create a stable manifold.

  • direction (Literal["positive", "negative"]) – The direction of the manifold.

Returns:

The manifold.

Return type:

Manifold

compute_stability()[source]

Compute the stability of the orbit.

Returns:

The stability of the orbit.

Return type:

Tuple[np.ndarray, np.ndarray, np.ndarray]

property amplitude: float

The amplitude of the orbit.

abstractmethod initial_guess()[source]

Generate an initial guess for the orbit.

Returns:

The initial guess for the orbit.

Return type:

np.ndarray

Generic Orbit Services

_GenericOrbitCorrectionService()

Provide correction services for generic orbit objects.

class hiten.algorithms.types.services.orbits._GenericOrbitCorrectionService(orbit)[source]

Bases: _OrbitCorrectionService

Drive Newton-based differential correction for generic orbits.

Parameters:

orbit (GenericOrbit) – The orbit.

property correction_config: _OrbitCorrectionConfig

Provides the differential correction configuration for generic orbits.

Returns:

The correction configuration.

Return type:

_OrbitCorrectionConfig

Raises:

NotImplementedError – If correction_config is not set on the orbit.

_GenericOrbitContinuationService()

Provide continuation services for generic orbit objects.

class hiten.algorithms.types.services.orbits._GenericOrbitContinuationService(orbit)[source]

Bases: _OrbitContinuationService

Drive continuation for generic orbits.

Parameters:

orbit (GenericOrbit) – The orbit.

property continuation_config: _OrbitContinuationConfig

Provides the continuation configuration for generic orbits.

Returns:

The continuation configuration.

Return type:

_OrbitContinuationConfig

Raises:

NotImplementedError – If continuation_config is not set on the orbit.

_GenericOrbitDynamicsService()

Provide dynamics services for generic orbit objects.

class hiten.algorithms.types.services.orbits._GenericOrbitDynamicsService(orbit)[source]

Bases: _OrbitDynamicsService

Dynamics service for generic orbits with custom amplitude handling.

Parameters:

orbit (GenericOrbit) – The orbit.

initial_guess()[source]

Generate initial guess for GenericOrbit.

Parameters:

**kwargs – Additional keyword arguments (unused).

Returns:

The initial state vector in nondimensional units.

Return type:

numpy.ndarray, shape (6,)

Raises:

ValueError – If no initial state is provided.

Halo Orbit Services

_HaloOrbitCorrectionService()

Provide correction services for halo orbit objects.

class hiten.algorithms.types.services.orbits._HaloOrbitCorrectionService(orbit)[source]

Bases: _OrbitCorrectionService

Drive Newton-based differential correction for halo orbits.

Parameters:

orbit (HaloOrbit) – The orbit.

property correction_config: _OrbitCorrectionConfig

Provides the differential correction configuration for halo orbits.

Returns:

The correction configuration.

Return type:

_OrbitCorrectionConfig

_HaloOrbitContinuationService()

Provide continuation services for halo orbit objects.

class hiten.algorithms.types.services.orbits._HaloOrbitContinuationService(orbit)[source]

Bases: _OrbitContinuationService

Drive continuation for halo orbits.

Parameters:

orbit (HaloOrbit) – The orbit.

property continuation_config: _OrbitContinuationConfig

Provides the continuation configuration for halo orbits.

Returns:

The continuation configuration.

Return type:

_OrbitContinuationConfig

_HaloOrbitDynamicsService()

Provide dynamics services for halo orbit objects.

class hiten.algorithms.types.services.orbits._HaloOrbitDynamicsService(orbit)[source]

Bases: _OrbitDynamicsService

Dynamics service for halo orbits.

Parameters:

orbit (HaloOrbit) – The orbit.

property zenith: Literal['northern', 'southern']

(Read-only) Current zenith of the orbit.

Returns:

The orbit zenith.

Return type:

Literal[“northern”, “southern”]

property n: int

(Read-only) Current n value of the orbit.

Returns:

The orbit n value.

Return type:

int

initial_guess()[source]

Generate an initial guess for the orbit. using Richardson’s third-order analytical approximation.

Returns:

The initial guess for the orbit.

Return type:

np.ndarray

References

[Richardson1980]

Richardson, D. L. (1980). “Analytic construction of periodic orbits about the

collinear libration points”.

Lyapunov Orbit Services

_LyapunovOrbitCorrectionService()

Provide correction services for Lyapunov orbit objects.

class hiten.algorithms.types.services.orbits._LyapunovOrbitCorrectionService(orbit)[source]

Bases: _OrbitCorrectionService

Dynamics service for Lyapunov orbits.

Parameters:

orbit (LyapunovOrbit) – The orbit.

property correction_config: _OrbitCorrectionConfig

Provides the differential correction configuration for Lyapunov orbits.

Returns:

The correction configuration.

Return type:

_OrbitCorrectionConfig

_LyapunovOrbitContinuationService()

Provide continuation services for Lyapunov orbit objects.

class hiten.algorithms.types.services.orbits._LyapunovOrbitContinuationService(orbit)[source]

Bases: _OrbitContinuationService

Dynamics service for Lyapunov orbits.

Parameters:

orbit (LyapunovOrbit) – The orbit.

property continuation_config: _OrbitContinuationConfig

Provides the continuation configuration for Lyapunov orbits.

Returns:

The continuation configuration.

Return type:

_OrbitContinuationConfig

_LyapunovOrbitDynamicsService()

Provide dynamics services for Lyapunov orbit objects.

class hiten.algorithms.types.services.orbits._LyapunovOrbitDynamicsService(orbit)[source]

Bases: _OrbitDynamicsService

Dynamics service for Lyapunov orbits.

Parameters:

orbit (LyapunovOrbit) – The orbit.

initial_guess()[source]

Generate an initial guess for the orbit using the analytical approximation.

Returns:

The initial guess for the orbit.

Return type:

np.ndarray

References

[Richardson1980]

Richardson, D. L. (1980). “Analytic construction of periodic orbits about the

collinear libration points”.

Vertical Orbit Services

_VerticalOrbitCorrectionService()

Provide correction services for vertical orbit objects.

class hiten.algorithms.types.services.orbits._VerticalOrbitCorrectionService(orbit)[source]

Bases: _OrbitCorrectionService

Dynamics service for Vertical orbits.

Parameters:

orbit (VerticalOrbit) – The orbit.

property correction_config: _OrbitCorrectionConfig

Provides the differential correction configuration for Vertical orbits.

Returns:

The correction configuration for Vertical orbits.

Return type:

_OrbitCorrectionConfig

_VerticalOrbitContinuationService()

Provide continuation services for vertical orbit objects.

class hiten.algorithms.types.services.orbits._VerticalOrbitContinuationService(orbit)[source]

Bases: _OrbitContinuationService

Dynamics service for Vertical orbits.

Parameters:

orbit (VerticalOrbit) – The orbit.

property continuation_config: _OrbitContinuationConfig

Provides the continuation configuration for Vertical orbits.

Returns:

The continuation configuration for Vertical orbits.

Return type:

_OrbitContinuationConfig

_VerticalOrbitDynamicsService()

Provide dynamics services for vertical orbit objects.

class hiten.algorithms.types.services.orbits._VerticalOrbitDynamicsService(orbit)[source]

Bases: _OrbitDynamicsService

Dynamics service for Vertical orbits.

Parameters:

orbit (VerticalOrbit) – The orbit.

initial_guess()[source]

Generate an initial guess for the orbit. using the initial_state.

Returns:

The initial guess for the orbit.

Return type:

np.ndarray

Orbit Services

_OrbitServices()

Encapsulate services for orbit objects.

class hiten.algorithms.types.services.orbits._OrbitServices(domain_obj, correction, continuation, dynamics, persistence)[source]

Bases: _ServiceBundleBase

Bundle all orbit services together.

Parameters:
classmethod default(domain_obj)[source]

Create a default service bundle.

Parameters:

domain_obj (PeriodicOrbit) – The domain object.

Returns:

The service bundle.

Return type:

_OrbitServices

classmethod with_shared_dynamics(dynamics)[source]

Create a service bundle with a shared dynamics service.

Parameters:

dynamics (_OrbitDynamicsService) – The dynamics service.

Returns:

The service bundle.

Return type:

_OrbitServices