act.utils.reduce_time_ranges

act.utils.reduce_time_ranges(time, time_delta=60, broken_barh=False)[source]

Given a time series, this function will return a list of tuples of time ranges representing the contineous times where no data is detected missing.

Parameters:
  • time (numpy datetime64 array) – The numpy array of date time values.

  • time_delta (int) – The number of seconds to use as default time step in time array.

  • broken_barh (boolean) – Option to return start time and duration instead of start time and end time. This is used with the pyplot.broken_barh() plotting routine.

Returns:

time_ranges (list of tuples with 2 numpy datetime64 times) – The time range(s) of contineous data.