.muse to .mat error in Museplayer W10 (problem file included in post)


#1

Apologies for the wall of text, this is technical, I am very technical as well, so I’m giving all the proper details. So my goal is to get a nice 3D image brain map as described here: (not relevant for this error)

But I am getting an error when I try and convert the recorded .muse to .mat

Here is EXACTLY what happens and what I am doing:

1 - Pair device with MuseDirect. All is well here. Connected. 4 lights to light up correctly.
(Output it selt to 5000 - 127.0.0.1 UDP - all other options are default)
2 - Open Muse-lab and go to OSC > enter in 5000 in UDP port > Open. WORKS. (tried port 7000 too)
3 - Go to Visualizers > Select Visualizers > New > Scrolling Line Graph > Finish
4 - Under Signals tick the following variables:

Alpha Data Absolute (0)
Theta Data Absolute (0)
Delta Data Absolute (0)
Beta Data Absolute (0)
Gamma Data Absolute (0)

5- Go to the settings tab, and under Amplitude, change the Max to +1.25 and min to -1.25. Hit Apply. (so I can see it) All is working as expected, I see my brain waves. They respond as expected.
6- Go to Recording Pull-Down Menu Item
7 - Change the path and filename to something useful
8 - Hit RECORD to record data. (saves as *.muse)
Meditate away.
9 - Hit STOP. File appears as expected.

HERE is a copy of file (renamed 2.muse). https://goo.gl/rTUVq7

