obob_mne.mixins.raw.LoadFromSinuhe

class obob_mne.mixins.raw.LoadFromSinuhe(subject_id, block_nr=None, **kwargs)[source]

mne.io.Raw mixin to facilitate loading data from sinuhe.

By including this mixin in your study specific Raw class, you can facilitate loading the raw data files.

Supposed your fif files follow the usual pattern: ‘19800908igdb_run01.fif’, you can define a Raw class like this one:

class Raw(mne.io.fiff.Raw, LoadFromSinuhe):
    study_acronym = 'test_study'

Loading run 2 of subject ‘19800908igdb’ can then be done like this:

raw_data = Raw(subject_id='19800908igdb', block_nr=2, preload=True)
classmethod get_all_subjects()[source]

Return a list of all subjects in the study.

Returns:all_subjects – A list of strings with all subjects codes found.
Return type:list
classmethod get_fif_filename(subject_id, run_nr)[source]

Find the fif file for the subject and run.

Parameters:
  • subject_id (str) – The subject id
  • run_nr (int) – The run number
Returns:

fname – The filename of the respective fif file

Return type:

str

classmethod get_number_of_runs(subject_id)[source]

Return the number of runs for the given subject.

Parameters:subject_id (str) – The subject id
Returns:n_runs – The number of runs for the subject.
Return type:int