ssapy_toolkit.Time_Functions.get_times

ssapy_toolkit.Time_Functions.get_times(duration, freq=(1, 's'), t0=<Time object: scale='tai' format='gps' value=0.0>, tf=None, tm=None)[source]

Calculate a list of times spaced equally apart over a specified duration.

Parameters:
  • duration (int, float, or tuple) – A duration in seconds (float/int), or a tuple like (30, ‘day’). Must be non-negative.

  • freq (int, float, or tuple) – A time step in seconds (float/int), or a tuple like (10, ‘min’). Must be positive.

  • t0 (str, float, int, or Time, optional) – Initial time (first element) if tf and tm are not provided. If str, interpreted as UTC. If numeric, interpreted as GPS seconds.

  • tf (str, float, int, or Time, optional) – Final time (last element). If provided (and tm is None), the time array is built so that the last element equals tf and the span equals duration with spacing freq.

  • tm (str, float, int, or Time, optional) –

    Middle time. If provided, the time array is built so that:
    • the total span is exactly duration,

    • tm is exactly the middle element,

    • the effective step is adjusted slightly from freq if needed.

Returns:

Time array of equally spaced times over the specified duration.

Return type:

astropy.time.Time