[FieldTrip] FT doesn't close .fif files

Alexandre Gramfort gramfort at nmr.mgh.harvard.edu
Wed Feb 9 17:05:51 CET 2011


Hi Vladimir,

> So why does fiff_setup_read_raw take so long? Do you really need half
> a second to open a fif file or does it also read some header data not
> all of which is necessary?

fiff_setup_read_raw reads many things from the fif file:
- measurement info
- sampling rate
- first/last time sample

to do this it locates in the file the location of all the info (the fif tags).
So when you look for something in the file, you go down the tree
(in matlab) and that points you to the location in the file where to read.

> Could there perhaps be a faster version for
> repeated calls that would make it possible to keep fileio code
> stateless?

we could write a single function that does both :
fiff_setup_read_raw and fiff_read_raw_segment
if it can help.

Alex



More information about the fieldtrip mailing list