<div dir="ltr"><div>Dear Hweeling,</div><div><br></div><div>ft_apply_montage is the function that you are looking for.</div><div><a href="http://fieldtrip.fcdonders.nl/reference/ft_apply_montage">http://fieldtrip.fcdonders.nl/reference/ft_apply_montage</a></div>
<div><br></div><div>The documentation for that function shows exactly what you want to do.</div><div><br></div><div>Pierre</div><div class="gmail_extra"><br clear="all"><div><div dir="ltr"><div>--</div><div style="font-family:arial">
<font size="1">Pierre Mégevand, MD, PhD</font></div><div style="font-family:arial"><font size="1">Post-doctoral research fellow</font></div><div><span style="font-family:arial"><font size="1">Laboratory for Multimodal Human Brain Mapping</font></span></div>
<div><span style="font-family:arial;font-size:x-small">Feinstein Institute for Medical Research</span><br></div><div style="font-family:arial"><font size="1">Manhasset, NY, USA</font><br></div></div></div>
<br><br><div class="gmail_quote">On Tue, Feb 25, 2014 at 6:00 AM,  <span dir="ltr"><<a href="mailto:fieldtrip-request@science.ru.nl" target="_blank">fieldtrip-request@science.ru.nl</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Send fieldtrip mailing list submissions to<br>
        <a href="mailto:fieldtrip@science.ru.nl">fieldtrip@science.ru.nl</a><br>
<br>
To subscribe or unsubscribe via the World Wide Web, visit<br>
        <a href="http://mailman.science.ru.nl/mailman/listinfo/fieldtrip" target="_blank">http://mailman.science.ru.nl/mailman/listinfo/fieldtrip</a><br>
or, via email, send a message with subject or body 'help' to<br>
        <a href="mailto:fieldtrip-request@science.ru.nl">fieldtrip-request@science.ru.nl</a><br>
<br>
You can reach the person managing the list at<br>
        <a href="mailto:fieldtrip-owner@science.ru.nl">fieldtrip-owner@science.ru.nl</a><br>
<br>
When replying, please edit your Subject line so it is more specific<br>
than "Re: Contents of fieldtrip digest..."<br>
<br>
<br>
Today's Topics:<br>
<br>
   1. Referencing (Hwee Ling Lee)<br>
   2. Band Limited Power Analysis in Fieldtrip? (Ian M. Andolina)<br>
<br>
<br>
----------------------------------------------------------------------<br>
<br>
Message: 1<br>
Date: Tue, 25 Feb 2014 10:32:39 +0100<br>
From: Hwee Ling Lee <<a href="mailto:hweeling.lee@gmail.com">hweeling.lee@gmail.com</a>><br>
To: FieldTrip discussion list <<a href="mailto:fieldtrip@science.ru.nl">fieldtrip@science.ru.nl</a>><br>
Subject: [FieldTrip] Referencing<br>
Message-ID:<br>
        <CABG7z0RBBMJCuXCsAN=<a href="mailto:BkryfFvXKuLR2SNpdTxsjWN_rQcAKEA@mail.gmail.com">BkryfFvXKuLR2SNpdTxsjWN_rQcAKEA@mail.gmail.com</a>><br>
Content-Type: text/plain; charset="iso-8859-1"<br>
<br>
Dear all,<br>
<br>
I have 4 electrodes, and I would like to reference my data by subtracting<br>
from the neighbouring electrode. In other words, E2-E1, E3-E2, E4-E3.<br>
<br>
I was wondering if there is an easier way in fieldtrip to perform this<br>
calculation, and then to change the data structure with these new channel<br>
labels.<br>
<br>
Thanks.<br>
<br>
Cheers,<br>
Hweeling<br>
-------------- next part --------------<br>
An HTML attachment was scrubbed...<br>
URL: <<a href="http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20140225/78be03db/attachment-0001.html" target="_blank">http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20140225/78be03db/attachment-0001.html</a>><br>

