ssapy_toolkit.Time_Functions.relative_times_to_absolute

Functions

time_rel_to_abs(times, ref[, anchor])

Convert relative times (seconds) into absolute astropy Time stamps.

ssapy_toolkit.Time_Functions.relative_times_to_absolute.time_rel_to_abs(times, ref, anchor='start')[source]

Convert relative times (seconds) into absolute astropy Time stamps.

Parameters:
  • times (array-like of float) – Sequence of time stamps in seconds. These are treated as relative offsets along a time series (not necessarily starting at 0).

  • ref (astropy.time.Time or str or float/int (optional)) – The reference timestamp to anchor the series. - If Time: used directly. - If str: parsed by astropy as UTC, e.g. “2025-01-01 00:00:00”. - If float/int: interpreted as GPS seconds.

  • anchor ({'start', 'end'}, default 'start') – Which sample the reference corresponds to: - ‘start’: ref is the absolute time of times[0] - ‘end’ : ref is the absolute time of times[-1]

Returns:

Vector Time object of the same length as times, with absolute stamps.

Return type:

astropy.time.Time

Notes

  • This mirrors the behavior of a typical get_times helper: evenly applies offsets in seconds to a reference Time.

  • The relative sequence does not need to start at 0. Offsets are computed against the chosen anchor sample.