Mathematica 9 is now available
Student Support Forum
Student Support Forum: 'Operating on Data from Binary Files' topicStudent Support Forum > General > "Operating on Data from Binary Files"

Help | Reply To Topic
Author Comment/Response
09/26/07 00:46am

Hi, I desperately want to analyze some neural recording data I've collected, but can't get Mathematica (v.6.0) to read it in...

The files I'm currently working with are around 10-50MB, start with 16kb of header I want to ignore then have a repeating pattern of data types (e.g. {int64, int32, int 32, int16,..., repeat}).

It seems like it would be easy to make an array in Mathematica for this, but I'm running into two problems: (1) finding the appropriate way to read the data in
Import has the nice "HeaderBytes->x" option, but doesn't seem to allow arbitrayr strings of elements types when readin ing,
alternatively I could use stream1 = OpenRead; BinaryReadList[stream1...], but I need to figure out how to skip the header...

(2) Even more problamatically, when I try to import one of my files around 40MB, the kernal shuts down and I get an out of memory message: I have more than 2GB of RAM!
BinaryReadList doesn't shut down, but it just seems to stall forever.

Can someone please help me with these problems? I really want to use Mathematica to do my data analysis, but I don't know how to get to my data...

URL: ,
Help | Reply To Topic