[Mne_analysis] option preload=True versus preload='True'

Brunner, Clemens (clemens.brunner@uni-graz.at) clemens.brunner at uni-graz.at
Thu Apr 19 03:50:06 EDT 2018
Search archives:

Hi Burkhard!

This behavior is documented in the docstring of mne.io.read_raw_fif:

preload : bool or str (default False)
    Preload data into memory for data manipulation and faster indexing.
    If True, the data will be preloaded into memory (fast, requires
    large amount of memory). If preload is a string, preload is the
    file name of a memory-mapped file which is used to store the data
    on the hard drive (slower, requires less memory).

Clemens


> On Apr 19, 2018, at 09:26, Burkhard Maess <maess at cbs.mpg.de> wrote:
> 
> Hallo, dear MNE-Python team,
> 
> recently, I realized that the preload option in mne.io.read_raw_fif offers more than I expected. Below is the line of code, which provides the expected bahaviour, i.e. it opens the rawdata fif file and preloads the data into RAM:
> rawdata = mne.io.read_raw_fif(name_of_rawdata_fif,preload=True)
> 
> Changing the type of the option value from boolean into string does not throw an error message, but instead it creates a file called True within the current working directory. This is obsiously no preloading into RAM, isn't it? Or does this file work as a buffer? Is this behavior intended or a bug?
> rawdata = mne.io.read_raw_fif(name_of_rawdata_fif,preload='True')
> 
> Interestingly, the loglevel DEBUG does not tell about creating the funny file True.
> 
> cheers,
> Burkhard
> 
> 
> 
> --
> Dr. Burkhard Maess
> Max Planck Institute for Human Cognitive and Brain Sciences
> Stephanstr. 1a, D-04301 Leipzig, Germany
> phone/fax: +49 341 9940-2526/-2511   mail: maess 'at' cbs.mpg.de,   http://www.cbs.mpg.de
> _______________________________________________
> Mne_analysis mailing list
> Mne_analysis at nmr.mgh.harvard.edu
> https://mail.nmr.mgh.harvard.edu/mailman/listinfo/mne_analysis
> 
> 
> The information in this e-mail is intended only for the person to whom it is
> addressed. If you believe this e-mail was sent to you in error and the e-mail
> contains patient information, please contact the Partners Compliance HelpLine at
> http://www.partners.org/complianceline . If the e-mail was sent to you in error
> but does not contain patient information, please contact the sender and properly
> dispose of the e-mail.
> 




More information about the Mne_analysis mailing list