From thomas at UCSD.EDU  Sun Dec  3 03:04:08 2006
From: thomas at UCSD.EDU (Thomas Thesen)
Date: Sat, 2 Dec 2006 21:04:08 -0500
Subject: importing  .avg neuroscan files
Message-ID: <SAT.2.DEC.2006.210408.0500.FIELDTRIP@NIC.SURFNET.NL>

Dear Robert,



I saw on the FieldTrip web site that you have a function to import average
.avg files from Neuroscan. When I looked at read_fcdc_header.m I only found
import routines for continous .cnt files from Neuroscan, but not for the
.avg files. Did I look in the wrong place?



Thanks a lot for your help.



Best wishes,



Thomas



------------------------------------

Thomas Thesen, Ph.D.

Department of Neurology

New York University

530 1st Ave, HCC-1219

New York, NY 10016



Cell:       +1-347-668-7432

e-mail: thomas.thesen at med.nyu.edu

http://www.fmrib.ox.ac.uk/~tnt/

------------------------------------



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20061202/a3d3240f/attachment.htm>

From r.oostenveld at FCDONDERS.RU.NL  Mon Dec  4 10:43:31 2006
From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld)
Date: Mon, 4 Dec 2006 10:43:31 +0100
Subject: Reading data with trialfun_general
In-Reply-To: <06113010405549_2800013E@mpih-frankfurt.mpg.de>
Message-ID: <MON.4.DEC.2006.104331.0100.FIELDTRIP@NIC.SURFNET.NL>

On 30 Nov 2006, at 10:40, Michael Wibral wrote:
> i.e. it changes it from the first three numbers bigger than 1 to the
> first three odd numbers that are bigger than one.
> Is it possible that there is still some frontpanel+backpanel binary
> addition going on - even in trialfun_general?

What is the cfg.trialdef.eventvalue that us specify, 'UPPT001' or
'backpanel trigger'? It should be the 'UPPT001', since that does not
undergo the splitting of the values.

Line 253-267 from private/read_event should be responsible for
reading your UPPT001. There is one line there related to the signed
vs unsigned nature of the data, which may have the effect that you
describe (but unlikely).

I suggest that you use the matlab debugger and set a breakpoint there
in the code to plot "trig" and to look at the code in detail. Please
let me know whether you can locate the problem. Alternatively, put a
copy of your dataset (in a tar or zip file) on our ftp server: ftp://
ftp.fcdonders.nl/pub/incoming and I will have a look.

Robert


From r.oostenveld at FCDONDERS.RU.NL  Mon Dec  4 10:55:42 2006
From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld)
Date: Mon, 4 Dec 2006 10:55:42 +0100
Subject: freqbaseline & zscore
In-Reply-To: <000401c7149e$794c4ba0$0202fea9@D3K61L91>
Message-ID: <MON.4.DEC.2006.105542.0100.FIELDTRIP@NIC.SURFNET.NL>

On 30 Nov 2006, at 17:42, Thomas Thesen wrote:
> In version 20060605 of FT, there is an option for cf.baselinetype =
> zscore; but it is commented out in freqbaseline.m. Is there a
> specific reason for it, i.e. is the code for computing a zscore for
> baseline vs active not correct?
The code itself is correct, but I suspect the reason for it being
commented out (and not being documented) is that the behaviour of the
z-values thus computed are not exactly what you expect from a
standard normal distribution. The estimated power values in the
baseline are not independent (since in general overlapping time-
windows), resulting in an underestimated variance estimate.

A more appropriate estimate for the variance in the power would be
obtained from the baseline value over trials: e.g. something like this
  for each trial, compute avg power within baseline
  over all trials, compute mean power (1)
  over all trials, compute variance/stdev in power (2)
  for the average over all trials, for each timepoint subtract mean
of baseline (1) and divide by stdev (2)

That requires single trial power as input and average power as
output, which does not fit very well in the freqbaseline function.
> s there an inbuilt option to plot the spectrograms with
> multiplotTFR funcions 'as they are', i.e. without any baseline
> operations, just the raw values. So far I've been using imagesc on
> the data matrix, but would like to plot them in an arrangement
> specified by the .lay file.
multiplotTFR has the option cfg.baseline, which by default is 'no'.
So that should give you the desired behaviour.

> nd is there a way to compute a 2D representation of the frequency
> spectrum of a particular channel? Like a typical FFT plot with
> frequency on the x axis and power on the y axis?

That is done using multiplotER. The xxER functions (also topoplot)
work both on ERP and on frequency spectra (with no time).


best regards,
Robert


From r.oostenveld at FCDONDERS.RU.NL  Mon Dec  4 11:40:52 2006
From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld)
Date: Mon, 4 Dec 2006 11:40:52 +0100
Subject: importing  .avg neuroscan files
In-Reply-To: <002901c7167f$524f39d0$ae3c3680@D3K61L91>
Message-ID: <MON.4.DEC.2006.114052.0100.FIELDTRIP@NIC.SURFNET.NL>

Hi Thomas,

On 3 Dec 2006, at 3:04, Thomas Thesen wrote:
> I saw on the FieldTrip web site that you have a function to import
> average .avg files from Neuroscan. When I looked at
> read_fcdc_header.m I only found import routines for continous .cnt
> files from Neuroscan, but not for the .avg files. Did I look in the
> wrong place?

You are correct, that is missing. Please put attached updated
functions in fieldtrip/private and let me know whether it works
(private mail is ok).

If you have access to neuroscan software, could you please also check
whether the Nth or the (N+1)th sample should be attached with the
time zero? I.e. there is a one-sample uncertainly regarding the
offset in samples and the time-axis that fieldtrip associates with
the data. For the demo Neuroscan *.avg file that I have the
hdr.nSamplesPre=250, which means that in fieldtrip the 251th sample
would be associated with time=0. I can also imagine that the
Neuroscan header should be interpreted in a way so that the 250th
sample is ascociated with time=0. I hope that this problem/question
is clear and that you can aid in clarifying it.

Robert

PS the updated files will also be in the next ftp release


