API

Graphical user interface

visbrain.gui:

Brain([bgcolor, verbose])

Visualization of brain-data on a standard MNI brain.

Sleep([data, hypno, config_file, …])

Visualize and edit sleep data.

Signal(data[, axis, time, sf, enable_grid, …])

Signal inspection module (data mining).

Figure(files[, path, grid, figtitle, y, …])

Automatically arange pictures in a grid and save a paper ready figure.

Objects

visbrain.objects:

Import visbrain objects.

BrainObj(name[, vertices, faces, normals, …])

Create a brain object.

ColorbarObj(name[, rect, transform, parent, …])

Create a colorbar object.

ConnectObj(name, nodes, edges[, select, …])

Create a connectivity object.

CrossSecObj(name[, vol, hdr, coords, …])

Create a Cross-sections object.

GridSignalsObj(name, data[, axis, plt_as, …])

Take a VisPy visual and turn it into a compatible Visbrain object.

HypnogramObj(name[, data, time, datafile, …])

Hypnogram object.

ImageObj(name[, data, xaxis, yaxis, cmap, …])

Create a single image object.

PacmapObj(name[, data, sf, f_pha, f_amp, …])

Create a Phase-Amplitude Coupling (PAC) object.

Picture3DObj(name, data, xyz[, select, …])

Create a 3-D picture object.

RoiObj(name[, vol, labels, index, hdr, …])

Create a Region Of Interest (ROI) object.

SceneObj([bgcolor, camera_state, verbose])

Create a scene and add objects to it.

SourceObj(name, xyz[, data, color, alpha, …])

Create a source object.

TopoObj(name, data[, xyz, channels, system, …])

Create a topoplot object.

TimeFrequencyObj(name[, data, sf, method, …])

Compute the time-frequency map (or spectrogram).

TimeSeries3DObj(name, data, xyz[, select, …])

Create a 3-D time-series object.

VectorObj(name, arrows[, data, …])

Create a vector object.

VispyObj(name, visual[, transform, parent, …])

Take a VisPy visual and turn it into a compatible Visbrain object.

VolumeObj(name[, vol, hdr, method, …])

Create a 3-D volume object.

Compatibility with existing software

MNE-python

visbrain.mne:

mne_plot_source_estimation(sbj, sbj_dir, …)

Plot source estimation.

mne_plot_source_space(fif_file[, …])

Plot source space.

I/O

visbrain.io:

Load read and write functions.

download_file(name[, astype, filename, …])

Download a file.

path_to_visbrain_data([file, folder])

Get the path to the visbrain_data folder.

read_stc(path)

Read an STC file from the MNE package.

write_fig_hyp(data, sf[, file, start_s, …])

Export hypnogram to a high-res png figure.

get_sleep_stats(hypno_file[, output_file])

Compute sleep statistics from hypnogram file and export them in csv.

Miscellaneous

visbrain.utils:

generate_eeg([sf, n_pts, n_channels, …])

Generate random eeg signals.

tal2mni(xyz)

Transform Talairach coordinates into MNI.

mni2tal(xyz)

Transform MNI coordinates into Talairach.

rereferencing(data, chans, reference[, …])

Re-reference data.

bipolarization(data, chans[, to_ignore, sep])

Bipolarize data.

commonaverage(data, chans[, to_ignore])

Re-referencement using common average.

convert_meshdata([vertices, faces, normals, …])

Convert mesh data to be compatible with visbrain.

volume_to_mesh(vol[, smooth_factor, level])

Convert a volume into a mesh with vertices, faces and normals.

color2vb([color, default, length, alpha, …])

Turn into a RGBA compatible color format.

array2colormap(x[, cmap, clim, alpha, vmin, …])

Transform an array of data into colormap (array of RGBA).

Colormap([cmap, clim, vmin, under, vmax, …])

Main colormap class.