fsleyes.plotting.powerspectrumseries¶
This module provides DataSeries sub-classes which are used
by the PowerSpectrumPanel for plotting power spectra.
The following classes are provided:
PowerSpectrumSeries |
The PowerSpectrumSeries encapsulates a power spectrum data series from an overlay. |
VoxelPowerSpectrumSeries |
The VoxelPowerSpectrumSeries class encapsulates the power spectrum of a single voxel from a 4D Image overlay. |
MelodicPowerSpectrumSeries |
The MelodicPowerSpectrumSeries class encapsulates the power spectrum of the time course for a single component of a MelodicImage. |
-
class
fsleyes.plotting.powerspectrumseries.PowerSpectrumSeries(overlay, overlayList, displayCtx, plotPanel)¶ Bases:
fsleyes.plotting.dataseries.DataSeriesThe
PowerSpectrumSeriesencapsulates a power spectrum data series from an overlay. ThePowerSpectrumSeriesclass is the base class for all other classes in this module. It provides thecalcPowerSpectrum()method which (surprisingly) calculates the power spectrum of a data series.-
varNorm= <MagicMock name='mock.Boolean()' id='139845844115072'>¶ If
True, the data is normalised to unit variance before the fourier transformation.
-
__init__(overlay, overlayList, displayCtx, plotPanel)¶ Create a
PowerSpectrumSeries.Parameters: - overlay – The overlay from which the data to be plotted is retrieved.
- overlayList – The
OverlayListinstance. - displayCtx – The
DisplayContextinstance. - plotPanel – The
PlotPanelthat owns thisPowerSpectrumSeries.
-
destroy()¶ Must be called when this
PowerSpectrumSeriesis no longer needed.
-
makeLabel()¶ Returns a label that can be used for this
PowerSpectrumSeries.
-
calcPowerSpectrum(data)¶ Calculates a power spectrum for the given one-dimensional data array. If the
varNormproperty isTrue, the data is de-meaned and normalised by its standard deviation before the fourier transformation.
-
__module__= 'fsleyes.plotting.powerspectrumseries'¶
-
-
class
fsleyes.plotting.powerspectrumseries.VoxelPowerSpectrumSeries(*args, **kwargs)¶ Bases:
fsleyes.plotting.powerspectrumseries.PowerSpectrumSeriesThe
VoxelPowerSpectrumSeriesclass encapsulates the power spectrum of a single voxel from a 4DImageoverlay. The voxel is dictated by theDisplayContext.locationproperty.-
__init__(*args, **kwargs)¶ Create a
VoxelPowerSpectrumSeries. All arguments are passed to thePowerSpectrumSeries.__init__()method. AValueErroris raised if the overlay is not a 4DImage.
-
makeLabel()¶ Creates and returns a label for use with this
VoxelPowerSpectrumSeries.
-
getData= <MagicMock name='mock.utils.idle.mutex()' id='139845839620640'>¶
-
__module__= 'fsleyes.plotting.powerspectrumseries'¶
-
-
class
fsleyes.plotting.powerspectrumseries.MelodicPowerSpectrumSeries(*args, **kwargs)¶ Bases:
fsleyes.plotting.powerspectrumseries.PowerSpectrumSeriesThe
MelodicPowerSpectrumSeriesclass encapsulates the power spectrum of the time course for a single component of aMelodicImage. The component is dictated by theNiftiOpts.volumeproperty.-
__init__(*args, **kwargs)¶ Create a
MelodicPowerSpectrumSeries. All arguments are passed through to thePowerSpectrumSeries.__init__()method.
-
makeLabel()¶ Returns a label that can be used for this
MelodicPowerSpectrumSeries.
-
getData()¶ Returns the power spectrum for the current component of the
MelodicImage, as defined by theNiftiOpts.volumeproperty.
-
__module__= 'fsleyes.plotting.powerspectrumseries'¶
-
-
class
fsleyes.plotting.powerspectrumseries.MeshPowerSpectrumSeries(*args, **kwargs)¶ Bases:
fsleyes.plotting.powerspectrumseries.PowerSpectrumSeriesA
MeshPowerSpectrumSeriesobject encapsulates the power spectrum for the data from aMeshoverlay which has some time series vertex data associated with it. See theMeshOpts.vertexDataproperty.-
__init__(*args, **kwargs)¶ Create a
MeshPowerSpectrumSeriesinstance. All arguments are passed through toPowerSpectrumSeries.__init__().
-
makeLabel()¶ Returns a label to use for this
MeshPowerSpectrumSerieson the legend.
-
_MeshPowerSpectrumSeries__haveData()¶ Returns
Trueif there is currently time series data to show for thisMeshPowerSpectrumSeries,Falseotherwise.
-
__module__= 'fsleyes.plotting.powerspectrumseries'¶
-
getData()¶ Returns the power spectrum of the data at the current location for the
Mesh, or[], []if there is no data.
-