Skip to content

Commit bbece3d

Browse files
committed
FIX: Fix command-line tool, add placeholder for tutorial
1 parent 85f04c5 commit bbece3d

File tree

3 files changed

+17
-4
lines changed

3 files changed

+17
-4
lines changed

bin/pysurfer

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,16 @@ if __name__ == '__main__':
2424
# boot up mlab/IPython
2525
if len(sys.argv) > 3:
2626
subjects_dir = os.environ['SUBJECTS_DIR']
27-
surf_file = os.path.join(subjects_dir,
28-
"%s/surf/%s.%s" % tuple(sys.argv[1:4]))
29-
if not os.path.exists(surf_file):
30-
sys.exit("ERROR: Could not find %s" % surf_file)
27+
if sys.argv[2] in ['both', 'split']:
28+
hemi_checks = ['lh', 'rh']
29+
else:
30+
hemi_checks = [sys.argv[2]]
31+
for h in hemi_checks:
32+
surf_file = os.path.join(subjects_dir,
33+
"%s/surf/%s.%s" % (sys.argv[1], h,
34+
sys.argv[3]))
35+
if not os.path.exists(surf_file):
36+
sys.exit("ERROR: Could not find %s" % surf_file)
3137

3238
if not is_ipython:
3339
# Parse the args so that --help exits back to the shell

doc/documentation/index.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,6 @@ Documentation
77

88
./command_line
99
./custom_viz
10+
./split_brain
1011
./config_file
1112

doc/documentation/split_brain.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
.. _split_brain:
2+
3+
Working with a split-screen brain
4+
=================================
5+
6+
Placeholder

0 commit comments

Comments
 (0)