adam_core.utils package

adam_core.utils.get_perturber_state(perturber: OriginCodes, times: Timestamp, frame: Literal['ecliptic', 'equatorial', 'itrf93'] = 'ecliptic', origin: OriginCodes = OriginCodes.SUN) CartesianCoordinates[source]

Query the JPL ephemeris files loaded in SPICE for the state vectors of desired perturbers.

Parameters:
  • perturber (OriginCodes) – The NAIF ID of the perturber.

  • times (Timestamp (N)) – Times at which to get state vectors.

  • frame ({'equatorial', 'ecliptic', 'itrf93'}) – Return perturber state in the equatorial or ecliptic J2000 frames.

  • origin (OriginCodes) – The NAIF ID of the origin.

Returns:

states – The state vectors of the perturber in the desired frame and measured from the desired origin.

Return type:

~adam_core.coordinates.cartesian.CartesianCoordinates

adam_core.utils.setup_SPICE(kernels: List[str] | None = None, force: bool = False)[source]

Load SPICE kernels.

This function checks to see if SPICE has already been initialized for the current process. If it has, then it does nothing. If it has not, then it loads the desired kernels into SPICE. If force is set to True, then the kernels will be loaded regardless of whether or not SPICE has already been initialized. SPICE has a limit on the number of kernels that can be loaded at once, so it is recommended to only load the kernels that are needed for the current calculation (calling sp.furnsh multiple times will load the same kernel multiple times, which will cause an error.)

The default kernels loaded are those provided by the NAIF data packages:

Parameters:

kernels – List of SPICE kernels to load into SPICE. If None, then the default kernels will be loaded.

Subpackages

Submodules