10 - I put said file (2.muse) in the folder with “Muse-Player.exe”
11 - Open a Command prompt and navigate to the siad folder what contains Muse-Player.exe and my newly created file 2.muse
12 - Type “muse-player -f INPUTFILE.muse -M OUTPUTFILE.mat”
(for this file I’ve linked, the exact command line is:

muse-player.exe -f 2.muse -M muselab_recording.mat

Now this is what I see:

D:\Documents\Muse Related\MusePlayer MUSE to MAT>muse-player.exe -f 2.muse -M muselab_recording.mat
Muse Player 1.8.4
Input:

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

Output:

  • Matlab output file: muselab_recording.mat
    Playback Time: 94.7s : Sending Data

At this point, that took about 20 seconds. Now my CPU is humming along doing “something” at about 7%.” Sure enough it’s muse-player.exe The file size IS staying the same size (1.4MB) , but if I copy the file, it’s getting bigger. After an hour it’s 50MB.

Usually I say forget it at this stage and CRTL+C it out, but I decided to just leave it. About 2 hours later (no kidding) it finally pooped out this message once:

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 278, in receive_msg
File “D:\Jenkins\workspace\MusePlayer-Win32-1.8.x\build\muse-player\out00-PYZ.pyz\output_handler”, line 188, in write_array
File “D:\Jenkins\workspace\MusePlayer-Win32-1.8.x\build\muse-player\out00-PYZ.pyz\hdf5storage”, line 1057, in write
File “D:\Jenkins\workspace\MusePlayer-Win32-1.8.x\build\muse-player\out00-PYZ.pyz\hdf5storage.lowlevel”, line 114, in write_data
File “D:\Jenkins\workspace\MusePlayer-Win32-1.8.x\build\muse-player\out00-PYZ.pyz\hdf5storage.Marshallers”, line 1465, in write
File “D:\Jenkins\workspace\MusePlayer-Win32-1.8.x\build\muse-player\out00-PYZ.pyz\hdf5storage.lowlevel”, line 114, in write_data
File “D:\Jenkins\workspace\MusePlayer-Win32-1.8.x\build\muse-player\out00-PYZ.pyz\hdf5storage.Marshallers”, line 1465, in write
File “D:\Jenkins\workspace\MusePlayer-Win32-1.8.x\build\muse-player\out00-PYZ.pyz\hdf5storage.lowlevel”, line 114, in write_data
File “D:\Jenkins\workspace\MusePlayer-Win32-1.8.x\build\muse-player\out00-PYZ.pyz\hdf5storage.Marshallers”, line 1465, in write
File “D:\Jenkins\workspace\MusePlayer-Win32-1.8.x\build\muse-player\out00-PYZ.pyz\hdf5storage.lowlevel”, line 114, in write_data
File “D:\Jenkins\workspace\MusePlayer-Win32-1.8.x\build\muse-player\out00-PYZ.pyz\hdf5storage.Marshallers”, line 1465, in write
File “D:\Jenkins\workspace\MusePlayer-Win32-1.8.x\build\muse-player\out00-PYZ.pyz\hdf5storage.lowlevel”, line 114, in write_data
File “D:\Jenkins\workspace\MusePlayer-Win32-1.8.x\build\muse-player\out00-PYZ.pyz\hdf5storage.Marshallers”, line 656, in write
File “D:\Jenkins\workspace\MusePlayer-Win32-1.8.x\build\muse-player\out00-PYZ.pyz\hdf5storage.Marshallers”, line 129, in write_object_array
File “D:\Jenkins\workspace\MusePlayer-Win32-1.8.x\build\muse-player\out00-PYZ.pyz\hdf5storage.lowlevel”, line 114, in write_data
File “D:\Jenkins\workspace\MusePlayer-Win32-1.8.x\build\muse-player\out00-PYZ.pyz\hdf5storage.Marshallers”, line 1566, in write
File “D:\Jenkins\workspace\MusePlayer-Win32-1.8.x\build\muse-player\out00-PYZ.pyz\hdf5storage.Marshallers”, line 656, in write
File “D:\Jenkins\workspace\MusePlayer-Win32-1.8.x\build\muse-player\out00-PYZ.pyz\hdf5storage.Marshallers”, line 129, in write_object_array
File “D:\Jenkins\workspace\MusePlayer-Win32-1.8.x\build\muse-player\out00-PYZ.pyz\hdf5storage.lowlevel”, line 114, in write_data
File “D:\Jenkins\workspace\MusePlayer-Win32-1.8.x\build\muse-player\out00-PYZ.pyz\hdf5storage.Marshallers”, line 1303, in write
File “D:\Jenkins\workspace\MusePlayer-Win32-1.8.x\build\muse-player\out00-PYZ.pyz\hdf5storage.Marshallers”, line 762, in write
File “D:\Jenkins\workspace\MusePlayer-Win32-1.8.x\build\muse-player\out00-PYZ.pyz\h5py._hl.group”, line 288, in contains
File “h5g.pyx”, line 437, in h5py.h5g.GroupID.contains (h5py\h5g.c:5101)
File “h5g.pyx”, line 501, in h5py.h5g._path_valid (h5py\h5g.c:5813)
File “h5l.pyx”, line 201, in h5py.h5l.LinkProxy.exists (h5py\h5l.c:3184)
KeyError: ‘Unable to get link info (Wrong b-tree signature)’

None of those paths are mine, but whatever.

I’ve tried it several different times, many different files, all less than 2 minutes as I’ve been trying different variables.

All the players:

  • 8700K/64GB ram/NVMe SSD/W10
  • Muse 2016 device
  • New Zexmete Bluetooth USB device
  • I’m using Museplayer 1.8.4, I’ve also tried “Muse Player 1.9.1 [Unofficial Build by James Clutterbuck www.MuseMonitor.com]” (Identical results)
    -I’ve tried changing from port 5000 to 7000
    -I see no errors in Event Manager
    -I tried it on another W10 machine (same problem)
    -I CAN successfully convert the test/sample data files located in the Museplayer download (\MusePlayer\test_data\ muselab_recording.muse & long_session.muse) They convert in seconds and open in Matlab with zero errors.

Again HERE is a copy of file. https://goo.gl/rTUVq7

It’s something stupid I know, help! I think I’m not checking the “right” values in step 4. Also, Am I selecting the correct variables (Alpha/Theta/Delta/Beta/Gamma Data Absolute (0)) that will get me the 3d Brain image map I desire (AKA - when I hit record, does it record EVERYTHING or just the variables I select?)


#2

I’m seeing the same issue with the conversion to Mat, but interestingly the Text/CSV convert works fine.
BTW: You should always add -q for “quick” otherwise it converts in real time!

muse-player -q -v -f input.muse -C out.txt

I’m wondering if the issue is with the OSC path. Muse Player was originally designed to convert files created with Muse-IO and the OSC path that it saves is /muse/eeg where as in your example here you have Darrell/eeg without the leading slash.

You can see in the source here that’s it’s specifically looking for the /muse/eeg path. My python is a little rusty, so I’m thinking what’s happening is it’s not matching properly and going in to an infinite loop as it’s not reading the next data line.


#3

Man Mr. Enigma644, If you aren’t getting paid by Muse, you should be. I bother you here, I bother you @ musemonitor.com you’re the only one giving descent answers to real technical questions. I do appreciate you.

So how do I make everything happy in the right paths? But if you are getting the error too, it’s not just my path’s problem, right? Where am I going wrong in the previous steps? I’m only selecting 5 values to record.


#4

Thank you :slight_smile:
I don’t work for Interaxon, start-ups can’t afford my rate :wink:

Well, you have two options, change the data or change the parser.
So you can re-record using Muse Monitor which creates .muse files with the correct OSC path, or you can re-compile Muse-Player.exe hardcoding it with your specific OSC path.

Unfortunately I’ve bought a new computer since I created my updated Muse Player v1.9.1 back in March 2017, so I don’t have python installed with all the myriad of dependencies required for compiling Muse Player, otherwise I’d knock you up a custom version. How are you with Python?


#5

Well, they should at leave give you another headband or something. :smile:

Oh look at that, your app does output to .muse as well. That would be awesome, but I love to use your app website & the excel macro thing you programmed up, but that uses you CSV. So can I convert your MuseMonitor’s .muse back into your CSV so I can use them with your Musemonitor’s website and excel macro?

Otherwise I gotta work on fixing the path. My Python skills are non-existent, but I am willing to learn.


#6

My .CSV format is different to Interaxon’s to make it easier to graph with Excel, so no, you can’t convert it to/from .Muse format with Muse-Player sorry! I thought about writing a converter from .Muse to my .CSV format, but then people who haven’t paid for Muse Monitor would be using all my graphing stuff for free :wink: I guess I could conceivably write one to convert the other way from my .CSV to .Muse


#7

Good point. We can’t have that.

Think about it more! :slight_smile: Make another paid app that converts them! I’ll buy it right now. Then everyone can use your awesome paid app to record .muse if they want to use it for EEGLab and Matlab and what not and then use your other paid app to convert the .muse your .CSV for using your awesome excel/website. Either way now you’ll make 1 sale or 2. Of course my ignorance is showing here on how hard this all is… don’tcha love dealing with demanding ignorant customers? :slight_smile: I just have months of awesome MuseMonitor data I’d hate to stop having as I switch to .muse so I can use EEGLab and what not to visualize the data in different ways.

I don’t know if this is your expertise at all, but this morning I did switch to your .muse recording function, and you are right, the file converted no problem, no hangs, super speedy. Yet I got this new error when I tried to Import (

the converted .mat file into EEG lab (14.1.2b). { Copy of files here }, both your raw .muse and the MusePlayer command line converted .mat

I’ll type it out for searching peeps:

pop_editset() error: cannot read .mat file ‘PATH/META.mat’ ,
(Error occurred in function pop_editset() at line 425)

Any idea what this is on about? Works fine for the sample .muse > .mat data. Is there something I need to change about MuseMonitor’s .muse raw data file to make matlab (R2017a) happy? I wouldn’t think so. Probably another problem I got.

This is the closest problem google could find

but that was no help.

Any thoughts?


#8

Sorry, I don’t own a licence for MatLAB, so I can’t test this.

I know others have used it successfully though, so perhaps there’s a different setting that should be used to import?


#9

EDIT: I think it was just the file. Maybe it was too big? Because I recorded some more meditations into .muse with MuseMonitor and I got it to map just fine in 3D.

So… A .muse to MuseMonitor’s .CSV converter app?

Where’s that “Shut up and take my money” meme? :slight_smile: If I start switching to the .muse source file because it allows for complete flexibility and more options for analysis, I’d hate to lose your great MuseMonitor data I’ve been collecting and analysing for months. My ignorance is showing here again, but is it even technically possible?