resurfemg.visualization.visualization module

Copyright 2022 Netherlands eScience Center and University of Twente Licensed under the Apache License, version 2.0. See LICENSE for details.

This file contains functions to visualize with various EMG arrays and other types of data arrays e.g. ventilator signals.

resurfemg.visualization.visualization.show_my_power_spectrum(sample, sample_rate, upper_window)

This function plots a power spectrum of the frequencies comtained in an EMG based on a Fourier transform. It does not return the graph, rather the values but plots the graph before it return. Sample should be one single row (1-dimensional array.)

Parameters:
  • sample (ndarray) – The sample array

  • sample_rate (int) – Number of samples per second

  • upper_window (int) – The end of window over which values will be plotted

Returns:

yf, xf tuple of fourier transformed array and frequencies (the values for plotting the power spectrum)

Return type:

Tuple[float, float]