File sizes, Memory leaks, and streamlining program start up


#1

Hi everyone!

I’m a PhD student working on a collaborative art and science installation. We’re planning on presenting the MUSE headsets at the exhibit, where visitors at an art museum will be able to use the headsets to record and see their own brain waves. The idea is that each visitor will be able to borrow a tablet and a headset which are paired and they’ll walk about the museum and observe exhibits while their EEG is recorded. Due to this environment, we would like to make the process of starting and displaying recordings as seamless as possible. I’ve ran into a few snags with the development software and I was wondering if anyone could offer solutions / suggestions.

I’m currently using a 64-bit Windows 7 OS.

Thanks!

  1. It seems that I cannot convert a Muse file that is longer than 32 minutes into the MATLAB format with MusePlayer. I also cannot use Muse-player to directly save into MATLAB format for longer than 32 minutes. Is there a way I can resolve this so I can use longer recordings? I would imagine there is a likelihood of one subject using the headset continuously for more than 30 minutes.

  2. Muselab appears to use up more RAM the longer I keep the software running. Is there a way to prevent this? I noticed that in our tablets, which have 1GB by RAM, the software slows down immensely after 2 hours. I also noticed in the task manager that the RAM allocated to the Muselab software doubled. It seems there’s a kind of a memory leak. While this is compensated for easily by restarting the software, I was wondering if there was a way to resolve this.

  3. To compensate for 2), my thought is that I could restart MuseLab after each visitor arrives, but I would have to reload the configuration files again. Is it possible to set up a “default” configuration for MuseLab? While there is a possibility of loading a configuration file each time, I was wondering if there’s a feature where this may not be necessary.

  4. Related to question 3, is there a way to load a configuration file with MuseLab through the command prompt? I’m currently using batch files to automatically start recordings and load Muselab, and it would be nice if I could have the batch file load the configuration file automatically.

  5. I noticed that the configuration files do not necessarily save all the options. Some option defaults persist, such as showing the grid lines, showing statistics, and showing the data point amplitude. Is there a way to hard code this into the configuration file?


#2

Hey apaek,

To answer your questions:

  1. It seems that I cannot convert a Muse file that is longer than 32 minutes into the MATLAB format with MusePlayer. I also cannot use Muse-player to directly save into MATLAB format for longer than 32 minutes. Is there a way I can resolve this so I can use longer recordings? I would imagine there is a likelihood of one subject using the headset continuously for more than 30 minutes.

This is a known issue. It will be addressed in the next SDK release. Perhaps the simplest workaround is to write your app such that it records sessions in multiple files of a fixed length. For instance if you capped recording length at 15 minutes, for a 33 minute session you would save two 15 minute files and one 3 minute file.

  1. Muselab appears to use up more RAM the longer I keep the software running. Is there a way to prevent this? I noticed that in our tablets, which have 1GB by RAM, the software slows down immensely after 2 hours. I also noticed in the task manager that the RAM allocated to the Muselab software doubled. It seems there’s a kind of a memory leak. While this is compensated for easily by restarting the software, I was wondering if there was a way to resolve this.

This is also a known issue that we hope to address in a future release. MuseLab holds all the visualized data in memory right now. There isn’t a simple workaround, I’m afraid.

  1. To compensate for 2), my thought is that I could restart MuseLab after each visitor arrives, but I would have to reload the configuration files again. Is it possible to set up a “default” configuration for MuseLab? While there is a possibility of loading a configuration file each time, I was wondering if there’s a feature where this may not be necessary.

MuseLab looks for a default config file called “default.json” in a directory called “config” relative to the muse-lab.jar file. In other words, in the Muse application folder add a directory “config” and put your desired default config file in there with the name “default.json”.

  1. Related to question 3, is there a way to load a configuration file with MuseLab through the command prompt? I’m currently using batch files to automatically start recordings and load Muselab, and it would be nice if I could have the batch file load the configuration file automatically.

Yes. You can use a command like:

java -jar muse-lab.jar --config config/my_config_file.json
  1. I noticed that the configuration files do not necessarily save all the options. Some option defaults persist, such as showing the grid lines, showing statistics, and showing the data point amplitude. Is there a way to hard code this into the configuration file?

Yes, the config files only save certain settings. This is a known issue also. You can check which settings are possible to configure by looking at the JSON in the config files themselves. For example:

"Visualizers": [
      {   
        "Visualizer Type": "Scrolling Line Graph",
        "Visualizer Settings": {
          "Label": "scrolling line graph 1", 
          "Max Amplitude": 10000.0,
          "Min Amplitude": -10000.0,
          "Override Master Time": false,
          "Time Range": 10000000000,
          "Spread Signals Apart": true,
          "Spread Factor": 1.0,
          "Data Lines": []
        }   
      },  
      {   
        "Visualizer Type": "Scrolling Line Graph",
        "Visualizer Settings": {
          "Label": "scrolling line graph 2", 
          "Max Amplitude": 10000.0,
          "Min Amplitude": -10000.0,
          "Override Master Time": false,
          "Time Range": 10000000000,
          "Spread Signals Apart": true,
          "Spread Factor": 1.0,
          "Data Lines": []
        }   
      },  
      {   
        "Visualizer Type": "Stationary Line Graph",
        "Visualizer Settings": {
          "Label": "stationary line graph 1", 
          "Max Amplitude": 1000.0,
          "Min Amplitude": -1000.0,
          "Magnifier Position": 0.0,
          "Magnifier Strength": 0.0,
          "Signal Groups": []
        }   
      }   
    ]

This part of the file specifies all the possible settings for the two graph types. To my knowledge, anything not specified above is not configurable.


#3

Just wanna advise u some more hints about start up development http://djangostars.com/blog/how-to-choose-a-development-company-for-your-web-project-the-overview/ . Helped me a lot, while I was starting my own project!