<br>
------------------------------<br>
<br>
Message: 2<br>
Date: Tue, 25 Feb 2014 10:25:02 +0000<br>
From: "Ian M. Andolina" <<a href="mailto:i.andolina@ucl.ac.uk">i.andolina@ucl.ac.uk</a>><br>
To: <<a href="mailto:fieldtrip@science.ru.nl">fieldtrip@science.ru.nl</a>><br>
Subject: [FieldTrip] Band Limited Power Analysis in Fieldtrip?<br>
Message-ID: <<a href="mailto:530C6F7E.2000702@ucl.ac.uk">530C6F7E.2000702@ucl.ac.uk</a>><br>
Content-Type: text/plain; charset="utf-8"; Format="flowed"<br>
<br>
Hi, I wanted to use Fieldtrip to recreate the methodology used in a<br>
paper by Leopold et al., 2003<br>
<<a href="http://dx.doi.org/10.1093/cercor/13.4.422" target="_blank">http://dx.doi.org/10.1093/cercor/13.4.422</a>> ? the relevant methods<br>
section is the following:<br>
<br>
/?The LFP signals were resampled to 1 kHz, and then band-pass filtered<br>
into seven frequency ranges using a second order, bi-directional,<br>
zero-phase Chebyshev type-1 filter. The frequency ranges, as well as<br>
their rough mapping onto classically defined electroencephalographic<br>
conventions, were the following: ? (1?4 Hz), ? (5?8 Hz), ? (9?14 Hz), ?<br>
(15?30 Hz), ?L (30?50 Hz), ?H (50?100 Hz), and ?VH (100?150 Hz). The<br>
resulting band-limited signals were full-wave rectified by taking their<br>
absolute value. They were then resampled to 20 Hz after low-pass<br>
filtering with an eighth order Chebyshev type-1 filter (cutoff = 8 Hz).?/<br>
<br>
My LFP data is sampled at 1kHz, and I manually pad with data either side<br>
of the event triggered region of interest. Fieldtrip doesn?t have a<br>
|chebyshev type-1| filter, but would a second order two-pass (aka zero<br>
phase?) butterworth be good enough considering the frequency bands used?<br>
I?m using the following cfg passed to |ft_preprocessing| for the initial<br>
bandpass filtering and rectification:<br>
<br>
|freq ={[1  4], [5  8], [9  14], [15  30], [30  50], [50  100], [100  150]};<br>
for  j  =1:length(freq)<br>
  cfg                        =[];<br>
  cfg.padding                =0;<br>
  cfg.bpfilter            ='yes';<br>
  cfg.bpfilttype            ='but';<br>
  cfg.bpfreq                = freq{j};<br>
  cfg.bpfiltdir            ='twopass';<br>
  cfg.bpfiltord            =2;<br>
  cfg.bpinstabilityfix    ='reduce';<br>
  cfg.rectify                ='yes';<br>
  bp{j}  = ft_preprocessing(cfg,ft);<br>
end<br>
|<br>
<br>
As far as I can see in |ft_preprocessing| rectification occurs after<br>
filtering, so this is as specified by Leopold /et al.,/<br>
<br>
Then for downsampling/resampling:<br>
<br>
|cfg                        =[];<br>
cfg.padding                =0;<br>
cfg.lpfilter            ='yes';<br>
cfg.lpfreq                =8;<br>
cfg.lpfilttype            ='but';<br>
cfg.lpfiltdir            ='twopass';<br>
cfg.lpfiltord            =8;<br>
cfg.lpinstabilityfix    ='reduce';<br>
bp{j}  = ft_preprocessing(cfg,bp{j});<br>
cfg                        =[];<br>
cfg.resample            ='yes';<br>
cfg.resamplefs            =20;<br>
cfg.detrend                ='no';<br>
bp{j}  = ft_resampledata(cfg,bp{j});<br>
|<br>
<br>
Does this seem a correct translation of this method in Fieldtrip? Are<br>
there any caveats other than the filter differences?<br>
<br>
Thanks, Ian<br>
<br>
-------------- next part --------------<br>
An HTML attachment was scrubbed...<br>
URL: <<a href="http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20140225/a73da687/attachment-0001.html" target="_blank">http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20140225/a73da687/attachment-0001.html</a>><br>

<br>
------------------------------<br>
<br>
_______________________________________________<br>
fieldtrip mailing list<br>
<a href="mailto:fieldtrip@donders.ru.nl">fieldtrip@donders.ru.nl</a><br>
<a href="http://mailman.science.ru.nl/mailman/listinfo/fieldtrip" target="_blank">http://mailman.science.ru.nl/mailman/listinfo/fieldtrip</a><br>
<br>
End of fieldtrip Digest, Vol 39, Issue 44<br>
*****************************************<br>
</blockquote></div><br></div></div>