pyCGM2.Lib.plot.plotConsistencyEnvelopEMGpanel#

pyCGM2.Lib.plot.plotConsistencyEnvelopEMGpanel(DATA_PATH: str, analysis: Analysis, normalized: bool = False, eventType: str = 'Gait', exportPdf: bool = False, OUT_PATH=None, outputName=None, show: bool = True, title=None, exportPng=False, autoYlim: bool = False, **kwargs)#

Displays all-cycle time-normalized EMG envelopes from an analysis instance.

This function visualizes EMG data for all cycles, highlighting the consistency across repetitions. It allows options for amplitude normalization, event type specification, and exportation in various formats.

Parameters:
  • DATA_PATH (str) – Path to the data directory.

  • analysis (Analysis) – An Analysis instance containing EMG data.

  • normalized (bool) – If True, displays normalized EMG amplitude. Defaults to False.

  • eventType (str) – Event type to consider (‘Gait’ or other). Defaults to ‘Gait’.

  • exportPdf (bool) – If True, exports the plot as a PDF. Defaults to False.

  • OUT_PATH (Optional[str]) – Path for saving exported files. Defaults to None.

  • outputName (Optional[str]) – Name of the output file. Defaults to None.

  • show (bool) – If True, displays the plot using Matplotlib. Defaults to True.

  • title (Optional[str]) – Title for the plot panel. Defaults to None.

  • exportPng (bool) – If True, exports the plot as a PNG. Defaults to False.

  • autoYlim (bool) – If True, sets Y-axis limits automatically. Defaults to False.

Keyword Arguments:

forceEmgManager (Optional[pyCGM2.EMG.EmgManager]) – Use a specific EmgManager instance.

Returns:
  • Union[matplotlib.figure.Figure, Tuple[matplotlib.figure.Figure, str]] – The Matplotlib figure object.

  • If exporting as PNG, returns a tuple of the figure object and the filename.

Examples

>>> fig = plotConsistencyEnvelopEMGpanel("/myDATA/", analysisInstance)

Note

The function is particularly useful for analyzing the consistency of EMG patterns across multiple gait cycles or other repetitive movements. The ‘Gait’ event type assumes cycle definition from foot strike and searches for foot off events.