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.OverlayPlotPanelThe
PowerSpectrumPanelclass is anOverlayPlotPanelwhich plots power spectra of overlay data.PowerSpectrumPanelusesPowerSpectrumSeriesto plot the power spectra of overlay data.A couple of control panels may be shown on a
PowerSpectrumPanel:The
PlotListPanelis a FSLeyes control panel for use withOverlayPlotPanelviews.The
PowerSpectrumControlPanelclass is aPlotControlPanelwhich allows the user to control aPowerSpectrumPanel.The following actions are provided, in addition to those already provided by the
PlotPanel:Shows/hides a
PlotToolBar.Shows/hides a
PowerSpectrumControlPanel.Melodic images
The
PowerSpectrumSeriesclass uses a fourier transform to calculate the power spectrum of a time course. However,MelodicImageoverlays already have an associated power spectrum, meaning that there is no need to calculate one for them.. So for these overlays, aMelodicPowerSpectrumSeriesinstance is used.-
plotMelodicICs= <MagicMock name='mock.Boolean()' id='281473497326640'>¶ If
True, the power spectra ofMelodicImageoverlays are plotted usingMelodicPowerSpectrumSeriesinstances. Otherwise,MelodicImageoverlays are treated as regularImageoverlays, andVoxelPowerSpectrumSeriesare used for plotting.
-
plotFrequencies= <MagicMock name='mock.Boolean()' id='281473497326640'>¶ If
True, the x axis is scaled so that it represents frequency.
-
__init__(parent, overlayList, displayCtx, frame)[source]¶ Create a
PowerSpectrumPanel.- Parameters
parent – The
wxparent object.overlayList – The
OverlayList.displayCtx – The
DisplayContext.frame – The
FSLeyesFrame.
-
destroy()[source]¶ Must be called when this
PowerSpectrumPanelis no longer needed. Removes some property listeners, and callsOverlayPlotPanel.destroy().
-
togglePowerSpectrumControl(floatPane=False)[source]¶ Shows/hides a
PowerSpectrumControlPanel. SeeViewPanel.togglePanel().
-
togglePowerSpectrumToolBar()[source]¶ Shows/hides a
PlotToolBar. SeeViewPanel.togglePanel().
-
getActions()[source]¶ Overrides
ActionProvider.getActions(). Returns all of theactionsthat are defined on thisPowerSpectrumPanel.
-
draw(*a)[source]¶ Overrides
PlotPanel.draw(). Draws somePowerSpectrumSeriesusing thePlotPanel.drawDataSeries()method.
-
createDataSeries(overlay)[source]¶ Overrides
OverlayPlotPanel.createDataSeries(). Creates aPowerSpectrumSeriesinstance for the given overlay.
-
_PowerSpectrumPanel__plotMelodicICsChanged(*a)¶ Called when the
plotMelodicICsproperty changes. Re-creates the internally cachedPowerSpectrmSeriesinstances for allMelodicImageoverlays in theOverlayList.
-
__module__= 'fsleyes.views.powerspectrumpanel'¶
-
prepareDataSeries(ps)[source]¶ Overrides
PlotPanel.prepareDataSeries(). Performs some pre-processing on the data of the givenPowerSpectrumSeriesinstance.
-