-------------- next part --------------
A non-text attachment was scrubbed...
Name: read_data.m
Type: application/octet-stream
Size: 25895 bytes
Desc: not available
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20061204/96295f9b/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: read_event.m
Type: application/octet-stream
Size: 26546 bytes
Desc: not available
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20061204/96295f9b/attachment-0001.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: read_header.m
Type: application/octet-stream
Size: 24078 bytes
Desc: not available
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20061204/96295f9b/attachment-0002.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: read_ns_avg.m
Type: application/octet-stream
Size: 2894 bytes
Desc: not available
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20061204/96295f9b/attachment-0003.obj>

From wibral at MPIH-FRANKFURT.MPG.DE  Tue Dec  5 11:09:25 2006
From: wibral at MPIH-FRANKFURT.MPG.DE (Michael Wibral)
Date: Tue, 5 Dec 2006 11:09:25 +0100
Subject: Reading data with trialfun_general
Message-ID: <TUE.5.DEC.2006.110925.0100.FIELDTRIP@NIC.SURFNET.NL>

Dear Robert,

I used the following lines in my code
%
cfg.trialdef.eventype = 'UPT001';
cfg.trialdef.eventvalue = 3 ; % or 5, or 7
cfg.trialdef.trigger = 3 ; % or 5, or 7
%
should the channel that carries the events really go into
cfg.trialdef.eventvalue ? Then I might indeed be misunderstanding
something.

Best Regards and many thanks,
Michael

>On 30 Nov 2006, at 10:40, Michael Wibral wrote:
>> i.e. it changes it from the first three numbers bigger than 1 to the
>> first three odd numbers that are bigger than one.
>> Is it possible that there is still some frontpanel+backpanel binary
>> addition going on - even in trialfun_general?
>
>What is the cfg.trialdef.eventvalue that us specify, 'UPPT001' or
>'backpanel trigger'? It should be the 'UPPT001', since that does not
>undergo the splitting of the values.
>
>Line 253-267 from private/read_event should be responsible for
>reading your UPPT001. There is one line there related to the signed
>vs unsigned nature of the data, which may have the effect that you
>describe (but unlikely).
>
>I suggest that you use the matlab debugger and set a breakpoint there
>in the code to plot "trig" and to look at the code in detail. Please
>let me know whether you can locate the problem. Alternatively, put a
>copy of your dataset (in a tar or zip file) on our ftp server: ftp://
>ftp.fcdonders.nl/pub/incoming and I will have a look.
>
>Robert


From lorina_naci at YAHOO.CO.UK  Tue Dec  5 20:35:10 2006
From: lorina_naci at YAHOO.CO.UK (Lorina Naci)
Date: Tue, 5 Dec 2006 19:35:10 +0000
Subject: Within-subject coherence statististics for virtual sources
In-Reply-To: <62856BC2-9AA0-4FA8-A241-7CB7E3F34A73@fcdonders.ru.nl>
Message-ID: <TUE.5.DEC.2006.193510.0000.FIELDTRIP@NIC.SURFNET.NL>

Dear Robert,
  Thanks so much for your help. I followed your suggestions can now run the scrip (as specified in your email below) and everything seems to work ok. However, that I am a bit surprised by the values that I get in the stat field.

  To recap, I am interested to test the probability that the following null hypothesis is correct: my two conditions, XM and Vis, do not differ significantly in their respective coherence values between one specific virtual channel/source (inferior frontal) and the rest of the channels/sources.

  As suggested, I specified in my script cfg.method = diff. I was expecting to be calculating the p value, for my test statistic which would be the dependent samples t test. However, in the stat field that I get from running the script, I have positive and negative values. This makes me wonder whether cfg.statistic = diff is calculating p values, or, if not, what is it calculating?

  By looking into the scrip of statfun_diff it seems that I am calculating the average difference between the two conditions. If this is the case, is there another script I could use to calculate whether this difference is statistically significant and get the p-values associated with this difference, similarly to how I am able to do with BESA for single subject data?

  From the other statfun_xxx functions in the fieldtrip private folder, I thought that the statfun_depsamplesT would be more appropriate for calculating the t statistic for my two conditions. However, when I modify my script by substituting cfg.statistic = diff for cfg.statistic = depsamplesT and run it, it crashes.

  I would greatly appreciate your help with this.

  Many thanks again,
  Lorina



Robert Oostenveld <r.oostenveld at FCDONDERS.RU.NL> wrote:
  Hi Lornia,

On 20 Nov 2006, at 19:32, Lorina Naci wrote:
> Thank you for sending me the modified script. Ive defined the
> cfg.neighbours{j}.label by entering one of my data structures.
> Also, Ive loaded all my subjects data structures which are saved
> in the file allsubjects.m
>
> I ran it but again it crashes, giving the same error pointing to
> the statistics_wrapper, saying that the input data could not be
> determined. I am attaching here my scrip and allsubjects.m
> Sorry to keep bothering you with this.

I found one small bug in your attached script

for j = 1:length(data1257Vis.label);
cfg.neighbours{j}.label = data1257Vis.label{j};
cgf.neighbours{j}.neighblabel = {}; <========== TYPO cgf->cfg
end

Furthermore, I do not understand why your attached script is a
mixture of fieldtrip code and your own code. You should put your own
code in a script (which does NOT start with "function"), and call
that script from the command line. The script should call the
freqstatistics function.

If I do the following using your data, it seems to work for me.

best regards,
Robert

%-------------------- script starts here --------------------

load allsubjects

cfg = [];
cfg.method = 'montecarlo';
cfg.statistic = 'diff';
% cfg.parameter = 'cohspctrm'; <==== it will always use powspctrm,
regardless of this parameter
cfg.numrandomization = 500;
cfg.design = [1 1 2 2 3 3 4 4 5 5 6 6; 1 2 1 2 1 2 1 2 1 2 1 2];
cfg.ivar = 2;
cfg.uvar = 1;
cfg.correctm = 'yes';
for j = 1:length(data1257Vis.label);
cfg.neighbours{j}.label = data1257Vis.label{j};
cfg.neighbours{j}.neighblabel = {};
end

stat = freqstatistics(cfg, data1257XM, data1257Vis, data1299XM,
data1299Vis, data349XM, data349Vis, data449XM, data449Vis, data732XM,
data732Vis, data868XM, data868Vis);


 Send instant messages to your online friends http://uk.messenger.yahoo.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20061205/57659a8c/attachment.htm>

