[FieldTrip] problem with ft_resampledata after ft_preprocessing (inc. Hilbert)
Elisa Carrus
elisa at csl.psychol.cam.ac.uk
Mon Apr 28 16:52:56 CEST 2014
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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20140428/ee0ebeb4/attachment.html>
More information about the fieldtrip
mailing list