I have EEG data that comes in the form of a 3D numpy array (epoch * channel * timepoint). timepoint is a 256 element array containing each sampled timepoint (1s total, at 256Hz). epoch is an experimental trial.

I'm trying to import the numpy array into a form Python-MNE (http://martinos.org/mne/stable/mne-python.html) understands, but I'm having some trouble

First, I'm not sure if I should be importing this raw data as a RawArray or an EpochsArray. I tried the latter with this:

ch_names = list containing my 64 eeg channel names
allData = 3d numpy array as described above

info = mne.create_info(ch_names, 256, ch_types='eeg')

event_id = 1

#I got this from a tutorial but really unsure what it does and I think this may be the problem
events = np.array([200, event_id])  #I got this from a tutorial but really unsure what it does and I think this may be the problem

raw = mne.EpochsArray(allData, info, events=events)

picks = mne.pick_types(info, meg=False, eeg=True, misc=False)

raw.plot(picks=picks, show=True, block=True)

When I run this I get an index error: "too many indices for array"

Ultimately I want to do some STFT and CSP analysis on the data, but right now I'm in need of some help with the initial restructuring and importing into MNE.

Whats the correct way to import this numpy data that would make it easiest to complete my intended analyses?


closed as off-topic by AliceD, Christian Hummeluhr, user7759, rmayer06, Josh de Leeuw Aug 14 '15 at 13:24

  • This question does not appear to be about psychology or neuroscience within the scope defined in the help center.
If this question can be reworded to fit the rules in the help center, please edit the question.

  • 5
    $\begingroup$ I'm voting to close this question as off-topic because this is likely better off at StackOverflow. In the end the question boils down to "var X too big for buffer Y, how come?" That X happens to be DAQ input is secondarily important. Hence, vote to close. $\endgroup$ – AliceD Aug 12 '15 at 10:25