From r.oostenveld at FCDONDERS.RU.NL  Tue Dec  5 21:23:29 2006
From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld)
Date: Tue, 5 Dec 2006 21:23:29 +0100
Subject: Reading data with trialfun_general
In-Reply-To: <06120511092586_2800013E@mpih-frankfurt.mpg.de>
Message-ID: <TUE.5.DEC.2006.212329.0100.FIELDTRIP@NIC.SURFNET.NL>

Hi Michael

On 5 Dec 2006, at 11:09, Michael Wibral wrote:
> I used the following lines in my code
> %
> cfg.trialdef.eventype = 'UPT001';
> cfg.trialdef.eventvalue = 3 ; % or 5, or 7
> cfg.trialdef.trigger = 3 ; % or 5, or 7
> %
> should the channel that carries the events really go into
> cfg.trialdef.eventvalue ? Then I might indeed be misunderstanding
> something.

Since the new CTF system can have triggers in multiple channels, it
is indeed neccessary to distinguish the different channels by their
name. So 'trigger' is not enough, but you need eventtype 'UPT001'. In
your code sample the element cfg.trialdef.trigger is not used by
trialfun_general. What is missing is the time before and after the
trigger.

See below for some sample code on a comparable dataset (275 channel
system, Munster). In this dataset there are events in the 'UPPT001'
trigger channel.

 >> cfg = [];
 >> cfg.dataset = 'A0132_Aud-Obj-Recognition_20051115_02.ds'
 >> cfg.trialdef.eventtype = 'UPPT001'
 >> cfg.trialdef.eventvalue = 4;
 >> cfg.trialdef.prestim = 0.2
 >> cfg.trialdef.poststim = 0.8

 >> cfg = definetrial(cfg)
evaluating trialfunction 'trialfun_general'
found 2389 events
created 148 trials

cfg =
        dataset: 'A0132_Aud-Obj-Recognition_20051115_02.ds'
       trialdef: [1x1 struct]
       datafile: 'A0132_Aud-Obj-Recognition_20051115_02.ds/A0132_Aud-
Obj-Recognition_20051115_02.meg4'
     headerfile: 'A0132_Aud-Obj-Recognition_20051115_02.ds/A0132_Aud-
Obj-Recognition_20051115_02.res4'
       trialfun: 'trialfun_general'
          event: [1x2389 struct]
            trl: [148x3 double]
        version: [1x1 struct]


%%%%%%%% also usefull is the following

cfg = []
cfg.dataset = 'A0132_Aud-Obj-Recognition_20051115_02.ds'
cfg.trialdef.eventtype = '?'
definetrial(cfg);
the following events were found in the datafile
event type: 'UPPT001' with event values: 2  3  4
event type: 'acousticTrg' with event values:
event type: 'do' with event values:
event type: 'doe' with event values:
event type: 'frontpanel trigger' with event values: 1  2  3  4
event type: 'go' with event values:
event type: 'goe' with event values:
event type: 'trial' with event values:
no trials have been defined yet, see DEFINETRIAL for further help
found 2389 events
created 0 trials

You can also read the help of read_fcdc_event and do
   event = read_fcdc_event(cfg.dataset)
and look into detail in the events.

best regards
Robert


From jan.schoffelen at FCDONDERS.RU.NL  Wed Dec  6 00:00:18 2006
From: jan.schoffelen at FCDONDERS.RU.NL (Jan Mathijs Schoffelen)
Date: Wed, 6 Dec 2006 00:00:18 +0100
Subject: Within-subject coherence statististics for virtual sources
Message-ID: <WED.6.DEC.2006.000018.0100.FIELDTRIP@NIC.SURFNET.NL>

Dear Lorina,

You have some virtual-channel coherence data, which you put into a .powspctrm-field to fool fieldtrip's routines, correct? These coherence-spectra you obtained from a bunch of subjects, and in different conditions. Now you want to test your null-hypothesis of exchangeability between the conditions, by means of a permutation test. So far so good, because the ingredients are there. Let's go through your questions:


> Dear Robert 
& CO,

>  Thanks so much for your help. I followed your suggestions can now 
> run the scrip (as specified in your email below) and everything 
> seems to work ok. However, that I am a bit surprised by the values 
> that I get in the stat field. 
>  As suggested, I specified in my script cfg.method = diff. I was 
> expecting to be calculating the p value, for my test statistic 
> which would be the dependent samples t test. However, in the stat 
> field that I get from running the script, I have positive and 
> negative values. This makes me wonder whether cfg.statistic = 
> diff is calculating p values, or, if not, what is it calculating? 

cfg.statistic = 'diff' means that the statistic that is computed is indeed the difference in coherence between the two conditions. It is done by calling the function statfun_diff, and you verified correctly that the function does what it claims to do. The probability which is obtained after the permutation is stored in the field .prob

>   
>  From the other statfun_xxx functions in the fieldtrip private 
> folder, I thought that the statfun_depsamplesT would be more 
> appropriate for calculating the t statistic for my two conditions. 
> However, when I modify my script by substituting cfg.statistic = 
> diff for cfg.statistic = depsamplesT and run it, it crashes.

could you be a bit more specific about why it crashes? Theoretically it shouldn't crash, but I am not aware of the intricacies of the function. It might be worthwile to check whether there is a statfun_paired-tstat in the release-version, which should do the same trick. From a practical point of view it does not matter whether you use a T-statistic or just the difference (the difference is just that you divide the diff between the two conditions by the variance of the diff between the two conditions).

Yours,

Jan-Mathijs


From r.oostenveld at FCDONDERS.RU.NL  Wed Dec  6 08:42:21 2006
From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld)
Date: Wed, 6 Dec 2006 08:42:21 +0100
Subject: operations on single precision numbers unstable in matlab 7.1
 (64bit ) vesions and higher
In-Reply-To: <456C31A9.9080300@fcdonders.ru.nl>
Message-ID: <WED.6.DEC.2006.084221.0100.FIELDTRIP@NIC.SURFNET.NL>

Dear FieldTrip users,

I have contacted Mathworks about this problem. They have been able to  
reproduce it, but were not able to provide a solution. I was informed  
that they expect itto be fixed in the next release of Matlab. I do  
not know when that release will be available.

The problem seems to be related to
http://www.mathworks.com/support/bugreports/details.html?rp=268001  
(login may be required)

