[SciPy-user] reading (labview) binary data

David Huard david.huard@gmail....
Wed Jul 15 08:56:08 CDT 2009


Michael,

I have no experience with Labview files, but for uniform data structures, I
found numpy.fromfile and numpy.memmap to be more practical than
struct.unpack.

HTH,

David

On Wed, Jul 15, 2009 at 9:00 AM, Michael Graber <michael@ini.phys.ethz.ch>wrote:

>
> hi all,
>
>
> i'm looking for the fastest way to read (labview) binary files.
>
> i figured out a method which is basically the same as described on:
>
>
> http://www.shocksolution.com/2008/06/25/reading-labview-binary-files-with-python/
>
> that is:
>
> binaryFile = open("Measurement_4.bin", mode='rb')
> (data.offset,) = struct.unpack('>d', binaryFile.read(8))
>
> but this is terribly slow. to read 12 MB takes about 80 seconds.
> matlab is orders of magnitude faster ..
>
> is there a better, i.e. faster way to read in (labview) binary files?
>
>
> thanks,
> michael
> _______________________________________________
> SciPy-user mailing list
> SciPy-user@scipy.org
> http://mail.scipy.org/mailman/listinfo/scipy-user
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.scipy.org/pipermail/scipy-user/attachments/20090715/14f19942/attachment.html 


More information about the SciPy-user mailing list