Split large muse files into smaller ones


#1

Hi everyone,

I have a large muse file (about 90 minutes of recording) and I tried to convert it to a .mat file. This does not work. There is some other post about this error aswell. It always stops around Playback Time 1900 s and since this is around 32 minutes (I read somewhere this was a limit for former releases) it seems like the recorded dataset is simply to long.
So is there a possibility to split the large muse file in smaller ones according to the recorded timestamps?

Hope to hear from someone soon :slight_smile:

Best,
S

PS: this is the error that occurs when converting to .mat file
Muse Player 1.8.4/EEG_Backup/part_17.muse -M part_17.mat
Input:

  • Muse file(s): [‘part_17.muse’]

Output:

  • Matlab output file: part_17.mat
    Playback Time: 1907.0s : Sending Data Exception in thread Thread-2:
    Traceback (most recent call last):
    File “D:\Jenkins\workspace\MusePlayer-Win32-1.8.x\build\muse-player\out00-PYZ.pyz\threading”, line 810, in __bootstrap_inner
    File “D:\Jenkins\workspace\MusePlayer-Win32-1.8.x\build\muse-player\out00-PYZ.pyz\threading”, line 763, in run
    File “D:\Jenkins\workspace\MusePlayer-Win32-1.8.x\build\muse-player\out00-PYZ.pyz\output_handler”, line 73, in start
    File “D:\Jenkins\workspace\MusePlayer-Win32-1.8.x\build\muse-player\out00-PYZ.pyz\output_handler”, line 35, in broadcast_message
    File “D:\Jenkins\workspace\MusePlayer-Win32-1.8.x\build\muse-player\out00-PYZ.pyz\output_handler”, line 321, in receive_msg
    AttributeError: ‘numpy.ndarray’ object has no attribute ‘append’

Input Output size mismatch:
Data in: 2498989 Data out: 1080001 File: [’/part_17.muse’]


#2

Depend of why you need to split muse files to smaller ones.
In my case I need to retrieve alpha, gamma,… waves only.
I used csv at first, and sort it in excel - too long, much work.
Now I just wrote android app to do this and it’s much easier now.
I published example in google play as MuseCSValpha app.


#3

Hi Dmitriy,

thanks for your answer.
I want to split it to convert the smaller parts of it to .mat files. So if my file is 90 minutes long, I want to split it into three 30 minute files.

Best,
Sabrina


#4

Bat file to record Muse data to .mat file, creates new mat file after every 30 minutes:

echo off
cls

echo
echo Connecting Muse
start cmd /k “C:\Program Files (x86)\Muse\muse-io.exe” --device Muse-DA42
ping -n 10 127.0.0.1 > nul

:start

echo Start data recording
start “MatLabCollectData” cmd /k “C:\Program Files (x86)\Muse\muse-player.exe” -l 5000 -M C:\Muse%date:~7,2%%date:~4,2%%date:~-4%%time:~0,2%%time:~3,2%.mat
ping -n 1800 127.0.0.1 > nul

echo Stop data recording
taskkill /fi “windowtitle eq MatLabCollectData*”

goto start