Summary: MATLAB compatibility issue with Intel Math Kernel Library
Report ID: 268001
Date Last Modified: 09 Oct 2006
Product: MATLAB®
Exists In Version: 7.0.4, 7.1, 7.2, 7.3
Exists In Release: R14SP2, R14SP3, R2006a, R2006b
Fixed In Version: OPEN
Fixed In Release: OPEN
Summary: MATLAB compatibility issue with Intel Math Kernel Library
Description: MATLAB is not compatible with single precision BLAS  
routines from the Intel Math Kernel Library which return a single  
precision floating point number on 64-bit LINUX platforms.
Workaround: There are currently no known workarounds.

Therefore I want to stress that you should not use single precision  
computations on Intel 64 bit machines with Linux. You still can use  
single precision to save your data to file (using struct2single), but  
when you read it back in memory you should again convert it to double  
(struct2double).

In the Donders centre the problem exists on all mentat nodes except  
mentat001 and 002 (these are not affected). Furthermore, serval is  
affected. Other desktop linux computers in the Donders centre are not  
affected.

best regards,
Robert



On 28 Nov 2006, at 13:55, Ali Mazaheri wrote:
> ...
> A simple example of this problem is as follows
>
> a=[1 2]
> b=[1 2];
>
> >> a/b
> ans = 1
>
> NOW in single precision
>
> a=single(a);
> b=single(b);
> >> a/b
> ans = 1.9074 e-05


From sameer at ANDREW.CMU.EDU  Wed Dec  6 17:34:49 2006
From: sameer at ANDREW.CMU.EDU (Sameer Aroon Walawalkar)
Date: Wed, 6 Dec 2006 11:34:49 -0500
Subject: forward models
Message-ID: <WED.6.DEC.2006.113449.0500.FIELDTRIP@NIC.SURFNET.NL>

Hi all,

I am learning how to use fieldtrip to do DICS (voxel beamforming) on my
data.  To do this, I need leadfield using some forward model.  How do I
calculate the forward model for my setup?  My data is collected using
Elekta Neuromag (102 x 3 channels). Also, I have converted it to .mat
format, have extracted the trials etc and will be passing these files to
fieldtrip functions.

I am sorry that this is not a technical question about fieldtrip, but all
the information on fieldtrip help seems to be about CTF based forward
models and seem to use MRI scans.

Thanks,
Sameer


From lorina_naci at YAHOO.CO.UK  Fri Dec  8 13:00:45 2006
From: lorina_naci at YAHOO.CO.UK (Lorina Naci)
Date: Fri, 8 Dec 2006 12:00:45 +0000
Subject: Within-subject coherence statististics for virtual sources
In-Reply-To: <964d5304172c3.45760812@ru.nl>
Message-ID: <FRI.8.DEC.2006.120045.0000.FIELDTRIP@NIC.SURFNET.NL>

Dear Jan Mathijs and co,

thanks for following up with my queries. I feel very close to getting my result barring a few difficulties.

    > From the other statfun_xxx functions in the fieldtrip private
> folder, I thought that the statfun_depsamplesT would be more
> appropriate for calculating the t statistic for my two conditions.
> However, when I modify my script by substituting cfg.statistic =
> diff for cfg.statistic = depsamplesT and run it, it crashes.

could you be a bit more specific about why it crashes? Theoretically it shouldn't crash, but I am not aware of the intricacies of the function.

  I have run the script (attached) several times and get slightly different errors each time. The last error version i get is 'Segmentation violation occurred within signal handler. Unable to complete stack trace; stack was probably corrupted.' Any hints as to what this may mean? I've also attached here my data structures (6 subjects, two conditions (XM, Vis) each), just in case.

  >It might be worthwhile to check whether there is a statfun_paired-tstat in the release-version, >which should do the same trick.

  I did look into the most recent version of Fieldtrip (07.12.2006) and don't think this function is available.

  Many thanks,
  Lorina


 		
---------------------------------
 All New Yahoo! Mail  Tired of Vi at gr@! come-ons? Let our SpamGuard protect you.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20061208/2f271636/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: my_script_Tstat.m
Type: application/octet-stream
Size: 648 bytes
Desc: 2110732836-my_script_Tstat.m
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20061208/2f271636/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: allsubjects.mat
Type: application/octet-stream
Size: 769060 bytes
Desc: 2990736193-allsubjects.mat
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20061208/2f271636/attachment-0001.obj>

From r.oostenveld at FCDONDERS.RU.NL  Fri Dec  8 17:39:26 2006
From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld)
Date: Fri, 8 Dec 2006 17:39:26 +0100
Subject: forward models
In-Reply-To: <Pine.LNX.4.61-042.0612061132510.4111@unix33.andrew.cmu.edu>
Message-ID: <FRI.8.DEC.2006.173926.0100.FIELDTRIP@NIC.SURFNET.NL>

On 6 Dec 2006, at 17:34, Sameer Aroon Walawalkar wrote:
> I am learning how to use fieldtrip to do DICS (voxel beamforming)
> on my data.  To do this, I need leadfield using some forward
> model.  How do I calculate the forward model for my setup?  My data
> is collected using Elekta Neuromag (102 x 3 channels). Also, I have
> converted it to .mat format, have extracted the trials etc and will
> be passing these files to fieldtrip functions.

There is nothing specific about the forward models in fieldtrip for
CTF, except that fieldtrip can easily read CTF head models. See the
following FAQ
http://www2.ru.nl/fcdonders/fieldtrip/doku.php?
id=fieldtrip:documentation:frequently_asked_questions#what_kind_of_volum
e_conduction_models_are_implemented

There are the following options for neuromag.

1) You can use the headmodel and leadfields from the neuromag
software (requires the meg_calc toolbox). For that, you specify
cfg.hdmfile=your_fif_file_with_the_headmodel.

2) The alternative is to use prepare_singleshell or
prepare_localspheres (that can also fit a single sphere to teh
anatomy). Both functions require a correctly realigned individual
anatomical MRI of your subject (you can use volumerealign to help you
with the coordinate system specification). The output of these
prepare_xxx functinos is put into cfg.vol (the cfg.vol applies to
prepare_leadfield, sourceanalysis or dipolefitting).

3) Finally, you can specify a simple single-sphere model using
cfg.vol.r = radius
cfg.vol.o = origin
also this applies to prepare_leadfield, sourceanalysis or dipolefitting

