fooof.Bands

class fooof.Bands(input_bands={})[source]

Frequency band definitions.

Examples

Define a bands object storing canonical frequency bands:

>>> bands = Bands({'theta' : [4, 8], 'alpha' : [8, 12], 'beta' : [15, 30]})
Attributes
bandsdict

Band definitions. Each entry should be {‘label’ : (f_low, f_high)}.

__init__(self, input_bands={})[source]

Initialize the Bands object.

Parameters
input_bandsdict, optional

A dictionary of oscillation bands.

Methods

__init__(self[, input_bands])

Initialize the Bands object.

add_band(self, label, band_definition)

Add a new oscillation band definition.

remove_band(self, label)

Remove a previously defined oscillation band.

Attributes

definitions

Frequency definitions for all the bands defined in the object.

labels

Labels for all the bands defined in the object.

n_bands

The number of bands defined in the object.

add_band(self, label, band_definition)[source]

Add a new oscillation band definition.

Parameters
labelstr

Band label to add.

band_definitiontuple of (float, float)

The lower and upper frequency limit of the band, in Hz.

definitions

Frequency definitions for all the bands defined in the object.

labels

Labels for all the bands defined in the object.

n_bands

The number of bands defined in the object.

remove_band(self, label)[source]

Remove a previously defined oscillation band.

Parameters
labelstr

Band label to remove from band definitions.