-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Only include generic examples. * Two different CTF examples. * Added message/link for oxford-ohba examples. * Updated readme.
- Loading branch information
Showing
87 changed files
with
700 additions
and
4,821 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
Example Scripts | ||
--------------- | ||
|
||
- See the `oxford` directory for scripts for preprocessing/source reconstructing data collected at OHBA. | ||
- See the `parallelisation` directory for how to parallelise a script in OSL. | ||
- The other directories are scripts for preprocessing/source reconstructing public M/EEG dataset. | ||
This directory contains generic scripts for preprocessing/source reconstructing MEG data collected with different scanners. | ||
|
||
For example scripts for various public M/EEG datasets, see https://github.com/OHBA-analysis/OHBA-Examples. |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
"""Preprocess CTF data. | ||
""" | ||
|
||
# Authors: Chetan Gohil <chetan.gohil@psych.ox.ac.uk> | ||
|
||
from osl import preprocessing | ||
|
||
# Settings | ||
config = """ | ||
preproc: | ||
- filter: {l_freq: 1, h_freq: 125, method: iir, iir_params: {order: 5, ftype: butter}} | ||
- notch_filter: {freqs: 50 100} | ||
- resample: {sfreq: 250} | ||
- bad_segments: {segment_len: 500, picks: mag} | ||
- bad_segments: {segment_len: 500, picks: mag, mode: diff} | ||
- bad_channels: {picks: mag} | ||
- interpolate_bads: {} | ||
""" | ||
|
||
# Create a list of paths to files to preprocess | ||
inputs = [ | ||
"data/raw/Nottingham/sub-not001/meg/sub-not001_task-resteyesopen_meg.ds", | ||
"data/raw/Nottingham/sub-not002/meg/sub-not002_task-resteyesopen_meg.ds", | ||
] | ||
|
||
# Directory to save output to | ||
outdir = "data/preproc" | ||
|
||
# Do preprocessing | ||
preprocessing.run_proc_batch( | ||
config, | ||
inputs, | ||
outdir=outdir, | ||
overwrite=True, | ||
) |
Oops, something went wrong.