🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: sci.astro.fits
Article #60

VAX R*8 to FITS/IEEE R*8 conversion problem

#60
From: Don Jennings
Date: Thu, 17 Dec 1992 13:54
28 lines
2051 bytes
My organization often needs to convert data that is native to the VAX
architecture into a FITS format. Since the VAX real*8 bit pattern is different
from the FITS/IEEE real*8 bit pattern, it is not possible to completely
encapsulate a VAX real*8 in a IEEE real*8; specificly, a loss of precision
occurs when transforming a VAX real*8 into an IEEE real*8.

One solution we have devised is to save the 7th byte of VAX real*8 values, 
where the loss of precision occurs, and add them to a column of the binary
table where the real*8 values are being stored. The following is a suggested
list of rules for the extra column:

   It would always be the last column of the table.

   Each column entry would contain the 7th byte of all real*8 values
   occurring in a given row. Thus, if a table row contained 5 real*8
   values, then the extra column's TFORM code would be 8B, if the
   row contained any real*8 variable length array entries then the
   extra column's TFORM code would be PB(XXXX).

FITS readers residing on non-VAX architectures would be able to ignore the
extra column, while VAX FITS readers could completely reconstruct the original
real*8 value by reading the extra column's values.

Has anyone out there had this problem? Does anyone out there have a 
different solution? If so, then I would like to hear from you. Please 
send/post any general comments on the above scheme you might have as well. 

                    Don Jennings, COSSC/GSFC 
Technical Details
Message-ID: <JENNINGS.92Dec17085450@antwrp.antwrp.gsfc.nasa.gov>
Path: arc1-ca.pugleaf.net!sparky!uunet!europa.asd.contel.com!emory!swrinde!zaphod.mps.ohio-state.edu!saimiri.primate.wisc.edu!ames!nsisrv!news2.gsfc.nasa.gov!jennings

Show Full Headers
Complete Article Headers
Newsgroups: sci.astro.fits
Path: arc1-ca.pugleaf.net!sparky!uunet!europa.asd.contel.com!emory!swrinde!zaphod.mps.ohio-state.edu!saimiri.primate.wisc.edu!ames!nsisrv!news2.gsfc.nasa.gov!jennings
From: jennings@antwrp.antwrp.gsfc.nasa.gov (Don Jennings)
Subject: VAX R*8 to FITS/IEEE R*8 conversion problem
Message-ID: <JENNINGS.92Dec17085450@antwrp.antwrp.gsfc.nasa.gov>
Sender: usenet@nsisrv.gsfc.nasa.gov (Usenet)
Nntp-Posting-Host: antwrp.gsfc.nasa.gov
Organization: Compton Gamma Ray Observatory Science Support Center
Date: Thu, 17 Dec 1992 13:54:50 GMT
Lines: 28