-----Original Message-----
From: J.M. Schoffelen [mailto:Jan.Schoffelen at fcdonders.ru.nl]
Sent: Thursday, October 07, 2004 2:48 PM
To: 'FieldTrip discussion list'
Subject: RE: [FIELDTRIP] Question: Read_ctf_rc usw..
Dear Masao,
>I am interested in DICS and now started to struggle with FieldTrip 0.92.
Glad to hear that.
>1) I couldn't find the script 'read_ctf_hc' as described in the document
>'Localizing oscillatory sources using beamformer techniques'. How can I
>obtain one?
First of all, we are very sorry, but the tutorials to which you have access
are not really up-to-date. That's important to realize. So the best
information about the functions is to be found in the help-documentation of
the function itself.
So, don't worry about read_ctf_hc, since that is an old function, and not
needed any more, since its functionality is covered by other functions.
>2) I am almost at a loss how to start. Can I have some brief description of
>how to do DICS kind of analysis? Let me say,
>600Hz, 4 min single trial dataset: Foo_trial_01.ds (a folder in current
>directory)
>Reference signal vector of the same length: RefSignal (14400 x 1 double
>array in matlab workspace)
>MRI/head information in Foo.mri, Foo.hdm, Foo.shape and
>Foo_trial_01.ds/localSpheres.hdm.
>If the cross-spectra should be calculated before using FieldTrip, I can do
>the calculation and the cross-spectra between RefSignal and all channels in
>Foo_trial_01 will be stored in Fxy_trial_01 (274 x 1024 double array
>(complex)) --- 274 is the number of MEG sensors.
>What should I do next?
In general, I would tackle the problem in the following way: from your
description of your data I cannot judge if your reference-signal is also
present in the .meg4-file, or that it is obtained from somewhere else. But
that's a minor point.
I would not calculate my csd's outside fieldtrip, but I would use the
preprocessing-function to read in my data, not as a single trial, but cut
in, say, 5-second pieces (I guess you will not need a frequency-resolution
of 1/240 Hz/bin). Consecutively, I would read in my reference signal, using
the same trial-configuration as used in your meg-data. (This would only work
if your reference signal is in your .meg4 file, otherwise you have to find
out a smart trick to combine the corresponding meg-data/reference-data.)
Then you have to apply a trick, and store your reference-data and meg-data
in the same structure. So, if your meg-data is contained in data, and your
reference data in refdata (with identical trials), I would do this:
for loop = 1:length(data.trial)
data.trial{loop}=[data.trial{loop};refdata.trial{loop}];
end
data.label=[data.label;refdata.label];
Now you're ready to compute your crosspectra (apparently you already
obtained something like that), by using freqanalysis, and your
coherencespectra by using freqdescriptives on the output of freqanalysis. By
visualising the coherence on the sensor-level, you are able to locate the
frequencies, at which the coherence might be interesting.
Then (following the tutorial, with some variations),
go back to frequency-analysis,
taking as cfg.foilim your frequency-band of interest, and for your
signal-combinations:
cfg.sgncmb = channelcombination({'MEG' 'MEG';'MEG' '$label of your reference
signal'},data.label);
If you then run freqanalysis you'll end up with an awful lot of csd's. This
will be your input into sourceanalysis. For this, you could perfectly well
follow the tutorial, but you have to change "cfg.method='power'" into
"cfg.method = 'coh_refchan'", and you have to add to your configuration:
cfg.refchannel = '$label of your reference signal'.
Hopefully this helps you a bit to get on track,
Jan-Mathijs