[FieldTrip] FieldTrip data format

Eelke Spaak eelke.spaak at donders.ru.nl
Tue Nov 18 13:59:43 CET 2014


Dear Xiong Xiao,

First, in general, I would recommend you send questions like this to
the general FieldTrip mailing list (cc), instead of to any of the
developers personally. Responses on the general list will usually be
faster, and will benefit other FieldTrip users as well. See here:
http://fieldtrip.fcdonders.nl/discussion_list for instructions how to
register.

Then, I have never worked with the spike data formats, so I cannot
tell you how to import them into FieldTrip. You could have a look at
the various ft_datatype_xxx functions, which outline the structure of
the data format.

Best,
Eelke



On 10 November 2014 15:06, Xiong Xiao <xxiong at ion.ac.cn> wrote:
>   Hi Eelke,
> Sorry to trouble you, but I really want to use FieldTrip for my data
> analysis. I am a graduate student from the Institute of Neuroscience,
> Shanghai. I am a new FieldTrp user with good programming skills. But I
> totally do not know how to convert my raw data (spikes, LFP and events) into
> appropriate format for using FieldTrip. So I converted my data (spikes, LFP
> and events) into .nex format. However, error occured when I read the events
> from .nex files; but it was OK to read spikes.
>
> BTW, the data was converted to .nex files by using the toolbox provided by
> NeuroExplorer.
>
> spike = ft_read_spike('xx1_SpikeEvents.nex');
> cfg              = [];
> cfg.spikechannel = {'N1xx1', 'N1xx3'}; % select only the two single units
> spike = ft_spike_select(cfg, spike);
>
> event = ft_read_event('xx1_SpikeEvents.nex');  % there is error here
>
>
> Error message:
> Attempted to access adindx(1); index out of bounds because numel(adindx)=0.
>
> Error in read_nex_event (line 38)
> smpfrq = hdr.varheader(adindx(1)).wfrequency;
>
> Error in ft_read_event (line 1528)
>     event = read_nex_event(filename);
>
>
> Still I think this is not so convenient to convert my data into .nex files
> and then to process it. Is there some other ways to convert the data into
> appropriate formats?
>
> The structure of my data is like this:
>
> (1) Spikes:  cell structure,  { n*1 vector (timestamps) }
>
> (2) Waveform: cell structure, { n*4*32 matrix (waveforms for tetrodes)}
>
> (2) Events:   m*2 matrix (the first column is the onset time of events, and
> the second column is the duration of each event)
>
> (3) LFP: lfp (1*n vector, voltage of the LFP signal), lfp_time (1*n vector,
> time of the LFP signal)
>
>
>
> Thank you for your time.
>
> Best regards,
> Xiong Xiao
>
> ________________________________
> *************************************************
> PhD student
> Lab of Neural Circuits and Animal Behavior
> Institute of Neuroscience, Chinese Academy of Sciences
> Room A0738, The New Life Science Building
> 320, Yue Yang Road
> Shanghai 200031, China
> Email: xxiong at ion.ac.cn
> Phone: 86-21-54921769
> Web: http://www.ion.ac.cn/laboratories/int.asp?id=46
> *************************************************



More information about the fieldtrip mailing list