.dat file is not read correctly

Do you have any information about the origin of this data file? Like what system it was recorded from? The .dat file you shared appears to have a single time series (first column time?, second column value) and no information about sensor name, position, units, etc. A file like this can be read into Python like so:

import numpy as np
import matplotlib.pyplot as plt

data = numpy.loadtxt("1_class_1.dat")
data = data.T
plt.plot(*data)
plt.show()

Figure_1

…and in theory you could then create an MNE object from it using RawArray:

import mne
times = data[0]
values = data[1]
sfreq = 1 / np.diff(times).mean()  # 250.0000000000236, maybe round this to 250?
info = mne.create_info(['mystery channel'], sfreq=sfreq)
raw = mne.io.RawArray(data=np.atleast_2d(values), info=info)

…but again, without knowing at least the units of measurement it’s hard to know what you might do with that.

1 Like