> I am sorry that this is not a technical question about fieldtrip,
> but all the information on fieldtrip help seems to be about CTF
> based forward models and seem to use MRI scans.

Volume conductor models require geometrical information, and that
geometrical information is obtained from teh anatomical MRI. If you
do not have an anatomical MRI, then you do not know how the brain of
your subject was located with respect to the MEG sensors. You still
can use a single sphere model, but you would have to estimate the
radius and the position of the origin of the sphere. Look at
http://www2.ru.nl/fcdonders/fieldtrip/doku.php?
id=fieldtrip:documentation:frequently_asked_questions#how_are_the_differ
ent_head_and_mri_coordinate_systems_defined
for more informatino about coordinate systems (which you should be
aware of if you want to manually specify a volume conduction model).

best regards,
Robert


From sdim14hg at T2.TECHNION.AC.IL  Sun Dec 10 14:44:59 2006
From: sdim14hg at T2.TECHNION.AC.IL (Hanukaev Dmitri)
Date: Sun, 10 Dec 2006 14:44:59 +0100
Subject: loreta2fieldtrip
Message-ID: <SUN.10.DEC.2006.144459.0100.FIELDTRIP@NIC.SURFNET.NL>

Hello
we want to do T depandent statistic over group of subjects with two 
conditions to find time -space cluster for Loreta's output.As you advised 
we used a monte carlo method as in attached file.We use one person's data
and low number of rundomization to simplify function .
WE got error message :

"
??? In an assignment  A(:) = B, the number of elements in A and B
must be the same.

Error in ==> fieldtrip-20061202\private\clusterstat at 111
    tmp(cfg.inside) = postailobs;

Error in ==> statistics_montecarlo at 308
  stat = clusterstat(cfg, statrand, statobs);

Error in ==> fieldtrip-20061202\private\statistics_wrapper at 233
  [stat, cfg] = statmethod(cfg, dat, cfg.design);

Error in ==> sourcestatistics at 112
  stat = statistics_wrapper(cfg, varargin{:});%
***********************monte here

Error in ==> try1 at 25
stat = sourcestatistics(cfg, cond1{:}, cond2{:});  "

Can you help us? 
sincerely




-------------- next part --------------
clc;clear all;close all;


cond1{1}=loreta2fieldtrip('ao_low.slor');
cond1{2}=cond1{1};cond1{3}=cond1{1};cond1{4}=cond1{1};cond1{5}=cond1{1};cond1{6}=cond1{1};
cond1{7}=cond1{1};cond1{8}=cond1{1};cond1{9}=cond1{1};cond1{10}=cond1{1};

cond2{1}=loreta2fieldtrip('ao_emotionaly.slor');
cond2{2}=cond2{1};cond2{3}=cond2{1};cond2{4}=cond2{1};cond2{5}=cond2{1};cond2{6}=cond2{1};
cond2{7}=cond2{1};cond2{8}=cond2{1};cond2{9}=cond2{1};cond2{10}=cond2{1};
cfg.method='montecarlo';
 cfg.correctm='cluster';
  cfg.statistic= 'depsamplesT';
  cfg.parameter= 'mom';
  cfg.numrandomization=50;
  cfg.design = [1 1 1 1 1 1 1 1 1 1  2 2 2 2 2 2 2 2 2 2
                1 2 3 4 5 6 7 8 9 10   1 2 3 4 5 6 7 8 9 10     ] ;

cfg.ivar = 1; % row with the independent variable (condition) in the  design
cfg.uvar = 2; % row with the unit of observation (subject) in the
% design matrix;
stat = sourcestatistics(cfg, cond1{:}, cond2{:});





From sdim14hg at T2.TECHNION.AC.IL  Sun Dec 10 14:56:00 2006
From: sdim14hg at T2.TECHNION.AC.IL (Hanukaev Dmitri)
Date: Sun, 10 Dec 2006 14:56:00 +0100
Subject: loreta2fieldtrip correction
Message-ID: <SUN.10.DEC.2006.145600.0100.FIELDTRIP@NIC.SURFNET.NL>

Hello again

this is code we used:

clc;clear all;close all;


cond1{1}=loreta2fieldtrip('ao_low.slor');
cond1{2}=cond1{1};cond1{3}=cond1{1};cond1{4}=cond1{1};cond1{5}=cond1
{1};cond1{6}=cond1{1};
cond1{7}=cond1{1};cond1{8}=cond1{1};cond1{9}=cond1{1};cond1{10}=cond1{1};

cond2{1}=loreta2fieldtrip('ao_emotionaly.slor');
cond2{2}=cond2{1};cond2{3}=cond2{1};cond2{4}=cond2{1};cond2{5}=cond2
{1};cond2{6}=cond2{1};
cond2{7}=cond2{1};cond2{8}=cond2{1};cond2{9}=cond2{1};cond2{10}=cond2{1};
cfg.method='montecarlo';
 cfg.correctm='cluster';
  cfg.statistic= 'depsamplesT';
  cfg.parameter= 'mom';
  cfg.numrandomization=50;
  cfg.design = [1 1 1 1 1 1 1 1 1 1  2 2 2 2 2 2 2 2 2 2       
                1 2 3 4 5 6 7 8 9 10   1 2 3 4 5 6 7 8 9 10     ] ;
  
cfg.ivar = 1; % row with the independent variable (condition) in the  
design
cfg.uvar = 2; % row with the unit of observation (subject) in the  

stat = sourcestatistics(cfg, cond1{:}, cond2{:});


sincerely


From r.oostenveld at FCDONDERS.RU.NL  Mon Dec 11 12:16:43 2006
From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld)
Date: Mon, 11 Dec 2006 12:16:43 +0100
Subject: loreta2fieldtrip
In-Reply-To: <LISTSERV%200612101444599590.FDE7@NIC.SURFNET.NL>
Message-ID: <MON.11.DEC.2006.121643.0100.FIELDTRIP@NIC.SURFNET.NL>

On 10 Dec 2006, at 14:44, Hanukaev Dmitri wrote:

