| Multivariate Pattern Analysis in Python

### Navigation

- index
- next |
- previous |
- ExpPsy Project |
- NeuroDebian Project |
- PyMVPA 0.4.x Home |
- PyMVPA Home |
- Documentation »
- Module Reference »

This content refers to the previous stable release of PyMVPA. Please visit www.pymvpa.org for the most recent version of PyMVPA and its documentation.

# datasets.channel

## Module: `datasets.channel`

Inheritance diagram for `mvpa.datasets.channel`:

Dataset handling data structured in channels.

## `ChannelDataset`

class `mvpa.datasets.channel.``ChannelDataset`(samples=None, dsattr=None, t0=None, dt=None, channelids=None, **kwargs)

  Bases: `mvpa.datasets.mapped.MappedDataset`

  Dataset handling data structured into channels.

  Channels are assumes to contain several timepoints, thus this Dataset stores some additional properties (reference time t0, temporal distance of two timepoints dt and channelids (names)).

  See also

  Please refer to the documentation of the base class for more information:

  `MappedDataset`

  Initialize ChannelDataset.

  Parameters:

  - samples (ndarray) – Three-dimensional array: (samples x channels x timepoints).
  - t0 (float) – Reference time of the first timepoint. Can be used to preserve information about the onset of some stimulation. Preferably in seconds.
  - dt (float) – Temporal distance between two timepoints. Has to be given in seconds. Otherwise samplingrate property will not return Hz.
  - channelids (list) – List of channel names.
  - mapper (Instance of Mapper) – This mapper will be embedded in the dataset and is used and updated, by all subsequent mapping or feature selection procedures.
  - data (dict) – Dictionary with an arbitrary number of entries. The value for each key in the dict has to be an ndarray with the same length as the number of rows in the samples array. A special entry in this dictionary is ‘samples’, a 2d array (samples x features). A shallow copy is stored in the object.
  - dsattr (dict) – Dictionary of dataset attributes. An arbitrary number of arbitrarily named and typed objects can be stored here. A shallow copy of the dictionary is stored in the object.
  - dtype (type | None) – If None – do not change data type if samples is an ndarray. Otherwise convert samples to dtype.

  `channelids`

    List of channel IDs

  `dt`

    Time difference between two samples (in seconds).

  `samplingrate`

    Yeah, sampling rate.

  `substractBaseline`(t=None)

    Substract mean baseline signal from the each timepoint.

    The baseline is determined by computing the mean over all timepoints specified by t.

    The samples of the dataset are modified in-place and nothing is returned.

    Parameters:

    t (int | float | None) – If an integer, t denotes the number of timepoints in the from the start of each sample to be used to compute the baseline signal. If a floating point value, t is the duration of the baseline window from the start of each sample in whatever unit corresponding to the datasets samplingrate. Finally, if None the t0 property of the dataset is used to determine t as it would have been specified as duration.

  `t0`

    Temporal position of first sample in the timeseries (in seconds) – possibly relative to stimulus onset.

### Navigation

- index
- next |
- previous |
- ExpPsy Project |
- NeuroDebian Project |
- PyMVPA 0.4.x Home |
- PyMVPA Home |
- Documentation »
- Module Reference »