home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #27 / NN_1992_27.iso / spool / sci / astro / 12324 < prev    next >
Encoding:
Internet Message Format  |  1992-11-23  |  3.7 KB

  1. Path: sparky!uunet!zaphod.mps.ohio-state.edu!cs.utexas.edu!asuvax!ncar!noao!amethyst!organpipe.uug.arizona.edu!aquarius.as.arizona.edu!newberry
  2. From: newberry@aquarius.as.arizona.edu (Mike Newberry)
  3. Newsgroups: sci.astro
  4. Subject: Re: st6 images wanted
  5. Message-ID: <1992Nov23.215025.22192@organpipe.uug.arizona.edu>
  6. Date: 23 Nov 92 21:50:25 GMT
  7. References: <1992Nov19.214524.6479@organpipe.uug.arizona.edu> <1992Nov19.225316.24612@nrao.edu>
  8. Sender: news@organpipe.uug.arizona.edu
  9. Organization: University of Arizona, Tucson, AZ
  10. Lines: 54
  11.  
  12. In article <1992Nov19.225316.24612@nrao.edu> cflatter@nrao.edu writes:
  13. >In article 6479@organpipe.uug.arizona.edu, newberry@kepler.as.arizona.edu (Mike Newberry) writes:
  14. >>Skip the first 2880 bytes of the file, as this contains the file information
  15. >>"header" in FITS format. Starting at byte offset 2880 will be found binary,
  16. >>uncompressed, unpadded pixel data. The pixels are unsigned 16-bit integers,
  17. >                                                   ^^^^^^^^^^^^^^^^^^^^^^^^
  18. >>so watch out if unsigned integers might choke your software--these images do
  19. >>have values above 32767. To turn this binary raster file into a 2-dimensional
  20. >>image, note that there are 375 2-byte pixels in each row. There are 242 rows.
  21. >
  22. >If this description is accurate the files do not conform to accepted FITS
  23. >standards.  Either 16-bit integers are twos complement or SIMPLE = F.
  24. >
  25. >    Chris Flatters
  26. >    cflatter@nrao.edu
  27.  
  28. Absolutely, Chris.  I don't know how many images you've seen lately coming
  29. out of CCD systems at major observatories, but images with values above
  30. 32767 in short integer format and the header flag SIMPLE='T' are typical.
  31. They do not conform to FITS standards.  On the other hand, since 16 bit A/D
  32. converters are the de facto standard for professional CCD cameras as well as
  33. for many used by amateurs these days, you'll have to get used to seeing
  34. 16 bit unsigned pixels. I've complained about the problem and tried holding
  35. out on writing software that would accomodate it. The problem is that people
  36. who write the CCD controller software refuse to chop values above 32767 and
  37. allow their "WFITS" programs to write files or tapes that have SIMPLE='T',
  38. thereby assuming that the image processing software will know how to deal
  39. with it. If observers want to keep pixels in short integer format throughout
  40. data reduction to save disk space and provide much faster processing speed,
  41. then they will need to allow for the negative values given by signed integers.
  42. With unsigned integer data, they'll either have to live with big negative
  43. holes in the centers of bright images or they will have to manually chop
  44. their pixels values at 32767 anyway! Since real world images must allow for
  45. negative intensity, the founding fathers of FITS, Wells and Griesen, made
  46. the right decision in allowing only for signed integers for 2-byte pixels.
  47. However, the world hasn't followed the rules. 
  48.  
  49. To accomodate this ambiguity with 2-byte integers, we have a flag for
  50. specifying unsigned integer data in the "read FITS file" function of MIRA.
  51. This is better than forcing people to write their data using SIMPLE='F'.
  52. Recall that setting SIMPLE='F' doesn't then tell the FITS translator
  53. specifically what in the heck is wrong with the image format. For this
  54. reason, it is better, I think, to simply allow the user to use SIMPLE='T'
  55. and then specify with a flag that their images contain unsigned 16 bit
  56. integers. The reader can then chop the values at 32767 to get the pixels
  57. into the domain of signed integers. This is an issue I had planned on
  58. bringing up at the FITS committee meeting at the AAS in January.
  59.  
  60. It would make life easy again if people would use only 15 bits of their
  61. 16 bit A/D converts, but that doesn't seem to be in the cards yet.
  62.  
  63. Mike Newberry
  64. Axiom Research, Inc.
  65. .
  66.