Skip to content

Scorepochs-tools/scorepochs_py

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 

Repository files navigation

scorEpochs - Python version

scorEpochs: a computer aided scoring tool for resting-state M/EEG epochs

By Simone Maurizio La Cava

Scorepochs aims to represent a simple tool for automatic scoring of resting-state M/EEG epochs to provide an accurate yet objective method to aid M/EEG experts during epoch selection procedure.

This approach, which works at subject level, provides a score for each epoch within a single M/EEG trace with the attempt to make this crucial procedure less ambiguous, more objective and reproducible.



This is the Python version of the tool

Developed on Python 3.6



Usage

This tool can be used through the command line (do not be afraid to put spaces, they will be automatically managed) or by importing it

In the last case you have two possibility:

  • Import the function from the module:
  from scorEpochs import scorEpochs 
  idx_best, epoch, scores = scorEpochs(cfg, data)
  • Import the module and use the function through the dot notation:
  import scorEpochs
  idx_best, epoch, scores = scorEpochs.scorEpochs(cfg, data)

The data parameter represents a 2D (channels x samples) matrix.


The cfg parameter is a dictionary which has the following keys:

  • freqRange, in which the interested frequency band is defined as a list which contains the related cut frequencies
  • fs, which represents the sampling frequency of the time series
  • windowL, which identify the number of seconds of each epoch
  • smoothFactor, which represents the window of the moving average filter which have to be applied on the power spectrum of each epoch (optional, the moving average is not computed if this parameter is omitted)

An example for this parameter is:

cfg = {'freqRange':[1, 100], 'fs':500, 'windowL':20, 'smoothFactor':3}

Click here to have a view of a demonstration on the usage of this tool.



Required libraries

  • Numpy
  • Scipy