Re: routine to translate DEC microvax Floating point... [message #25262] |
Thu, 31 May 2001 13:39 |
Richard French
Messages: 173 Registered: December 2000
|
Senior Member |
|
|
Got two instant tips, one from someone at RSI who read my post:
BYTEORDER has keywords such as /VAXTOF that do exactly what I want.
Also, the IDL astronomy library has a routine conv_vax_unix( ) that does the
job. Thanks for the quick responses, folks!
Dick
|
|
|
Re: routine to translate DEC microvax Floating point... [message #25264 is a reply to message #25262] |
Thu, 31 May 2001 12:11  |
Brian Jackel
Messages: 34 Registered: January 1998
|
Member |
|
|
Did you try this keyword for OPEN?
==============================
VAX_FLOAT
The opened file contains VAX format floating point values. This keyword
implies little endian byte ordering for all data contained in the file,
and supersedes any setting of the SWAP_ENDIAN, SWAP_IF_BIG_ENDIAN, or
SWAP_IF_LITTLE_ENDIAN keywords.
The default setting for this keyword is FALSE. Under VMS, starting the
VAX_FLOAT option to the IDL command at startup has the effect of
changing this default and making it TRUE. See Command Line Options for
details on this qualifier. You can change this setting at runtime using
the VAX_FLOAT function.
Warning - Please read Note On IEEE to VAX Format Conversion before using
this feature.
=====================================
Brian
|
|
|
Re: routine to translate DEC microvax Floating point... [message #25266 is a reply to message #25264] |
Thu, 31 May 2001 11:35  |
Craig Markwardt
Messages: 1869 Registered: November 1996
|
Senior Member |
|
|
Richard French <rfrench@wellesley.edu> writes:
> Hi, friends -
> I have some 20-year old data in binary floating point format (DEC
> microvax
> running ULTRIX4.4). Unfortunately, that ancient machine, while still
> running, can
> no longer connect to the internet, so my old subterfuge of converting
> the floating
> point to ascii on the microvax, piping across the network to my Alpha
> machine,
> and then reconverting it to binary no longer works. I do have the binary
> files on
> my new machine, but I don't know how the bits are packed for DEC
> microvax
> floating point format, and my web prowls have not revealed the answer.
> I'm hoping that some of you may know how to decode floating point
> (and possibly also double precision) from DEC microvax format to IEEE. I
>
> think I recall seeing some IDL utilties to do this once, but I have not
> been able
> to track them down.
Hi Dick--
Why don't you simply try reading the numbers into IDL. I did a search
on Google, and of the source code in the scientific package called
Yorick which knows about a lot of formats. Both showed that IEEE
float and VAX float are potentially the same format, except for a
different "bias." This suggests that reading the numbers into IDL
will give the same number, except for a factor of 2^N (which you can
determine once).
However, if you have "D" or "H" type doubles then it's harder, but
still doable. Leaving that open-ended until you find out...
Craig
--
------------------------------------------------------------ --------------
Craig B. Markwardt, Ph.D. EMAIL: craigmnet@cow.physics.wisc.edu
Astrophysics, IDL, Finance, Derivatives | Remove "net" for better response
------------------------------------------------------------ --------------
|
|
|
Re: routine to translate DEC microvax Floating point... [message #25267 is a reply to message #25266] |
Thu, 31 May 2001 11:25  |
tam
Messages: 48 Registered: February 2000
|
Member |
|
|
The IDL Astronomy library at
http://idlastro.jpl.nasa.gov
includes two routines conv_vax_unix and conv_unix_vax
which seem to convert from/to VAX formats.
Regards,
Tom McGlynn
Richard French wrote:
>
> Hi, friends -
> I have some 20-year old data in binary floating point format (DEC
> microvax
> running ULTRIX4.4). Unfortunately, that ancient machine, while still
> running, can
> no longer connect to the internet, so my old subterfuge of converting
> the floating
> point to ascii on the microvax, piping across the network to my Alpha
> machine,
> and then reconverting it to binary no longer works. I do have the binary
> files on
> my new machine, but I don't know how the bits are packed for DEC
> microvax
> floating point format, and my web prowls have not revealed the answer.
> I'm hoping that some of you may know how to decode floating point
> (and possibly also double precision) from DEC microvax format to IEEE. I
>
> think I recall seeing some IDL utilties to do this once, but I have not
> been able
> to track them down.
> Thanks very much for any and all leads!
> Dick French
> Astronomy Dept.
> Wellesley College
|
|
|