AFNI Message Board

Dear AFNI users-

We are very pleased to announce that the new AFNI Message Board framework is up! Please join us at:

https://discuss.afni.nimh.nih.gov

Existing user accounts have been migrated, so returning users can login by requesting a password reset. New users can create accounts, as well, through a standard account creation process. Please note that these setup emails might initially go to spam folders (esp. for NIH users!), so please check those locations in the beginning.

The current Message Board discussion threads have been migrated to the new framework. The current Message Board will remain visible, but read-only, for a little while.

Sincerely, AFNI HQ

History of AFNI updates  

|
October 08, 2012 06:27PM
Hi gurus,

I've been having a couple of issues with align_epi_anat.py recently. The first issue is that the script crashes when I try to run it on EPIs that are not in the current directory. The temporary and output files are getting created in the current working directory (which is where I want them, and where fresh_start() looks for them), but the script subsequently searches for them in the directory in which the EPIs reside. The crash, after I've inserted some debugging statements into the script, looks like this:

#++ align_epi_anat version: 1.35
#++ turning off volume registration
#Script is running:
  3dAttribute DELTA /study/fmfmri/data/processed/016/epis/warm_cdmf+orig
#Script is running:
  3dAttribute DELTA /study/fmfmri/data/processed/016/epis/warm_cdmf+orig
#Script is running:
  3dAttribute DELTA /study4/fmfmri/data/processed/016/anat/T1High_ns+orig
#++ Multi-cost is lpc
name = opt.parlist[0] = /study/fmfmri/data/processed/016/epis/warm_cdmf+orig[0]
rp = os.path.dirname(name) = /study/fmfmri/data/processed/016/epis
ap = os.path.abspath(rp) = /study/fmfmri/data/processed/016/epis
e.path = /study/fmfmri/data/processed/016/epis/
e.prefix = warm_cdmf
os.getcwd() = /study4/fmfmri/data/processed/016/anat
e.ppv() = /study/fmfmri/data/processed/016/epis/warm_cdmf+orig
e.out_prefix() = warm_cdmf
#++ Removing all the temporary files
#Script is running:
  \rm -f __tt_warm_cdmf*
#Script is running:
  \rm -f __tt_T1High_ns*
#Script is running:
  3dcopy /study4/fmfmri/data/processed/016/anat/T1High_ns+orig __tt_T1High_ns
++ 3dcopy: AFNI version=AFNI_2011_12_21_1014 (Aug 15 2012) [64-bit]
#Script is running (command trimmed):
  3dinfo ./__tt_T1High_ns+orig | \grep 'Data Axes Tilt:'|\grep 'Oblique'
#++ Dataset /study4/fmfmri/data/processed/016/anat/__tt_T1High_ns+orig is not oblique
#Script is running:
  3dinfo /study/fmfmri/data/processed/016/epis/warm_cdmf+orig | \grep 'Data Axes Tilt:'|\grep 'Oblique'
#++ Dataset /study/fmfmri/data/processed/016/epis/warm_cdmf+orig is not oblique
e.path = /study/fmfmri/data/processed/016/epis/
e.prefix = warm_cdmf
e.view = +orig
e.type = BRIK
os.getcwd() = /study4/fmfmri/data/processed/016/anat
e.p() = /study/fmfmri/data/processed/016/epis/
#++ Creating representative epi sub-brick
#Script is running:
  3dbucket -prefix __tt_warm_cdmf_ts /study/fmfmri/data/processed/016/epis/warm_cdmf+orig'[0]'
++ 3dbucket: AFNI version=AFNI_2011_12_21_1014 (Aug 15 2012) [64-bit]
o.out_prefix() = __tt_warm_cdmf_ts
o.ppv() = /study/fmfmri/data/processed/016/epis/__tt_warm_cdmf_ts+orig
o.exist() = 0
** ERROR: Could not 3dTstat epi
#++ resampling epi to match anat data
Traceback (most recent call last):
  File "/home/schwabacher/afni_src/python_scripts/align_epi_anat.py", line 3035, in <module>
    ps.process_epi(use_ss=ps.epi_strip_method)
  File "/home/schwabacher/afni_src/python_scripts/align_epi_anat.py", line 2751, in process_epi
    e = self.resample_epi( o,"", prefix)
  File "/home/schwabacher/afni_src/python_scripts/align_epi_anat.py", line 2542, in resample_epi
    % (ps.anat_ns.input(), o.out_prefix(), e.input(),sb), ps.oexec)
AttributeError: 'NoneType' object has no attribute 'input'

I think that changing various
o = e.new(prefix)
to
o = afni_name(e.out_prefix()).new(prefix)
should fix this, though I'm not entirely sure because I got a little lost among the 'e's, 'o's and 'a's.

The other issue is that align_epi_anat.py for some reason just discards any selectors attached to its input, which I traced to the fact that it uses afni_name.input(self), which has this behavior. I assume this is this way because otherwise the world would break, but it would be nice if it worked the same as the other programs. It took me a while to figure out why it was taking so long to generate a high-resolution version of the high-contrast frame of my EPI data for quality checking purposes!

Isaac



Edited 1 time(s). Last edit at 10/08/2012 06:37PM by Isaac Schwabacher.
Subject Author Posted

align_epi_anat.py path issues

Isaac Schwabacher October 08, 2012 06:27PM

Re: align_epi_anat.py path issues

Daniel Glen October 08, 2012 10:30PM

Re: align_epi_anat.py path issues

Isaac Schwabacher October 09, 2012 11:48AM