> we want to do T depandent statistic over group of subjects with two
> conditions to find time -space cluster for Loreta's output.As you
> advised
> we used a monte carlo method as in attached file.We use one
> person's data
> and low number of rundomization to simplify function .
> WE got error message :
>
> "
> ??? In an assignment  A(:) = B, the number of elements in A and B
> must be the same.
>
> Error in ==> fieldtrip-20061202\private\clusterstat at 111
>     tmp(cfg.inside) = postailobs;


You are doing an experimental 4D clustering (3x space plus 1x time).
That is not yet completely supported and requires some manual
tweaking. Let me explain.

The inside and outside refers to dipole locations inside or outside
the brain. See also http://www2.ru.nl/fcdonders/fieldtrip/doku.php?
id=fieldtrip:documentation:frequently_asked_questions#why_is_there_a_rim
_around_the_brain_for_which_the_source_reconstruction_is_not_computed
for more background.
Note that inside/outside in the FT code either be represented as a
list of indices (e.g. inside=[1 2 3 5], outside=[4]), or as a boolean
vector (inside=[1 1 1 0 1], no outside needed). For the moment
consider that it is a boolean vector.

The source reconstruction can be depicted as a matrix with NxM, where
N=number_of_voxels and M=number_of_timepoints. So the data may look
like this

 >> a = randn(5,3)  % some example data
a =
    -0.4326    1.1909   -0.1867
    -1.6656    1.1892    0.7258
     0.1253   -0.0376   -0.5883
     0.2877    0.3273    2.1832
    -1.1465    0.1746   -0.1364

 >> a(4,:) = nan   % the 4th voxel is not inside the brain, so no
source reconstruction there
a =
    -0.4326    1.1909   -0.1867
    -1.6656    1.1892    0.7258
     0.1253   -0.0376   -0.5883
        NaN       NaN       NaN
    -1.1465    0.1746   -0.1364

What I expect to be the problem here is that inside and outside
relate to voxels, and not to timepoints. Since you are clustering 4D,
the data of a single subject and the statistic that is computed over
all subjects is represented as a (N*M)x1 vector. So the first
dimension is number_of_space_time_points. The "inside" vector only
codes for the inside "space" points, i.e. only for the rows in the
NxM matrix, whereas it now should should index into a (N*M)x1 vector.

I.e. the data per subject is now represented as


 >> a(:)
ans =
    -0.4326
    -1.6656
     0.1253
        NaN
    -1.1465
     1.1909
     1.1892
    -0.0376
        NaN
     0.1746
    -0.1867
     0.7258
    -0.5883
        NaN
    -0.1364

So the "inside" indicator should also repeat itself 3 times for this
example.

Please do "dbstop if error" and use the matlab debugger to confirm
this. If it is indeed the case, then I suspect that you manually can
override the (normally automatic) cfg.inside option using a repeated
version of it. So something like

dum = zeros(prod(size(cond1{:}.dim),1))
dum(cond1{:}.inside)  = 1;
dum(cond1{:}.outside) = 0;

cfg.inside = repmat(dum, num_timepoints, 1);

Please let me know whether this works.


Robert


From conrado.bosman at GMAIL.COM  Mon Dec 11 14:20:54 2006
From: conrado.bosman at GMAIL.COM (Conrado Bosman)
Date: Mon, 11 Dec 2006 14:20:54 +0100
Subject: Error in trialfun_neuroscan_eeg function
Message-ID: <MON.11.DEC.2006.142054.0100.FIELDTRIP@NIC.SURFNET.NL>

Dear Fieldtrippers,
I'm currently work with old registers performed in a Neuroscan EEG
equipment.
I try to read the data using trialfun_neuroscan_eeg, but I got errors.
Checking the scripts, I think the problem could be because there is an
update in the fields names in the header, but not in the
trialfun_neuroscan_eeg.
As an example, in the first loop you have:

for k=1:hdr.nsweeps

but actually in the header nsweeps was renamed to nTrials.



Thanks

--
Conrado
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20061211/a40547a1/attachment.htm>

From r.oostenveld at FCDONDERS.RU.NL  Mon Dec 11 15:42:26 2006
From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld)
Date: Mon, 11 Dec 2006 15:42:26 +0100
Subject: Error in trialfun_neuroscan_eeg function
In-Reply-To: <d0870ef70612110520t3aadc999s7b4b28a0d689de9e@mail.gmail.com>
Message-ID: <MON.11.DEC.2006.154226.0100.FIELDTRIP@NIC.SURFNET.NL>

On 11 Dec 2006, at 14:20, Conrado Bosman wrote:
> I try to read the data using trialfun_neuroscan_eeg, but I got
> errors. Checking the scripts, I think the problem could be because
> there is an update in the fields names in the header, but not in
> the trialfun_neuroscan_eeg.
> As an example, in the first loop you have:
>
> for k=1:hdr.nsweeps
>
> but actually in the header nsweeps was renamed to nTrials.

Hi Conrado,

I suspect that it is easiest for you to fix the updated header
elements yourself in trialfun_neuroscan_eeg. Just rename it to
trialfun_conrado, and use your local working copy. Once it works,
please send me the fixed function and I will incorporate it in the
release version of FT.

Additionally, it should also be possible to use trialfun_general,
using cfg.eventtype ='trial'. Please do read_fcdc_event on your data
and see whether the event structure contains a trial event.

best regards,
Robert


From r.oostenveld at FCDONDERS.RU.NL  Tue Dec 12 14:50:13 2006
From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld)
Date: Tue, 12 Dec 2006 14:50:13 +0100
Subject: fellowship announcement
Message-ID: <TUE.12.DEC.2006.145013.0100.FIELDTRIP@NIC.SURFNET.NL>

Begin forwarded message:

