Subject: CDF question

From: thompson at orpheus.nascom.nasa.gov (William Thompson)
Date: 27 Dec 1995 16:52:17 GMT

Please excuse me if this is a little outside the scope of this newsgroup, but I
couldn't find one specifically for Common Data Format.

I'm reading some FITS binary table files that were converted from CDF format.
The original CDF files have descriptions such as

!-------------------------------------------------------------
!   Variable         Data             Number     Record       Dim      
!   Name             Type             Elements   Variance     Variance 
!   -------          ----             --------   --------     -------- 
    "LAT_SPACE"   CDF_REAL8             1          T            F 

!  Attribute   Data          Value
!  Name        Type        
!-----------   -----         ------
   "FIELDNAM"  CDF_CHAR      { "Heliographic Lat of the Craft" }
   "VALIDMIN"  CDF_REAL8     { -1.570796327 }
   "VALIDMAX"  CDF_REAL8     { 1.570796327 }
   "SCALEMIN"  CDF_REAL8     { -1.570796327 }
   "SCALEMAX"  CDF_REAL8     { 1.570796327 }
   "LABLAXIS"  CDF_CHAR      { "Helio Lat" }
   "UNITS"     CDF_CHAR      { "rad" }
   "FORMAT"    CDF_CHAR      { "F7.3" }
   "DEPEND_0"  CDF_CHAR      { "Epoch" }
   "FILLVAL"   CDF_REAL8     { -1.0E31 }
   "VAR_TYPE"  CDF_CHAR      { "data" }
   "DICT_KEY"  CDF_CHAR      { " " }.

It appears that the data in the FITS binary table file has the same resolution
as that given in the FORMAT statement, rather than the full resolution of the
Real*8 data type.  In the above example, the numbers are quantized to 0.001
radians, even though the double precision numbers are theoretically much more
precise than this.

I'm not very familiar with CDF, so I have some simple questions:

1.  Are all CDF files written out to the resolution given by the FORMAT
    statement?  Or is there a mode of writing CDF files that automatically
    applies this quantization?

2.  If not, is it possible that the process of reading the CDF file
    unintentionally quantized the values?  In other words, is there a mode of
    reading CDF files that automatically applies this quantization?

3.  Failing the above two possibilities, is it standard practice for CDF files
    written by some of the groups here at Goddard to write out data to a
    quantization given by the FORMAT specification.

Please excuse these possibly naive questions.

Thank you,

Bill Thompson