« Stockwell | Software | randpermute »
StockwellDs.pyStockwellDs.py computes time-frequency representations of MEG data using the Stockwell transform.
Download StockwellDs-1.7.tar.gz. Dated 7/2/09.
You will also need broken pyctf.tar .gz Δ. (Now with segmentation goodness.)
To install, unpack pyctf, go to the src directory, type make, then go to the python directory and type make install. Note that you must have a PYTHONPATH environment variable pointing at the installation directory.
Then unpack StockwellDs, and run make and make install in that directory.
StockwellDs.py [options] $ds
The default behavior is to average all trials and compute the Stockwell transform of the average. Each channel is averaged separately and the resulting Stockwells are averaged together.
Following a 3dWilcoxon command like
3dWilcoxon -out ${cond1}V${cond2} $dsetlist1 $dsetlist2
the out brik has 2 subbriks. You need to do two things; threshold it, and copy the tfdim information.
3dmerge −1thresh 1.96 -datum float -prefix ${cond1}V${cond2}_z ${cond1}V${cond2}+orig
This 3dmerge command will create one brik thresholded at p < .05. The 1.96 is the .025 cutoff for the normal distribution. The 3dWilcoxon program creates zscores. If you want p < .01, use 2.57.
To copy the tfdim header, do this: start with a Stockwell brik that has the same dimensions (one of your input briks), here $subj$cond1
h=`3dNotes ${subj}${cond1}+orig | grep tfdim | sed 's/.*\(tfdim: .*\)/\1/'`
3dNotes -h "$h" ${cond1}V${cond2}_z+orig
The variable h contains the stuff that disptfbrik.py needs to display the axes correctly.
3dWilcoxon produces images of dset2 minus dset1.