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)¶ Bases:
fsleyes.views.plotpanel.OverlayPlotPanel
The
PowerSpectrumPanel
class is anOverlayPlotPanel
which plots power spectra of overlay data.PowerSpectrumPanel
usesPowerSpectrumSeries
to plot the power spectra of overlay data.A couple of control panels may be shown on a
PowerSpectrumPanel
:PlotListPanel
The PlotListPanel
is a FSLeyes control panel for use withOverlayPlotPanel
views.PowerSpectrumControlPanel
The PowerSpectrumControlPanel
class is aPlotControlPanel
which allows the user to control aPowerSpectrumPanel
.The following actions are provided, in addition to those already provided by the
PlotPanel
:togglePowerSpectrumToolBar
Shows/hides a PlotToolBar
.togglePowerSpectrumControl
Shows/hides a PowerSpectrumControlPanel
.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, aMelodicPowerSpectrumSeries
instance is used.-
plotMelodicICs
= <MagicMock name='mock.Boolean()' id='140655056157552'>¶ If
True
, the power spectra ofMelodicImage
overlays are plotted usingMelodicPowerSpectrumSeries
instances. Otherwise,MelodicImage
overlays are treated as regularImage
overlays, andVoxelPowerSpectrumSeries
are used for plotting.
-
plotFrequencies
= <MagicMock name='mock.Boolean()' id='140655056157552'>¶ If
True
, the x axis is scaled so that it represents frequency.
-
__init__
(parent, overlayList, displayCtx, frame)¶ Create a
PowerSpectrumPanel
.Parameters: - parent – The
wx
parent object. - overlayList – The
OverlayList
. - displayCtx – The
DisplayContext
. - frame – The
FSLeyesFrame
.
- parent – The
-
destroy
()¶ Must be called when this
PowerSpectrumPanel
is no longer needed. Removes some property listeners, and callsOverlayPlotPanel.destroy()
.
-
togglePowerSpectrumControl
(floatPane=False)¶ Shows/hides a
PowerSpectrumControlPanel
. SeeViewPanel.togglePanel()
.
-
togglePowerSpectrumToolBar
()¶ Shows/hides a
PlotToolBar
. SeeViewPanel.togglePanel()
.
-
getActions
()¶ Overrides
ActionProvider.getActions()
. Returns all of theactions
that are defined on thisPowerSpectrumPanel
.
-
draw
(*a)¶ Overrides
PlotPanel.draw()
. Draws somePowerSpectrumSeries
using thePlotPanel.drawDataSeries()
method.
-
createDataSeries
(overlay)¶ Overrides
OverlayPlotPanel.createDataSeries()
. Creates aPowerSpectrumSeries
instance for the given overlay.
-
_PowerSpectrumPanel__plotMelodicICsChanged
(*a)¶ Called when the
plotMelodicICs
property changes. Re-creates the internally cachedPowerSpectrmSeries
instances for allMelodicImage
overlays in theOverlayList
.
-
__module__
= 'fsleyes.views.powerspectrumpanel'¶
-
prepareDataSeries
(ps)¶ Overrides
PlotPanel.prepareDataSeries()
. Performs some pre-processing on the data of the givenPowerSpectrumSeries
instance.
-