Hi,
I’ve noticed that align_epi_anat.py fails when I use the -edge option on the latest AFNI version I have (AFNI_18.0.11) on my Mac (running OSX 10.12.6). I tried the same command on another machine I have access to (Ubuntu 14.04 running AFNI_17.0.06) and I didn’t get an error. I also don’t get an error on either machine when the -edge option is not used. It looks like a Python bug? Here is the screen output from running this command:
kuang-hans-imac:test_align khuang$ ls
anat+orig.BRIK files_T1w_BIC7T_V0_20170823145002_7.nii
anat+orig.HEAD mtc+orig.BRIK
anat2+orig.BRIK mtc+orig.HEAD
anat2+orig.HEAD nomtc+orig.BRIK
files_BP_tfl_multiMTC_1000_20170823145002_8.nii nomtc+orig.HEAD
files_BP_tfl_noMTCav2_500_20170823145002_9.nii
kuang-hans-imac:test_align khuang$ align_epi_anat.py -dset1 mtc+orig. -dset2 anat+orig. -dset1to2 -partial_axial -dset1_strip None -dset2_strip None -save_all -edge
#++ align_epi_anat version: 1.57
#++ turning off tshift, volume registration, resampling
#++ turning off tshift, volume registration, resampling
#Script is running:
3dAttribute DELTA /Users/khuang/Sinai/LC/test_align/anat+orig
#Script is running:
3dAttribute DELTA /Users/khuang/Sinai/LC/test_align/anat+orig
#Script is running:
3dAttribute DELTA /Users/khuang/Sinai/LC/test_align/mtc+orig
#++ Multi-cost is lpa
#++ Removing all the temporary files
#Script is running:
\rm -f ./__tt_anat*
#Script is running:
\rm -f ./__tt_mtc*
#Script is running (command trimmed):
3dcopy ./mtc+orig ./__tt_mtc+orig
++ 3dcopy: AFNI version=AFNI_18.0.11 (Jan 27 2018) [64-bit]
#Script is running (command trimmed):
3dinfo ./__tt_mtc+orig | \grep ‘Data Axes Tilt:’|\grep ‘Oblique’
#++ Dataset /Users/khuang/Sinai/LC/test_align/__tt_mtc+orig is not oblique
#Script is running (command trimmed):
3dinfo ./anat+orig | \grep ‘Data Axes Tilt:’|\grep ‘Oblique’
#++ Dataset /Users/khuang/Sinai/LC/test_align/anat+orig is not oblique
#++ Creating edge dataset
#Script is running (command trimmed):
3dAutomask -overwrite -erode 5 -prefix __tt_mtc_edge_edge_mask ./__tt_mtc+orig
++ 3dAutomask: AFNI version=AFNI_18.0.11 (Jan 27 2018) [64-bit]
++ Authored by: Emperor Zhark
++ Loading dataset ./__tt_mtc+orig
++ Forming automask
- Fixed clip level = 61.024502
- Used gradual clip level = 42.995399 … 67.998802
- Number voxels above clip level = 5487398
- Clustering voxels …
- Largest cluster has 5465876 voxels
- Clustering voxels …
- Largest cluster has 5291420 voxels
- Filled 93063 voxels in small holes; now have 5384483 voxels
- Filled 1012832 voxels in large holes; now have 6397315 voxels
- Clustering voxels …
- Largest cluster has 6397127 voxels
- Clustering non-brain voxels …
- Clustering voxels …
- Largest cluster has 30092473 voxels
- Mask now has 6397127 voxels
++ Eroding automask - Eroded 409378 voxels
- Eroded 354864 voxels
- Eroded 344067 voxels
- Eroded 334997 voxels
- Eroded 327460 voxels
- Clustering voxels …
- Largest cluster has 31179202 voxels
++ 5310398 voxels in the mask [out of 36489600: 14.55%]
++ first 44 x-planes are zero [from R]
++ last 39 x-planes are zero [from L]
++ first 10 y-planes are zero [from A]
++ last 11 y-planes are zero [from P]
++ first 12 z-planes are zero [from I]
++ last 13 z-planes are zero [from S]
++ CPU time = 39.470000 sec
#Script is running (command trimmed):
3dLocalstat -overwrite -mask ./__tt_mtc_edge_edge_mask+orig -nbhd ‘RECT(-2,-2,-1)’ -stat cvar -prefix __tt_mtc_edge ./__tt_mtc+orig
++ 3dLocalstat: AFNI version=AFNI_18.0.11 (Jan 27 2018) [64-bit]
++ Authored by: Emperor Zhark
++ Number of voxels in mask = 5310398
++ Neighborhood comprises 75 voxels
++ Start sub-brick [0]
#++ using 0th sub-brick because only one found
#Script is running (command trimmed):
3dbucket -prefix ./anat_ts ./anat+orig’[0]’
++ 3dbucket: AFNI version=AFNI_18.0.11 (Jan 27 2018) [64-bit]
#++ removing skull or area outside brain
Traceback (most recent call last):
File “/Users/khuang/abin/align_epi_anat.py”, line 3414, in
ps.process_epi(use_ss=ps.epi_strip_method)
File “/Users/khuang/abin/align_epi_anat.py”, line 3116, in process_epi
prefix = “%s%s%s” % (basepathname,basesuff)
TypeError: not enough arguments for format string
Thanks!
Kuang