Mworks file format documentation?

Hi Chris,

Is the mwk file format documented anywhere?

I’m trying to do some analyses of eye-movement patterns from mwk files. While I know where in Ha’s code I can extract this type of information (in kind of a hack-y way), for me it’s often more time effective and cleaner to have an understanding of how things underneath are structured (ex. the file format) than to somewhat hack-ily modify Ha’s scripts which were designed for a completely different purpose (RSVP-type analyses).

[I’m specifically using GitHub - hahong/maru: Multi-electrode Array Recording Utilities, which uses GitHub - hahong/pymworks: Python interface to .mwk files under *NIX systems for file reading… but neither seem to describe the mwk file format explicitly and I don’t see documentation on the mworks website]

Thanks!
Darren

Oh–I was looking through some of the source files and found:

https://github.com/mworks/mworks/blob/master/examples/Examples/RSVPDemo/MATLAB_analysis_files/RSVP_analysis.m

This example seems like the right amount of detail for me to extract the data I need.

(maybe it would be useful to provide a link to these examples on the mworks website in the “Knowledge Base / Data Analysis” section? I was assuming examples like this might not exist since I didn’t find anything linked from the main website)

Best,
Darren

Hi Darren,

If you’re doing your analysis on a Mac, then you can use the data-unpacking tools that are bundled with MWorks. I’ve attached MATLAB and Python example scripts that demonstrate the basics.

I believe Ha wrote his pymworks package so that he could unpack MWorks data files under Linux. If you’re also working on a non-Mac system, then you’ll either need to use Ha’s code (or another package, also called pymworks, written by a former member of Dave Cox’s lab) or write your own unpacking tools.

Unfortunately, there is no documentation of MWorks’ file format apart from the source code. For a more digestible version of such, see the attached file ldo.py, which contains a pure-Python implementation of the unpacking algorithm.

(maybe it would be useful to provide a link to these examples on the mworks website in the “Knowledge Base / Data Analysis” section? I was assuming examples like this might not exist since I didn’t find anything linked from the main website)

Yes, that’s a good idea!

Cheers,
Chris

Attachments: