orbit_divergence_plot
- ssapy.plotUtils.orbit_divergence_plot(rs, r_moon=[], t=False, limits=False, title='', save_path=False)[source][source]
Plot multiple cislunar orbits in the GCRF frame with respect to the Earth and Moon.
Parameters: - rs (numpy.ndarray): A 3D array of shape (n, 3, m) where n is the number of time steps,
3 represents the x, y, z coordinates, and m is the number of orbits.
- r_moon (numpy.ndarray, optional): A 2D array of shape (3, n) representing the Moon’s position at each time step.
If not provided, it is calculated based on the time t.
t (astropy.time.Time, optional): The time at which to calculate the Moon’s position if r_moon is not provided. Default is False.
limits (float, optional): The plot limits in units of Earth’s radius (GEO). If not provided, it is calculated as 1.2 times the maximum norm of rs. Default is False.
title (str, optional): The title of the plot. Default is an empty string.
save_path (str, optional): The file path to save the plot. If not provided, the plot is not saved. Default is False.
Returns: None
This function creates a 3-panel plot of multiple cislunar orbits in the GCRF frame. Each panel represents a different plane (xy, xz, yz) with Earth at the center. The orbits are plotted with color gradients to indicate progression. The Moon’s position is also plotted if provided or calculated.
Example usage: ``` import numpy as np from astropy.time import Time from your_module import orbit_divergence_plot
# Example data rs = np.random.randn(100, 3, 5) # 5 orbits with 100 time steps each t = Time(“2025-01-01”)