fsleyes.plotting.powerspectrumseries
¶
This module provides DataSeries
sub-classes which are used
by the PowerSpectrumPanel
for plotting power spectra.
The following classes are provided:
The |
|
The |
|
The |
-
class
fsleyes.plotting.powerspectrumseries.
PowerSpectrumSeries
(overlay, overlayList, displayCtx, plotPanel)¶ Bases:
fsleyes.plotting.dataseries.DataSeries
The
PowerSpectrumSeries
encapsulates a power spectrum data series from an overlay. ThePowerSpectrumSeries
class 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='140127691212880'>¶ 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
OverlayList
instance.displayCtx – The
DisplayContext
instance.plotPanel – The
PlotPanel
that owns thisPowerSpectrumSeries
.
-
destroy
()¶ Must be called when this
PowerSpectrumSeries
is 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
varNorm
property 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.PowerSpectrumSeries
The
VoxelPowerSpectrumSeries
class encapsulates the power spectrum of a single voxel from a 4DImage
overlay. The voxel is dictated by theDisplayContext.location
property.-
__init__
(*args, **kwargs)¶ Create a
VoxelPowerSpectrumSeries
. All arguments are passed to thePowerSpectrumSeries.__init__()
method. AValueError
is 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='140127684344528'>¶
-
__module__
= 'fsleyes.plotting.powerspectrumseries'¶
-
-
class
fsleyes.plotting.powerspectrumseries.
MelodicPowerSpectrumSeries
(*args, **kwargs)¶ Bases:
fsleyes.plotting.powerspectrumseries.PowerSpectrumSeries
The
MelodicPowerSpectrumSeries
class encapsulates the power spectrum of the time course for a single component of aMelodicImage
. The component is dictated by theNiftiOpts.volume
property.-
__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.volume
property.
-
__module__
= 'fsleyes.plotting.powerspectrumseries'¶
-
-
class
fsleyes.plotting.powerspectrumseries.
MeshPowerSpectrumSeries
(*args, **kwargs)¶ Bases:
fsleyes.plotting.powerspectrumseries.PowerSpectrumSeries
A
MeshPowerSpectrumSeries
object encapsulates the power spectrum for the data from aMesh
overlay which has some time series vertex data associated with it. See theMeshOpts.vertexData
property.-
__init__
(*args, **kwargs)¶ Create a
MeshPowerSpectrumSeries
instance. All arguments are passed through toPowerSpectrumSeries.__init__()
.
-
makeLabel
()¶ Returns a label to use for this
MeshPowerSpectrumSeries
on the legend.
-
_MeshPowerSpectrumSeries__haveData
()¶ Returns
True
if there is currently time series data to show for thisMeshPowerSpectrumSeries
,False
otherwise.
-
__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.
-