.. _maxi-orbit: .. |MaxiOrbit| replace:: :class:`~gdt.missions.maxi.orbit.MaxiOrbit` .. |MaxiFrame| replace:: :class:`~gdt.missions.maxi.frame.MaxiFrame` ************************************************************** MAXI Orbit Files (:mod:`gdt.missions.maxi.orbit`) ************************************************************** The MAXI mission provides orbit files that specify the position and velocity of the ISS (and hence MAXI) in orbit at an approximate 1-s cadence over a day. We can open these files using the |MaxiOrbit| class and extract the orbit information from them. For example we can read the example orbit file that is in the testing/example data: >>> from gdt.core import data_path >>> from gdt.missions.maxi.orbit import MaxiOrbit >>> orb_file = data_path / 'maxi-gsc/mx_mjd58849.orb.gz' >>> orb = MaxiOrbit.open(orb_file) >>> orb To extract the orbit information into a MAXI frame, we do the following: >>> frame = orb.get_spacecraft_frame() >>> frame Notice that this |MaxiFrame| object contains 86362 different frames, each defined at a particular ``obstime`` and with a ``obsgeoloc`` defining the position of MAXI in orbit and a ``obsgeovel`` defining the orbital velocity. Using these frames, we can retrieve the location of MAXI in orbit relative to the geocenter: >>> # latitude >>> frame.earth_location.lat >>> # longitude >>> frame.earth_location.lon >>> # altitude >>> frame.earth_location.height We can also extract a single frame or slice multiple frames: >>> frame[100] >>> frame[100:110] Note that the orbit file contains *only* the orbit information, and there is no attitude information, which is contained within the attitude file and is discussed further in :ref:`MAXI Attitude Files`. See :ref:`MAXI Reference Frame` for information about how to combine the attitude and orbit information into a single |MaxiFrame| object. For more details about working with spacecraft frames, see :external:ref:`Spacecraft Attitude, Position, and Coordinates`. Reference/API ============= .. automodapi:: gdt.missions.maxi.orbit :inherited-members: