« F-to-Log | Software | Stockwell »
ctf2st
A Matlab GUI for performing Stockwell time-frequency analysis. Time-frequency analysis can be performed on multiple datasets and channels, including virtual channels. New version posted on 5/27/05.
Download ctf2st.tgz, and unzip using the following command:
tar -xvzf ctf2st.tgz
Next, you'll need to add ctf2st
and its subdirectory to your Matlab path. One way to do this to create a file called startup.m
in the directory you run Matlab from, containing the full paths to those directories. For example, if you installed ctf2st
in /home/user
, you'd put
addpath '/home/user/ctf2st' addpath '/home/user/ctf2st/st'
in startup.m
.
The distribution contains a precompiled mex
file for Linux/x86. If you're on a different architecture (e.g., Mac), you will need to recompile the mex
files in the st
subdirectory. Just cd
there and type make clean
and make
. See the comments in the Makefile
if mex
is not found. ctf2st
uses FFTW
version 3, which comes with Matlab. For older versions of Matlab see the README file.
Once you've compiled it, run stest
to make sure it's working. It produces a cross-chirp spectrum that looks like a big X.
Now with Octave goodness! The ctf2st
GUI doesn't work, but you can run Stockwell transforms in Octave using a compiled st.oct
. It has the same interface as the st
function that comes with ctf2st
. Download st-oct.tar.bz2, and create the .oct
file via
mkoctfile st.cc _st.c
It's possible to make this even faster by storing the time dimension in columns instead of rows. That's not done yet.
This is currently broken. You can compile it yourself, but please make sure that the version of mex
you are using is from the same bin/
that contains the matlab
you will use, on the type of nodes that you will use!
Here's a version that has been recompiled to work on the NIH Biowulf system: ctf2stBW.tgz Δ. Installation is as above, with one extra step: there are two versions, one for 32 bit systems and one for 64 bit systems. If you use linux24
nodes, use the 32 bit version, if you use linux26
nodes, use the 64 bit version. I think.
To do this, you need to set the symbolic link to the appropriate version:
cd ctf2st rm st ln -s st32 st # on 32 bit nodes ln -s st64 st # on 64 bit nodes
You can determine your node type for sure with uname -m
. If it says "x86_64
", you're on a 64 bit node.
Run Matlab. Type ctf2st
at the command line. Click on "Add DS". Because datasets are also directories, and "Add DS" uses a file selection box, you need to navigate into the dataset directory, and select a file there (just pick any file).
ctf2st
performs the Stockwell transform over entire trials, and averages the result. This means you must select a dataset consisting of many short trials.
To create a dataset for use with ctf2st
, use newDs
to select time windows around an event of interest, for example,
newDs -marker stim -time -.1 .5 $ds stim.ds
Now you can choose stim.ds
. Once that's done, try hitting the "Auto" buttons to set the analysis time window and normalization. Also uncheck the "Datasets already averaged" button if the dataset(s) contain raw data.
Select some channels to analyze (the results of all channels will be averaged together), and press "Stockwell Transform". Now sit back and wait…