- MNE version: 1.8.0
- operating system: e.g. Windows 11
I recorded SSVEP based BCI Paradigm EEG signal using Mitsar SmartBCIx24 (19 channel) acquisition system. I recorded the signal for 5.6 minutes with sampling frequency of 256 Hz. I exported that signal in .DAT format and imported that EEG file in python.
Then the signal values are extracted and created an MNE object using that data. Raw data is in the shape of [19, 86416]. If I plot that signal using “raw_mne.plot(scalings=‘auto’, title=‘EEG Data’, show=True)”, it shows the EEG signal for 5.6 minutes. But there is an scaling issues occurred in that plot, where, It I tried to visualize 2 second data, the signal becomes flat line. I had attached that code and EEG signal file and its output for the reference. Kindly explain the issue and rectify it. Thank you.
Python code:
import pandas as pd
import numpy as np
import mne
# Define the file path
file_path = r"C:\Users\Barath\Desktop\MITSAR_RAW\14_11_24\win_eeg_formats\SSVEP_EEG.txt"
# Load the data into a DataFrame, assuming tab or space-separated values
# Adjust delimiter if necessary (e.g., ',' for comma-separated)
eeg_data = pd.read_csv(file_path, delimiter='\t', header=None) # Use '\t' for tab, adjust if needed
# Split each row into 19 separate columns
# Use space as the delimiter within each row and expand to 19 columns
eeg_data_corrected = eeg_data[0].str.split(expand=True).astype(float)
raw_data = eeg_data_corrected.T
print("Shape of the raw data", raw_data.shape)
# Define sampling frequency and channel info
sfreq = 256 # Sampling frequency in Hz
n_channels = raw_data.shape[0] # Number of EEG channels
channel_names = [f"EEG {i+1}" for i in range(n_channels)]
channel_types = ['eeg'] * n_channels
# Create MNE Info object
info = mne.create_info(ch_names=channel_names, sfreq=sfreq, ch_types=channel_types)
# Create RawArray object
raw_mne = mne.io.RawArray(raw_data.values, info)
# Plot the EEG data
raw_mne.plot(scalings='auto', title='EEG Data', show=True)
I also attached the google drive file link to download data file below for the reference,