cortex.dataset.Vertex

class cortex.dataset.Vertex(data, subject, cmap=None, vmin=None, vmax=None, description='', **kwargs)[source]

Encapsulates a 1D vertex map or 2D vertex movie. Includes information on how the data should be colormapped for display purposes.

Parameters:
datandarray

The data. Can be 1D with shape (v,), or 2D with shape (t,v). Here, v can be the number of vertices in both hemispheres, or the number of vertices in either one of the hemispheres. In that case, the data for the other hemisphere will be filled with zeros.

subjectstr

Subject identifier. Must exist in the pycortex database.

cmapstr or matplotlib colormap, optional

Colormap (or colormap name) to use. If not given defaults to matplotlib default colormap.

vminfloat, optional

Minimum value in colormap. If not given, defaults to the 1st percentile of the data.

vmaxfloat, optional

Maximum value in colormap. If not given defaults to the 99th percentile of the data.

descriptionstr, optional

String describing this dataset. Displayed in webgl viewer.

**kwargs

All additional arguments in kwargs are passed to the VolumeData and Dataview

Methods

__init__(data, subject[, cmap, vmin, vmax, ...])

blend_curvature(alpha[, threshold, ...])

Blend the data with a curvature map depending on a transparency map.

copy(data)

Return a new VertexData object for the same subject but with data replaced by the given data.

empty(subject[, value])

Create a constant-valued VertexData for the given subject.

exp()

Return copy of this brain data with data exponentiated.

from_hdf(node[, subject])

get_cmapdict()

Returns a dictionary with cmap information.

map(target_subj[, surface_type, hemi, fs_subj])

Map this data from this surface to another surface

random(subject, **kwargs)

Create a random-valued VertexData for the given subject.

to_json([simple])

Creates JSON description of this brain data.

uniques([collapse])

TODO: WHAT IS THIS

volume(xfmname[, projection])

Map this VertexData back to volume space, creating a VolumeData object.

Attributes

data

left

Data for only the left hemisphere vertices.

name

Name of this BrainData, computed from hash of data.

priority

raw

right

Data for only the right hemisphere vertices.

vertices