find_interval_at#

ethograph.labels.intervals.find_interval_at(df, time_s, individual, label_ids=None, individual_rec=None)[source]#

Return DataFrame index of state interval containing time_s for one subject.

Point events are never returned here — use find_point_at() for those.

Parameters:
  • individual (str | None) – None matches any individual — used as a selection fallback when the current individual name doesn’t match what a loaded file stores.

  • label_ids (set[int] | None) – When given, only match intervals whose labels value is in this set. Useful for restricting to the active branch.

  • individual_rec (str | None) – Recipient to match; None matches any (same fallback role).

  • time. (Returns None if no non-background interval contains the)

Return type:

int | None