# Is there an OS independent way to analyze MWorks behavioral files?

**URL:** <https://mworks.discourse.group/t/is-there-an-os-independent-way-to-analyze-mworks-behavioral-files/529>\
**Category:** Support\
**Created:** [April 7, 2015, 11:33am UTC](https://mworks.discourse.group/t/is-there-an-os-independent-way-to-analyze-mworks-behavioral-files/529 "2015-04-07T11:33:25Z")\
**Posts on this page:** 5\
**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:** [April 7, 2015, 11:33am UTC](https://mworks.discourse.group/t/is-there-an-os-independent-way-to-analyze-mworks-behavioral-files/529/1 "2015-04-07T11:33:25Z")

</div>

Hi Chris,

Sorry if there are duplicate questions, I wrote a ‘private discussion’ question to you but I couldn’t figure out how to see if anyone replied to that question, so I decided to make a profile and post here.

The question relates to whether we can get an architecture independent method for data analysis, particularly in Matlab., I saw in the thread how to use getCodecs and getEvents in Matlab to extract the behavioral data offline, however these Matlab functions (1) use a mexmaci64 file which is Mac OS dependent, and (2) all of the Matlab code is wrapped into the OS installation file, which is a headache to unrap in Linux or Windows systems.

Do you have any suggestions for how to extract the mworks behavioral files in Matlab under a non-OS architecture?

Travis

---

<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 7, 2015, 1:41pm UTC](https://mworks.discourse.group/t/is-there-an-os-independent-way-to-analyze-mworks-behavioral-files/529/2 "2015-04-07T13:41:32Z")

</div>

Hi Travis,

The short answer is no. `mwfeval.mexmaci64` depends on the MWorksCore framework, and that isn’t portable beyond OS X.

One thing you might look at is [pymorks](https://github.com/braingram/pymworks), which is a pure-Python and therefore (potentially) cross-platform package for reading MWorks data. It was written by an MWorks user, so I can’t vouch for it (or support it), but you may find it useful. I assume you could find another Python package that could re-package the data extracted by pymorks into native MATLAB format. Or, if you were feeling _very_ ambitious, you could re-implement the guts of pymorks in MATLAB, which would give you a cross-platform solution without the intermediate hop through Python.

Cheers,  
Chris Stawarz

---

<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 7, 2015, 2:36pm UTC](https://mworks.discourse.group/t/is-there-an-os-independent-way-to-analyze-mworks-behavioral-files/529/3 "2015-04-07T14:36:36Z")

</div>

Thanks Chris!,

I assume by the MWorksCore framework, that refers to a bunch of OS X specific functions? My thought was to just create a Windows compatible mwfeval.mex.

I’ll definitely give pyworks a try.

If any other ideas pop into your had I’d love to hear them.

Thanks  
Travis

---

<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 7, 2015, 7:36pm UTC](https://mworks.discourse.group/t/is-there-an-os-independent-way-to-analyze-mworks-behavioral-files/529/4 "2015-04-07T19:36:04Z")

</div>

Hi Travis,

> I assume by the MWorksCore framework, that refers to a bunch of OS X specific functions?

By “MWorksCore framework”, I mean `/Library/Frameworks/MWorksCore.framework`, which is where the guts of MWServer reside. Porting it to another platform would be nearly equivalent to porting all of MWorks to that platform – not a small task!

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:** [July 19, 2022, 10:40pm UTC](https://mworks.discourse.group/t/is-there-an-os-independent-way-to-analyze-mworks-behavioral-files/529/5 "2022-07-19T22:40:54Z")

</div>


