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:

tTime, 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:
  • t0Time, start Skyfield Time

  • t1Time, end Skyfield Time

  • numint, 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:
  • t0Time, start Skyfield Time

  • t1Time, end Skyfield Time

Returns:

A Time, mid Skyfield Time

satsim.time.to_astropy(t)

Convert a Skyfield Time object to an AstroPy Time.

Parameters:

tTime, 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:

tTime, 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:
  • yearint, UTC year

  • monthint, UTC month of year

  • dayint, UTC day of month

  • hourint, UTC hour

  • minuteint, UTC minute

  • secondsfloat, 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_listlist, UTC as [year, month, day, hour, minute, seconds]

  • delta_secfloat, 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:
  • tlist or float, UTC as [year, month, day, hour, minute, seconds] or delta seconds from default_t

  • delta_secfloat, seconds to add

  • default_tlist, UTC as [year, month, day, hour, minute, seconds], required if t is None or a scalar

Returns:

A Skyfield Time object