comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: Reading non-standard variable sizes
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: Reading non-standard variable sizes [message #81372] Mon, 10 September 2012 11:56 Go to previous message
Brian Daniel is currently offline  Brian Daniel
Messages: 80
Registered: July 2009
Member
Thanks for your advice Mike and Craig. After trying and failing with double() and swapping endians (which only reverses the answers you get with double(var,0) and double(var,1)), I realized the data is ASCII and the ICD is really describing the number of characters in the string, not the number of bytes in the binary data. But again, thanks for your help.

-B

On Friday, September 7, 2012 4:44:21 PM UTC-4, Brian J. Daniel wrote:
> I'm attempting to read values from a binary file with some strange variable formats. Specifically, I have a field of data that uses 9 bytes. No IDL data format has 9 bytes. I can do the following:
>
>
>
> data = bytarr(9)
>
> ReadU, lun, data
>
>
>
> And lun will be ready to read the next variable, but how do I convert the 9 byte variable into a single 8-byte double number?
>
>
>
> Unfortunately, I can't change the format of this data because its a standard. Thanks for your interest.
>
>
>
> -Brian
[Message index]
 
Read Message
Read Message
Read Message
Previous Topic: Re: Off-kilter z-axis label in function graphics?
Next Topic: IDLdoc 3.5 released

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 18:56:55 PDT 2025

Total time taken to generate the page: 0.00452 seconds