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  

|
Colm Connolly
February 20, 2009 11:45AM
so the up shot is that after align_epi_anat.py is finished I have to run 3dWarp -deoblique on both func+orig and anat_al+orig to eliminate the obliquity warnings?

With respect to the the timeshifting issue I don't actually have the slice time numbers and getting them is a real PITA.

I presume that 3dTshift -tpattern, will in tha absence of timing info the header will simply assume that the slices are TR/nslices apart. Is that correct?

The patch to align_epi_anat.py is below.

--- align_epi_anat.py.orig 2009-02-20 15:53:44.659133131 +0000
+++ align_epi_anat.py 2009-02-20 16:03:14.301636707 +0000
@@ -212,6 +212,9 @@
(0/mean/median/max/subbrick#)

-tshift : do time shifting of EPI dataset before alignment ([on]/off)
+ -force_ts : Perform timeshifting even if the EPI header indiciates it
+ should not be done. (on/[off])
+ Only use this if you know what you're doing.
-tshift_opts : options to use with 3dTshift
The script will determine if slice timing correction is
necessary unless tshift is set to off.
@@ -337,6 +340,7 @@
self.prep_only = 0 # do preprocessing only
self.odir = os.getcwd()
self.tshift_flag = 1 # do time shifting on EPI
+ self.force_ts_flag = 0 # do time shifting on EPI even if the headers indicate it should not be done
self.volreg_flag = 1 # do volume registration on EPI
self.resample_flag = 1 # do resample
self.deoblique_flag = 1 # deoblique datasets first
@@ -466,6 +470,7 @@

# do time shifting
self.valid_opts.add_opt('-tshift', 1, [], ['on','off'])
+ self.valid_opts.add_opt('-force_ts', 1, [], ['on','off'])
self.valid_opts.add_opt('-tshift_opts', -1, [])

# obliquity options
@@ -713,6 +718,16 @@
self.error_msg("tshift option not on/off")
self.ciao(1)

+ opt = opt_list.find_opt('-force_ts') # do time shifting
+ if opt != None:
+ if(opt.parlist[0]=='on'):
+ self.force_ts_flag = 1
+ elif(opt.parlist[0]=='off'):
+ self.force_ts_flag = 0
+ else:
+ self.error_msg("force_ts option not on/off")
+ self.ciao(1)
+
opt = opt_list.find_opt('-volreg') # do volume registration
if opt != None:
if(opt.parlist[0]=='on'):
@@ -1232,15 +1247,18 @@

# determine if dataset has time shifts in slices
def tshiftable_dset( self, dset=None) :
- com = shell_com( \
- "3dAttribute TAXIS_OFFSETS %s" % dset.input(), ps.oexec,capture=1)
- com.run()
- if ps.dry_run():
- return (1)
- if(len(com.so)): status = 1
- else: status = 0
- return (status)
-
+ if self.force_ts_flag:
+ return 1
+ else:
+ com = shell_com( \
+ "3dAttribute TAXIS_OFFSETS %s" % dset.input(), ps.oexec,capture=1)
+ com.run()
+ if ps.dry_run():
+ return (1)
+ if(len(com.so)): status = 1
+ else: status = 0
+ return (status)
+
# determine if dataset is oblique
def oblique_dset( self, dset=None) :
com = shell_com( \
Subject Author Posted

bug in 3dAttribute?

Colm Connolly February 19, 2009 06:32AM

Re: bug in 3dAttribute?

Daniel Glen February 19, 2009 09:58AM

Re: bug in 3dAttribute?

Colm Connolly February 20, 2009 11:09AM

Re: bug in 3dAttribute?

Daniel Glen February 20, 2009 11:31AM

Re: bug in 3dAttribute?

Colm Connolly February 20, 2009 11:45AM

Re: bug in 3dAttribute?

Daniel Glen February 20, 2009 12:11PM