[FieldTrip] FT doesn't close .fif files
Alexandre Gramfort
gramfort at nmr.mgh.harvard.edu
Wed Feb 9 16:31:02 CET 2011
Hi,
> The design idea is that reading from files shoudl be
> stateless, i.e. prior and after each read operation the file should be
> closed. On modern file systems there is no penalty associated with that, and
> it keeps the code much cleaner. That is why fieldtrip does not have a
> ft_open_file and ft_close_file function, and why you cannot close the file
> (except with fclose('all')).
> Do you happen to know whether fiff_read_meas_info and fiff_setup_read_raw
> are supposed to keep the files open? I could not find a fiff_close function,
> do you know whether there is one?
fiff_setup_read_raw keeps the files open for subsequent calls of
fiff_read_raw_segment, fiff_read_raw_segment_times etc.
when done the file can be closed with :
fclose(raw.fid)
assuming you used:
raw = fiff_setup_read_raw(filename);
FYI (I wanted to wait but it seems to be a good occasion)
the mne-matlab code is now publicly hosted on line:
https://github.com/mne-tools/mne-matlab
latest commits:
https://github.com/mne-tools/mne-matlab/commits/master
the license of this code has been changed to BSD.
If you have feature request, bug reports or willing to contribute some code
that's a good place to do it. If you need help, just send me an email.
If fieldtripers turn out to modify the mne matlab code it would be great to
consider applying the modifications on the main repository.
Alex
--
Alexandre Gramfort, PhD
gramfort at nmr.mgh.harvard.edu
Dept. of Radiology MGH Martinos Center / Harvard Medical School
http://www-sop.inria.fr/members/Alexandre.Gramfort/
More information about the fieldtrip
mailing list