> From: Allen Braun <brauna at nidcd.nih.gov>
> Date: 12 December 2006 14:21:29 GMT+01:00
> To: FIELDTRIP-request at NIC.SURFNET.NL
> Subject: <no subject>
>
> *****
>
> A postdoctoral fellowship is available immediately in the Language  
> Section,
> NIDCD, NIH Intramural Program, Bethesda, MD
>
> Our section conducts multimodal imaging studies of language  
> processing using
> hemodynamic (fMRI, PET), radiotracer (PET) and electrophysiological  
> (EEG,
> MEG) techniques.
>
> An ideal candidate would have experience with one or more of these  
> methods
> and/or computational methods used in the analysis of the data they  
> provide,
> and a strong interest in using these methods to study brain-language
> relationships
>
> Instrumentation available to our Section at The NIH Clinical Center  
> includes
> a 3T GE MRI instrument, GE Advance PET scanners, 275 channel CTF  
> MEG and
> Neuroscan EEG/ERP systems, as well as animal imaging facilities  
> using MRI,
> CT, PET and electrophysiological methods.
>
> The present position would be dedicated to studies of recovery in  
> aphasia –
> evaluating and modeling the natural history, and long term  
> neuroplastic
> reorganization and repair in this disorder - or other studies of  
> language
> and brain.
>
> The Language Section is a cooperative environment in which there is an
> opportunity to interact with postdoctoral fellows, graduate  
> students and
> technicians with a wide range of interests and skills.
>
> A PhD or MD degree is required.  Knowledge of fMRI or MEG and any  
> experience
> in using these methods to evaluate brain language relationships is  
> strongly
> preferred.  Experience in computer programming, image processing  
> will be
> advantageous as well. The fellowship carries an initial contract of  
> two
> years with an option to renew.  The typical duration of such a  
> fellowship is
> three years.
>
> Contact:
> Allen Braun, M.D.
> Chief, Language Section
> Voice, Speech and Language Branch
> National Institute on Deafness and
> Other Communication Disorders
> Building 10, Room 8S235A
> National Institutes of Health
> Bethesda, MD  20892
>
> Phone: 301-402-1497
> Fax: 301-451-5353
> brauna at nidcd.nih.gov
>
>
>


From Jan.Schoffelen at FCDONDERS.RU.NL  Fri Dec 15 10:09:15 2006
From: Jan.Schoffelen at FCDONDERS.RU.NL (Jan Mathijs Schoffelen)
Date: Fri, 15 Dec 2006 10:09:15 +0100
Subject: Within-subject coherence statististics for virtual sources
In-Reply-To: <22107.49124.qm@web28111.mail.ukl.yahoo.com>
Message-ID: <FRI.15.DEC.2006.100915.0100.FIELDTRIP@NIC.SURFNET.NL>

Dear Lorina,



It's a mystery. So when you specify cfg.statistic = 'diff' it does not
crash? It seems as if your computer has a hard time handling things, but
since the error is different each time, I don't think it's a directly
fieldtrip-related problem. I cannot find your data you attached to your
message.





Yours,



Jan-Mathijs



  _____

From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf
Of Lorina Naci
Sent: Friday, December 08, 2006 1:01 PM
To: FIELDTRIP at NIC.SURFNET.NL
Subject: Re: [FIELDTRIP] Within-subject coherence statististics for virtual
sources



Dear Jan Mathijs and co,


thanks for following up with my queries. I feel very close to getting my
result barring a few difficulties.

> From the other statfun_xxx functions in the fieldtrip 'private'
> folder, I thought that the statfun_depsamplesT would be more
> appropriate for calculating the t statistic for my two conditions.
> However, when I modify my script by substituting cfg.statistic =
> 'diff' for cfg.statistic = 'depsamplesT' and run it, it crashes.

could you be a bit more specific about why it crashes? Theoretically it
shouldn't crash, but I am not aware of the intricacies of the function.



I have run the script (attached) several times and get slightly different
errors each time. The last error version i get is 'Segmentation violation
occurred within signal handler. Unable to complete stack trace; stack was
probably corrupted.' Any hints as to what this may mean? I've also attached
here my data structures (6 subjects, two conditions (XM, Vis) each), just in
case.



>It might be worthwhile to check whether there is a statfun_paired-tstat in
the release-version, >which should do the same trick.



I did look into the most recent version of Fieldtrip (07.12.2006) and don't
think this function is available.



Many thanks,

Lorina



  _____

