<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Hi Elisa,<div><br></div><div>did you check your .cfg of the output for demean and detrend? </div><div>Depending on the FT-Version you use, the defaults may be to demean and detrend your data which might center the data around 0.</div><div><br></div><div>See the help of your fr_resampledata-function for more info.</div><div><br></div><div>Best,</div><div><br></div><div>Julian</div><div><br></div><div><br><div>
<span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "><div><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; font-size: 12px; ">********************</div><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><b>Dr. Julian Keil</b></div><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><b><br></b></div>AG Multisensorische Integration<br>Psychiatrische Universitätsklinik<br>der Charité im St. Hedwig-Krankenhaus<br>Große Hamburger Straße 5-11, Raum E 307<br>10115 Berlin</div><div><br>Telefon: +49-30-2311-1879<br>Fax: +49-30-2311-2209 </div><div><a href="http://psy-ccm.charite.de/forschung/bildgebung/ag_multisensorische_integration">http://psy-ccm.charite.de/forschung/bildgebung/ag_multisensorische_integration</a></div></span>
</div>
<br><div><div>Am 28.04.2014 um 16:52 schrieb Elisa Carrus:</div><br class="Apple-interchange-newline"><blockquote type="cite">
<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
<div text="#000000" bgcolor="#FFFFFF">
Hi FT users,<br>
<br>
I am having some problems with resampling (downsampling) the data.<br>
<br>
Here is what I'm doing:<br>
<br>
I preprocess the continuous data to obtain band-pass filtered signal
in several frequencies (4-8,8-12,12-30, etc), also taking the abs
value of the Hilbert transform. The absolute value of the Hilbert is
ultimately what I need.<br>
<br>
I have used the following code:<br>
<i><br>
</i><i>cfg = [];</i><i><br>
</i><i>cfg.channel = 'MEG';</i><i><br>
</i><i>cfg.demean = 'yes';</i><i><br>
</i><i>cfg.detrend = 'yes';</i><i><br>
</i><i>cfg.lpfilter = 'yes';</i><i><br>
</i><i>cfg.hilbert = 'abs';</i><i><br>
</i><i>cfg.hpfilter = 'yes';</i><i><br>
</i><i>cfg.hilbert = 'abs';</i><i><br>
</i><i>cfg.lpfreq = 30;</i><i><br>
</i><i>cfg.hpfreq = 12;</i><i><br>
</i><i>cfg.dataset = '0061_syntask_02_raw_ssst_td.fif';</i><i><br>
</i><i>cfg.continuous = 'yes';</i><i><br>
</i><i>beta = ft_preprocessing(cfg);</i><i><br>
</i><br>
After this, I epoch the data as follows<br>
<br>
<i>cfg = [];</i><i><br>
</i><i>cfg.trl = trl2; % this is a trial definition previously
created</i><i><br>
</i><i>beta_ep = ft_redefinetrial(cfg,beta);</i><br>
<br>
and then I downsample as follows:<br>
<br>
<i>cfg = [];</i><i><br>
</i><i>cfg.resamplefs = 500;</i><i><br>
</i><i>beta_epdw = ft_resampledata(cfg, beta_ep)</i><br>
<br>
I don't encounter any errors, but the strange thing is that the data
looks fine up to before I downsample (i.e.g. if I plot one trial,
it's all positive values, as I would expect from the abs of the
Hilbert), but if I plot the downsampled data, the signal has both
negative and positive values. <br>
<br>
Is there something I'm missing? <br>
<br>
Thanks a lot if you can help,<br>
<br>
Elisa<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
</div>
_______________________________________________<br>fieldtrip mailing list<br><a href="mailto:fieldtrip@donders.ru.nl">fieldtrip@donders.ru.nl</a><br>http://mailman.science.ru.nl/mailman/listinfo/fieldtrip</blockquote></div><br></div></body></html>