period = 0.00048828125 #s #Put the data into a TimeSeriesRegion datatype white_matter = connectivity.Connectivity() tsr = TimeSeriesRegion(connectivity=white_matter, data=data, sample_period=period) tsr.configure() #Create and run the analyser pca_analyser = pca.PCA(time_series=tsr) pca_data = pca_analyser.evaluate() #Generate derived data, such as, compnent time series, etc. pca_data.configure() #Put the data into a TimeSeriesSurface datatype component_tsr = TimeSeriesRegion(connectivity=white_matter, data=pca_data.component_time_series, sample_period=period) component_tsr.configure() #Prutty puctures... tsi = timeseries_interactive.TimeSeriesInteractive(time_series=component_tsr) tsi.configure() tsi.show() if IMPORTED_MAYAVI: xmas_balls(tsr.connectivity, pca_data.weights[:, 0, 0, 0], edge_data=True)
##----------------------------------------------------------------------------## ##- Plot pretty pictures of what we just did -## ##----------------------------------------------------------------------------## #Make the lists numpy.arrays for easier use. LOG.info("Converting result to array...") TAVG_TIME = numpy.array(tavg_time) BOLD_TIME = numpy.array(bold_time) BOLD = numpy.array(bold_data) TAVG = numpy.array(tavg_data) #Create TimeSeries instance tsr = TimeSeriesRegion(data=TAVG, time=TAVG_TIME, sample_period=2.) tsr.configure() #Create and run the monitor/analyser bold_model = bold.BalloonModel(time_series=tsr) bold_data = bold_model.evaluate() bold_tsr = TimeSeriesRegion(connectivity=white_matter, data=bold_data.data, time=bold_data.time) #Prutty puctures... tsi = timeseries_interactive.TimeSeriesInteractive(time_series=bold_tsr) tsi.configure() tsi.show() ###EoF###
imshow(ss[timesteps,:,:], vmin=0, vmax=1, cmap='hot') subplot(3,4,7) imshow(fs[timesteps,:,:], vmin=0, vmax=1, cmap='hot') subplot(3,4,11) imshow(fd1[timesteps,:,:], vmin=0, vmax=1, cmap='hot') subplot(3,4,4) imshow(fd2[timesteps,:,:], vmin=0, vmax=1, cmap='hot') subplot(3,4,8) imshow(fr[timesteps,:,:], vmin=0, vmax=1, cmap='hot') stimesteps.on_changed(update) ########## NOW DISPLAY TVB SIMULATED NEURAL ACTIVITY ################## plot_connectivity(white_matter) white_matter.display_name = 'default' tsr = tvb.datatypes.time_series.TimeSeriesRegion(data = RAW, connectivity=white_matter) tsr.configure() tsi = ts_int.TimeSeriesInteractive(time_series=tsr) tsi.configure() tsi.show()