obspy.clients.filesystem.sds.Client.get_latency

Client.get_latency(network, station, location, channel, sds_type=None, stop_time=None, check_has_no_data=True)[source]

Get latency for given stream, i.e. difference of current time and latest available data for stream in SDS archive. None is returned if no data at all is encountered when going backwards until stop_time (defaults to Jan 1st 1950).

Parameters
  • network (str) – Network code of requested data (e.g. “IU”).

  • station (str) – Station code of requested data (e.g. “ANMO”).

  • location (str) – Location code of requested data (e.g. “”).

  • channel (str) – Channel code of requested data (e.g. “HHZ”).

  • sds_type (str) – Override SDS data type identifier that was specified during client initialization.

  • stop_time (UTCDateTime) – Time at which the search for data is stopped and None is returned. If not specified, stops at 1950-01-01T00.

  • check_has_no_data (bool) – Whether to perform a check with has_data() if any data is available at all for the given SEED ID. Turns out that this check can take a long time on slow filesystems (e.g. NFS), so it might actually make the latency check take longer than necessary, so deactivating it might be worth a try if speed issues occur.

Return type

float or None

Returns

Latency in seconds or None if no data was encountered from current time backwards until stop_time.