Band Energy versus Time

This analysis calculates energy of a specified frequency band over time.

Parameters

Parameter

Description

XMin (sec)

Analysis is run on the data from a specific time range [XMin, XMax]. XMin specifies time range minimum in seconds.

XMax (sec)

Analysis is run on the data from a specific time range [XMin, XMax]. XMax specifies time range maximum in seconds.

Window Width (sec)

Band energies are calculated in consecutive time windows. This parameter specifies the width of each window in seconds.

Use Custom Window Shift

By default (if Use Custom Window Shift is not checked), window shift is equal to Window Width (sec) (so the analysis is done over consecutive non-overlapping windows). If Use Custom Window Shift option is selected, the shift is specified by Window Shift (sec) parameter.

Window Shift (sec)

If Use Custom Window Shift is not checked, window shift is equal to Window Width (sec) and this parameter is ignored. If Use Custom Window Shift option is selected, the shift is specified by Window Shift (sec) parameter.

Spectrum Normalization

Spectrum units (see Normalization below).

Band Min. Freq. (Hz)

Specifies minimum of the frequency band in Hz (for example, 3 Hz for theta band).

Band Max. Freq. (Hz)

Specifies maximum of the frequency band in Hz (for example, 6 Hz for theta band).

Band Energy Measure

Specifies how the band energy is measured.

Create Continuous Variables

An option to create continuous variables with band energy.

Result Prefix

Prefix for the created continuous variables with band energy.

Select Data

If Select Data is From Time Range, only the data from the specified time range will be used in analysis. See also Data Selection Options .

Select Data From

Start of the time range in seconds.

Select Data To

End of the time range in seconds.

Interval filter

Specifies the interval filter that will be used to preselect data before analysis. See also Data Selection Options .

Smooth

Option to smooth the result after the calculation. See Post-Processing Options for details.

Smooth Filter Width

The width of the smooth filter. See Post-Processing Options for details.

Add to Results / Bin left

An option to add an additional vector (containing a left edge of each frequency bin) to the matrix of numerical results.

Add to Results / Bin middle

An option to add an additional vector (containing a center of each frequency bin) to the matrix of numerical results.

Add to Results / Bin right

An option to add an additional vector (containing a right edge of each frequency bin) to the matrix of numerical results.

Result Prefix

The prefix for generating names of the continuous variables. For example, if we analyze variable LFP and the prefix is Theta, the generated continuous variable will be named Theta_LFP.

Send to Matlab

An option to send the matrix of numerical results to Matlab. See also Matlab Options .

Matrix Name

Specifies the name of the results matrix in Matlab workspace.

Matlab command

Specifies a Matlab command that is executed after the numerical results are sent to Matlab.

Send to Excel

An option to send numerical results or summary of numerical results to Excel. See also Excel Options .

Sheet Name

The name of the worksheet in Excel where to copy the numerical results.

TopLeft

Specifies the Excel cell where the results are copied. Should be in the form CR where C is Excel column name, R is the row number. For example, A1 is the top-left cell in the worksheet.

Algorithm

For each window, the spectrum of the signal in this window is calculated. For the values of the specified frequency band, average, sum, percent of these values or the area below the spectrum curve (for Integral option of the Band Energy Measure) is calculated.

The Integral measure (the area below the spectrum curve) is calculated using the Simpson rule (similar to simpson function of the Python scipy.integrate package). See Compute the average bandpower of an EEG signal.

Normalization

If Normalization is Raw PSD (Numerical Recipes), the power spectrum is normalized so that the sum of all the spectrum values is equal to the mean squared value of the rate histogram. The formulas (13.4.10) of Numerical Recipes in C are used. (Numerical Recipes in C, Press, Flannery, et al. (Cambridge University Press, 1992))

If Normalization is % of Total PSD (Numerical Recipes), the power spectrum is normalized so that the sum of all the spectrum values equals 100.

If Normalization is Log of PSD (Numerical Recipes), the power spectrum is calculated using the formula:

power_spectrum[i] = 10.*log10(raw_spectrum[i])

where raw_spectrum is calculated as described above in Raw PSD (Numerical Recipes).

If Normalization is Raw PSD (Matlab), the power spectrum is normalized as described in https://www.mathworks.com/help/signal/ug/power-spectral-density-estimates-using-fft.html

If Normalization is Log of PSD (Matlab), the power spectrum is calculated using the formula:

power_spectrum[i] = 10.*log10(raw_spectrum_matlab[i])

where raw_spectrum_matlab is calculated as described above in Raw PSD (Matlab).