Skip to content

Commit 1e53e30

Browse files
committed
added code to specify the session from command line
1 parent 8fd157b commit 1e53e30

1 file changed

Lines changed: 8 additions & 2 deletions

File tree

processing/pipeline.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
77
"""
88

9-
9+
import argparse
1010
import os
1111
import json
1212
import glob
@@ -19,6 +19,12 @@
1919
from ibc_public.utils_data import get_subject_session
2020
from script_resample_normalized_data import resample_func_and_anat
2121

22+
parser = argparse.ArgumentParser(description='Parameters for the logfiles')
23+
parser.add_argument('-s', '--session', metavar='SessionLabel', type=str,
24+
help="Session label, should be compliand with the "
25+
"ini files names.")
26+
args = parser.parse_args()
27+
2228

2329
def clean_anatomical_images(main_dir):
2430
""" Removed NaNs from SPM12-supplied images """
@@ -211,7 +217,7 @@ def run_subject_preproc(jobfile, subject, session=None):
211217
cache_dir = '/neurospin/tmp/ibc'
212218
prepare_derivatives(main_dir)
213219
do_topup = True
214-
protocol = 'lpp1'
220+
protocol = args.session
215221
subject_session = sorted(get_subject_session([protocol]))
216222
if do_topup:
217223
acq = None

0 commit comments

Comments
 (0)