gwexpy.time.to_gps๏ƒ

gwexpy.time.to_gps(t, *args, **kwargs)[source]

Convert a given time or array of times to GPS seconds.

This is a vectorized extension of gwpy.time.to_gps. It supports single values (strings, datetime, etc.) as well as arrays, pandas Series, and lists.

Parameters:
  • t (str, datetime.datetime, astropy.time.Time, or array-like) โ€“ The input time(s) to convert. Supported formats include UTC strings, datetime objects, pandas Timestamps, or arrays of these types.

  • *args โ€“ Additional positional arguments passed to gwpy.time.to_gps.

  • **kwargs โ€“ Additional keyword arguments passed to gwpy.time.to_gps.

Returns:

The equivalent time in GPS seconds. Returns a float for scalar inputs and a numpy.ndarray of floats for array-like inputs.

Return type:

float or numpy.ndarray