pyCGM2.Lib.plot.plotDescriptiveEnvelopEMGpanel#

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

Displays average and standard deviation of time-normalized EMG envelopes.

This function visualizes descriptive statistics (average and standard deviation) of EMG envelopes for a given analysis instance. It offers options for amplitude normalization and event type specification.

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 = plotDescriptiveEnvelopEMGpanel("/myDATA/", analysisInstance)

Note

The function allows for detailed visualization of EMG data, which can be tailored based on analysis needs. ‘Gait’ event type assumes cycle definition from foot strike and searches for foot off events.