eelbrain.pipeline.RawSource

class eelbrain.pipeline.RawSource(filename='{subject}_{recording}-raw.fif', reader=<function read_raw_fif>, sysname=None, rename_channels=None, montage=None, connectivity=None, **kwargs)

Raw data source

Parameters
  • filename (str) – Pattern for filenames. The pattern should contain the fields {subject} and {recording} (which internally is expanded to session and, if applicable, visit; default '{subject}_{recording}-raw.fif').

  • reader (callable) – Function for reading data (default is mne.io.read_raw_fif()).

  • sysname (str) – Used to determine sensor positions (not needed for KIT files, or when a montage is specified).

  • rename_channels (dict) – Rename channels before applying montage, {from: to} dictionary; useful to convert idiosyncratic naming conventions to standard montages.

  • montage (str) – Name of a montage that is applied to raw data to set sensor positions.

  • connectivity (str | list of (str, str)) –

    Connectivity between sensors. Can be specified as:

    • list of connections (e.g., [('OZ', 'O1'), ('OZ', 'O2'), ...])

    • numpy.ndarray of int, shape (n_edges, 2), to specify connections in terms of indices. Each row should specify one connection [i, j] with i < j. If the array’s dtype is uint32, property checks are disabled to improve efficiency.

    • 'grid' to use adjacency in the sensor names

    • 'auto' to use mne.channels.find_ch_adjacency()

    If unspecified, it is inferred from sysname if possible.

  • .. – Additional parameters for the reader function.

Methods

as_dict()

cache(subject, recording)

Make sure the file exists and is up to date

exists(subject, recording)

get_connectivity(data)

get_sysname(info, subject, data)

load(subject, recording[, add_bads, …])

load_bad_channels(subject, recording)

make_bad_channels(subject, recording, …)

make_bad_channels_auto(subject, recording[, …])

mtime(subject, recording[, bad_chs])

Modification time of anything influencing the output of load