fsleyes.plotting.timeseries¶
This module provides a number of DataSeries sub-classes which
are use by the TimeSeriesPanel. The following classes are provided:
A |
|
A |
|
An |
|
An |
|
An |
|
A |
|
A |
|
A |
|
A |
|
A |
|
A |
|
A |
-
class
fsleyes.plotting.timeseries.VoxelTimeSeries(*args, **kwargs)[source]¶ Bases:
fsleyes.plotting.dataseries.VoxelDataSeriesA
VoxelTimeSeriesis aVoxelDataSerieswhich represents time series data.-
__module__= 'fsleyes.plotting.timeseries'¶
-
-
class
fsleyes.plotting.timeseries.ComplexTimeSeries(overlay, overlayList, displayCtx, plotPanel)[source]¶ Bases:
fsleyes.plotting.timeseries.VoxelTimeSeriesA
VoxelTimeSeriesto display time series from 4D complex images. ThegetData()method returns the real component of the data..The
extraSeries()method returns additional series based on the values of theplotImaginary,plotMagnitudeandplotPhaseproperties. TheextraSeries()method will return instances of the following classes:An
ImaginaryTimeSeriesrepresents the imaginary component of a complex-valued image.An
MagnitudeTimeSeriesrepresents the magnitude of a complex-valued image.An
PhaseTimeSeriesrepresents the phase of a complex-valued image.-
plotReal= <MagicMock name='mock.Boolean()' id='281473497326640'>¶ If
True, thegetData()method will return the real component time series data.
-
plotImaginary= <MagicMock name='mock.Boolean()' id='281473497326640'>¶ If
True, theextraSeries()method will return anImaginaryTimeSeriesinstance, containing the imaginary component data.
-
plotMagnitude= <MagicMock name='mock.Boolean()' id='281473497326640'>¶ If
True, theextraSeries()method will return aMagnitudeTimeSeriesinstance, containing the complex magnitude.
-
plotPhase= <MagicMock name='mock.Boolean()' id='281473497326640'>¶ If
True, theextraSeries()method will return aPhaseTimeSeriesinstance, containing the complex phase.
-
__init__(overlay, overlayList, displayCtx, plotPanel)[source]¶ Create a
ComplexTimeSeries. All arguments are passed through to theVoxelTimeSeriesconstructor.
-
getData()[source]¶ If
plotRealis true, returns the real component of the complex data. Otherwise returns(None, None).
-
extraSeries()[source]¶ Returns a list of additional series to be plotted, based on the values of the
plotImaginary,plotMagnitudeandplotPhaseproperties.
-
__module__= 'fsleyes.plotting.timeseries'¶
-
-
class
fsleyes.plotting.timeseries.ImaginaryTimeSeries(*args, **kwargs)[source]¶ Bases:
fsleyes.plotting.timeseries.VoxelTimeSeriesAn
ImaginaryTimeSeriesrepresents the imaginary component of a complex-valued image.ImaginaryTimeSeriesinstances are created byComplexTimeSeriesinstances.-
__module__= 'fsleyes.plotting.timeseries'¶
-
-
class
fsleyes.plotting.timeseries.MagnitudeTimeSeries(*args, **kwargs)[source]¶ Bases:
fsleyes.plotting.timeseries.VoxelTimeSeriesAn
MagnitudeTimeSeriesrepresents the magnitude of a complex-valued image.MagnitudeTimeSeriesinstances are created byComplexTimeSeriesinstances.-
__module__= 'fsleyes.plotting.timeseries'¶
-
-
class
fsleyes.plotting.timeseries.PhaseTimeSeries(*args, **kwargs)[source]¶ Bases:
fsleyes.plotting.timeseries.VoxelTimeSeriesAn
PhaseTimeSeriesrepresents the phase of a complex-valued image.PhaseTimeSeriesinstances are created byComplexTimeSeriesinstances.-
__module__= 'fsleyes.plotting.timeseries'¶
-
-
class
fsleyes.plotting.timeseries.FEATTimeSeries(*args, **kwargs)[source]¶ Bases:
fsleyes.plotting.timeseries.VoxelTimeSeriesA
VoxelTimeSeriesclass for use withFEATImageinstances, containing some extra FEAT specific options.The
FEATTimeSeriesclass acts as a container for severalTimeSeriesinstances, each of which represent some part of a FEAT analysis. The data returned by a call togetData()on aFEATTimeSeriesinstance returns the fMRI time series data (filtered_func_datain the.featdirectory).The
extraSeries()method may be used to retrieve a list of all the otherTimeSeriesinstances which are associated with theFEATTimeSeriesinstance - all of theseDataSeriesinstances, in addition to thisFEATTimeSeriesinstasnce, should be plotted.For example, if the
plotDataandplotFullModelFitsettings areTrue, theextraSeries()method will return a list containing oneTimeSeriesinstance, containing the full model fit, for the voxel in question.The following classes are used to represent the various parts of a FEAT analysis:
A
TimeSeriesclass which represents the time course of an EV from a FEAT analysis.A
VoxelTimeSeriesclass which represents the time course of the residuals from a FEAT analysis at a specific voxel.A
VoxelTimeSeriesclass which represents the partial model fit of an EV or contrast from a FEAT analysis at a specific voxel.A
TimeSeriesclass which represents the time course for a model fit from a FEAT analysis at a specific voxel.-
plotData= <MagicMock name='mock.Boolean()' id='281473497326640'>¶ If
True, the FEAT input data is plotted.
-
plotResiduals= <MagicMock name='mock.Boolean()' id='281473497326640'>¶ If
True, the FEAT model residuals are plotted.
-
plotEVs= <MagicMock name='mock.List()' id='281473495788224'>¶ A list of
Booleanproperties, one for each EV in the FEAT analysis. For elements that areTrue, the corresponding FEAT EV time course is plotted.
-
plotPEFits= <MagicMock name='mock.List()' id='281473495788224'>¶ A list of
Booleanproperties, one for each EV in the FEAT analysis. For elements that areTrue, the model fit for the corresponding FEAT EV is plotted.
-
plotCOPEFits= <MagicMock name='mock.List()' id='281473495788224'>¶ A list of
Booleanproperties, one for each EV in the FEAT analysis. For elements that areTrue, the model fit for the corresponding FEAT contrast is plotted.
-
plotPartial= <MagicMock name='mock.Choice()' id='281473498355456'>¶ Plot the raw data, after regression against a chosen EV or contrast. The options are populated in the
__init__()method.
-
__init__(*args, **kwargs)[source]¶ Create a
FEATTimeSeries.All arguments are passed through to the
VoxelTimeSeriesconstructor.
-
plotFullModelFit= <MagicMock name='mock.Boolean()' id='281473497326640'>¶ If
True, the FEAT full model fit is plotted.
-
getData()[source]¶ Returns the fMRI time series data at the current voxel. Or, if
plotDataisFalse, returns(None, None).
-
extraSeries()[source]¶ Returns a list containing all of the
TimeSeriesinstances which should be plotted in place of thisFEATTimeSeries.
-
getModelTimeSeries= <MagicMock name='mock.utils.deprecated.deprecated()()' id='281473495817568'>¶
-
_FEATTimeSeries__createModelTs(tsType, *args, **kwargs)¶ Creates a
TimeSeriesinstance of the giventsType, and sets its display settings according to those of thisFEATTimeSeries.- Parameters
tsType – The type to create, e.g.
FEATModelFitTimeSeries,FEATEVTimeSeries, etc.args – Passed to the
tsTypeconstructor.kwargs – Passed to the
tsTypeconstructor.
-
_FEATTimeSeries__getContrast(fitType, idx)¶ Returns a contrast vector for the given model fit type, and index.
- Parameters
fitType – either
'full','pe', or'cope'. If'full', theidxargument is ignored.idx – The EV or contrast index for
'pe'or'cope'model fits.
-
_FEATTimeSeries__plotCOPEFitChanged(*a)¶ Called when the
plotCOPEFitssetting changes.If necessary, creates and caches one or more
FEATModelFitTimeSeriesinstances.
-
_FEATTimeSeries__plotEVChanged(*a)¶ Called when the
plotEVssetting changes.If necessary, creates and caches one or more
FEATEVTimeSeriesinstances.
-
_FEATTimeSeries__plotFullModelFitChanged(*a)¶ Called when the
plotFullModelFitsetting changes.If necessary, creates and caches a
FEATModelFitTimeSeriesinstance.
-
_FEATTimeSeries__plotPEFitChanged(*a)¶ Called when the
plotPEFitssetting changes.If necessary, creates and caches one or more
FEATModelFitTimeSeriesinstances.
-
_FEATTimeSeries__plotPartialChanged(*a)¶ Called when the
plotPartialsetting changes.If necessary, creates and caches a
FEATPartialFitTimeSeriesinstance.
-
_FEATTimeSeries__plotResidualsChanged(*a)¶ Called when the
plotResidualssetting changes.If necessary, creates and caches a
FEATResidualTimeSeriesinstance.
-
__module__= 'fsleyes.plotting.timeseries'¶
-
-
class
fsleyes.plotting.timeseries.FEATPartialFitTimeSeries(overlay, overlayList, displayCtx, plotPanel, parentTs, contrast, fitType, idx)[source]¶ Bases:
fsleyes.plotting.timeseries.VoxelTimeSeriesA
VoxelTimeSeriesclass which represents the partial model fit of an EV or contrast from a FEAT analysis at a specific voxel. Instances of this class are created by theFEATTimeSeriesclass.-
__init__(overlay, overlayList, displayCtx, plotPanel, parentTs, contrast, fitType, idx)[source]¶ Create a
FEATPartialFitTimeSeries.- Parameters
overlay – The
FEATImageinstance to extract the data from.overlayList – The
OverlayListinstance.displayCtx – The
DisplayContextinstance.plotPanel – The
TimeSeriesPanelwhich owns thisFEATPartialFitTimeSeries.parentTs – The
FEATTimeSeriesinstance that has created thisFEATPartialFitTimeSeries.contrast – The contrast vector to calculate the partial model fit for.
fitType – The model fit type, either
'full','pe'or'cope'.idx – If the model fit type is
'pe'or'cope', the EV/contrast index.
-
dataAtCurrentVoxel()[source]¶ Returns the partial model fit for the voxel and model fit type specified in the constructop.
See the
FEATImage.partialFit()method.
-
__module__= 'fsleyes.plotting.timeseries'¶
-
-
class
fsleyes.plotting.timeseries.FEATEVTimeSeries(overlay, overlayList, displayCtx, plotPanel, parentTs, idx)[source]¶ Bases:
fsleyes.plotting.dataseries.DataSeriesA
TimeSeriesclass which represents the time course of an EV from a FEAT analysis. Instances of this class are created by theFEATTimeSeriesclass.-
__init__(overlay, overlayList, displayCtx, plotPanel, parentTs, idx)[source]¶ Create a
FEATEVTimeSeries.- Parameters
overlay – The
FEATImageinstance to extract the data from.overlayList – The
OverlayListinstance.displayCtx – The
DisplayContextinstance.plotPanel – The
TimeSeriesPanelwhich owns thisFEATEVTimeSeries.parentTs – The
FEATTimeSeriesinstance that has created thisFEATEVTimeSeries.idx – The EV index.
-
__module__= 'fsleyes.plotting.timeseries'¶
-
-
class
fsleyes.plotting.timeseries.FEATResidualTimeSeries(overlay, overlayList, displayCtx, plotPanel, parentTs)[source]¶ Bases:
fsleyes.plotting.timeseries.VoxelTimeSeriesA
VoxelTimeSeriesclass which represents the time course of the residuals from a FEAT analysis at a specific voxel. Instances of this class are created by theFEATTimeSeriesclass.-
__init__(overlay, overlayList, displayCtx, plotPanel, parentTs)[source]¶ Create a
FEATResidualTimeSeries.- Parameters
overlay – The
FEATImageinstance to extract the data from.overlayList – The
OverlayListinstance.displayCtx – The
DisplayContextinstance.plotPanel – The
TimeSeriesPanelwhich owns thisFEATResidualTimeSeries.parentTs – The
FEATTimeSeriesinstance that has created thisFEATResidualTimeSeries.
-
__module__= 'fsleyes.plotting.timeseries'¶
-
-
class
fsleyes.plotting.timeseries.FEATModelFitTimeSeries(overlay, overlayList, displayCtx, plotPanel, parentTs, contrast, fitType, idx)[source]¶ Bases:
fsleyes.plotting.timeseries.VoxelTimeSeriesA
TimeSeriesclass which represents the time course for a model fit from a FEAT analysis at a specific voxel. Instances of this class are created by theFEATTimeSeriesclass.-
__init__(overlay, overlayList, displayCtx, plotPanel, parentTs, contrast, fitType, idx)[source]¶ Create a
FEATModelFitTimeSeries.- Parameters
overlay – The
FEATImageinstance to extract the data from.overlayList – The
OverlayListinstance.displayCtx – The
DisplayContextinstance.plotPanel – The
TimeSeriesPanelwhich owns thisFEATModelFitTimeSeries.parentTs – The
FEATTimeSeriesinstance that has created thisFEATModelFitTimeSeries.contrast – The contrast vector to calculate the partial model fit for.
fitType – The model fit type, either
'full','pe'or'cope'.idx – If the model fit type is
'pe'or'cope',
-
__module__= 'fsleyes.plotting.timeseries'¶
-
-
class
fsleyes.plotting.timeseries.MelodicTimeSeries(overlay, overlayList, displayCtx, plotPanel)[source]¶ Bases:
fsleyes.plotting.dataseries.DataSeriesA
DataSeriesclass which encapsulates the time course for one component of aMelodicImage. ThegetData()method returns the time course of the component specified by the currentNiftiOpts.volume.-
__module__= 'fsleyes.plotting.timeseries'¶
-
__init__(overlay, overlayList, displayCtx, plotPanel)[source]¶ Create a
MelodicTimeSeries.- Parameters
overlay – A
MelodicImageoverlay.overlayList – The
OverlayListinstance.displayCtx – The
DisplayContextinstance.plotPanel – The
TimeSeriesPanelwhich owns thisMelodicTimeSeries.
-
-
class
fsleyes.plotting.timeseries.MeshTimeSeries(overlay, overlayList, displayCtx, plotPanel)[source]¶ Bases:
fsleyes.plotting.dataseries.DataSeriesA
MeshTimeSeriesobject encapsulates the time course for aMeshoverlay which has some time series vertex data associated with it. See theMeshOpts.vertexDataproperty.-
_MeshTimeSeries__haveData()¶ Returns
Trueif there is currently time series data to show for thisMeshTimeSeries,Falseotherwise.
-
__module__= 'fsleyes.plotting.timeseries'¶
-
__init__(overlay, overlayList, displayCtx, plotPanel)[source]¶ Create a
MeshTimeSeriesinstance.- Parameters
overlay – The
Meshinstance to extract the data from.overlayList – The
OverlayListinstance.displayCtx – The
DisplayContextinstance.plotPanel – The
TimeSeriesPanelwhich owns thisTimeSeries.
-