From 9839268a1d72e0f55db042a46e4dd8d153a51cf0 Mon Sep 17 00:00:00 2001 From: Chetan Gohil Date: Fri, 2 Aug 2024 13:02:36 +0100 Subject: [PATCH] Updated examples. --- examples/ctf/ctf_with_headshape_pos/2_coregister.py | 6 +++--- examples/ctf/ctf_with_headshape_pos/3_source_reconstruct.py | 4 ++-- examples/ctf/ctf_with_smri_fid/2_coregister.py | 2 +- examples/ctf/ctf_with_smri_fid/3_source_reconstruct.py | 2 +- examples/elekta/3_coregister.py | 2 +- examples/elekta/4_source_reconstruct.py | 2 +- examples/opm/2_coregister.py | 4 ++-- examples/opm/3_source_reconstruct.py | 2 +- examples/parallelisation/parallel_source_reconstruct.py | 4 ++-- examples/parallelisation/serial_source_reconstruct.py | 4 ++-- 10 files changed, 16 insertions(+), 16 deletions(-) diff --git a/examples/ctf/ctf_with_headshape_pos/2_coregister.py b/examples/ctf/ctf_with_headshape_pos/2_coregister.py index e8a9dfd..f596255 100644 --- a/examples/ctf/ctf_with_headshape_pos/2_coregister.py +++ b/examples/ctf/ctf_with_headshape_pos/2_coregister.py @@ -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 @@ -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 diff --git a/examples/ctf/ctf_with_headshape_pos/3_source_reconstruct.py b/examples/ctf/ctf_with_headshape_pos/3_source_reconstruct.py index 45dd66d..b2b70ca 100644 --- a/examples/ctf/ctf_with_headshape_pos/3_source_reconstruct.py +++ b/examples/ctf/ctf_with_headshape_pos/3_source_reconstruct.py @@ -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 diff --git a/examples/ctf/ctf_with_smri_fid/2_coregister.py b/examples/ctf/ctf_with_smri_fid/2_coregister.py index 5a69433..82adf8a 100644 --- a/examples/ctf/ctf_with_smri_fid/2_coregister.py +++ b/examples/ctf/ctf_with_smri_fid/2_coregister.py @@ -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 diff --git a/examples/ctf/ctf_with_smri_fid/3_source_reconstruct.py b/examples/ctf/ctf_with_smri_fid/3_source_reconstruct.py index ffdeed4..79ee901 100644 --- a/examples/ctf/ctf_with_smri_fid/3_source_reconstruct.py +++ b/examples/ctf/ctf_with_smri_fid/3_source_reconstruct.py @@ -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" diff --git a/examples/elekta/3_coregister.py b/examples/elekta/3_coregister.py index 21019be..1d60f3a 100644 --- a/examples/elekta/3_coregister.py +++ b/examples/elekta/3_coregister.py @@ -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 diff --git a/examples/elekta/4_source_reconstruct.py b/examples/elekta/4_source_reconstruct.py index 572ecb7..1064db9 100644 --- a/examples/elekta/4_source_reconstruct.py +++ b/examples/elekta/4_source_reconstruct.py @@ -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"] diff --git a/examples/opm/2_coregister.py b/examples/opm/2_coregister.py index b944e4f..1fd4bb7 100644 --- a/examples/opm/2_coregister.py +++ b/examples/opm/2_coregister.py @@ -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 @@ -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 diff --git a/examples/opm/3_source_reconstruct.py b/examples/opm/3_source_reconstruct.py index c57694a..6cb3d35 100644 --- a/examples/opm/3_source_reconstruct.py +++ b/examples/opm/3_source_reconstruct.py @@ -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 diff --git a/examples/parallelisation/parallel_source_reconstruct.py b/examples/parallelisation/parallel_source_reconstruct.py index 2192d01..6d74245 100644 --- a/examples/parallelisation/parallel_source_reconstruct.py +++ b/examples/parallelisation/parallel_source_reconstruct.py @@ -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 = """ @@ -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 diff --git a/examples/parallelisation/serial_source_reconstruct.py b/examples/parallelisation/serial_source_reconstruct.py index db0efe2..4731cbc 100644 --- a/examples/parallelisation/serial_source_reconstruct.py +++ b/examples/parallelisation/serial_source_reconstruct.py @@ -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 = """ @@ -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