[FieldTrip] units of data sample read from neuroscan avg file is incorrect

Stephen Politzer-Ahles politzerahless at gmail.com
Sat Aug 3 13:50:40 CEST 2013

Hi Lizhuang,

I haven't used Fieldtrip to import .avg files so I'm not sure about this,
but I wonder if this is related to the same problem in EEGLAB. EEGLAB also
scales .avg files like this when importing them, for some reason, so if the
Fieldtrip function is based on EEGLAB code these issues may be related.
(However, I just looked at read_ns_avg.m, which is what ft_read_data calls,
and it doesn't say it's copied from EEGLAB). If you have EEGLAB, you can
add the custom function loadavg_bcl.m to your path (it is available at
http://sccn.ucsd.edu/pipermail/eeglablist/2011/003986.html, as one of the
attachments near the bottom), use that to import the .avg file, and then
use the EEGLAB function eeglab2fieldtrip() to get the data into FieldTrip.

Also, have you tried reading the data with ft_preprocessing() instead of
ft_read_data? ft_read_data is kind of a low-level function; in the past I
think I've had better luck just using ft_preprocessing.


Stephen Politzer-Ahles
New York University, Abu Dhabi
Psychology Department

> Message: 1
> Date: Sat, 03 Aug 2013 16:49:59 +0800
> From: lzyang <lzyang at ustc.edu.cn>
> To: fieldtrip at science.ru.nl
> Subject: [FieldTrip] units of data sample read from neuroscan avg file
>         is      incorrect
> Message-ID: <51FCC437.5070409 at ustc.edu.cn>
> Content-Type: text/plain; charset=GB2312
> Dear fieldtrip list,
> I used ft_read_data to read in .avg files (neuroscan format) to do some
> advanced analysis.
> data=ft_read_data('sham.avg', 'dataformat', 'ns_avg');
> I noticed that the unit of data sample read by this function is incorrect.
> Values of samples ranged from -0.1 to 0.1.
> I will appreciate if anyone can give me some hints on how to import avg
> files correctly using fieldtrip.
> Thanks very much!
> Best Regards,
> -Lizhuang
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20130803/306027b9/attachment-0002.html>

More information about the fieldtrip mailing list