From mathews@nssdc.gsfc.nasa.gov Fri Dec 29 14:18:33 1995 Path: solitaire.cv.nrao.edu!hearst.acc.Virginia.EDU!news-server.ncren.net!news.duke.edu!news.mathworks.com!newsfeed.internetmci.com!uwm.edu!lll-winken.llnl.gov!ames!newsfeed.gsfc.nasa.gov!usenet From: Jason Mathews Newsgroups: sci.data.formats Subject: Re: CDF question Date: 27 Dec 1995 20:47:40 GMT Organization: NASA Goddard Space Flight Center -- Greenbelt, Maryland USA Lines: 80 Message-ID: <4bsbdc$rva@post.gsfc.nasa.gov> References: <4brv9l$ol0@post.gsfc.nasa.gov> NNTP-Posting-Host: discover.gsfc.nasa.gov Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Mailer: Mozilla 1.1N (Windows; I; 16bit) To: thompson@orpheus.nascom.nasa.gov,cdfsupport@nssdca.gsfc.nasa.gov thompson@orpheus.nascom.nasa.gov (William Thompson) wrote: > >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? Not necessarily and no. In most cases the metadata attributes FORMAT in particular are edited by people and/or the software that generates the data and may or may not reflect the true data values, but this has no effect on how the data is written to CDF or read. It is, however, used by CDF applications (such as CDFlist) to format the output of the values, so an incorrect format value will produce funny output listings. >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? > As above, there is no effect. The real* value is read as whatever is stored regardless of FORMAT attribute. >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 It is standard practice NOT to format the data to fit the FORMAT specification but to select a FORMAT specification that matches the precision of the data. Any detailed quesitons about CDF should be forwarded to cdfsupport@nssdca.gsfc.nasa.gov Jason ------------------------------------------------------------------------ Jason Mathews, Code 633.2 |National Space Science Data Center NASA/Goddard Space Flight Center|Email: mathews@nssdc.gsfc.nasa.gov URL: http://coney.gsfc.nasa.gov/Mathews/