Directly editing data values in mne.fiff.Raw object?

Hello,

I am trying to replace the data values in a Raw object in Python with data
I've gotten from somewhere else. (Because I did some ICA-related stuff
using other software already and rather than re-doing it, I'd like to just
load the .fif file in Python, load the other file in Python as well, and
then copy the data values from the other file into the Raw object and then
save it back to a new .fif file.)

However, the actual data values in the Raw object don't seem in a matrix
that I can just modify. It looks like they're inside of tuples which I
can't change (and it's not a 2-d array; for example, Raw[0] returns a tuple
of 2 arrays, each of which is <samples> long, the first is the data for the
first channel and the second is times). Is there any method for directly
modifying the data in a Raw object?

Thank you,
Steve

Stephen Politzer-Ahles
New York University, Abu Dhabi
Neuroscience of Language Lab
http://www.nyu.edu/projects/politzer-ahles/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.nmr.mgh.harvard.edu/pipermail/mne_analysis/attachments/20131204/0abc9461/attachment.html

Hi Steve,

This is because the data is only loaded from the file when accessing it,
unless you use "preload=True" when opening the raw file. To modify the
data directly, use "preload=True" and then modify "Raw._data", which is
a numpy array with all the data.

Note that this is not officially supported (hence the "_" prefix), so it
may change from one release to the next without warning (we don't have
plans to change it, just so you are aware of it).

Best,

Martin