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 TODO:WHAT

vmaxfloat, optional

Maximum value in colormap. If not given defaults to TODO:WHAT

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__(self, data, subject[, cmap, vmin, …])

Initialize self.

copy(self, 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(self)

Return copy of this brain data with data exponentiated.

from_hdf(node)

map(self, target_subj[, surface_type, hemi, …])

Map this data from this surface to another surface

random(subject, \*\*kwargs)

Create a random-valued VertexData for the given subject.

to_json(self[, simple])

Creates JSON description of this brain data.

uniques(self[, collapse])

TODO: WHAT IS THIS

volume(self, 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