Overwriting data in raw fif file

Hi,

I have some data saved in a matlab array that I'd like to do source
localization on. I was thinking of replacing the data in an existing raw
fif file (created in mne-python by reading in a brainvision file) with the
matlab data, so that the subject-specific info and other parameters in the
mne raw object will be preserved. I'm doing this using:

rawcopy = raw.copy()
rawcopy._data = matlabdata

I noticed that raw._data is in a 'memmap' format, whereas matlab data read
into Python is in the 'array' format. Is it ok to replace the memmap data
with the array data as I'm doing above, or will it cause processing
problems? What's the difference between the memmap and array formats?

Thanks and Best Regards,
Gladia
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.nmr.mgh.harvard.edu/pipermail/mne_analysis/attachments/20170717/71633ac0/attachment.html

Hi Gladia,

I have some data saved in a matlab array that I'd like to do source
localization on. I was thinking of replacing the data in an existing raw fif
file (created in mne-python by reading in a brainvision file) with the
matlab data, so that the subject-specific info and other parameters in the
mne raw object will be preserved. I'm doing this using:

rawcopy = raw.copy()
rawcopy._data = matlabdata

yes that will work but you'll need channel locations for source reconstruction.

I noticed that raw._data is in a 'memmap' format, whereas matlab data read
into Python is in the 'array' format. Is it ok to replace the memmap data
with the array data as I'm doing above, or will it cause processing
problems? What's the difference between the memmap and array formats?

memmap allows to have the data on disk and not in memory.

HTH
Alex