build_cycles_fromEvents#
- pyCGM2.Cycles.build_cycles_fromEvents(ipsi_fs: ndarray | Sequence[float] | None, ipsi_fo: ndarray | Sequence[float] | None = None, contra_fs: ndarray | Sequence[float] | None = None, contra_fo: ndarray | Sequence[float] | None = None, check_order_for_complete: bool = True) List[Dict[str, object]]#
Build gait cycles from foot strike and foot off events.
Each cycle is a dictionary with the mandatory keys:
startendtype:"cycle","partial_gaitCycle"or"complete_gaitCycle"
and the optional keys (added only if present in the cycle window):
footOffcontrolateral_footStrikecontrolateral_footOff
If
check_order_for_completeis True, complete cycles must satisfystart < controlateral_footOff < controlateral_footStrike < footOff < end; otherwise they are downgraded to"partial_gaitCycle"(kept, but not complete).- Parameters:
ipsi_fs (ArrayLike) – Ipsilateral foot strike times.
ipsi_fo (ArrayLike, optional) – Ipsilateral foot off times.
contra_fs (ArrayLike, optional) – Contralateral foot strike times.
contra_fo (ArrayLike, optional) – Contralateral foot off times.
check_order_for_complete (bool, optional) – Check the event order of complete cycles. Defaults to True.
- Returns:
List[Dict[str, object]] – The cycles.