All
<http://us.rd.yahoo.com/mail/uk/taglines/default/nowyoucan/spamguard/*http:/
us.rd.yahoo.com/evt=40565/*http:/uk.docs.yahoo.com/nowyoucan.html>  New
Yahoo! Mail - Tired of Vi at gr@! come-ons? Let our SpamGuard protect you.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20061215/a2b62b39/attachment.htm>

From Jan.Schoffelen at FCDONDERS.RU.NL  Fri Dec 15 16:34:32 2006
From: Jan.Schoffelen at FCDONDERS.RU.NL (Jan Mathijs Schoffelen)
Date: Fri, 15 Dec 2006 16:34:32 +0100
Subject: Within-subject coherence statististics for virtual sources
In-Reply-To: <22107.49124.qm@web28111.mail.ukl.yahoo.com>
Message-ID: <FRI.15.DEC.2006.163432.0100.FIELDTRIP@NIC.SURFNET.NL>

Dear Lorina,



My outlook blocked your attached data. I managed to get it anyhow and ran
your script. It runs through just fine. Apparently FT is doing what it
should do.



Yours, JM



  _____

From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf
Of Lorina Naci
Sent: Friday, December 08, 2006 1:01 PM
To: FIELDTRIP at NIC.SURFNET.NL
Subject: Re: [FIELDTRIP] Within-subject coherence statististics for virtual
sources



Dear Jan Mathijs and co,


thanks for following up with my queries. I feel very close to getting my
result barring a few difficulties.

> From the other statfun_xxx functions in the fieldtrip 'private'
> folder, I thought that the statfun_depsamplesT would be more
> appropriate for calculating the t statistic for my two conditions.
> However, when I modify my script by substituting cfg.statistic =
> 'diff' for cfg.statistic = 'depsamplesT' and run it, it crashes.

could you be a bit more specific about why it crashes? Theoretically it
shouldn't crash, but I am not aware of the intricacies of the function.



I have run the script (attached) several times and get slightly different
errors each time. The last error version i get is 'Segmentation violation
occurred within signal handler. Unable to complete stack trace; stack was
probably corrupted.' Any hints as to what this may mean? I've also attached
here my data structures (6 subjects, two conditions (XM, Vis) each), just in
case.



>It might be worthwhile to check whether there is a statfun_paired-tstat in
the release-version, >which should do the same trick.



I did look into the most recent version of Fieldtrip (07.12.2006) and don't
think this function is available.



Many thanks,

Lorina



  _____

All
<http://us.rd.yahoo.com/mail/uk/taglines/default/nowyoucan/spamguard/*http:/
us.rd.yahoo.com/evt=40565/*http:/uk.docs.yahoo.com/nowyoucan.html>  New
Yahoo! Mail - Tired of Vi at gr@! come-ons? Let our SpamGuard protect you.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20061215/1a5b9b47/attachment.htm>

From marie at PSY.GLA.AC.UK  Fri Dec 15 16:46:22 2006
From: marie at PSY.GLA.AC.UK (Marie Smith)
Date: Fri, 15 Dec 2006 15:46:22 +0000
Subject: Positions to mri mapping
In-Reply-To: <FBB7A630-4929-4433-B320-70A53283734B@fcdonders.ru.nl>
Message-ID: <FRI.15.DEC.2006.154622.0000.FIELDTRIP@NIC.SURFNET.NL>

Hi Robert,

I was hoping you could help with another question that I have related
to fieldtrip. I'm not sure if you recall the analysis that I have
discussed with you in the past so I will quickly summarize where I am
with it and then explain the problem.

I have performed an lcmv beamformer analysis to estimate the single
time course at a regular grid of points within the brain space. At
each point inside the space (from source.inside) i computed the
reverse correlation with the bubbles stimuli to establish the
information sensitivity of that point. I would now like to go from
these points in a regular array to a more interpretable brain space.
I have been trying to do this myself looking at your
sourceinterpolate and prepare_dipole_grid functions to establish what
the x, y and z co-ordinates correspond to in terms of the brain
orientations but I am getting lost in the functions.  Would you be
able to tell me? I am assuming z - is the vertical direction from
chin to scalp, but x and y?

The other solution that I thought off was to replace the energy
values coming out of sourceanalysis with a score for the correlation
of the classification image at that point with a given facial feature
(e.g. left eye). Could I then put that in source2full and
sourceinterpolate along with the mri to establish illustrate the
sensitivity to that feature overlayed on the mri?

Thanks for any advice / suggestions you may have,

Marie


From r.oostenveld at FCDONDERS.RU.NL  Mon Dec 18 16:09:35 2006
From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld)
Date: Mon, 18 Dec 2006 16:09:35 +0100
Subject: Positions to mri mapping
In-Reply-To: <3D0AFD10-D9B1-4796-8456-5BA7040AC9A8@psy.gla.ac.uk>
Message-ID: <MON.18.DEC.2006.160935.0100.FIELDTRIP@NIC.SURFNET.NL>

Hi Marie

On 15 Dec 2006, at 16:46, Marie Smith wrote:
> I have performed an lcmv beamformer analysis to estimate the single
> time course at a regular grid of points within the brain space. At
> each point inside the space (from source.inside) i computed the
> reverse correlation with the bubbles stimuli to establish the
> information sensitivity of that point. I would now like to go from
> these points in a regular array to a more interpretable brain
> space. I have been trying to do this myself looking at your
> sourceinterpolate and prepare_dipole_grid functions to establish
> what the x, y and z co-ordinates correspond to in terms of the
> brain orientations but I am getting lost in the functions.  Would
> you be able to tell me? I am assuming z - is the vertical direction
> from chin to scalp, but x and y?

The dipole grid as constructed with fieldtrip/private/
prepare_dipole_grid is aligned with the x, y and z-axis of the head
coordinate system.That means for CTF that the  x-ax is going to the
nose, and the y-axis to the left ear.  The default is to make a 3D
box with positions that encompases the brain. Hence some positions
are inside the brain, and other positions are outside. The dipole
positions that are in the brain are coded in

source.pos(source.inside,:)

The positions are coded linearly, with the x as the fastest changing
index, then y, and then z.

For plotting the 3D volume, it is more convenient to have all the
positions in the 3D box, including the outside positions. So if you
compute a value "val" at all inside positions, you could do

tmp = zeros(source.dim);
tmp(source.inside)  = val;
tmp(source.outside) = 0;

and you would have a 3D array with the values all at the right
position. The source2full function is needed if you ghave a sparse
source representation, since in that case only the inside grid points
are retained, which makes inside=1:Ndipoles. Hence in a sparse source
representation the inside and outside in the sparse structure cannot
be used as above, but the original inside and outside first have to
be reconstructed (using the sparse positions in source.pos and the x/
y/zgrid fields).

> The other solution that I thought off was to replace the energy
> values coming out of sourceanalysis with a score for the
> correlation of the classification image at that point with a given
> facial feature (e.g. left eye). Could I then put that in
> source2full and sourceinterpolate along with the mri to establish
> illustrate the sensitivity to that feature overlayed on the mri?

For interpolating the values on the regular grid in headcoordinates
(i.e. the source grid) onto the regular grid in MRI coordinates, I
indeed would suggest to use the SOURCEINTERPOLATE function. In the
MRI the axis are not aligned to the head-coordinate axes (i.e. the
first dimension of the MRI 3D volume is not equal to x). The MRI uses
a homogenous transformation matrix to attach a head-coordinate
position to each MRI voxel, and the inverted transformation matrix
can be used to assign each head coortdinate point to a MRI voxel:
that is how sourceinterpolate works (except that sourceinterploate
also tries to do it in a memory efficient manner, which makes the
code more difficult to read).

I hope this helps,
Robert


This is a multi-part message in MIME format...

--Boundary_(ID_XhvWlEVLkFNhw6Xo7VxHqQ)
Content-type: text/plain
Content-transfer-encoding: 8BIT
Content-disposition: inline

This message has been marked as SPAM by the RU spamfilter. If this is
incorrect you could whitelist this file by clicking on the following URL:
https://svf.ru.nl/index.php?action=whitelist&session=VDy9kDaEhoSkRTLD3ryBv9Mw8EcdczAPbqfpv0cDmV4%3D&whitelistfrom=MAILER-DAEMON
If this does not work, copy and paste the URL into your browser.


Dit bericht is door het RU spamfilter als SPAM aangemerkt. Als dit niet juist is
kunt u de afzender op uw 'whitelist' zetten door op de volgende url te klikken:
https://svf.ru.nl/index.php?action=whitelist&session=VDy9kDaEhoSkRTLD3ryBv9Mw8EcdczAPbqfpv0cDmV4%3D&whitelistfrom=MAILER-DAEMON
Als dit niet werkt, knip deze link dan uit en plak hem in uw browser.


