irfpy.cy1orb.eclipse

Get umbra time from eclipse.dat file.

From eclipse.dat file, one can get the eclipse time. The eclipse.dat file location is set from .irfpyrc file cy1orb/eclipseuri entry.

>>> e = EclipseDat()
>>> print(e.getEclipse(1000))       # Obtain the time of eclipse for the orbit 1000.
(datetime.datetime(2009, 1, 30, 14, 37, 50), datetime.datetime(2009, 1, 30, 15, 18, 40))
>>> print(e.inEclipse(datetime.datetime(2009, 1, 25, 15, 0, 0)))  # Check if s/c is in eclipse at 2009-01-25T15:00:00.
True

The original data file is generated via spice using ISSDC/spice/cy1_event.cpp program, but this is re-implemented in scripts/cy1orb_mkeclipse.py script.

class irfpy.cy1orb.eclipse.EclipseDat(uri=None)[source]

Bases: object

Constructor of the EclipseDat class. Read the data from the specified uri.

The eclipse.dat file is read and reformated. The location of file (or uri) can be specified in .irfpyrc file, cy1orb eclipseuri entry.

getEclipse(orbit)[source]

Obtain a eclipse time for the specified orbit.

inEclipse(t)[source]

Check whether the specified time t is inside the eclipse or not.