Skip to content

Commit

Permalink
Updated examples.
Browse files Browse the repository at this point in the history
  • Loading branch information
cgohil8 committed Aug 2, 2024
1 parent 6254068 commit 9839268
Show file tree
Hide file tree
Showing 10 changed files with 16 additions and 16 deletions.
6 changes: 3 additions & 3 deletions examples/ctf/ctf_with_headshape_pos/2_coregister.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

from osl import source_recon, utils

def save_polhemus_from_pos(outdir, subject, preproc_file, smri_file, epoch_file):
def save_polhemus_from_pos(outdir, subject):
"""Saves fiducials/headshape from a pos file."""

# Get path to pos file
Expand Down Expand Up @@ -107,8 +107,8 @@ def fix_headshape_points(outdir, subject, preproc_file, smri_file, epoch_file):

# Fif files containing the sensor-level preprocessed data for each subject
preproc_files = [
"data/sub-not001_task-resteyesopen/sub-not001_task-resteyesopen_preproc_raw.fif",
"data/sub-not002_task-resteyesopen/sub-not002_task-resteyesopen_preproc_raw.fif",
"data/sub-not001_task-resteyesopen/sub-not001_task-resteyesopen_preproc-raw.fif",
"data/sub-not002_task-resteyesopen/sub-not002_task-resteyesopen_preproc-raw.fif",
]

# The corresponding structurals for each subject
Expand Down
4 changes: 2 additions & 2 deletions examples/ctf/ctf_with_headshape_pos/3_source_reconstruct.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@

# Fif files containing the sensor-level preprocessed data for each subject
preproc_files = [
"data/sub-not001_task-resteyesopen/sub-not001_task-resteyesopen_preproc_raw.fif",
"data/sub-not002_task-resteyesopen/sub-not002_task-resteyesopen_preproc_raw.fif",
"data/sub-not001_task-resteyesopen/sub-not001_task-resteyesopen_preproc-raw.fif",
"data/sub-not002_task-resteyesopen/sub-not002_task-resteyesopen_preproc-raw.fif",
]

# Directory to save output to
Expand Down
2 changes: 1 addition & 1 deletion examples/ctf/ctf_with_smri_fid/2_coregister.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
subjects = ["LN_VTA2"]

# Lists for input files
preproc_files = ["data/LN_VTA2/mg04938_BrainampDBS_20170504_01_preproc_raw.fif"]
preproc_files = ["data/LN_VTA2/mg04938_BrainampDBS_20170504_01_preproc-raw.fif"]
smri_files = ["smri/LN_VTA2.nii"]

# Output directory
Expand Down
2 changes: 1 addition & 1 deletion examples/ctf/ctf_with_smri_fid/3_source_reconstruct.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
subjects = ["LN_VTA2"]

# Fif files containing the sensor-level preprocessed data for each subject
preproc_files = ["data/LN_VTA2/mg04938_BrainampDBS_20170504_01_preproc_raw.fif"]
preproc_files = ["data/LN_VTA2/mg04938_BrainampDBS_20170504_01_preproc-raw.fif"]

# Directories
outdir = "data"
Expand Down
2 changes: 1 addition & 1 deletion examples/elekta/3_coregister.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
anatdir = "smri"

# Files ({subject} will be replaced by the name for the subject)
preproc_file = outdir + "{subject}/{subject}_tsss_preproc_raw.fif"
preproc_file = outdir + "{subject}/{subject}_tsss_preproc-raw.fif"
smri_file = anatdir + "/{subject}/anat/{subject}_T1w.nii"

# Subjects to coregister
Expand Down
2 changes: 1 addition & 1 deletion examples/elekta/4_source_reconstruct.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
outdir = "data"

# Files
preproc_file = outdir + "/{subject}_tsss_preproc_raw.fif" # {subject} will be replaced by the subject name
preproc_file = outdir + "/{subject}_tsss_preproc-raw.fif" # {subject} will be replaced by the subject name

# Subjects to do
subjects = ["sub-001", "sub-002"]
Expand Down
4 changes: 2 additions & 2 deletions examples/opm/2_coregister.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

from osl import source_recon, utils

def coregister(outdir, subject, preproc_file, smri_file, epoch_file):
def coregister(outdir, subject, preproc_file):
"""Coregister OPM data."""

# Create dummy coregistration files
Expand Down Expand Up @@ -44,7 +44,7 @@ def coregister(outdir, subject, preproc_file, smri_file, epoch_file):

# Fif files containing the sensor-level preprocessed data for each subject
preproc_files = [
"data/13703/13703-braille_test-meg_preproc_raw.fif",
"data/13703/13703-braille_test-meg_preproc-raw.fif",
]

# The corresponding structurals for each subject
Expand Down
2 changes: 1 addition & 1 deletion examples/opm/3_source_reconstruct.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@

# Fif files containing the sensor-level preprocessed data for each subject
preproc_files = [
"data/13703/13703-braille_test-meg_preproc_raw.fif",
"data/13703/13703-braille_test-meg_preproc-raw.fif",
]

# Do source reconstruction
Expand Down
4 changes: 2 additions & 2 deletions examples/parallelisation/parallel_source_reconstruct.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@

# Files
smri_file = anatdir + "/{0}/anat/{0}_T1w.nii"
preproc_file = outdir + "{0}_ses-rest_task-rest_meg/{0}_ses-rest_task-rest_meg_preproc_raw.fif"
preproc_file = outdir + "{0}_ses-rest_task-rest_meg/{0}_ses-rest_task-rest_meg_preproc-raw.fif"

# Settings
config = """
Expand All @@ -51,7 +51,7 @@
orthogonalisation: symmetric
"""

def remove_headshape_points(outdir, subject, preproc_file, smri_file, epoch_file):
def remove_headshape_points(outdir, subject):
"""Removes headshape points near the nose."""

# Get coreg filenames
Expand Down
4 changes: 2 additions & 2 deletions examples/parallelisation/serial_source_reconstruct.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@

# Files
smri_file = anatdir + "/{0}/anat/{0}_T1w.nii"
preproc_file = outdir + "{0}_ses-rest_task-rest_meg/{0}_ses-rest_task-rest_meg_preproc_raw.fif"
preproc_file = outdir + "{0}_ses-rest_task-rest_meg/{0}_ses-rest_task-rest_meg_preproc-raw.fif"

# Settings
config = """
Expand All @@ -47,7 +47,7 @@
orthogonalisation: symmetric
"""

def remove_headshape_points(outdir, subject, preproc_file, smri_file, epoch_file):
def remove_headshape_points(outdir, subject):
"""Removes headshape points near the nose."""

# Get coreg filenames
Expand Down

0 comments on commit 9839268

Please sign in to comment.