Mne Bids Pipeline -

if == ' main ': parser = argparse.ArgumentParser() parser.add_argument('--subject', required=True) parser.add_argument('--config', default='config.yaml') args = parser.parse_args()

src = mne.setup_source_space('sub-001', spacing='oct6', subjects_dir=subjects_dir) fwd = mne.make_forward_solution( raw.info, trans=None, src=src, bem=bem_sol, meg=False, eeg=True ) 4. Inverse operator (dSPM or MNE) inverse_operator = mne.minimum_norm.make_inverse_operator( epochs.info, fwd, cov, loose=0.2, depth=0.8 ) 5. Apply to evoked data stc = mne.minimum_norm.apply_inverse( evoked_face, inverse_operator, lambda2=1/9., method='dSPM' ) Plot on cortical surface stc.plot(subject='sub-001', subjects_dir=subjects_dir, initial_time=0.1) mne bids pipeline

raw = read_raw_bids(bids_path, verbose=True) raw.load_data() # now in memory - Channel locations (from .tsv) - Events (from events.tsv) - Bad channels (from channels.tsv) print(raw) Step 3: Preprocessing Pipeline A typical preprocessing pipeline in MNE for BIDS data: if == ' main ': parser = argparse

with open(args.config, 'r') as f: config = yaml.safe_load(f) main(args.subject, config) initial_time=0.1) raw = read_raw_bids(bids_path