pyrregular.describe

Checks of how regular the time axis of a dataset is.

check_regularity(fn, df, ts_level) applies one of the checks below:

  • ts_level=False: each series is checked on the timestamps of its signals; one answer per series.

  • ts_level=True: each series is reduced to its merged timeline (the union of the timestamps of its signals) and all series are checked together, as the signals of one group; one answer for the whole dataset.

Correspondence with the taxonomy in the paper’s appendix (a check returning False means the irregularity is present):

  • uneven sampling: are_all_signals_sampled_at_constant_intervals

  • ragged length: are_all_signals_equal_length

  • shift: are_all_signals_not_strongly_offset

  • ragged sampling: do_all_signals_have_equal_sampling (the k-th intervals of two signals are compared, for the intervals both signals have)

  • partial observation (NaN where a value was expected) is not checked here.

Each check receives T: a list (one item per series) of lists (one item per signal) of sorted timestamp arrays. Timestamps are the original values, compared exactly (datetimes as integer nanoseconds), so no rounding makes equal intervals look different.

Functions

are_all_signals_equal_length(signals)

are_all_signals_not_offset(signals)

are_all_signals_not_strongly_offset(signals)

are_all_signals_sampled_at_constant_intervals(signals)

check_regularity(fn, df[, ts_level, ...])

do_all_signals_have_equal_sampling(signals)

get_lengths(signals)

get_time_delta(signals)

pyrregular.describe.are_all_signals_equal_length(signals)[source]
pyrregular.describe.are_all_signals_not_offset(signals)[source]
pyrregular.describe.are_all_signals_not_strongly_offset(signals)[source]
pyrregular.describe.are_all_signals_sampled_at_constant_intervals(signals)[source]
pyrregular.describe.check_regularity(fn, df, ts_level=True, return_percentage=True)[source]
pyrregular.describe.do_all_signals_have_equal_sampling(signals)[source]
pyrregular.describe.get_lengths(signals)[source]
pyrregular.describe.get_time_delta(signals)[source]