[pymvpa] detrend, polyord, optarg and the principle of least surprise

Michael Hanke michael.hanke at gmail.com
Fri Mar 6 11:58:31 UTC 2009


On Fri, Mar 06, 2009 at 12:39:15PM +0100, Emanuele Olivetti wrote:
> Howdy,
> 
> While playing with polynomial detrend of fMRI data I noticed that
> I forgot to specify the 'model' parameter and it happened that
> I was just doing linear detrending.
> Example:
> 
> detrend(dataset,polyord=5) # WRONG! This does just LINEAR detrending!!
> 
> detrend(dataset,model='regress',polyord=5) # CORRECT, poly(5) detrending
> 
> Would it be OK if we accept the first of the two examples as a valid
> way to request polynomial detrending? It seems much more natural to
> me and avoid stupid mistakes like those I did today :)
> 
> Note that I'd add the same idea for the 'opt_arg' parameter, and not
> oly for 'polyord'. I.e., 'opt_arg'=!None would mean model='regress' too.
> 
> If this is OK I can add the trivial patch.

Sounds good to me. Please go ahead.


Michael

-- 
GPG key:  1024D/3144BE0F Michael Hanke
http://apsy.gse.uni-magdeburg.de/hanke
ICQ: 48230050



More information about the Pkg-ExpPsy-PyMVPA mailing list