From dwells at fits.cx.nrao.edu Wed Jan 15 15:21:24 1992 X-VM-Summary-Format: "%n %*%a %-17.17F %-3.3m %2d %4l/%-5c %I\"%s\"\n" X-VM-Labels: nil X-VM-VHeader: ("Resent-" "From:" "Sender:" "To:" "Apparently-To:" "Cc:" "Subject:" "Date:") nil X-VM-Bookmark: 1 Status: RO X-VM-v5-Data: ([nil nil nil nil nil nil nil nil nil] ["15280" "Wed" "1" "January" "1992" "19:08:23" "GMT" "Don Wells" "dwells at fits.cx.nrao.edu " nil "340" "pbm+ (was Re: FITS viewer)" "^From:" nil nil "1" nil nil (number " " mark " Don Wells Jan 1 340/15280 " thread-indent "\"pbm+ (was Re: FITS viewer)\"\n") nil] nil) Newsgroups: alt.sci.astro.fits In-Reply-To: youngs at ccu.umanitoba.ca's message of 31 Dec 91 00: 50:13 GMT Organization: National Radio Astronomy Observatory, Charlottesville, VA From: dwells at fits.cx.nrao.edu (Don Wells) Subject: pbm+ (was Re: FITS viewer) Date: Wed, 1 Jan 1992 19:08:23 GMT In article <1991Dec31.005013.27797 at ccu.umanitoba.ca> youngs at ccu.umanitoba.ca (Scott D. Young) writes: "... I also need a program that converts FITS to GIF format..." The standard answer to most FITS<==>popular_format requirements is the "pbm+" package. I append the README file for a fairly recent version. pbm+ is a Unix-style solution, but it is obvious that it might well be portable to DOS using, e.g., Borland Turbo C. pbm+ is widely available in anon-FTP servers; an "archie" query can tell your about a server near you. (I don't remember from which one I fetched my copy of the pbm+ kit.) The FITS support which pbm+ provides is rather limited. In particular, my memory is that it does not support NAXIS>2 and does not know about the Floating Point Agreement (which became effective two years ago today). I suspect that with a little bit of work some of these deficiencies could be remedied. Volunteers? Donald C. Wells Associate Scientist dwells at nrao.edu National Radio Astronomy Observatory +1-804-296-0277 520 Edgemont Road Fax= +1-804-296-0278 Charlottesville, Virginia 22903-2475 USA 78:31.1W, 38:02.2N =-=-=-=-=-=-=-=-=-=-=-=-=-= cut here =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= Extended Portable Bitmap Toolkit BETA TEST distribution of 05feb91 Previous distribution 25jan91 PBMPLUS is a toolkit for converting various image formats to and from portable formats, and therefore to and from each other. The idea is, if you want to convert among N image formats, you only need 2*N conversion filters, instead of the N^2 you would need if you wrote each one separately. In addition to the converters, the package includes some simple tools for manipulating the portable formats. The package is broken up into four parts (five parts if you count this one, the zeroth part). First is PBM, for bitmaps (1 bit per pixel). Then there is PGM, for grayscale images. Next is PPM, for full-color images. Last, there is PNM, which does content-independent manipulations on any of the three internal formats, and also handles external formats that have multiple types. The parts are upwards compatible: PGM reads both PGM and PBM files and writes PGM; PPM reads all three and write PPM; and PNM reads all three and writes, usually, the same type as it read. Whenever PNM makes an exception and "promotes" a file to a higher format, it lets you know. The parts are also semi-independent; if you're only going to deal with bitmaps, you don't have to install PGM and PPM, and this makes PNM run faster; if you want PGM, you must install PBM but can leave PPM out; but if you want PPM, you must install both PGM and PBM. PNM is optional but recommended. INSTALLATION Unpack the files. Decide whether you want to use Imakefiles or Makefiles. If you want to use Makefiles: Edit the top-level Makefile, find each line with the string "CONFIGURE", and follow the directions for setting configuration options. Likewise edit pbmplus.h. Likewise edit pnm/Makefile. If you are using gnu make, you have to edit *all* the Makefiles and remove all the imake stuff at the ends, otherwise gnu make will overwrite the Makefiles. Make. When you're happy that things work ok, make install. If you want to use Imakefiles instead: Edit the top-level Imakefile, find each line with the string "CONFIGURE", and follow the directions for setting configuration options. Likewise edit pbmplus.h. Likewise edit pnm/Imakefile. Edit Makefile and */Makefile, look towards the end for the definition of TOP, and change it to point to your X11 tree. Save the original Makefiles, in case you later want to switch back to using them. Touch Imakefile, since you just editted Makefile. Make Makefile, make Makefiles, make depend, then make. When you're happy that things work ok, make install. After installing the manual pages, you may want to create the "whatis" file by doing a catman -w -M , or whatever the equivalent is on your system. SUPPORT I've tested this stuff under SysV and BSD, on Sun 3's 4's and 386's and Sequents and Vaxen and HPs, with cc and gcc. Nevertheless, I'm sure bugs remain, and portability to systems like Amigas and IBM compatibles is an interesting question. Feedback is welcome; send bug reports, enhancements, etc. to this address: jef at well.sf.ca.us {apple, ucbvax, hplabs}!well!jef When sending bug reports, be sure to mention what version you have (see the head of this file), what system you are on, and what compiler you used. I try to respond to bug reports and enhancements promptly; say, within a week. Also, if there is a new format or feature you would like to have added to the package, feel free to drop me a line. If it's a format, include whatever documentation you have, and if possible a uuencoded sample. My response time will depend on how busy I am, and how easy the job looks. If you need it right away, or it's a complicated job, you might consider paying me; lately, that's how a lot of work on the package has gotten done. Finally, if you have access to Usenet, there's a newsgroup called alt.graphics.pixutils which is specifically for discussion of image conversion and editing packages such as PBMPLUS. Posting stuff there is even better than mailing it to me, since it lets other people help out with the answers. CONTENTS Files in pbmplus.shar: README this CHANGES list of changes between the various versions of PBM TODO list of things still to be done FORMATS list of the formats supported OTHER.SYSTEMS list of other free image-processing software Makefile guess Imakefile for X11-type installations pbmplus.h header file for PBM, PGM, PPM, and PNM compat.csh csh script for compatibility with old versions compat.ksh ksh script for compatibility with old versions magic additions for /etc/magic to recognize some image formats LIBTIFF.PATCH patch file with a minor but necessary change for libtiff Files in pbm.shar?: Makefile guess Imakefile for X11-type installations brushtopbm.c convert Xerox doodle brushes to portable bitmap cmuwmtopbm.c convert CMU window manager format to portable bitmap g3topbm.c convert Group 3 FAX to portable bitmap icontopbm.c convert Sun icon to portable bitmap gemtopbm.c convert GEM .img format to portable bitmap macptopbm.c convert MacPaint to portable bitmap mgrtopbm.c convert MGR format to portable bitmap pi3topbm.c convert Atari Degas .pi3 to portable bitmap xbmtopbm.c convert X10 or X11 bitmap to portable bitmap ybmtopbm.c convert Bennet Yee "face" file into portable bitmap pbmto10x.c convert portable bitmap to Gemini 10x printer graphics pbmtoascii.c convert portable bitmap to ASCII graphic form pbmtobbnbg.c convert portable bitmap to BBN BitGraph graphics pbmtocmuwm.c convert portable bitmap to CMU window manager format pbmtoepson.c convert portable bitmap to Epson printer graphics pbmtog3.c convert portable bitmap to Group 3 FAX pbmtogem.c convert portable bitmap into GEM .img file pbmtogo.c convert portable bitmap to GraphOn graphics pbmtoicon.c convert portable bitmap to Sun icon pbmtolj.c convert portable bitmap to HP LaserJet graphics pbmtomacp.c convert portable bitmap to MacPaint pbmtomgr.c convert portable bitmap to MGR format pbmtopi3.c convert portable bitmap to Atari Degas .pi3 pbmtoplot.c convert portable bitmap into Unix plot(5) file pbmtoptx.c convert portable bitmap to Printronix graphics pbmtoxbm.c convert portable bitmap to X11 bitmap pbmtox10bm.c convert portable bitmap to X10 bitmap pbmtoybm.c convert portable bitmap into Bennet Yee "face" file pbmtozinc.c convert portable bitmap to Zinc Interface Library icon pbmlife.c apply Conway's rules of Life to a portable bitmap pbmmake.c create a blank bitmap of a specified size pbmmask.c create a mask bitmap from a regular bitmap pbmpaste.c paste a rectangle into a portable bitmap pbmreduce.c reduce a portable bitmap N times, using Floyd-Steinberg pbmtext.c render text into a bitmap pbmupc.c create a Universal Product Code bitmap libpbm[1-5].c a few utility routines pbmmerge.c merge wrapper routine pbm.h header file for libpbm pbmfont.h header file for font routines in libpbm libpbm.h internal header file for libpbm g3.h definitions for Group 3 FAX macp.h definitions for MacPaint files bitreverse.h useful include file *.1 manual entries for all of the tools pbm.5 manual entry for the pbm format libpbm.3 manual entry for the pbm library Files in pgm.shar?: Makefile guess Imakefile for X11-type installations fitstopgm.c convert FITS format to portable graymap fstopgm.c convert Usenix FaceSaver(tm) format to portable graymap hipstopgm.c convert HIPS format to portable graymap lispmtopgm.c convert a Lisp Machine bitmap file into pgm format psidtopgm.c convert PostScript "image" data to portable graymap rawtopgm.c convert raw grayscale bytes to portable graymap pgmtofits.c convert portable graymap to FITS format pgmtofs.c convert portable graymap to Usenix FaceSaver(tm) format pgmtolispm.c convert a portable graymap into Lisp Machine format pgmtopbm.c convert portable graymap to portable bitmap pgmtops.c convert portable graymap to Encapsulated PostScript pgmbentley.c Bentleyize a portable graymap pgmedge.c edge-detect a portable graymap pgmenhance.c edge-enhance a portable graymap pgmhist.c print a histogram of the values in a portable graymap pgmnorm.c normalize contrast in a portable graymap pgmoil.c turn a portable graymap into an oil painting pgmramp.c generate a grayscale ramp libpgm[1-3].c a few utility routines pgmmerge.c merge wrapper routine pgm.h header file for libpgm libpgm.h internal header file for libpgm dithers.h useful include file *.1 manual entries for all of the tools pgm.5 manual entry for the pgm format libpgm.3 manual entry for the pgm library Files in ppm.shar?: Makefile guess Imakefile for X11-type installations giftoppm.c convert GIF to portable pixmap gouldtoppm.c convert Gould scanner file to portable pixmap ilbmtoppm.c convert IFF ILBM to portable pixmap imgtoppm.c convert Img-whatnot to portable pixmap mtvtoppm.c convert MTV ray-tracer output to portable pixmap pcxtoppm.c convert PC Paintbrush format to portable pixmap pgmtoppm.c colorize a portable graymap into a portable pixmap pi1toppm.c convert Atari Degas .pi1 to portable pixmap picttoppm.c convert Macintosh PICT to portable pixmap qrttoppm.c convert QRT ray-tracer output to portable pixmap rawtoppm.c convert raw RGB bytes to portable pixmap rgb3toppm.c combine three portable graymaps into one portable pixmap spctoppm.c convert Atari compressed Spectrum to portable pixmap sputoppm.c convert Atari uncompressed Spectrum to portable pixmap tgatoppm.c convert TrueVision Targa file to portable pixmap ximtoppm.c convert Xim to portable pixmap xpmtoppm.c convert XPM format to portable pixmap ppmtogif.c convert portable pixmap to GIF ppmtoicr.c convert portable pixmap to NCSA ICR graphics ppmtoilbm.c convert portable pixmap to IFF ILBM ppmtopcx.c convert portable pixmap to PC Paintbrush format ppmtopgm.c convert portable pixmap to portable graymap ppmtopi1.c convert portable pixmap to Atari Degas .pi1 ppmtopict.c convert portable pixmap to Macintosh PICT ppmtops.c convert portable pixmap to color Encapsulated PostScript ppmtopuzz.c convert portable pixmap to X11 "puzzle" file ppmtorgb3.c separate a portable pixmap into three portable graymaps ppmtouil.c convert portable pixmap to Motif UIL icon file ppmtoxpm.c convert portable pixmap to XPM format ppmhist.c print a histogram of a portable pixmap ppmpat.c create a pretty pixmap ppmquant.c quantize colors down to a specified number ppmquantall script to run ppmquant on a set of pixmaps ppmrelief.c run a Laplacian Relief filter on a portable pixmap libppm[1-5].c a few utility routines ppmmerge.c merge wrapper routine ppm.h header file for libppm ppmcmap.h header file for colormap routines in libppm ppmdraw.h header file for simple drawing routines in libppm libppm.h internal header file for libppm tga.h definitions for TrueVision Targa files xim.h definitions for Xim files *.1 manual entries for all of the tools ppm.5 manual entry for the ppm format libppm.3 manual entry for the ppm library Files in pnm.shar?: Makefile guess Imakefile for X11-type installations anytopnm script to attempt to convert any format to P?M rasttopnm.c convert Sun raster file to portable anymap tifftopnm.c convert TIFF file to portable anymap xwdtopnm.c convert X10 or X11 window dump to portable anymap pnmtorast.c convert portable anymap to Sun raster file pnmtotiff.c convert portable anymap to TIFF file pnmtoxwd.c convert portable anymap to X11 window dump pnmarith.c perform arithmetic on two portable anymaps pnmcat.c concatenate portable anymaps pnmconvol.c general MxN convolution on a portable anymap pnmcrop.c crop all like-colored borders off a portable anymap pnmcut.c select a rectangular region from a portable anymap pnmdepth.c change the maxval in a portable anymap pnmenlarge.c enlarge a portable anymap N times pnmfile.c describe a portable anymap pnmflip.c perform one or more flip operations on a portable anymap pnmgamma.c perform gamma correction on a portable anymap pnmindex script to build a visual index of a bunch of anymaps pnminvert.c invert a portable anymap pnmmargin script to add a margin to a portable anymap pnmnoraw.c force a portable anymap into ASCII format pnmpaste.c paste a rectangle into a portable anymap pnmrotate.c rotate a portable anymap pnmscale.c scale a portable anymap pnmshear.c shear a portable anymap pnmsmooth script that uses pnmconvol to smooth a anymap pnmtile.c replicate a portable anymap into a specified size libpnm[1-4].c a few utility routines pnmmerge.c merge wrapper routine pnm.h header file for libpnm rast.h definitions for Sun raster files x10wd.h definitions for X10 window dumps x11wd.h definitions for X11 window dumps *.1 manual entries for all of the tools pnm.5 manual entry for the pnm format libpnm.3 manual entry for the pnm library -- Donald C. Wells Associate Scientist dwells at nrao.edu National Radio Astronomy Observatory +1-804-296-0277 520 Edgemont Road Fax= +1-804-296-0278 Charlottesville, Virginia 22903-2475 USA 78:31.1W, 38:02.2N From warnock at nssdca.gsfc.nasa.gov Wed Jan 15 15:21:31 1992 Status: RO X-VM-v5-Data: ([nil nil nil nil nil nil nil nil nil] ["992" "" "2" "January" "92" "13:54:00" "GMT" "Archie Warnock" "warnock at nssdca.gsfc.nasa.gov " nil "16" "Re: pbm+ (was Re: FITS viewer)" "^From:" nil nil "1" nil nil (number " " mark " Archie Warnock Jan 2 16/992 " thread-indent "\"Re: pbm+ (was Re: FITS viewer)\"\n") nil] nil) Newsgroups: alt.sci.astro.fits Organization: Hughes STX - NASA/NCDS News-Software: VAX/VMS VNEWS 1.41 Nntp-Posting-Host: nssdca.gsfc.nasa.gov From: warnock at nssdca.gsfc.nasa.gov (Archie Warnock) Subject: Re: pbm+ (was Re: FITS viewer) Date: 2 Jan 92 13:54:00 GMT In article , dwells at fits.cx.nrao.edu (Don Wells) writes... >The standard answer to most FITS<==>popular_format requirements is the >"pbm+" package. I append the README file for a fairly recent version. >pbm+ is a Unix-style solution, but it is obvious that it might well be >portable to DOS using, e.g., Borland Turbo C. pbm+ is widely It's too much of a memory hog to port easily to DOS, although I believe someone has used DJ Delorie's DJGPP (32-bit Gnu compiler for DOS) to build a 386-specific version. Last time I looked at pbmplus' FITS handling, it took only NAXIS=2 and only BITPIX=8. But that's most likely what one would want to convert to GIF anyway... ---------------------------------------------------------------------------- -- Archie Warnock Internet: warnock at nssdc.gsfc.nasa.gov -- Hughes STX SPAN: NSSDC::WARNOCK -- NASA/GSFC "Unix - JCL for the 90s" From warnock at nssdca.gsfc.nasa.gov Wed Jan 15 15:21:53 1992 Status: RO X-VM-v5-Data: ([nil nil nil nil nil nil nil nil nil] ["992" "" "2" "January" "92" "13:54:00" "GMT" "Archie Warnock" "warnock at nssdca.gsfc.nasa.gov " nil "16" "Re: pbm+ (was Re: FITS viewer)" "^From:" nil nil "1" nil nil (number " " mark " Archie Warnock Jan 2 16/992 " thread-indent "\"Re: pbm+ (was Re: FITS viewer)\"\n") nil] nil) Newsgroups: alt.sci.astro.fits Organization: Hughes STX - NASA/NCDS News-Software: VAX/VMS VNEWS 1.41 Nntp-Posting-Host: nssdca.gsfc.nasa.gov From: warnock at nssdca.gsfc.nasa.gov (Archie Warnock) Subject: Re: pbm+ (was Re: FITS viewer) Date: 2 Jan 92 13:54:00 GMT In article , dwells at fits.cx.nrao.edu (Don Wells) writes... >The standard answer to most FITS<==>popular_format requirements is the >"pbm+" package. I append the README file for a fairly recent version. >pbm+ is a Unix-style solution, but it is obvious that it might well be >portable to DOS using, e.g., Borland Turbo C. pbm+ is widely It's too much of a memory hog to port easily to DOS, although I believe someone has used DJ Delorie's DJGPP (32-bit Gnu compiler for DOS) to build a 386-specific version. Last time I looked at pbmplus' FITS handling, it took only NAXIS=2 and only BITPIX=8. But that's most likely what one would want to convert to GIF anyway... ---------------------------------------------------------------------------- -- Archie Warnock Internet: warnock at nssdc.gsfc.nasa.gov -- Hughes STX SPAN: NSSDC::WARNOCK -- NASA/GSFC "Unix - JCL for the 90s" From dwells at fits.cx.nrao.edu Wed Jan 15 15:21:56 1992 Status: RO X-VM-v5-Data: ([nil nil nil nil nil nil nil nil nil] ["850" "Thu" "2" "January" "1992" "23:02:34" "GMT" "Don Wells" "dwells at fits.cx.nrao.edu " nil "23" "Re: pbm+ (was Re: FITS viewer)" "^From:" nil nil "1" nil nil (number " " mark " Don Wells Jan 2 23/850 " thread-indent "\"Re: pbm+ (was Re: FITS viewer)\"\n") nil] nil) Newsgroups: alt.sci.astro.fits In-Reply-To: warnock at nssdca.gsfc.nasa.gov's message of 2 Jan 92 13: 54:00 GMT Organization: National Radio Astronomy Observatory, Charlottesville, VA From: dwells at fits.cx.nrao.edu (Don Wells) Subject: Re: pbm+ (was Re: FITS viewer) Date: Thu, 2 Jan 1992 23:02:34 GMT In article <2JAN199208544956 at nssdca.gsfc.nasa.gov> warnock at nssdca.gsfc.nasa.gov (Archie Warnock) writes: ".... Last time I looked at pbmplus' FITS handling, it took only NAXIS=2 and only BITPIX=8. But that's most likely what one would want to convert to GIF anyway..." I received a piece of mail which included the following remarks about adding the additional functionality to pbm+: "I actually fixed it at one point to do those things, but never sent the fix in and have since lost it. It was trivial, 10 minutes work if that." Again, volunteers? -Don -- Donald C. Wells Associate Scientist dwells at nrao.edu National Radio Astronomy Observatory +1-804-296-0277 520 Edgemont Road Fax= +1-804-296-0278 Charlottesville, Virginia 22903-2475 USA 78:31.1W, 38:02.2N From souva at aibn53.mpifr-bonn.mpg.de Wed Jan 15 15:21:59 1992 Status: RO X-VM-v5-Data: ([nil nil nil nil nil nil nil nil nil] ["518" "" "3" "January" "92" "14:05:07" "GMT" "Ignatios Souvatzis" "souva at aibn53.mpifr-bonn.mpg.de " nil "15" "Re: pbm+ (was Re: FITS viewer)" "^From:" nil nil "1" nil nil (number " " mark " Ignatios Souvatzi Jan 3 15/518 " thread-indent "\"Re: pbm+ (was Re: FITS viewer)\"\n") nil] nil) Newsgroups: alt.sci.astro.fits Reply-To: isouvatzis at babsy.mpifr-bonn.mpg.de Organization: Radioastronomisches Institut der Universitaet Bonn, Bonn, FRG In-Reply-To: dwells at fits.cx.nrao.edu's message of 2 Jan 92 23:02:34 GMT Nntp-Posting-Host: aibn53 From: souva at aibn53.mpifr-bonn.mpg.de (Ignatios Souvatzis) Subject: Re: pbm+ (was Re: FITS viewer) Date: 3 Jan 92 14:05:07 GMT I just looked at the fitstopgm program of the Extended Portable Bitmap Toolkit Distribution of 05oct91 Previous distribution 27sep91 I just browsed the code, and actually it -claims to create a series of graymaps when naxis3>1 -claims to handle bitpix=8,bitpix=16,bitpix=32 -- Paper mail: Ignatios Souvatzis, Radioastronomisches Institut der Universitaet Bonn, Auf dem Huegel 71, D-5300 Bonn 1, FRG Internet: souva at babsy.mpifr-bonn.mpg.de From SEB at lns61.tn.cornell.edu Wed Jan 15 15:22:04 1992 Status: RO X-VM-v5-Data: ([nil nil nil nil nil nil nil nil nil] ["1905" "Wed" "1" "January" "1992" "19:29:00" "GMT" "\"Selden E. Ball, Jr.\"" "SEB at lns61.tn.cornell.edu" nil "46" "Re: pbm+ (was Re: FITS viewer)" "^From:" nil nil "1" nil nil (number " " mark " \"Selden E. Ball, Jan 1 46/1905 " thread-indent "\"Re: pbm+ (was Re: FITS viewer)\"\n") nil] nil) Newsgroups: alt.sci.astro.fits Organization: National Radio Astronomy Observatory From: "Selden E. Ball, Jr." Subject: Re: pbm+ (was Re: FITS viewer) Date: Wed, 1 Jan 1992 19:29:00 GMT Don Wells recently posted a message about the Jan'91 version of PBM+. I'm appending Jef Pokanzer's meessage about the October'91 release, which is supposed to be included in the X11R5 distribution. FITS support doesn't seem to have been significantly improved, Most of the source code is very portable. Unfortunately, the modifications needed for VMS support were not included in the 1991 version of PBM+. It does include conditionals for BSD, SYSV, MSDOS, ANSI C and "C Classic". Porting it to an Amiga using SAS C, for example, was trivial (except for the makefiles). I hope this helps. Selden Ball seb at lns61.tn.cornell.edu ================================================== Xref: dog.ee.lbl.gov alt.graphics.pixutils:1748 comp.graphics:19824 comp.windows.x:40857 comp.sources.d:5690 Path: dog.ee.lbl.gov!ucbvax!agate!apple!well!jef From: jef at well.sf.ca.us (Jef Poskanzer) Newsgroups: alt.graphics.pixutils,comp.graphics,comp.windows.x,comp.sources.d Subject: PBMPLUS patch - update from 27sep91 to 05oct91. Message-ID: <27709 at well.sf.ca.us> Date: 6 Oct 91 17:14:51 GMT References: <27544 at well.sf.ca.us> Reply-To: Jef Poskanzer Followup-To: alt.graphics.pixutils Organization: Acme Software Lines: 333 Well, I got back from Hawaii a day early and found a small crop of bug reports waiting. At least one of them seemed serious enough to attempt to get another release in under the X11R5 contrib tape deadline. So much for planning ahead. This new version is dated 05oct91. If you have the 27sep91 version, via comp.sources.misc or FTP, you can update with the appended patch file. Or, you can FTP the new version complete from: export.lcs.mit.edu:contrib/pbmplus05oct91.tar.Z (18.24.0.12) ftp.ee.lbl.gov:pbmplus05oct91.tar.Z (128.3.112.20) Jef Poskanzer jef at well.sf.ca.us {apple, ucbvax}!well!jef - - - - - - - - - - [text of patches deleted] From bschlesinger at nssdca.gsfc.nasa.gov Wed Jan 15 15:22:08 1992 Status: RO X-VM-v5-Data: ([nil nil nil nil nil nil nil nil nil] ["1421" "" "3" "January" "92" "14:57:00" "GMT" "Barry Schlesinger" "bschlesinger at nssdca.gsfc.nasa.gov " nil "25" "What FITS Is and Isn't" "^From:" nil nil "1" nil nil (number " " mark " Barry Schlesinger Jan 3 25/1421 " thread-indent "\"What FITS Is and Isn't\"\n") nil] nil) Newsgroups: comp.graphics,alt.sci.astro.fits Keywords: FITS Organization: NASA - Goddard Space Flight Center News-Software: VAX/VMS VNEWS 1.41 Nntp-Posting-Host: nssdca.gsfc.nasa.gov From: bschlesinger at nssdca.gsfc.nasa.gov (Barry Schlesinger) Subject: What FITS Is and Isn't Date: 3 Jan 92 14:57:00 GMT This posting is in response to inquiries that appear from time to time about the "FITS image format." FITS (Flexible Image Transport System) is a data format designed to allow convenient exchange of astronomical data. A FITS file consists of a series of Header Data Units (HDUs), each of which consists of a header made up of keyword=value type statements describing data that follow. The data section of the HDU may contain a digital image, BUT IT DOESN'T HAVE TO. Other possible formats include tables and multidimensional matrices that are not images. The "Image" in the name comes from the original use of the format to transport digital images, but it's not just for images any more. FITS is not principally a graphics format designed for the transfer of pictures, in which standard support for many platforms exists as part of the package for decoding the image transported. Separate software must be developed or obtained for converting the data from the FITS file into a form that can be readily displayed. As noted by Don Wells in his alt.sci.astro posting, the Extended Portable Bitmap Toolkit (pbm+) can be used for converting many FITS files to such a format, but support for all FITS files where the data are in the form of an image, in particular those with floating point data or more than two dimensions, is not guaranteed. Barry Schlesinger NSSDC/NOST FITS Support Office From bschlesinger at nssdca.gsfc.nasa.gov Wed Jan 15 15:22:11 1992 Status: RO X-VM-v5-Data: ([nil nil nil nil nil nil nil nil nil] ["2118" "" "7" "January" "92" "15:30:00" "GMT" "Barry Schlesinger" "bschlesinger at nssdca.gsfc.nasa.gov " nil "44" "Paper copies of version 0.3 NASA Draft FITS Standard" "^From:" nil nil "1" nil nil (number " " mark " Barry Schlesinger Jan 7 44/2118 " thread-indent "\"Paper copies of version 0.3 NASA Draft FITS Standard\"\n") nil] nil) Newsgroups: alt.sci.astro.fits Keywords: FITS, draft, standard, hardcopy Organization: NASA - Goddard Space Flight Center News-Software: VAX/VMS VNEWS 1.41 Nntp-Posting-Host: nssdca.gsfc.nasa.gov From: bschlesinger at nssdca.gsfc.nasa.gov (Barry Schlesinger) Subject: Paper copies of version 0.3 NASA Draft FITS Standard Date: 7 Jan 92 15:30:00 GMT The paper edition of Version 0.3b of the NASA/OSSA Office of Standards and Technology (NOST) Draft Standard for Implementation of the Flexible Image Transport System (FITS) is now available from the NOST Librarian. As noted in the announcement of the ftp version, the most significant changes between versions 0.2 and 0.3 are elimination of the restriction on alphabetic characters to upper case in table field names (value of TTYPEn keywords) and replacement of the informational appendix describing the AIPS A3DTABLE construct with text describing the Cotton and Tody BINTABLE binary tables proposal. As noted in the announcement of electronic availability, the Panel expects that only minor revisions, if any, will be necessary before submission to the NOST Accreditation Panel for approval as a NASA standard and to the IAU FITS Working group for endorsement as the standard for FITS Consequently, no further general community comment period is envisioned, although comments may be sent to the address at the end of this announcement or to the user FITS at the same nodes as the Librarian. The purpose of making version 0.3 generally available now is to allow those individuals or groups who may have been using earlier drafts as a reference on FITS, in spite of their provisional status, to replace their copies of the earlier draft with the improved one. As before, the NOST Standard should not be considered to supersede the existing FITS documentation. ====================================================================== The Standards Librarian can be reached at the following E-mail addresses (DECnet) NCF::NOST (Internet) nost at nssdca.gsfc.nasa.gov by U. S. Mail at NASA/OSSA Office of Standards and Technology Code 933 (Building 26, room G10a) Goddard Space Flight Center Greenbelt MD 20771 and by telephone at (301)286-3575. The telephone is equipped with a voice mail system to take messages >from touch tone phones. The Librarian's normal hours are 8:00 A. M. - 5:00 P. M., Eastern Time. Anonymous ftp and DECnet access through NSSDCA(.gsfc.nasa.gov) remain available. From landsman at stars.gsfc.nasa.gov-286-3625) Tue Jan 21 17:46:29 1992 Status: RO X-VM-v5-Data: ([nil nil nil nil nil nil nil nil nil] ["1267" "" "9" "January" "92" "05:24:00" "GMT" "301" "landsman at stars.gsfc.nasa.gov (Wayne Landsman -286-3625)" nil "24" "CD matrix in a FITS header" "^From:" nil nil "1" nil nil (number " " mark " 301 Jan 9 24/1267 " thread-indent "\"CD matrix in a FITS header\"\n") nil] nil) Newsgroups: alt.sci.astro.fits Organization: NASA/GSFC-Laboratory for Astronomy and Solar Physics News-Software: VAX/VMS VNEWS 1.4-b1 Nntp-Posting-Host: stars.gsfc.nasa.gov From: landsman at stars.gsfc.nasa.gov (Wayne Landsman (301)-286-3625) Subject: CD matrix in a FITS header Date: 9 Jan 92 05:24:00 GMT I'm interested in placing image astrometry in my FITS header using the "coordinate description" CD matrix favored by the Space Telescope group. These are partial derivatives which relate instrumental coordinates to astronomical coordinates, and provide more generality than the the CDELTi astrometry described in the FITS papers. (For example, they allow for non-perpendicular axis.) I have seen the CD matrix formatted as a FITS keyword in the form CD1_1, CD1_2... and also in the form CD001001,CD001002... I believe that the first format was once deprecated because it contained an underscore. But the NOST FITS document explicity allows underscores, so is there any reason to prefer either of the above representations of the CD matrix? A more general question concerns the status of coordinate systems within the FITS standard. A couple of years ago I thought an effort was being made to standardize more general coordinate systems within FITS. However, the latest NOST FITS document makes no mention of this, and limits references to astrometry to the CROTAi and CRPIXi keywords. Is there still hope of standardizing more general astrometry, or has this effort been scuttled for a while? Wayne Landsman landsman at stars.gsfc.nasa.gov From bschlesinger at nssdca.gsfc.nasa.gov Tue Jan 21 17:46:37 1992 Status: RO X-VM-v5-Data: ([nil nil nil nil nil nil nil nil nil] ["1838" "" "9" "January" "92" "14:55:00" "GMT" "Barry Schlesinger" "bschlesinger at nssdca.gsfc.nasa.gov " nil "40" "Re: CD matrix in a FITS header" "^From:" nil nil "1" nil nil (number " " mark " Barry Schlesinger Jan 9 40/1838 " thread-indent "\"Re: CD matrix in a FITS header\"\n") nil] nil) Newsgroups: alt.sci.astro.fits Summary: The NASA Standard codifies the rules; it doesn't make them Keywords: FITS, World Coordinates Organization: NASA - Goddard Space Flight Center News-Software: VAX/VMS VNEWS 1.41 Nntp-Posting-Host: nssdca.gsfc.nasa.gov From: bschlesinger at nssdca.gsfc.nasa.gov (Barry Schlesinger) Subject: Re: CD matrix in a FITS header Date: 9 Jan 92 14:55:00 GMT In article <9JAN199201244080 at stars.gsfc.nasa.gov>, landsman at stars.gsfc.nasa.gov (Wayne Landsman (301)-286-3625) writes... > > I'm interested in ... using >the "coordinate description" CD matrix favored by the Space Telescope >group. These are partial derivatives which relate instrumental coordinates >to astronomical coordinates, and provide more generality than the >the CDELTi astrometry described in the FITS papers.... > >A couple of years ago I thought an effort >was being made to standardize more general coordinate systems within FITS. >However, the latest NOST FITS document makes no mention of this, and limits >references to astrometry to the CROTAi and CRPIXi keywords. Is there >still hope of standardizing more general astrometry, or has this effort been >scuttled for a while? The charge to the Technical Panel developing the NOST Standard was to codify the existing IAU FITS Standard, eliminating contradictions between and ambiguities in the original FITS Papers. The Panel decided early in the process that it would include material in the Standard only if there was either a basis in the FITS papers or community consensus on the issue as verified by the IAU FITS Working Group and reviewers' comments; it would not attempt to create new FITS rules. On the basis of these criteria, the Panel decided that it would not be appropriate to include any World Coordinates specifications in the Standard. I agree that standardization of World Coordinates is needed, but we do not want to include any such rules in the Standard until the IAU Working Group has confirmed that there is a consensus. Maybe people would like to discuss the World Coordinates questions here. Barry Schlesinger Coordinator, NOST FITS Support Office and Secretary, NOST FITS Technical Panel From dwells at fits.cx.nrao.edu Tue Jan 21 17:46:41 1992 Status: RO X-VM-v5-Data: ([nil nil nil nil nil nil nil nil nil] ["2255" "" "15" "January" "92" "05:37:39" "GMT" "Don Wells" "dwells at fits.cx.nrao.edu " nil "48" "RFD: sci.astro.fits" "^From:" nil nil "1" nil nil (number " " mark " Don Wells Jan 15 48/2255 " thread-indent "\"RFD: sci.astro.fits\"\n") nil] nil) Newsgroups: news.announce.newgroups,news.groups,sci.astro,alt.sci.astro.fits,sci.space Followup-To: news.groups Nntp-Posting-Host: cs.rpi.edu Organization: National Radio Astronomy Observatory, Charlottesville, VA From: dwells at fits.cx.nrao.edu (Don Wells) Subject: RFD: sci.astro.fits Date: 15 Jan 92 05:37:39 GMT Request For Discussion to Create USENET Newsgroup Name: sci.astro.fits Status: Unmoderated Charter: This newsgroup will provide a forum for the discussion of all topics concerning the FITS [Flexible Image Transport System] data format. The newsgroup will be interfaced to the Email exploder fitsbits at fits.cx.nrao.edu so that traffic originating on either the newsgroup on the exploder will be automatically transmitted to the other. This new newsgroup will replace existing newsgroup alt.sci.astro.fits. Reference Entry: sci.astro.fits Issues related to FITS [Flexible Image Transport System] Initial Discussion: On 19 December I posted a message to alt.sci.astro.fits entitled "Create sci.astro.fits?". I received four replies, three in favor and one opposed. The person opposed was not really in opposition to a FITS newsgroup per se, but rather to proliferation of special interest groups. We had an exchange of Email which explored the class of related issues, but the heart of the difference of opinion is fairly well conveyed by the appended extract, in which my remarks are labelled "DW" and the other person's opinions are labelled "OP": OP> I object in principle to groups on Usenet (which is OP> essentially a general purpose public broadcasting system) which have a OP> total potential worldwide readership numbered in the thousands, most OP> of whom don't know about Usenet in the first place, and who are OP> concentrated at only a small minority of the sites. DW> Very few groups on Usenet are read by even 10% of the readers. In DW> fact, the purpose of Usenet is to provide a communication mechanism DW> for modest-sized subsets of the community who have specialized DW> interests. In other words, you are objecting in principle to the main DW> *principle* of Usenet! Each of these small communities agrees to carry DW> the traffic of the other communities, and thus all benefit. -- Donald C. Wells Associate Scientist dwells at nrao.edu National Radio Astronomy Observatory +1-804-296-0277 520 Edgemont Road Fax= +1-804-296-0278 Charlottesville, Virginia 22903-2475 USA 78:31.1W, 38:02.2N From dwells at fits.cx.nrao.edu Wed Jan 22 16:53:01 1992 Status: RO X-VM-v5-Data: ([nil nil nil nil nil nil nil nil nil] ["2788" "Wed" "22" "January" "1992" "21:47:16" "GMT" "Don Wells" "dwells at fits.cx.nrao.edu " nil "58" "Re: RFD: sci.astro.fits" "^From:" nil nil "1" nil nil (number " " mark " Don Wells Jan 22 58/2788 " thread-indent "\"Re: RFD: sci.astro.fits\"\n") nil] nil) Newsgroups: news.groups,alt.sci.astro.fits In-Reply-To: dwells at fits.cx.nrao.edu's message of 15 Jan 92 05: 37:39 GMT Followup-To: news.groups Organization: National Radio Astronomy Observatory, Charlottesville, VA From: dwells at fits.cx.nrao.edu (Don Wells) Subject: Re: RFD: sci.astro.fits Date: Wed, 22 Jan 1992 21:47:16 GMT In article on 15-January-92 dwells at fits.cx.nrao.edu (Don Wells) writes: DW> Request For Discussion to Create USENET Newsgroup DW> DW> Name: sci.astro.fits DW> DW> Status: Unmoderated DW> DW> Charter: DW> DW> This newsgroup will provide a forum for the discussion of all topics DW> concerning the FITS [Flexible Image Transport System] data format. DW> The newsgroup will be interfaced to the Email exploder DW> fitsbits at fits.cx.nrao.edu so that traffic originating on either the DW> newsgroup on the exploder will be automatically transmitted to the DW> other. This new newsgroup will replace existing newsgroup DW> alt.sci.astro.fits. Two followups, private Email to me from several people, and the "OP" [Other Person] quoted in the RFD have argued that the traffic volume of alt.sci.astro.fits plus the implied(?) small size of the special-interest user community suggest that formation of the new newsgroup is not justified. I do not agree. First, number of postings is not necessarily related to either the importance of a subject or to the need for a newsgroup. Second, many sites do not subscribe to the alt.* heirarchy, so traffic may prove to be larger in sci.astro.fits than in alt.sci.astro.fits. Finally, I believe that the astronomical computing community *is* large enough. In the end this debate cannot be resolved by an appeal to currently-known facts. Instead, we must follow the USEnet procedure, RFD and CFV, and let the votes decide the question. One person suggested to me in Email that the scope of the charter should be broadened to include astronomical software in general. I do not agree with this. I recommend that the WGAS-L exploder be gated to a new newsgroup bit.listserv.wgas-l (the AUVM gateway service will do this for our community on request); WGAS-L has been used for general software discussion during the past year. I have received several Email messages expressing support for the sci.astro.fits proposal. I thank those of you who sent them! It wouldn't hurt for a few of you to also post such statements as followups (in news.groups, of course). I have not seen anything in the followups or Email which indicates to me that the proposed charter for sci.astro.fits should be modified. I asked "group-advice at rpi.edu" how soon the CFV [Call For Votes] can be issued; the answer was "please don't send out a CFV until after 5 February". Therefore, discussion of this RFD will continue for at least another 14 days. -- Donald C. Wells Associate Scientist dwells at nrao.edu National Radio Astronomy Observatory +1-804-296-0277 520 Edgemont Road Fax= +1-804-296-0278 Charlottesville, Virginia 22903-2475 USA 78:31.1W, 38:02.2N From jwright at cfht.hawaii.edu Tue Jan 28 18:12:23 1992 Status: RO X-VM-v5-Data: ([nil nil nil nil nil nil nil nil nil] ["13712" "Wed" "22" "January" "1992" "03:31:53" "GMT" "Jim Wright" "jwright at cfht.hawaii.edu " nil "349" "Astronomical image compression" "^From:" nil nil "1" nil nil (number " " mark " Jim Wright Jan 22 349/13712 " thread-indent "\"Astronomical image compression\"\n") nil] nil) Newsgroups: comp.compression,alt.comp.compression,alt.sci.astro.fits Nntp-Posting-Host: quonset.cfht.hawaii.edu Organization: University of Hawaii From: jwright at cfht.hawaii.edu (Jim Wright) Subject: Astronomical image compression Date: Wed, 22 Jan 1992 03:31:53 GMT This article is to announce the first release of the program Compfits. Compfits was developed at Canada-France-Hawaii Telescope Corp. for lossless (or lossy) compression of 16 bit astronomical images (FITS or non-FITS format). Compfits is a public domain program and is available via anonymous ftp from uwila.cfht.hawaii.edu (128.171.80.50). To get it, log in as anonymous, retrieve the compressed tar file compfits.tar.Z in the pub/compfits directory and untar it with the command "zcat compfits.tar.Z | tar xf -". What follows is the manpage of Compfits. Just cut after the "------" and use the command nroff -man to read it. Feel free to test this program and to mail any comments, criticism or suggestions to compfits at cfht.hawaii.edu . Jean-Pierre Veran Canada-France-Hawaii Telescope Corporation / Ecole Nationale Superieure des Telecommunications de Paris ---------------------------------------------------------------------- . at (#)Compfits.1 1.0 01/14/92 .TH COMPFITS 1 "January 1992" "Public Domain" .SH NAME compfits \- compress/uncompress 16 bit images (lossless or lossy) .SH SYNOPSIS .SH Compression: .PP .HP 5 .B compfits [\ \fB\-cinqvwL\ \fR] \ \fB\-F\ \fIorigfile\ \fR [\ \fB\-f\ \fIcompfile\ \fR] [\ \fB\-P\ \fIpathext\ \fR] [\ \fB\-p\ \fIargext\ \fR] [\ \fB\-N\ \fInuser\ \fR] [\ \fB\-e\ \fIepsilon\ \fR] [\ \fB\-m\ \fImsbbuf\ \fR] [\ \fB\-l\ \fIlsbbuf\ \fR] [\ \fB\-t\ \fItesbuf\ \fR] .PP .SH Decompression: .PP .HP 5 .B compfits \ \fB\-d\ \fR [\ \fB\-inqv\ \fR] \ \fB\-f\ \fIcompfile\ \fR [\ \fB\-F\ \fIdecfile\ \fR] [\ \fB\-P\ \fIpathext\ \fR] [\ \fB\-p\ \fIargext\ \fR] [\ \fB\-m\ \fImsbbuf\ \fR] [\ \fB\-l\ \fIlsbbuf\ \fR] [\ \fB\-t\ \fItesbuf\ \fR] .SH DESCRIPTION \fICompfits\fP is a utility program developed at Canada-France-Hawaii Telescope Corporation for lossless compression of astronomical 16 bits/pixel FITS (Flexible Image Transport System) format images. These images are usually very noisy and don't shrink well with the typical lossless compression algorithms. Options are available to compress non-FITS files and to perform lossy compression. .PP \fICompfits\fP doesn't compress anything by itself and therefore needs an external compression program to work. \fICompfits\fP analyzes the bit planes of the original image to see which contain only noise (the low order planes) and which contain the actual information (the high order planes). These two sets of bit planes, or partitions, are respectively called the \fBLSB image\fP (containing the n least significant bits of the original image) and the \fBMSB image\fP (containing the 16-n most significant bits of the original image). The LSB image is supposed to contain only noise, therefore any attempt to compress it would actually increase its size. \fICompfits\fP writes it as it is in the compressed file, just packing the bits one after the other. The MSB image contains the information and can usually compress fairly well. \fICompfits\fP sends it to the chosen external compression program which must be a filter (i.e. read stdin and send compressed version to stdout) and writes the compressed MSB image in the compressed file. Of course, the best partition (i.e. the best value of n) depends a good deal on the image and slightly on the external compression program used. \fICompfits\fP makes a guess for the optimal n trying to estimate the entropy of the different bit planes, unless the user specifies a partition. .PP The compressed file has the following structure: .nf .I HEADER .I LSB image .I Compressed MSB image .sp .fi The header is the FITS header if the original is a FITS format image or a blank 2880 bytes FITS header if it is not. .PP For the decompression, it is necessary to know which partition was used during the compression. This information is written in the header as a card named \fBCOMPART\fP. .PP If the original file is a FITS file the value of the \fBCOMPART\fP card is a long integer: \fIn+17*size_diff\fP where \fIsize_diff\fP is the difference in bytes between the actual size of the file and the expected size according to the FITS header (\fIsize_diff\fP should normally be zero). .PP If the original file is not a FITS file the value of the \fBCOMPART\fP card is a long integer: \fIn+17*size_file\fP where \fIsize_file\fP is the size in bytes of the original file. .PP Another card named \fBCOMPRESS\fP is added to indicate that the file is compressed and to give the name of the compression algorithm. When \fICompfits\fP is used, the value of the \fBCOMPRESS\fP card is set to \fBCOMPFITS\fP for a lossless compression and to \fBLOSSFITS\fP for a lossy compression. When it is not a FITS image, the added header contains both the \fBCOMPRESS\fP and the \fBCOMPART\fP card following a \fBSIMPLE\fP card with the logical value \fB'F'\fP (false), to denote that although the header may be recognized as FITS, the data does not conform to the FITS standard. .PP Because it needs to first analyse the data before starting the compression process, \fICompfits\fP needs an input disk file. Because it needs to write the compressed MSB and LSB images at the same time to different locations in the compressed file, \fICompfits\fP needs an output disk file. In other words, \fICompfits\fP cannot be used as a filter. The recommended suffix for files compressed with \fICompfits\fP is \fB.CF\fP. .SH OPTIONS All numbers indicating sizes may be suffixed by \fBb\fP (512 bytes blocks), \fBk\fP (kilobytes), or \fBm\fP (megabytes). .TP 12 .B \-c Compress data. .TP .B \-d Decompress data. .TP .BI \-e \ epsilon Use this value of \fIepsilon\fP instead of the defined one. .TP .BI \-f \ filename Name of the compressed file. For compression, the default is \fIoriginal\fP\fB.CF\fP. For decompression, there is no default; this option must be given. .TP .BI \-F \ filename Name of the original or reconstructed file. For compression, there is no default; this option must be given. For decompression, the default is \fIcompressed\fP\fB.REC\fP. .TP .B \-i Ignore garbage at the end of file if any (this may happen if the file is blocked for storage). .TP .B \-L Lossy compression: the LSB image is not written which allows the program to achieve particularly good compression ratios. Reconstruction is not exact. .TP .BI \-l \ lsbbuf Size of the buffer for the LSB image. Data is written to or read from the disk in blocks of this size. .TP .BI \-m \ msbbuf Size of the buffer for the MSB image. Data is sent to or received from the external compression program in blocks of this size. .TP .BI \-N \ nuser Force the partion value \fIn\fP to be \fInuser\fP and not the one determined by the program. .TP .B \-n Indicates that the file to be compressed or uncompressed is not a FITS file. .TP .BI \-P \ pathext Path to the external compression or decompression program. Default is \fI/usr/local/bin/compact_1.0\fP for compression. Default is \fI/usr/local/bin/uncompact_1.0\fP for decompression. .TP .BI \-p \ argext Arguments of the external compression or decompression program. If multiple arguments with imbedded spaces are present, this must be a quoted string. Default is "\fB-q\fP" (quiet mode) for compact. .TP .B \-q Quiet mode: no compression or decompression statistics will be printed on stderr. .TP .BI \-t \ tesbuf Size of the central test zone for determining the best partition. Default is 512*512*16 bits. .TP .B \-v Verbose: prints some information on the image to stderr. .TP .B \-w Print the entropy of all the bit planes. .SH THEORY OF OPERATION For \fICompfits\fP, the critical operation is to determine the optimal partition of LSB/MSB (i.e. determine the optimal \fIn\fP). To do so, it tries to compute the entropy of the different bit planes of a subimage. For homogeneous 16 bits/pixel images, experiments show that there is no advantage in sampling a subimage bigger than 512*512. First the image is translated from the binary code into the Gray code to give more coherence to the bit planes. Then for each bit plane \fIi\fP, starting with the zeroth order and increasing, the entropy is computed assuming that the bit plane is a binary discrete memoryless source. This continues until \fIi-entropy(i)>epsilon\fP. Thus the optimal \fIn\fP is chosen such that \fIn-entropy(n)epsilon\fP. This comes simply from the fact that the low order bit planes are supposed to contain almost only noise and therefore \fIentropy(i)\fP is very close to \fIi\fP, whereas high order bit planes mainly contain information so \fIentropy(i)\fP is much lower than \fIi\fP. With \fICompfits\fP plus \fICompact 1.0\fP, the experimental best value of \fIepsilon\fP is 0.01 (used as the default \fIepsilon\fP). Usually the function \fIf(i)=i-entropy(i)\fP is non-decreasing with a sharp transition for \fIi=n\fP, which makes the determination of the optimal partition quite reliable. Of course, considering each bit plane as a binary discrete memoryless source is a bit simplistic. However, as the computation is actually performed only on the low order bit planes (i.e. almost white noise most of the time), this model is quite accurate. .SH PERFORMANCE The compression ratio achieved depends of course on the external compression program. As \fICompfits\fP assumes a 16 bits/pixel image, the best results are obtained when using an external compression program which assumes a 16 bit word input stream too. An example of such a program is the public domain \fICompact 1.0\fP, using the Lempel-Ziv algorithm. The default value of \fIepsilon\fP is set for use with this program. .PP \fICompfits\fP plus \fICompact 1.0\fP were tested on a number of 8 megabyte FITS images (2048*2048 pixels, 16 bits/pixels) taken at the Canada-France-Hawaii Telescope. Typically an object image (i.e. an actual sky image rather than a flat field or bias image) is compressed to 4 megabytes whereas usual lossless compression programs such as \fIUnix Compress\fP or \fICompact 1.0\fP rarely do better than 6 megabytes. The difference is even more drammatic when the images are very noisy (e.g. flat field images). Such images may not shrink at all with a usual lossless compression program whereas it is reduced to 6 megabytes with \fICompfits\fP plus \fICompact 1.0\fP. .PP On these astronomical images, and with the default value of \fIepsilon\fP, the partition found by \fICompfits\fP is almost always optimal; any other partition leads to worse results. Note that a partition with \fIn=0\fP (0 LSB) is the same as using the external program alone. The more noise there is in the image, the higher \fIn\fP is and the greater the difference between the use of \fICompfits\fP and the simple use of the external program is. .PP The visual result of lossy compression is usually quite good as the LSB image which is removed is supposed to contain only noise. Moreover, 256 color workstation displays usually can't show the whole range of intensity which hides the defects. However a lossy compressed astronomical image can't possibly be considered as a scientific frame. .PP .B WARNING: This progam will work well on any noisy 16 bits/word file, but may yield poor results on any other kind of file. .SH DIAGNOSTIC \fICompfits\fP prints error messages and warning messages on stderr. It differentiates between "error due to operating system", typically producing an \fIerrno\fP code and "error due to program", (all the others). .PP .nf \fICompfits\fP exits with a 0 status on normal completion. .sp The exit status is negative on error: -1 for a system error; -2 for a program error. .sp The exit status is positive on warning: 1 for bad arguments; 2 if the file is shorter than expected from examining the header; 3 if the file larger than expected from examining the header; 4 if the image is not 16 bits/pixel; 10 if the image is not a FITS file (unexpected). .SH EXAMPLES .B compfits -F image will compress the file image, using \fI/usr/local/bin/compact_1.0\fP as the external compression program and with all the default parameters. The compressed file will be \fIimage.CF\fP. .PP .B compfits -d -f image.CF will do the reverse, uncompressing \fIimage.CF\fP using \fI/usr/local/bin/uncompact_1.0\fP as the external program. The reconstructed file will be \fIimage.CF.REC\fP and will be identical to \fIimage\fP. .PP .B compfits -F image -f compimage .B -P /usr/bin/compress -p -b16 will compress \fIimage\fP to \fIcompimage\fP, using \fI/usr/bin/compress\fP with options \fI-b16\fP as the external compression program. All other parameters will be default ones. .PP .B compfits -d -f compimage -F recimage .B -P /usr/bin/uncompress -p -b16 will do the reverse. \fIrecimage\fP and \fIimage\fP will be identical. .PP .B compfits -F image -N 4 -w (reverse: .B compfits -d -f image.CF) will compress \fIimage\fP to \fIimage.CF\fP forcing the partition to be 4 LSB / 12 MSB, and displaying the entropy of the different bit planes. This is useful when testing if the default value of \fIepsilon\fP is optimal. .PP .B compfits -F image -L (reverse: .B compfits -d -f image.CF) will compress \fIimage\fP to \fIimage.CF\fP. The compression will be lossy. Therefore after the decompression, \fIimage\fP and \fIimage.CF.REC\fP won't be identical. .SH AUTHOR .nf Jean-Pierre Veran Canada-France-Hawaii Telescope Corporation / Ecole Nationale Superieure des Telecommunications de Paris .sp Copyright (C) 1992 Canada-France-Hawaii Telescope Corp. .fi .PP All the programs in the compfits package are distributed WITHOUT any warranty, and are under the terms of the GNU General Public License. .PP .nf Please, send any questions or comments to "compfits at cfht.hawaii.edu". .fi -- Jim Wright jwright at cfht.hawaii.edu Canada-France-Hawaii Telescope Corp. From bschlesinger at nssdca.gsfc.nasa.gov Tue Jan 28 18:12:31 1992 Status: RO X-VM-v5-Data: ([nil nil nil nil nil nil nil nil nil] ["788" "Fri" "24" "January" "1992" "14:37:00" "GMT" "Barry Schlesinger" "bschlesinger at nssdca.gsfc.nasa.gov " nil "16" "Extension type name 'COMPRESS' reserved" "^From:" nil nil "1" nil nil (number " " mark " Barry Schlesinger Jan 24 16/788 " thread-indent "\"Extension type name 'COMPRESS' reserved\"\n") nil] nil) Newsgroups: alt.sci.astro.fits Nntp-Posting-Host: nssdca.gsfc.nasa.gov Organization: Goddard Space Flight Center From: bschlesinger at nssdca.gsfc.nasa.gov (Barry Schlesinger) Subject: Extension type name 'COMPRESS' reserved Date: Fri, 24 Jan 1992 14:37:00 GMT Preben Grosbol, chair of the IAU FITS Working Group, has notified me that the extension type name 'COMPRESS' has been reserved. It has been added to the others on the list of reserved extension type names kept in the file XTENSION.LIS available by anonymous ftp and DECnet on nssdca.gsfc.nasa.gov. A formal draft proposal for the extension with this type name, designed to contain compressed FITS data should appear in 1-2 weeks. A preprint of a paper discussing the concepts to be used is available by anonymous ftp from fits.cx.nrao.edu in the directory FITS/Documents (case is significant) as fitscomp.tex (LaTeX format) or fitscomp.ps (Postscript format). Barry Schlesinger NSSDC/NOST FITS Support Office fits at nssdca.gsfc.nasa.gov or NCF::FITS (301)513-1634 From pedelty at jansky.gsfc.nasa.gov Tue Feb 4 10:08:34 1992 Status: RO X-VM-v5-Data: ([nil nil nil nil nil nil nil nil nil] ["817" "Thu" "30" "January" "1992" "20:52:34" "GMT" "Jeffrey A. Pedelty" "pedelty at jansky.gsfc.nasa.gov " nil "24" "FITSIO on a DECstation 5000" "^From:" nil nil "1" nil nil nil nil] nil) X-VM-VHeader: ("From:" "Sender:" "Resent-From" "To:" "Apparently-To:" "Cc:" "Subject:" "Date:" "Resent-Date:") nil X-VM-Bookmark: 15 Newsgroups: alt.sci.astro.fits Organization: National Radio Astronomy Observatory From: pedelty at jansky.gsfc.nasa.gov (Jeffrey A. Pedelty) Subject: FITSIO on a DECstation 5000 Date: Thu, 30 Jan 1992 20:52:34 GMT I'm looking for anyone who's successfully built Bill Pence's FITSIO package on a DECstation 5000. The following builds his example1 program without apparent error, but the program bombs while writing the test FITS file. f77 -c fitsio.for f77 -c fitsdec.for f77 -o example1 example1.for fitsio.o fitsdec.o Do I need to specify anything else on the f77 command line? Thanks in advance, Jeff Pedelty BTW: His package works just fine on a Silicon Graphics IRIS. Use the fitssun.for specific routines, and compile with -static and -old_rl options. The -old_rl is not needed if you're running pre- 3.2 IRIX. --- Jeffrey Pedelty | pedelty at jansky.gsfc.nasa.gov Code 936 | Phone: 301-286-3065, Fax: x3221 NASA / GSFC, Greenbelt, MD 20771 | "We're not making this up" From EXOSAT at IMISIAM.MI.CNR.IT Tue Feb 4 10:08:40 1992 Status: RO X-VM-v5-Data: ([nil nil nil nil nil nil nil nil nil] ["1950" "Fri" "31" "January" "1992" "14:17:30" "GMT" "Lucio Chiappetti - IFC Milano" "EXOSAT at IMISIAM.MI.CNR.IT" nil "41" "Re: FITSIO on a DECstation 5000" "^From:" nil nil "1" nil nil nil nil] nil) Newsgroups: alt.sci.astro.fits Organization: National Radio Astronomy Observatory From: Lucio Chiappetti - IFC Milano Subject: Re: FITSIO on a DECstation 5000 Date: Fri, 31 Jan 1992 14:17:30 GMT Jeffrey Pedelty wrote >I'm looking for anyone who's successfully built Bill Pence's FITSIO >package on a DECstation 5000. The following builds his example1 >program without apparent error, but the program bombs while writing I have done it. There are two known problems as far as I am aware of. 1) compiling fitsio.f and fitsdec.f as they are implies that the entire object file is relocated. This applies to any Unix, I guess (at least the same is true for Sun). This will just make your executable bigger, but it will work. I personally splitted fitsio.f and fitsdec.f with fsplit and then compiled each of them individually, and used ar to make a libfitsio.a (I have a private utility to do all this). Bill Pence told me Lick people have a makefile for the same purpose. 2) there is a problem in routine ftgbyx. This tries to extend a file, and has to detect the EOF. Unfortunately it does this testing the error code ios. Using DEC Fortran the test is done on the wrong value (possibly an earlier compiler worked like that, ie like on Sun, ios.lt.0). I replaced the check with ios.eq.36 (ie. same as VMS version of ftgbyx). I will provide an excerpt of my correspondence with Bill Pence to Jeffrey Pedelty in a separate mail. Lucio Chiappetti ----------------------------------------------------------------------------- Lucio Chiappetti Istituto di Fisica Cosmica e Tecnologie Relative - CNR via Bassini 15 - I-20133 Milano - Italy Phone : +39 2 2363542 / 2665237 / 2665753 Telex : 313839 MUACNR I Fax : +39 2 2362946 E-mail: EXOSAT at IMISIAM (Bitnet) EXOSAT at IMISIAM.MI.CNR.IT (Internet) IFCTR::LUCIO (SPAN/DECNET) Bitnet node IMISIAM is Internet node (IMI)SIAM.MI.CNR.IT alias 192.65.131.1 Decnet node IFCTR is 38.698 (39610) and Internet node IFCTR.MI.CNR.IT alias 192.65.131.40. Acknowledge-To: From sla at helios.ucsc.edu Tue Feb 4 10:08:44 1992 Status: RO X-VM-v5-Data: ([nil nil nil nil nil nil nil nil nil] ["1313" "" "31" "January" "92" "20:31:41" "GMT" "Steve Allen" "sla at helios.ucsc.edu " nil "23" "splitting monolith Fortran (was Re: FITSIO on a DECstation 5000)" "^From:" nil nil "1" nil nil nil nil] nil) Newsgroups: alt.sci.astro.fits Organization: UCO/Lick Observatory From: sla at helios.ucsc.edu (Steve Allen) Subject: splitting monolith Fortran (was Re: FITSIO on a DECstation 5000) Date: 31 Jan 92 20:31:41 GMT In article <9201310826.AA20186 at fits.cx.nrao.edu> EXOSAT at IMISIAM.MI.CNR.IT (Lucio Chiappetti - IFC Milano) writes: > I personally splitted fitsio.f and fitsdec.f with fsplit and then > compiled each of them individually, and used ar to make a libfitsio.a > (I have a private utility to do all this). > Bill Pence told me Lick people have a makefile for the same purpose. > > Lucio Chiappetti The "Lick people" is me, and I have a make procedure and a version of "fsplit" which know how to install a new update of the FITSIO library. It splits everything intelligently, i.e., if the new version of any given module is identical to the old one, it does not replace it. This means that when I install a new version of FITSIO, I only compile the routines which actually have changed. This saves bundles of time. It's not guaranteed to be completely robust, but I'm willing to distribute it (or post it if I get lots and lots of requests) Steve Allen _______________________________________________________________________________ Steve Allen | That was the equation! | sla at helios.ucsc.edu UCO/Lick Observatory | Existence!...Survival must | If the UC were opining, Santa Cruz, CA 95064 | cancel out programming! -- Ruk | it wouldn't tell me.