Re: Skipping bytes while reading a binary file?

2009-02-06 Thread Krzysztof Retel
On Feb 5, 11:51 pm, Lionel lionel.ke...@gmail.com wrote: On Feb 5, 3:35 pm, Lionel lionel.ke...@gmail.com wrote: On Feb 5, 2:56 pm, Lionel lionel.ke...@gmail.com wrote: On Feb 5, 2:48 pm, MRAB goo...@mrabarnett.plus.com wrote: Lionel wrote:   Hello,   I have data stored in

Re: Skipping bytes while reading a binary file?

2009-02-06 Thread Slaunger
You might also want to have a look at a numpy memmap viewed as a recarray. from numpy import dtype, memmap, recarray # Define your record in the file, 4bytes for the real value, # and 4 bytes for the imaginary (assuming Little Endian repr) descriptor = dtype([(r, f4), (i, f4)]) # Now typecast a

Skipping bytes while reading a binary file?

2009-02-05 Thread Lionel
Hello, I have data stored in binary files. Some of these files are huge...upwards of 2 gigs or more. They consist of 32-bit float complex numbers where the first 32 bits of the file is the real component, the second 32bits is the imaginary, the 3rd 32-bits is the real component of the second

Re: Skipping bytes while reading a binary file?

2009-02-05 Thread Lionel
On Feb 5, 2:22 pm, Lionel lionel.ke...@gmail.com wrote: Hello, I have data stored in binary files. Some of these files are huge...upwards of 2 gigs or more. They consist of 32-bit float complex numbers where the first 32 bits of the file is the real component, the second 32bits is the

Re: Skipping bytes while reading a binary file?

2009-02-05 Thread MRAB
Lionel wrote: Hello, I have data stored in binary files. Some of these files are huge...upwards of 2 gigs or more. They consist of 32-bit float complex numbers where the first 32 bits of the file is the real component, the second 32bits is the imaginary, the 3rd 32-bits is the real component

Re: Skipping bytes while reading a binary file?

2009-02-05 Thread Lionel
On Feb 5, 2:48 pm, MRAB goo...@mrabarnett.plus.com wrote: Lionel wrote:   Hello,   I have data stored in binary files. Some of these files are   huge...upwards of 2 gigs or more. They consist of 32-bit float complex   numbers where the first 32 bits of the file is the real component, the  

Re: Skipping bytes while reading a binary file?

2009-02-05 Thread Lionel
On Feb 5, 2:56 pm, Lionel lionel.ke...@gmail.com wrote: On Feb 5, 2:48 pm, MRAB goo...@mrabarnett.plus.com wrote: Lionel wrote:   Hello,   I have data stored in binary files. Some of these files are   huge...upwards of 2 gigs or more. They consist of 32-bit float complex   numbers

Re: Skipping bytes while reading a binary file?

2009-02-05 Thread Lionel
On Feb 5, 3:35 pm, Lionel lionel.ke...@gmail.com wrote: On Feb 5, 2:56 pm, Lionel lionel.ke...@gmail.com wrote: On Feb 5, 2:48 pm, MRAB goo...@mrabarnett.plus.com wrote: Lionel wrote:   Hello,   I have data stored in binary files. Some of these files are   huge...upwards of 2