# Analyzing MWorks Experiment Data on Openmind

**URL:** <https://mworks.discourse.group/t/analyzing-mworks-experiment-data-on-openmind/72>\
**Category:** Support\
**Created:** [March 27, 2022, 10:52pm UTC](https://mworks.discourse.group/t/analyzing-mworks-experiment-data-on-openmind/72 "2022-03-27T22:52:01Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![cstawarz](https://yyz1.discourse-cdn.com/flex031/user_avatar/mworks.discourse.group/cstawarz/32/3_2.png) [@cstawarz](https://mworks.discourse.group/u/cstawarz)\
**Post date:** [March 27, 2022, 10:52pm UTC](https://mworks.discourse.group/t/analyzing-mworks-experiment-data-on-openmind/72/1 "2022-03-27T22:52:01Z")

</div>

Hi Chris, is it possible to process MWorks files on OpenMind? I’ve tried both processing with Matlab and with python using the MWorks tools, but both run into errors on OpenMind.

The errors seem to be because the application files in mworks/Scripting/MATLAB only work on Mac OS, not Linux:

With python, when I run “from mworks.data import MWKFile” I get an error “invalid ELF header” coming from “from . import \_mworks” in Scripting/Python/mworks/data.py.

With MAtlab, when I run “getReverseCodec” I get an error “Unable to resolve the name mworks.mwfeval.”.

Surely lots of MIT users analyze mwk files on OpenMind — how is this done?

Thanks!

---

<div class="post-metadata">

**Author:** ![cstawarz](https://yyz1.discourse-cdn.com/flex031/user_avatar/mworks.discourse.group/cstawarz/32/3_2.png) [@cstawarz](https://mworks.discourse.group/u/cstawarz)\
**Post date:** [March 28, 2022, 2:44pm UTC](https://mworks.discourse.group/t/analyzing-mworks-experiment-data-on-openmind/72/2 "2022-03-28T14:44:06Z")

</div>

Hi Nick,

MWorks’ standard [data-file tools](https://mworks.github.io/documentation/latest/guide/data_analysis.html) depend on the MWorksCore framework, which is available only for Apple platforms. However, some users have come up with workarounds. See [this discussion](https://mworks.tenderapp.com/discussions/questions/1400) for details.

Cheers,  
Chris

---

<div class="post-metadata">

**Author:** ![cstawarz](https://yyz1.discourse-cdn.com/flex031/user_avatar/mworks.discourse.group/cstawarz/32/3_2.png) [@cstawarz](https://mworks.discourse.group/u/cstawarz)\
**Post date:** [March 29, 2022, 5:45pm UTC](https://mworks.discourse.group/t/analyzing-mworks-experiment-data-on-openmind/72/3 "2022-03-29T17:45:11Z")

</div>

Hi Chris,

Thanks for the reply. I spoke with Rishi about this, and he also never successfully read MWorks logs on OpenMind (though admittedly didn’t have much time to spend wrangling).

However, this is a pain point for him, me, and several others in the lab that I’ve spoken with. Being able to read logs on the cluster (where we all do our physiology analysis) would be extremely useful. Any chance this feature can be added to MWorks?

Thanks,  
Nick

---

<div class="post-metadata">

**Author:** ![cstawarz](https://yyz1.discourse-cdn.com/flex031/user_avatar/mworks.discourse.group/cstawarz/32/3_2.png) [@cstawarz](https://mworks.discourse.group/u/cstawarz)\
**Post date:** [April 1, 2022, 2:14pm UTC](https://mworks.discourse.group/t/analyzing-mworks-experiment-data-on-openmind/72/4 "2022-04-01T14:14:15Z")

</div>

Hi Nick,

Porting the standard MWorks data tools (and hence the MWorksCore framework) to Linux is not going to happen, short of someone hiring another full-time developer to do it.

At some point, I would like to release standalone Python and MATLAB readers for MWK2 files. The Python version would be a slightly-nicer iteration of the code I discussed with Rishi, which depends only on the Python standard library and the [msgpack](https://pypi.org/project/msgpack/) package. The feasibility of a standalone MATLAB reader would depend on finding available MATLAB interfaces for reading [SQLite](https://sqlite.org/index.html) databases and decoding the [MessagePack](https://msgpack.org) serialization format. I haven’t found suitable ones thus far, but my search has been limited.

I don’t know why Rishi failed to read MWorks event files on OpenMind using the method I suggested. The [example code](https://mworks.github.io/documentation/latest/reference/event_file_format/current.html#example-code) he mentioned certainly works, as I use it as part of my automated test suite of MWorks data tools. If he or you can tell me exactly how it fails, I’m confident we could resolve the issue.

Cheers,  
Chris

---

<div class="post-metadata">

**Author:** ![cstawarz](https://yyz1.discourse-cdn.com/flex031/user_avatar/mworks.discourse.group/cstawarz/32/3_2.png) [@cstawarz](https://mworks.discourse.group/u/cstawarz)\
**Post date:** [April 1, 2022, 4:43pm UTC](https://mworks.discourse.group/t/analyzing-mworks-experiment-data-on-openmind/72/5 "2022-04-01T16:43:04Z")

</div>

Thanks, Chris!

That example code may work! None of us have actually tried it. Rishi says he started looking into it, but wasn’t able to spare the time to follow through and integrate it into the analysis pipeline (this was while he was doing physiology so had no time at all). I’m now in the same boat.

Some others in JazLab are planning to start physiology in the next few weeks but haven’t yet, so we’ll get one of them to try it out, and may follow up with questions.

Thank you!  
– Nick

---

<div class="post-metadata">

**Author:** ![cstawarz](https://yyz1.discourse-cdn.com/flex031/user_avatar/mworks.discourse.group/cstawarz/32/3_2.png) [@cstawarz](https://mworks.discourse.group/u/cstawarz)\
**Post date:** [July 19, 2022, 6:06pm UTC](https://mworks.discourse.group/t/analyzing-mworks-experiment-data-on-openmind/72/6 "2022-07-19T18:06:51Z")

</div>


