History of AFNI updates  

|
April 12, 2022 02:46PM
I've been experimeting with afni_proc.py to create a notch filter. I haven't yet been successful. I'm using a simple afni_proc call to examine the generated scripts. The following call generates a processing script that seems reasonable (using bandpass filtering).

afni_proc.py \
-dsets ./*.nii.gz \
-regress_motion_per_run \
-regress_censor_motion 0.2 \
-regress_censor_outliers 0.05 \
-regress_bandpass 0.01 0.1

When I try to modify this call to implement notch filtering, afni_proc either will not generate a script or ignores one of the requested bandpass ranges

Example 1 (explicitly supply multiple bandpass ranges)

afni_proc.py \
-dsets ./*.nii.gz \
-regress_motion_per_run \
-regress_censor_motion 0.2 \
-regress_censor_outliers 0.05 \
-regress_bandpass 0.01 0.06 \
-regress_bandpass 0.14 0.69

Produces the following bandpass regressor call (which ignores the second range):

# create bandpass regressors (instead of using 3dBandpass, say)
1dBport -nodata 1200 0.72 -band 0.01 0.1 -invert -nozero > bandpass_rall.1D

Example 2: (supply multiple ranges to a single call regress_bandpass argument)

afni_proc.py \
-dsets ./*.nii.gz \
-regress_motion_per_run \
-regress_censor_motion 0.2 \
-regress_censor_outliers 0.05 \
-regress_bandpass 0.01 0.06 0.14 0.69

Produces a failure

usr/local/AFNI/lib_afni1D.py:1284: SyntaxWarning: 'str' object is not callable; perhaps you missed a comma?
print('** uncensor from vec: nt = %d, but nocen len = %d' \
/usr/local/AFNI/lib_vars_object.py:244: SyntaxWarning: 'str' object is not callable; perhaps you missed a comma?
print('** SVWD %s.%s, cannot convert value %s to %s' \
** error: unknown trailing arguments : ['0.14', '0.69']
----------------------------------------------------------------------
** failed command (get_user_opts):

afni_proc.py -dsets ./sub-100206_task-restRL_run-1_bold.nii.gz \
-regress_motion_per_run -regress_censor_motion 0.2 \
-regress_censor_outliers 0.05 -regress_bandpass 0.01 0.1 0.14 0.69
----------------------------------------------------------------------

What is the syntax for supplying multiple bandpass ranges within afni_proc? I'm not finding documentation or examples of how to implement this (in the end I'd like to notch filter 0.06-0.14). Thank you in advance. Best.
Subject Author Posted

Notch filter using AFNI

kabush_mri April 01, 2022 04:15PM

Re: Notch filter using AFNI

ptaylor April 01, 2022 05:45PM

Re: Notch filter using AFNI

kabush_mri April 08, 2022 07:25PM

Re: Notch filter using AFNI

kabush_mri April 12, 2022 02:46PM

Re: Notch filter using AFNI

ptaylor April 12, 2022 03:35PM

Re: Notch filter using AFNI

kabush_mri April 12, 2022 03:53PM

Re: Notch filter using AFNI

ptaylor April 12, 2022 03:59PM

Re: Notch filter using AFNI

kabush_mri April 12, 2022 05:00PM