fsleyes.views.powerspectrumpanel

This module provides the PowerSpectrumPanel class, a ViewPanel which plots frequency/power spectra.

class fsleyes.views.powerspectrumpanel.PowerSpectrumPanel(parent, overlayList, displayCtx, frame)[source]

Bases: fsleyes.views.plotpanel.OverlayPlotPanel

The PowerSpectrumPanel class is an OverlayPlotPanel which plots power spectra of overlay data. PowerSpectrumPanel uses PowerSpectrumSeries to plot the power spectra of overlay data.

A couple of control panels may be shown on a PowerSpectrumPanel via ViewPanel.togglePanel().

PlotListPanel

The PlotListPanel is a FSLeyes control panel for use with OverlayPlotPanel views.

PowerSpectrumControlPanel

The PowerSpectrumControlPanel class is a PlotControlPanel which allows the user to control a PowerSpectrumPanel.

Melodic images

The PowerSpectrumSeries class uses a fourier transform to calculate the power spectrum of a time course. However, MelodicImage overlays already have an associated power spectrum, meaning that there is no need to calculate one for them.. So for these overlays, a MelodicPowerSpectrumSeries instance is used.

plotMelodicICs = <MagicMock name='mock.Boolean()' id='140604701766320'>

If True, the power spectra of MelodicImage overlays are plotted using MelodicPowerSpectrumSeries instances. Otherwise, MelodicImage overlays are treated as regular Image overlays, and VoxelPowerSpectrumSeries are used for plotting.

plotFrequencies = <MagicMock name='mock.Boolean()' id='140604701766320'>

If True, the x axis is scaled so that it represents frequency.

static defaultLayout()[source]

Returns a list of control panel types to be added for the default power spectrum panel layout.

static controlOrder()[source]

Returns a list of control panel names, specifying the order in which they should appear in the FSLeyes ortho panel settings menu.

__init__(parent, overlayList, displayCtx, frame)[source]

Create a PowerSpectrumPanel.

Parameters
destroy()[source]

Must be called when this PowerSpectrumPanel is no longer needed. Removes some property listeners, and calls OverlayPlotPanel.destroy().

getActions()[source]

Overrides ActionProvider.getActions(). Returns all of the actions that are defined on this PowerSpectrumPanel.

draw(*a)[source]

Overrides PlotPanel.draw(). Draws some PowerSpectrumSeries using the PlotPanel.drawDataSeries() method.

createDataSeries(overlay)[source]

Overrides OverlayPlotPanel.createDataSeries(). Creates a PowerSpectrumSeries instance for the given overlay.

__annotations__ = {}
__module__ = 'fsleyes.views.powerspectrumpanel'
prepareDataSeries(ps)[source]

Overrides PlotPanel.prepareDataSeries(). Performs some pre-processing on the data of the given PowerSpectrumSeries instance.

__plotMelodicICsChanged(*a)

Called when the plotMelodicICs property changes. Re-creates the internally cached PowerSpectrmSeries instances for all MelodicImage overlays in the OverlayList.