Cycle#

class pyCGM2.Processing.cycle.Cycle(acq: btkAcquisition, startFrame: int, endFrame: int, context: str, enableFlag: bool = True)#

Generic Cycle class constructor.

Parameters:
  • acq (btk.btkAcquisition) – An acquisition instance.

  • startFrame (int) – Start frame of the cycle.

  • endFrame (int) – End frame of the cycle.

  • context (str) – Context of the cycle (e.g., ‘Left’, ‘Right’).

  • enableFlag (bool) – Flag to indicate if the cycle will be used in further computation. Defaults to True.

__init__(acq: btkAcquisition, startFrame: int, endFrame: int, context: str, enableFlag: bool = True)#

Methods

__init__(acq, startFrame, endFrame, context)

addDiscreteData(label, value, instant)

getAnalogTimeSequenceData(analogLabel)

Get analog data of the cycle.

getAnalogTimeSequenceDataNormalized(analogLabel)

Get time-normalized analog data of the cycle.

getEvents([context])

Get all events of the cycle.

getPointTimeSequenceData(pointLabel)

Get point data of the cycle.

getPointTimeSequenceDataNormalized(pointLabel)

Get Time-normalized a point label.

setEnableFlag(flag)

Enable or disable the cycle.

getAnalogTimeSequenceData(analogLabel: str)#

Get analog data of the cycle.

Parameters:

analogLabel (str) – Analog label.

Returns:

Optional[np.ndarray] – Analog data of the specified label.

getAnalogTimeSequenceDataNormalized(analogLabel: str)#

Get time-normalized analog data of the cycle.

Parameters:

analogLabel (str) – Analog label.

Returns:

Optional[np.ndarray] – Analog data of the specified label.

getEvents(context: str = 'All')#

Get all events of the cycle.

Parameters:

context (str) – Event context (All, Left, or Right).

Returns:

List[btk.Event] – List of events in the specified context.

getPointTimeSequenceData(pointLabel: str)#

Get point data of the cycle.

Parameters:

pointLabel (str) – Point label.

Returns:

Optional[np.ndarray] – Temporal data of the specified point label.

getPointTimeSequenceDataNormalized(pointLabel: str)#

Get Time-normalized a point label.

Parameters:

pointLabel (str) – Point label.

Returns:

np.ndarray – Time-normalized data of the specified point label.

setEnableFlag(flag: bool)#

Enable or disable the cycle.

Parameters:

flag (bool) – Boolean flag to enable or disable the cycle.