Hi all,
I am currently working on running some based time-series analyses on some pupil data. I’m currently running into an issue where the plot_image()
function in conjunction with the 'bio'
data channel.
I am running MNE version 1.3.0, Python 3.10.8, on a Windows 10 system.
Specifically, the code I’m working with is the following:
n_channels = ['eye_x','eye_y','Pupil Area']
sampling_freq = 500 # in Hertz
info = mne.create_info(n_channels, sfreq=sampling_freq, ch_types='bio')
evnt, evntd = mne.events_from_annotations(raws[0])
epochs = mne.Epochs(raws[0], evnt, event_id=evntd,
preload=True, tmin= -0.5, tmax = 0.5,
baseline=(-0.3, 0), picks=['Pupil Area']
)
epochs.plot_image(picks=['Pupil Area'])
raws[0] is a concatenated raw object (I concatenated multiple individual blocks for one participant to create a time-course over the entire experiment) using the info object I instantiated above. The issue is that i get the following error message **ValueError**: axes must be an array-like of length 0, but the length is 1
from _validate_if_list_of_axes()
when attempting to plot the epoched data (calling either conditions or generally).
However, if I change this to another data channel (only tried with MEG or EEG) I do not get this error and the epoched data are plotted but for obvious reasons, the units are not appropriate. I would much rather the 'bio'
arbitrary units, at least in lieu of being able to manually adjust these myself.
I was wondering if someone had some insight as to what is going on. For completeness a sample of the epochs data, events data, and event dictionary are posted here:
epochs:
array([[[ -96.67549669, -96.67549669, -96.67549669, ...,
209.32450331, 209.32450331, 210.32450331]],
(there is more data there i just posted the first snippet)
events
array([[ 308, 0, 12],
[ 1903, 0, 11],
[ 3366, 0, 10],
...,
[1022141, 0, 2],
[1023016, 0, 8],
[1023753, 0, 11]])
event dictionary
{'119': 1,
'129': 2,
'139': 3,
'149': 4,
'219': 5,
'229': 6,
'239': 7,
'249': 8,
'319': 9,
'329': 10,
'339': 11,
'349': 12}
Any help would be much appreciated and if there is anything more I could provide to help please let me know.
Cheers, Andrew