satsim.time package — SatSim 0.23.0 documentation

# satsim.time package

class satsim.time.TimeWrapper(other)

  Bases: `Time`

  This class implements the __hash__ function for the Skyfield Time.

satsim.time.delta_sec(t0, t1)

  Subtract t0 and t1. (t0 - t1)

  Returns:

    A float in seconds.

satsim.time.from_astropy(t)

  Convert an AstroPy Time to Skyfield Time.

  Parameters:

    t – Time, an AstroPy Time

  Returns:

    A Skyfield Time object

satsim.time.from_datetime(dt, utc=False)

satsim.time.linspace(t0, t1, num=50)

  Return evenly spaced Skyfield times over a specified interval.

  Parameters:

    - t0 – Time, start Skyfield Time

    - t1 – Time, end Skyfield Time

    - num – int, number of samples to generate. default=50

  Returns:

    A list of Skyfield times equally spaced between t0 and t1.

satsim.time.mid(t0, t1)

  Return the mid of two times.

  Parameters:

    - t0 – Time, start Skyfield Time

    - t1 – Time, end Skyfield Time

  Returns:

    A Time, mid Skyfield Time

satsim.time.to_astropy(t)

  Convert a Skyfield Time object to an AstroPy Time.

  Parameters:

    t – Time, a Skyfield Time

  Returns:

    An AstroPy Time object

satsim.time.to_utc_list(t)

  Convert a Skyfield Time object to UTC in array form.

  Parameters:

    t – Time, time to convert to UTC

  Returns:

    A list with UTC values for year, month, day, hour, minutes, seconds

satsim.time.utc(year, month, day, hour, minute, seconds)

  Generate a Skyfield Time object based on UTC time.

  Parameters:

    - year – int, UTC year

    - month – int, UTC month of year

    - day – int, UTC day of month

    - hour – int, UTC hour

    - minute – int, UTC minute

    - seconds – float, UTC seconds

  Returns:

    A Skyfield Time object

satsim.time.utc_from_list(t_list, delta_sec=0)

  Generate a Skyfield Time object based on UTC time in array form.

  Parameters:

    - t_list – list, UTC as [year, month, day, hour, minute, seconds]

    - delta_sec – float, seconds to add

  Returns:

    A Skyfield Time object

satsim.time.utc_from_list_or_scalar(t, delta_sec=0, default_t=None)

  Generate a Skyfield Time object based on a UTC time in array or scalar form. Scalar form requires default_t to be defined.

  Parameters:

    - t – list or float, UTC as [year, month, day, hour, minute, seconds] or delta seconds from default_t

    - delta_sec – float, seconds to add

    - default_t – list, UTC as [year, month, day, hour, minute, seconds], required if t is None or a scalar

  Returns:

    A Skyfield Time object