The Virtual Brain Project

Previous topic

Power-Spectra Interactive

Next topic

Suggested Coding Conventions.

This Page

Timeseries Interactive

Class diagram for tvb.simulator.timeseries_interactive

An interactive time-series plot generated from a TVB TimeSeries datatype.

Usage

#Load the demo data
import numpy
data = numpy.load("demos/demo_data_region_16s_2048Hz.npy")
period = 0.00048828125 #NOTE: Providing period in seconds

#Create a tvb TimeSeries object
import tvb.datatypes.time_series
tsr = tvb.datatypes.time_series.TimeSeriesRegion()
tsr.data = data
tsr.sample_period = period

#Create and launch the interactive visualiser
import tvb.simulator.timeseries_interactive as ts_int
tsi = ts_int.TimeSeriesInteractive(time_series=tsr)
tsi.configure()
tsi.show()
tvb.simulator.plot.timeseries_interactive.TimeSeriesInteractive[source]

For generating an interactive time-series figure, given one of TVB’s TimeSeries datatypes to initialise it. The graphical interface for visualising a timeseries provides controls for setting:

  • Window length
  • Amplitude scaling
  • Stepping forward/backward through time.

traits on this class:

first_n (Display the first ‘n’)
Primarily intended for displaying the first N components of a surface PCA timeseries. Defaults to -1, meaning it’ll display all of ‘space’ (ie, regions or vertices or channels). In other words, for Region or M/EEG timeseries you can ignore this, but, for a surface timeseries it really must be set.
default: -1
time_series (Timeseries)
The TVB TimeSeries datatype to be displayed.
default: None