forked from neurospin/pypreprocess
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpypreprocess.py
More file actions
executable file
·26 lines (21 loc) · 810 Bytes
/
Copy pathpypreprocess.py
File metadata and controls
executable file
·26 lines (21 loc) · 810 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
"""
Synopsis: Run pypreprocess using dataset-specific configuration file given
at command line.
Author: DOHMATOB Elvis Dopgima <gmdopp@gmail.com> <elvis.dohmatob@inria.fr>
"""
import sys
import matplotlib
matplotlib.use('Agg')
from pypreprocess.nipype_preproc_spm_utils import do_subjects_preproc
if __name__ == "__main__":
# sanitize command-line usage
if len(sys.argv) < 2:
print "\r\nUsage: python %s </path/to/preproc/job.ini>\r\n" % (
sys.argv[0])
print ("Example:\r\npython %s scripts/HCP_tfMRI_MOTOR_preproc"
".ini\r\n") % sys.argv[0]
sys.exit(1)
# consume config file and run pypreprocess back-end
subjects = do_subjects_preproc(sys.argv[1])
from pypreprocess.glm_utils import do_subject_glm
map(do_subject_glm, subjects)