[FieldTrip] problem with ft_resampledata after ft_preprocessing (inc. Hilbert)

Julian Keil julian.keil at gmail.com
Mon Apr 28 17:32:07 CEST 2014


Hi Elisa,

did you check your .cfg of the output for demean and detrend? 
Depending on the FT-Version you use, the defaults may be to demean and detrend your data which might center the data around 0.

See the help of your fr_resampledata-function for more info.

Best,

Julian


********************
Dr. Julian Keil

AG Multisensorische Integration
Psychiatrische Universitätsklinik
der Charité im St. Hedwig-Krankenhaus
Große Hamburger Straße 5-11, Raum E 307
10115 Berlin

Telefon: +49-30-2311-1879
Fax:        +49-30-2311-2209 
http://psy-ccm.charite.de/forschung/bildgebung/ag_multisensorische_integration

Am 28.04.2014 um 16:52 schrieb Elisa Carrus:

> Hi FT users,
> 
> I am having some problems with resampling (downsampling) the data.
> 
> Here is what I'm doing:
> 
> 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.
> 
> I have used the following code:
> 
> cfg = [];
> cfg.channel = 'MEG';
> cfg.demean = 'yes';
> cfg.detrend = 'yes';
> cfg.lpfilter = 'yes';
> cfg.hilbert = 'abs';
> cfg.hpfilter = 'yes';
> cfg.hilbert = 'abs';
> cfg.lpfreq = 30;
> cfg.hpfreq = 12;
> cfg.dataset = '0061_syntask_02_raw_ssst_td.fif';
> cfg.continuous = 'yes';
> beta = ft_preprocessing(cfg);
> 
> After this, I epoch the data as follows
> 
> cfg = [];
> cfg.trl = trl2; % this is a trial definition previously created
> beta_ep = ft_redefinetrial(cfg,beta);
> 
> and then I downsample as follows:
> 
> cfg = [];
> cfg.resamplefs = 500;
> beta_epdw = ft_resampledata(cfg, beta_ep)
> 
> 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. 
> 
> Is there something I'm missing? 
> 
> Thanks a lot if you can help,
> 
> Elisa
> 
> 
> 
> 
> 
> 
> 
> _______________________________________________
> fieldtrip mailing list
> fieldtrip at donders.ru.nl
> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20140428/c2a251fd/attachment-0002.html>


More information about the fieldtrip mailing list