|
|
|
[[_TOC_]]
|
|
|
|
# Description
|
|
|
|
Computes PSD of channels, based on selected data markers.
|
|
|
|
Can be run from the command line. See the [command line section](Plugins_cli) to learn more.
|
|
|
|
|
|
|
|
# Select channels before launching it
|
|
|
|
The user can select channels in a view before launching the plugin.
|
|
|
|
If no channels are selected, the plugin will get the current montage as its input channels.
|
|
|
|
|
|
|
|
# Running the process
|
|
|
|
## Launch from the Processes Menu
|
|
|
|
![image](uploads/a8695e91a7ddc3a4614bd82afc66d67d/image.png)
|
|
|
|
|
|
|
|
### Select input data for processing
|
|
|
|
Launching this way will make the following window appear, if the data contains some markers :
|
|
|
|
![image](uploads/120c353916d319094fd91260bfa895b8/image.png)
|
|
|
|
|
|
|
|
This is a first GUI allowing to precisely select the data chunk on which to compute PSD.
|
|
|
|
The left part allows to select data parts to skip during computation, typically artefacted data.
|
|
|
|
The right part allows to select data parts to use for computation, exclusively.
|
|
|
|
|
|
|
|
Pick a marker name either on the left or right part of the GUI and click the button Add to list to fill the corresponding list of markers.
|
|
|
|
|
|
|
|
**This GUI is fully optional**. If you don't want to select data chunk to keep or avoid, just click OK.
|
|
|
|
You will asked to validate your choice and informed that the computation will take place on the whole data.
|
|
|
|
No artefacted data will be skipped and no particular chunks of data will be used.
|
|
|
|
|
|
|
|
## Launch using markers
|
|
|
|
Select markers on the Markers GUI then right click and choose Launch process.
|
|
|
|
![image](uploads/53bac412f7754da1549d568ec4c51095/image.png)
|
|
|
|
|
|
|
|
**NOTE:** Launching the process this way will force to use the selected markers as input data chunks.
|
|
|
|
|
|
|
|
# Set parameters for computation
|
|
|
|
![image](uploads/8592cbda3bfea4bee096b0e48511824a/image.png)
|
|
|
|
The time window parameter, expressed in seconds is the length of the FFT operation that will be used.
|
|
|
|
The overlap parameter, expressed in seconds, is the overlap of the FFT operation that will be used.
|
|
|
|
|
|
|
|
Assuming a signal recorder at 1024Hz, the default parameters will set a fft window of 1024 samples and an overlap of 512 samples.
|
|
|
|
|
|
|
|
The window parameter defines which type of Windowing to apply on data before any computation. The default settings is to apply a Hanning window.
|
|
|
|
|
|
|
|
# The computation process
|
|
|
|
For every chunks of data set as input, a floating FFT window will be computed and shifted by overlap samples and computed again until the end of the chunk is reached.
|
|
|
|
|
|
|
|
Only fully fitted fft window will be computed, so if the data chunk is too short regarding the fft window length, nothing will be computed and warning messages will appear in log file.
|
|
|
|
|
|
|
|
After all data chunks have been processed, a mean of the all the fft iterations is done for each channels and the PSD is computed by applying a 10 x log10(mean(abs(ffts)).
|
|
|
|
|
|
|
|
# Results
|
|
|
|
Here are the PSD computed on 121 signals recorded at 1024 Hz.
|
|
|
|
The input data chunks were two markers of 10s and 15s.
|
|
|
|
|
|
|
|
![image](uploads/e8c93891730947eff323407340c93320/image.png)
|
|
|
|
|
|
|
|
# Default result file
|
|
|
|
A result file will go by default to the data directory and will be named as follow: (assuming the data sampling rate is 1024Hz):
|
|
|
|
*spectrum_fftwindow-1024_fftoverlap-512_windowing-hanning.mat*
|
|
|
|
|
|
|
|
# [Using in command line](plugin_spectral_cli) |
|
|
|
\ No newline at end of file |