From fitsbits-request Tue Feb 2 18:49:49 1993 X-VM-VHeader: ("From:" "Sender:" "Resent-From" "To:" "Apparently-To:" "Cc:" "Subject:" "Date:" "Resent-Date:") nil X-VM-Bookmark: 18 Status: RO X-VM-v5-Data: ([nil nil nil nil nil nil nil nil nil] ["5181" "Tue" "2" "February" "1993" "23:49:33" "GMT" "Don Wells" "dwells at fits.CV.NRAO.EDU " nil "118" "Incunabula!" "^From:" nil nil "2"]) Received: by fits.cv.nrao.edu (4.1/DDN-DLB/1.5) id AA20780; Tue, 2 Feb 93 18:49:49 EST Return-Path: Message-Id: Organization: nrao Path: cv3.cv.nrao.edu!cv3.cv.nrao.edu!dwells From: dwells at fits.CV.NRAO.EDU (Don Wells) Sender: fitsbits-request at fits.CV.NRAO.EDU To: fitsbits at fits.CV.NRAO.EDU Subject: Incunabula! Date: Tue, 2 Feb 1993 23:49:33 GMT Today Eric Greisen and I made a wonderful discovery. I told Eric that I had found a tape of early FITS files from April 1980, and I said (sadly) that this was the oldest FITS tape known to me. He then looked in his rack of 9-track tapes and found a reel of tape whose typed label says: "FITS Test Tape written at KPNO. unlabelled, 9-track, 1600bpi. 7 files, 5 written by program WFITS and 2 copied from Greisen's original test tape. Don Wells, 19Sep79" This is the oldest FITS tape so far discovered. Also, the sixth file on it is a copy of the first file on the first FITS tape, written in April 1979. I have copied four of the files from the September 1979 tape and one file from the April 1980 tape to directory /FITS/TestFiles/Incunabula on anonymous-FTP server fits.cv.nrao.edu [192.33.115.8]. I append the README from that directory. I will be delighted to accept examples of early FITS files from other observatories for installation in this directory. ----------------- /FITS/TestFiles/Incunabula/README ------------------ Incunabula -=-=-=-=-=-=- Don Wells 2-February-93 Incunabula noun pl. [1] The beginnings or the earliest monuments of an art, race, or development; cradle; birthplace. [2] {incunabulum, sing.} Specifically, specimens of printing and block-engraving that appeared before A.D. 1500. The FITS files in directory /FITS/TestFiles/Incunabula were produced early in the history of FITS, before the Basic_FITS paper was received for publication by A&A Supplement Series on March 31, 1980. (The file first-uv.fits has a DATE keyword only 12 days after this limit, and is included because it is the oldest known example of the "Random Groups" format.) Additional sample files with early values of DATE, preferably before March 31, 1980 but certainly before June 1981 (publication of Basic_FITS), will be gratefully accepted for inclusion in the directory. filename bytes ------------- ------- first-uv.fits 25920 first.fits 1056960 m87-32.fits 267840 mndrll-8.fits 792000 orion-16.fits 529920 -=-=-=- first.fits -=-=-=- This was the first file on the first FITS interchange tape. Eric Greisen (NRAO) sent the tape to Don Wells (KPNO [now NOAO]). The tape was produced by a PL/I program on an IBM_360 in April 1979 and was read by a Fortran program on a CDC_6400 about a month later. That first tape has since been lost, but the two files on it were copied by Don Wells to another tape on September 19, 1979 and sent back to Eric Greisen, who still possesses the copy tape. The tape has no parity errors after 13.4 years. The data for this 5_GHz image of radio source 0810+665 were obtained while the VLA was still under construction. Fewer than 27 antennas were available and the image was computed two years before the invention of the self-calibration algorithm, so this image is not representative of either the present VLA or the present state of the art of synthesis imaging. The software used on the IBM_360 was not AIPS, the design of which had only recently begun at that time. DATE-MAP= '16/10/78' / MAP CREATION DATE DD/MM/YY DATE = '19/04/79' / MAP WRITING DATE DD/MM/YY ORIGIN = 'NRAO(CV) PGM=DEC2FITS(V1)' File first.lst is a listing of the header of first.fits as produced by program "listfits". -=-=-=- first-uv.fits -=-=-=- This file is believed to be the oldest surviving example of the Random Groups format used by radio synthesis imaging systems for about a decade. Recently it has become common to use the BINTABLE extension format for fringe visibility data instead of random groups. DATE-OBS= '05/01/80' / OBSERVATION START DATE DD/MM/YY DATE = '12/04/80' / TAPE WRITING DATE: DD/MM/YY ORIGIN = 'NRAO(CV) PGM=DUV2FITS(V1)' / -=-=-=- mndrll-8.fits -=-=-=- This is believed to be the oldest file with BITPIX=8. It was also the first image file on the first FITS tape sent from KPNO to NRAO. ORIGIN = 'KPNO -- WFITS OF 09/13/79.' / DATE = '13/09/79' '10.00.04' 'DCWGFAG' / DATE TIME JOBNAME -=-=-=- orion-16.fits -=-=-=- This is believed to be the first file with BITPIX=16 produced by KPNO. ORIGIN = 'KPNO -- WFITS OF 09/13/79.' / DATE = '13/09/79' '10.02.56' 'DCWGFAG' / DATE TIME JOBNAME -=-=-=- m87-32.fits -=-=-=- This is believed to be the oldest surviving file with BITPIX=32. ORIGIN = 'KPNO -- WFITS OF 09/13/79.' / DATE = '13/09/79' '10.03.51' 'DCWGFAG' / DATE TIME JOBNAME The times on the DATE cards of the three successive files are an indication of the speed of the batch job on the CDC_6400. -- 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 fitsbits-request Wed Feb 3 10:09:07 1993 Status: RO X-VM-v5-Data: ([nil nil nil nil nil nil nil nil nil] ["1482" "Wed" "3" "February" "93" "10:11:03" "EST" "Eric Greisen" "egreisen at primate.CV.NRAO.EDU " nil "31" "Correction of coordinate computation correction" "^From:" nil nil "2"]) Received: by fits.cv.nrao.edu (4.1/DDN-DLB/1.5) id AA22433; Wed, 3 Feb 93 10:09:07 EST Return-Path: Message-Id: <9302031511.AA09671 at primate.cv.nrao.edu> From: egreisen at primate.CV.NRAO.EDU (Eric Greisen) Sender: fitsbits-request at fits.CV.NRAO.EDU To: fitsbits at primate.CV.NRAO.EDU Subject: Correction of coordinate computation correction Date: Wed, 3 Feb 93 10:11:03 EST A couple of days ago, I put out a message concerning the conversion of the old coordinate nomenclature into the new (proposed) form. In particular, I was concerned to point out that there is a formula for this in the text of Chapter 4 of the NOST FITS Reference Guide (which directly reflects a draft of the Hanisch/Wells paper on "World Coordinate Systems") which I believe to be in error. Unfortunately, the corrected formulae which I proposed turn out also to have an error. I was confused by the complexities of the internal plot code in AIPS. The actual formulae used by AIPS (and other packages) are CDi_i = Di cos(rho) CDj_j = Dj cos(rho) CDi_j = -Dj sin(rho) CDj_i = Di sin(rho) where i refers to the longitude-like axis, j the latitude-like axis, Dn = CDELTn, and rho = CROTAj. The old formulae for coordinates do define the sign of rho implicitly, but I can't find it written down anywhere. The formulae show that rho is the angle measured from the +y axis to the +latitude axis (actually direction cosine axis in the +latitude direction) in the clock sense toward the +x axis. Thus, the angle is measured counter-clockwise for left-handed systems (our usual) and clockwise for right-handed systems. Fortunately, the CD nomenclature will eliminate rho and all this confusing sign business. (Of course, we will undoubtedly find something else to confuse us instead.) Eric W. Greisen, Scientist National Radio Astronomy Observatory Charlottesville, VA From fitsbits-request Thu Feb 4 11:35:24 1993 Status: RO X-VM-v5-Data: ([nil nil nil nil nil nil nil nil nil] ["1969" "Thu" "4" "February" "93" "11:35:50" "EST" "William Pence" "pence at tetra.gsfc.nasa.gov " nil "41" "New release of FITSIO V3.31" "^From:" nil nil "2"]) Received: by fits.cv.nrao.edu (4.1/DDN-DLB/1.5) id AA25021; Thu, 4 Feb 93 11:35:24 EST Return-Path: Message-Id: <9302041635.AA16702 at tetra.gsfc.nasa.gov> From: pence at tetra.gsfc.nasa.gov (William Pence) Sender: fitsbits-request at fits.CV.NRAO.EDU To: fitsbits at fits.CV.NRAO.EDU, wgas at hypatia.gsfc.nasa.gov Cc: pence at tetra.gsfc.nasa.gov Subject: New release of FITSIO V3.31 Date: Thu, 4 Feb 93 11:35:50 EST FITSIO - Version 3.31 4 February 1992 A new mini-release of the FITSIO subroutine library, version 3.31, is now available. This new version contains several bug repairs and efficiency improvements as well as an updated documentation file. Otherwise, it is functionally identical and completely compatible with the previous FITSIO release. See the 'release.doc' file in the FITSIO distribution directory for further details on the changes made to this version. For those unfamiliar with FITSIO, it is a powerful yet simple to use Fortran subroutine interface for reading and writing files in FITS format on magnetic disk. It runs on most common types of computers and supports FITS ASCII tables, binary tables, and image extensions as well as simple array FITS files. The FITSIO software, documentation, and example programs can be obtained via anonymous ftp from: tetra.gsfc.nasa.gov (128.183.8.77) Type the following commands at the ftp prompt to copy any desired files: ftp> user anonymous Password: [type your username as a password] ftp> cd pub/fitsio [to move to the fitsio subdirectory] ftp> ls [to see a list of the available files] ftp> get Read.me [contains latest information on FITSIO] ftp> get fitsio.doc [complete user documentation] ftp> get fitsio.tex [Latex version of the documentation] ftp> get ... [get any additional desired files] ftp> quit ------------------------------------------------------------------------- Dr. William Pence USRA/HEASARC (High Energy Astrophysics Science Archive Research Center) Code 668 NASA/Goddard Space Flight Center SPAN: LHEAVX::PENCE Greenbelt, MD 20771 Internet: pence at tetra.gsfc.nasa.gov Telephone: (301)286-4599 From fitsbits-request Thu Feb 4 17:34:35 1993 Status: RO X-VM-v5-Data: ([nil nil nil nil nil nil nil nil nil] ["4622" "Thu" "4" "February" "93" "17:36:30" "EST" "Eric Greisen" "egreisen at primate.CV.NRAO.EDU " nil "101" "WCS draft paper for comments" "^From:" nil nil "2"]) Received: by fits.cv.nrao.edu (4.1/DDN-DLB/1.5) id AA25343; Thu, 4 Feb 93 17:34:35 EST Return-Path: Message-Id: <9302042236.AA11408 at primate.cv.nrao.edu> From: egreisen at primate.CV.NRAO.EDU (Eric Greisen) Sender: fitsbits-request at fits.CV.NRAO.EDU To: fitsbits at primate.CV.NRAO.EDU Subject: WCS draft paper for comments Date: Thu, 4 Feb 93 17:36:30 EST I have been working on coordinate representation in FITS and have, with Mark Calabretta's great help, prepared a draft proposal. It is just that - a draft. I'm sure I will find things I forgot to put in as will Mark and I am sure that many of you will have suggestions as well. I hope that you will keep them temperate and constructive. Since I am about burned out on this for a few days or more, I have decided to release the drafts for comment. They are on the computer called fits in the anonymous ftp area with the following README file. I look forward to hearing from you - I think. Eric C----------------------------------------------------------------------- Representation of Coordinates in FITS This anonymous ftp area (fits.cv.nrao.edu [192.33.115.8] : /FITS/Documents/FITS_wcs) has been set aside for documents concerning the representation of the coordinates of the pixels in FITS images. My two early AIPS Memos (27 and 46) have been recovered and recast into modern LaTeX (from TeX -1 or so). In so doing, we simply digitized the old figures with a scanner and inserted them in the documents. They are called aips27.ps.Z and aips46.ps.Z and are of a reasonable size when compressed. They become over 2 and 1.4 Megabytes, resp., when uncompressed! Try "zcat | lpr -Pxxx" to avoid on-disk decompression; else "lpr -s -Pxxx " to avoid complaints about too-large files. The working document for a FITS paper authored by myself and Mark Calabretta (and presumably others to be named later for political or real reasons) is called wcs.ps.xxxx.Z. The xxxx is "none", "some", "most", and "all" depending on the figures actually represented in the paper (rather than shown as blank \vskip's). The figures are drawn with postscript programs which have all been verified with our printers and ghostview. However, we have found several models of "postscript" printer which simply fail on the documents and others which work, but are exceedingly slow. Hence, the quicker-to-print versions. If you find that you cannot read the papers via ftp, or cannot get them to print, you may obtain paper copies of all 3 are by contacting Ernest Allen National Radio Astronomy Observatory 520 Edgemont Road Charlottesville, VA 22903-2475 e-mail: eallen at nrao.edu phone: 804-296-0209 fax: 804-296-0328 Please let us know your comments (well-considered and temperate only), so that we may develop a consensus which will allow the final wcs.ps to become a new FITS standard. Thanks, Eric W. Greisen, Scientist. National Radio Astronomy Observatory egreisen at nrao.edu 804-296-0348 From fitsbits-request Wed Feb 10 11:58:07 1993 Status: RO X-VM-v5-Data: ([nil nil nil nil nil nil nil nil nil] ["1174" "Wed" "10" "February" "93" "11:58:19" "EST" "William Pence" "pence at tetra.gsfc.nasa.gov " nil "25" "CFITSIO Beta Testers Wanted" "^From:" nil nil "2"]) Received: by fits.cv.nrao.edu (4.1/DDN-DLB/1.5) id AA04303; Wed, 10 Feb 93 11:58:07 EST Return-Path: Message-Id: <9302101658.AA24314 at tetra.gsfc.nasa.gov> From: pence at tetra.gsfc.nasa.gov (William Pence) Sender: fitsbits-request at fits.CV.NRAO.EDU To: fitsbits at fits.CV.NRAO.EDU, wgas at hypatia.gsfc.nasa.gov Cc: pln at egret1.stanford.edu, mcs at phobos.caltech.edu, pence at tetra.gsfc.nasa.gov Subject: CFITSIO Beta Testers Wanted Date: Wed, 10 Feb 93 11:58:19 EST CFITSIO Beta Testers Wanted We now have available a test version of CFITSIO, which is a C version of the FITSIO subroutine interface for reading and writing files in FITS format. We are looking for volunteer beta testers who would be willing to try using this version for the next few weeks, prior to the general release. If you are interested in this, please send me a mail message, including which type of machine (e.g., SUN, VAX/VMS, etc.) you will be using. CFITSIO is not a complete re-write of FITSIO in C, but rather it consists of a set of C wrapper routines which sit on top of the Fortran FITSIO code. Thus, one must also have the lastest version of the Fortran FITSIO library (Version 3.31 was released last week) to be able to use CFITSIO. CFITSIO was written by Bruce O'Neel here at the HEASARC and it uses the very useful CFORTRAN library written by Burkhard Burrow at the U. of Toronto which provides a completely transparent, machine independent interface between C and FORTRAN routines. A copy of the CFORTRAN library is included with the CFITSIO package. William Pence NASA/GSFC HEASARC pence at tetra.gsfc.nasa.gov LHEAVX::PENCE From fitsbits-request Sat Feb 13 17:25:38 1993 Status: RO X-VM-v5-Data: ([nil nil nil nil nil nil nil nil nil] ["434" "" "12" "February" "93" "07:44:08" "GMT" "Bruce Sams" "bruce at head-cfa.harvard.edu " nil "13" "are negative bitpix values legal??" "^From:" nil nil "2"]) Received: by fits.cv.nrao.edu (4.1/DDN-DLB/1.5) id AA12118; Sat, 13 Feb 93 17:25:38 EST Return-Path: Message-Id: <1993Feb12.074408.17376 at cfa160.harvard.edu> Organization: Smithsonian Astrophysical Observatory, Cambridge, MA, USA Path: cv3.cv.nrao.edu!uvaarpa!darwin.sura.net!newsserver.jvnc.net!yale.edu!qt.cs.utexas.edu!news.Brown.EDU!noc.near.net!ceylon!hsdndev!cfa203!bruce From: bruce at head-cfa.harvard.edu (Bruce Sams) Sender: fitsbits-request at fits.CV.NRAO.EDU To: fitsbits at fits.CV.NRAO.EDU Subject: are negative bitpix values legal?? Date: 12 Feb 93 07:44:08 GMT Hello there, I'm writing a very simple FITS i/o facility for our data system here at the Max Planck Institute in Munich, and I've come across a question about whether it is legal to have negative values for BITPIX in order to indicate that the dta is floating point rather than integer. Can someone please tell me if this is legal? I have not seen it before, but the SAOIMAGE fits reader seems to use it. Many thanks, Bruce Sams From fitsbits-request Sat Feb 13 18:24:21 1993 Status: RO X-VM-v5-Data: ([nil nil nil nil nil nil nil nil nil] ["1331" "Fri" "12" "February" "1993" "20:31:16" "GMT" "Orin Day" "oday at lobster.gsfc.nasa.gov " nil "32" "Re: are negative bitpix values legal??" "^From:" nil nil "2"]) Received: by fits.cv.nrao.edu (4.1/DDN-DLB/1.5) id AA12167; Sat, 13 Feb 93 18:24:21 EST Return-Path: Message-Id: Organization: NASA Goddard Space Flight Center - Greenbelt, MD USA Path: cv3.cv.nrao.edu!uvaarpa!caen!sdd.hp.com!spool.mu.edu!agate!ames!nsisrv!news1.gsfc.nasa.gov!usenet References: <1993Feb12.074408.17376 at cfa160.harvard.edu> Reply-To: oday at lobster.gsfc.nasa.gov (Orin Day) From: oday at lobster.gsfc.nasa.gov (Orin Day) Sender: fitsbits-request at fits.CV.NRAO.EDU To: fitsbits at fits.CV.NRAO.EDU Subject: Re: are negative bitpix values legal?? Date: Fri, 12 Feb 1993 20:31:16 GMT In article <1993Feb12.074408.17376 at cfa160.harvard.edu> bruce at head-cfa.harvard.edu (Bruce Sams) writes: > I'm writing a very simple FITS i/o facility for our data system here > at the Max Planck Institute in Munich, and I've come across a > question about whether it is legal to have negative values for BITPIX > in order to indicate that the dta is floating point rather than integer. > Can someone please tell me if this is legal? Quoting directly the 3.0 NOST FITS User's Guide, p.16: **************************************************************** 2. BITPIX (integer) describes how an array value is represented: 8 --> ASCII or 8-bit unsigned integers 16 --> 16 bit, twos complement signed integers 32 --> 32 bit, twos complement signed integers -32 --> IEEE 32-bit floating point values -64 --> IEEE 64-bit floating point values No other values for BITPIX are valid **************************************************************** I believe the current standards document can be obtained via anonymous FTP from nssdca.gsfc.nasa.gov. OD -- ************* "How about a little fire, Scarecrow?" ************** Orin Day, Code 664.1 oday at lobster.gsfc.nasa.gov Hughes STX/NASA GSFC Laboratory for High Energy Astrophysics *******"Think that this is NASA's opinion? NO, NO, NO!!!" ****** From fitsbits-request Sat Feb 13 18:43:15 1993 Status: RO X-VM-v5-Data: ([nil nil nil nil nil nil nil nil nil] ["811" "Fri" "12" "February" "1993" "21:17:00" "GMT" "Barry Schlesinger" "bschlesinger at nssdca.gsfc.nasa.gov " nil "22" "Re: are negative bitpix values legal??" "^From:" nil nil "2"]) Received: by fits.cv.nrao.edu (4.1/DDN-DLB/1.5) id AA12179; Sat, 13 Feb 93 18:43:15 EST Return-Path: Message-Id: <12FEB199316173992 at nssdca.gsfc.nasa.gov> Organization: NASA - Goddard Space Flight Center Path: cv3.cv.nrao.edu!uvaarpa!darwin.sura.net!haven.umd.edu!ames!nsisrv!news1.gsfc.nasa.gov!nssdca.gsfc.nasa.gov!bschlesinger References: <1993Feb12.074408.17376 at cfa160.harvard.edu> From: bschlesinger at nssdca.gsfc.nasa.gov (Barry Schlesinger) Sender: fitsbits-request at fits.CV.NRAO.EDU To: fitsbits at fits.CV.NRAO.EDU Subject: Re: are negative bitpix values legal?? Date: Fri, 12 Feb 1993 21:17:00 GMT In article <1993Feb12.074408.17376 at cfa160.harvard.edu>, bruce at head-cfa.harvard.edu (Bruce Sams) writes... >I'm writing a very simple FITS i/o facility for our data system here >at the Max Planck Institute in Munich, and I've come across a >question about whether it is legal to have negative values for BITPIX >in order to indicate that the dta is floating point rather than integer. >Can someone please tell me if this is legal? I have not seen it >before, but the SAOIMAGE fits reader seems to use it. > BITPIX = -32 means that the data are in single precision (32-bit) IEEE floating point. BITPIX = -64 means that the data following are in double precision (64-bit) IEEE floating point. No other negative values of BITPIX are permitted. Barry Schlesinger NSSDC/NOST FITS Support Office From fitsbits-request Wed Feb 17 10:59:24 1993 Status: RO X-VM-v5-Data: ([nil nil nil t nil t nil nil nil] ["8598" "Wed" "17" "February" "1993" "15:26:00" "GMT" "Barry Schlesinger" "bschlesinger at nssdca.gsfc.nasa.gov " nil "167" "FITS basics and information (periodic posting)" "^From:" nil nil "2"]) Received: by fits.cv.nrao.edu (4.1/DDN-DLB/1.5) id AA22081; Wed, 17 Feb 93 10:59:24 EST Return-Path: Message-Id: Organization: NASA Goddard Space Flight Center - Greenbelt, MD USA Path: cv3.cv.nrao.edu!uvaarpa!caen!sdd.hp.com!cs.utexas.edu!sun-barr!ames!nsisrv!news1.gsfc.nasa.gov!nssdca.gsfc.nasa.gov!bschlesinger From: bschlesinger at nssdca.gsfc.nasa.gov (Barry Schlesinger) Sender: fitsbits-request at fits.CV.NRAO.EDU To: fitsbits at fits.CV.NRAO.EDU Subject: FITS basics and information (periodic posting) Date: Wed, 17 Feb 1993 15:26:00 GMT for the benefit of new readers and the reference of old readers. Message-ID: <17FEB199310264540 at nssdca.gsfc.nasa.gov> Organization: NASA - Goddard Space Flight Center News-Software: VAX/VMS VNEWS 1.41 FITS (Flexible Image Transport System) is a data format designed to provide a means for convenient exchange of astronomical data between installations whose standard internal formats and hardware differ. A FITS file is composed of a sequence of Header Data Units (HDUs). The header consists of keyword=value statements, which describe the format and organization of the data in the HDU and may also provide additional information, for example, about the instrument or the history of the data. The data follow, structured as the header specifies. The data section of the HDU may contain a digital image, but, except for the first, IT DOESN'T HAVE TO. Other possible formats include tables and multidimensional matrices that are not images. The first HDU must contain a multidimensional matrix or no data at all; the data in subsequent HDUs, called extensions, may be of any type, consistent with certain rules. 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; it does not incorporate "FITS viewers", packages for decoding the data into an image. Users must develop or obtain separate software to convert the data from the FITS file into a form that can be readily displayed. As has been discussed in this newsgroup, and in alt.sci.astro.fits before it, the Extended Portable Bitmap Toolkit (pbm+) can be used for converting many FITS files to such a format. However, support is not guaranteed for all FITS files where the data are in the form of an image. In particular, there may be problems when the data matrix members are in IEEE floating point format (BITPIX<0) or the matrix has more than two dimensions (NAXIS>2). Archie Warnock and Ron Baalke have announced release of version 7.8 of the IMDISP program. IMDISP is an interactive image processing program that runs on an IBM PC computer and supports FITS input. IMDISP 7.8 is available via anonymous ftp at ames.arc.nasa.gov [128.102.18.3] in a file called imdisp78.zip in the pub/SPACE/SOFTWARE subdirectory and at hypatia.gsfc.nasa.gov in the pub/software/imdisp subdirectory. It is also available through Simtel-20 [192.88.110.20] at PD1:IMDISP78.ZIP. Additional discussion of FITS->image converters appears in this newsgroup from time to time. The fundamental references on FITS are the following four papers, often referred to collectively as the "Four FITS Papers". These papers are the formal standard for FITS, endorsed by the International Astronomical Union (IAU). Wells, D. C., Greisen, E. W., and Harten, R. H., "FITS: a flexible image transport system," Astronomy and Astrophysics Supplement Series, 44, 363-370, 1981. Greisen, E. W. and Harten, R. H., "An extension of FITS for small arrays of data," Astronomy and Astrophysics Supplement Series, 44, 371-374, 1981. (NOTE: The format described in this paper has been used almost exclusively to transport radio interferometry and is likely to be replaced by other formats in the future. Writing data other than radio interferometry data using this format is not recommended.) Grosbol, P., Harten, R. H., Greisen, E. W., and Wells, D. C., "Generalized extensions and blocking factors for FITS," Astronomy and Astrophysics Supplement Series, 73, 359-364, 1988. Harten, R. H., Grosbol. P., Greisen, E. W., and Wells, D. C., "The FITS tables extension, Astronomy and Astrophysics Supplement Series, 73, 365-372, 1988. A User's Guide for FITS, commissioned by NASA Headquarters, is maintained by the NASA/OSSA Office of Standards and Technology (NOST) FITS Support Office. This Guide is intended to be a tutorial for new FITS users. In addition to presenting the rules of FITS, it provides some of the history and reasoning behind the choice of the rules, adds recommendations on good practices, and discusses current developments in FITS. A new version, 3.0, was issued in January 1993. This document is at present available only in printed form, but steps are under way to generate a PostScript version that will work on many systems and a flat ASCII version. NASA is sponsoring development of a formal standard for FITS. The goal is a document codifying FITS as endorsed by the IAU, eliminating some contradictions and ambiguities in the original FITS papers, that can be endorsed by the IAU FITS Working Group as the FITS standard. The document is being developed by a Technical Panel chaired by Dr. Robert J. Hanisch (STSci), with review by the astronomical community. Only minor revisions are expected to the current draft, version 0.3b, but the form of the standard is not final, and it does not supersede the four papers and Floating Point Agreement endorsed by the IAU as the official standard for FITS. The IAU has endorsed the Floating Point Agreement, which defines how floating point numbers are to be expressed in FITS. The basic agreement appears verbatim in the User's Guide, and the substance is incorporated in the Draft NASA FITS definition. The NOST maintains a file of FITS information available by anonymous ftp from nssdca.gsfc.nasa.gov or DECnet copy from NSSDCA, in the directory FITS. It includes copies of the current NASA draft standard in flat ASCII, PostScript, and LaTeX. Style and index files are provided for the LaTeX form. Except that the ASCII form does not have an index, the standards in the three formats are identical; only one need be retrieved. A current list of the extension type (structure) names registered with the IAU FITS Working Group is maintained. Also available, in LaTeX form, is the text of the proposal for one of these new extension types, IMAGE. A README. file describes the contents of the directory. A SOFTWARE subdirectory, described by an included README.FIRST file, contains a program in C to read and list the headers of a FITS file and another file with information on publicly available FITS software packages. The ERRTEST subdirectory contains several versions of the same FITS file, a valid one and several with different kinds of header errors, for use in testing software to read FITS files. An included README.FIRST file contains details. Additional material can be obtained by anonymous ftp from the National Radio Astronomy Observatory, from fits.cv.nrao.edu, in the directory FITS. The Documents subdirectory (case is significant) contains copies of the BINTABLE Binary Tables extension proposal, which is now under consideration by the FITS committees, and a draft describing a proposed method for incorporating data compression under FITS. It also contains text of the paper summarizing conclusions of a workshop on World Coordinates held in Charlottesville in 1988 that is serving as the basis for continuing discussion of world coordinates issues, some of which appears on this newsgroup from time to time. These documents are available in both LaTeX and PostScript forms. A number of additional documents are available in ASCII text form, including the proposal on physical blocking of FITS files on media other than tape and material on FITS, its history, and the FITS community. Printed copies of many of the documents listed above can be obtained from the NOST Librarian. Printed copies of the User's Guide and either paper or electronic copies of the Draft NOST Standard, for those without ftp access, are available. Because of restrictions set by the copyright holder, NOST can send copies of the four FITS papers only to non-profit organizations. The NOST can be reached as follows: (Postal) NASA/OSSA Office of Standards and Technology Code 633.2 Goddard Space Flight Center Greenbelt MD 20771 USA (Internet) nost at nssdca.gsfc.nasa.gov (DECnet) NCF::NOST Telephone: (301)286-3575 8 a. m. - 5 p. m., U. S. Eastern Time If the Librarian is unavailable, a phone mail system takes the call after four rings. Please mention this posting in your request. Use the FITS office electronic mail address below for replies or questions. It is monitored by other NOST staff memebers when I am away from the office and provides a greater certainty of a rapid response. Barry M. Schlesinger Coordinator, NASA/NSSDC NOST FITS Support Office (301) 513-1634 fits at nssdca.gsfc.nasa.gov NCF::FITS From dwells Thu Feb 18 12:59:39 1993 Status: RO X-VM-v5-Data: ([nil nil nil nil nil nil nil nil nil] ["33617" "Thu" "18" "February" "93" "12:59:38" "EST" "301" "fred at manono.span (Fred Patt 286-4569)" nil "771" "Comments on Draft WCS Standard" "^From:" nil nil "2"]) Received: by fits.cv.nrao.edu (4.1/DDN-DLB/1.5) id AA25483; Thu, 18 Feb 93 12:59:39 EST Resent-Message-Id: <9302181759.AA25483 at fits.cv.nrao.edu> Return-Path: Message-Id: <9302181759.AA25477 at fits.cv.nrao.edu> Resent-Sender: dwells From: fred at manono.span (Fred Patt (301)286-4569) Sender: fitsbits-request at fits.CV.NRAO.EDU Resent-From: dwells (Don Wells) To: fitsbits Subject: Comments on Draft WCS Standard Date: Thu, 18 Feb 93 12:59:38 EST Resent-Date: Thu, 18 Feb 93 12:59:38 EST The following message was addressed to "fitsbits-request at nrao.edu", rather than to "fitsbits at nrao.edu", and so it came to me, Don Wells, the maintainer of the exploder, rather than being exploded as intended. ------- Start of forwarded message ------- From: fred at manono.span (Fred Patt (301)286-4569) To: fitsbits-request at fits.CV.NRAO.EDU Subject: Comments on Draft WCS Standard Date: Thu, 18 Feb 93 11:12:32 EST Dr. Greisen, I was offered a chance by Richard White to review your draft World Coordinate System standard for FITS, due to my interest in map projections in general and the quad sphere in particular. My recent involvement has been with Earth science data sets but I was also involved with the COBE mission for several years and am familiar with their skymap implementation. I have advocated the adoption of the quad sphere by local Earth science projects and was responsible for the use of this scheme in the Advanced Very High Resolution Radiometer (AVHRR) Pathfinder Land prototype processing system here at Goddard. I provided details of the projection equations to the AVHRR group in the form of pseudocode, which has been implemented in C by the developers. The data system manager, Mary James of Goddard Code 902, has given me encouragement to publish my work on this project. My point here is that an exact form of the projection was derived in the second of the two references (O'Neill and Laubscher, 1976) in terms of polar coordinates, and this is the form which was implemented by AVHRR. The reference only derived the projection in the forward direction, from sky to cube coordinates, but I found that the derivation of the reverse projection was very straightforward. I also found that the equations could be significantly simplified by direct use of cartesian coordinates, thereby eliminating the polar angles as intermediaries and, as a side benefit, reducing the number of trig function evaluations required. The information regarding the COBE implementation by Immanuel Freedman is completely accurate. COBE has accepted the non-exact form of the transformation, but I suggest that the description of the exact form is at least as appropriate for your work. The combination of the overall complexity of the projection equations and the errors in the projection described for COBE would seem to discourage most potential users. I have attached a set of summary notes which I provided for the AVHRR group and the derivation of the reverse projection and cartesian form equations for the exact transformation (in computer-language syntax; it would be reasonable for me to put these into a more appropriate notation if desired). I hope that this information may be of use to you. Fred Patt SUMMARY The quadrilaterlized spherical cube, or quad sphere for short, is an equal-area mapping and binning scheme for data collected on a spherical surface (either Earth data or the celestial sphere). It was first proposed by Chan and O'Neill in 1975 for the Naval Environmental Prediction Research Facility (Reference 1). There are two key elements to the quad sphere: o The mapping consists of projecting the sphere onto the faces of an inscribed cube using a curvilinear projection which preserves area. The sphere is divided into six equal areas which correspond to the faces of the cube. The vertices of the cube correspond to the cartesian coordinates defined by |x|=|y|=|z| on the unit sphere. For an Earth projection, the cube is normally oriented with one face normal to the North Pole and one face centered on the Greenwich meridian (although any definition of pole and meridian could be used). The faces of the cube are divided into square bins, where the number of bins along each edge is a power of 2, selected to produce the desired bin size. Thus the number of bins on each face is 2**(2*N), where N is the binning level, and the total number of bins is 6*2**(2*N). For example, a level of 10 gives 1024x1024 bins on each face and 6291456 (6*2**20) total bins, which are 23.605 square arcminutes (1.99737E-6 steradians) in size. o The bins are numbered serially, rather than being rastered as for an image. The bin numbers are determined as follows. The total number of bits required for the bin numbers at level N is 2*N+3, where the 3 MSBs are used for the face numbers and the remaining bits are used to number the bins within each face. The faces are numbered 0-5 with 0 being the North face, 1 through 4 being equatorial with 1 corresponding to Greenwich, and 5 being South. Thus at level 10, face 0 has bin numbers 0-1048577, face 1 has numbers 1048576-2097151, etc. Within each face the bins are numbered serially from one corner (the convention is to start at the "lower left") to the opposite corner, with the ordering such that each pair of bits corresponds to a level of bin resolution. This ordering in effect is a two-dimensional binary tree, which is referred to as the quad-tree The conversion between bin numbers and coordinates is straightforward. If 4-byte integers are used for the bin numbers the maximum practical bin level is 14, which uses 31 of the 32 bits and results in a bin size of 0.0922 square arcminutes (7.80223E-9 steradians). The advantages of this numbering approach are stated below. In principal the mapping and numbering schemes are separable; the projection onto the cube could be used with another bin numbering scheme, and the numbering scheme itself could be used with any arrangement of bins which can be partitioned as a set of square arrays. Used together, they comprise a flexible and efficient system for storing map data. ADVANTAGES The quad sphere projection does not produce singularities at the poles or elsewhere, as do some other equal-area mapping schemes. The distortion is moderate over the entire sphere, so that at no point are shapes distorted beyond recognition. Individual faces can be used to display parts of the sphere without remapping by converting from pixel order to raster order; coordinate grids can be overlaid on the faces to assist in registration. The bin numbering allows the resolution to be changed (by factors of two) simply by adding or deleting LSBs. This is particularly useful if it is desired to increase the bin size, for example to compare maps with different resolutions. This is performed simply by dividing the bin numbers by four for each factor of two increase in bin size. The bin numbers tend be closer together in sequence for neighboring bins. The quadtree bin numbering allows maps to be stored as FITS BINTABLES with no wasted storage needed for blank areas (unfilled bins). Only bins containing valid data need be included in a file, as the bin numbers themselves identify the locations of the bins. The serial numbering frees up one array dimension for another use (e.g., time, a third coordinate, multichannel data, etc.). DERIVATIONS OF REVERSE AND CARTESIAN TRANSFORMATIONS The equations for the polar form of the transformation from the sphere to the cube are given in reference 2 as equations (3-21) and (3-38). I have taken this approach further in two areas: 1) inversion of these equations to derive the cube-to-sphere transformation; and 2) simplification of these equations to perform the transformation directly in terms of cartesian coordinates. Both of these are straightforward as shown below. 1. DERIVATION OF THE CUBE-TO-SPHERE TRANSFORMATION The exact form of the sphere-to-cube tranformation in reference 2 is derived in terms of the co-elevation and azimuth angles (theta, phi) on the sphere and an equivalent set of angles (mu,nu) on the cube. The equal-area tranformation is performed using the following equations: TAN(mu) = (12/pi)*(theta+ACOS(SIN(theta)*SIN(pi/4))-pi/2) (3-21) TAN(nu) = SQRT((SEC(mu))**2*(1-COS(theta))/(1-COS(ATAN(SEC(theta))))) (3-38) The inversion of these equations is as follows. Using the trig identity ASIN(x)+ACOS(x)=pi/2, and the knowledge that SIN(pi/4) = 1/SQRT(2), equation (3-21) can be written as TAN(mu) = (12/pi)*(theta-ASIN(SIN(theta)/SQRT(2))) (3-21a) and then rearranged as theta - (pi/12)*TAN(mu) = ASIN(SIN(theta)/SQRT(2)) Taking the sine of both sides gives SIN(theta)*COS((pi/12)*TAN(mu)) - COS(theta)*SIN((pi/12)*TAN(mu)) = SIN(theta)/SQRT(2) Dividing through by COS(theta) and solving for TAN(theta) yields the desired inverse relationship: TAN(theta) = SIN((pi/12)*TAN(mu))/(COS((pi/12)*TAN(mu))-1/SQRT(2)) (1) The inversion of equation (3-38) is performed by squaring both sides and solving for COS(phi): COS(phi) = 1 - (TAN(nu))**2*(1-COS(ATAN(SEC(theta))))/(SEC(mu)**2 (2) As in the original derivation, this equation used the prior determination of theta as a function of mu. 2. EXPRESSION OF THE TRANSFORMATIONS IN CARTESIAN COORDINATES Both sets of transformation equations can be expressed in cartesian coordinates (three-dimensional coordinates of the unit vector on the sphere and two-dimensional coordinates on the cube face). Assume the unit vector has coordinates (q,r,s) and the coordinates on the cube face are (x,y), where q is normal to the plane of the cube face and (r,s) cooresponds to (x,y). Then the functions of angles can be expressed as follows: TAN(theta) = s/r SIN(theta) = s/SQRT(r*r+s*s) COS(phi) = q TAN(mu) = y/x TAN(nu) = SQRT(x*x+y*y) Substituting these into the transformation equations results in the following revised forms for the equations. Equation (3-21a): y/x = (12/pi)*(ATAN(s/r)- ASIN(s/SQRT(2*r*r+2*s*s))) (3) Equation (3-38) can first be simplified by the following substitution: COS(ATAN(SEC(theta))) = 1/SQRT(1+(SEC(theta))**2) Substituting this and the appropriate cartesian coordinate expressions gives: x*x+y*y = (1+(y/x)**2)*(1-q)/(1-1/SQRT(2+(s/r)**2)) which can be re-written to eliminate y: x = sqrt((1-q)/(1-1/SQRT(2+(s/r)**2))) (4) Note that there is no ambiquity in the sign of the square root since the derivation of (3-38) assumes that x is positive. This and equation (3) for y/x above give the solution for both y and x, noting also that (3-21) assumes that x is not less than y. Equation (1) above can be rewritten also by direct substitution: s/r = SIN((pi/12)*(y/x))/(COS((pi/12)*(y/x))-1/SQRT(2)) (5) Equation (2) above can be rewritten by solving (4) for q: q = 1 - x*x*(1-1/SQRT(2+(s/r)**2))) (6) Thus equations (3) through (6) can be used to convert directly from coordinates on the sphere to the cube and back without the need to convert to angles as intermediate variables, and the number of trigonometric function evaluations required is greatly reduced. REFERENCES 1. Chan, F.K. and O'Neill (1975), Feasibility Study of a Quadrilateralized Spherical Cube Earth Data Base, Computer Sciences Corporation, EPRF Technical Report 2-75 (CSC). Prepared for the Environmental Prediction Research Facility, Monterey, California. 2. O'Neill, I.M. and Laubscher, R.E. (1976), Extended Studies of a Quadrilateralized Spherical Cube Earth Data Base, Computer Sciences Corporation, NEPRF Technical Report 3-76 (CSC). Prepared for the Naval Environmental Prediction Research Facility, Monterey, California. ------- End of forwarded message ------- From fitsbits-request Fri Feb 19 22:47:09 1993 Status: RO X-VM-v5-Data: ([nil nil nil nil nil nil nil nil nil] ["1820" "" "19" "February" "1993" "22:54:57" "GMT" "Steve Allen" "sla at umbra.UCSC.EDU " nil "43" "little FITS tools" "^From:" nil nil "2"]) Received: by fits.cv.nrao.edu (4.1/DDN-DLB/1.5) id AA29412; Fri, 19 Feb 93 22:47:09 EST Return-Path: Message-Id: <1m3og1INN3vn at darkstar.UCSC.EDU> Organization: UCO/Lick Observatory Path: cv3.cv.nrao.edu!uvaarpa!caen!zaphod.mps.ohio-state.edu!howland.reston.ans.net!agate!darkstar.UCSC.EDU!umbra.UCSC.EDU!sla From: sla at umbra.UCSC.EDU (Steve Allen) Sender: fitsbits-request at fits.CV.NRAO.EDU To: fitsbits at fits.CV.NRAO.EDU Subject: little FITS tools Date: 19 Feb 1993 22:54:57 GMT In playing around with FITS files, I often want to do quick little manipulations of them. I have several little shell scripts for poking at them. I'm appending one at the end of this message. (Apologies to VMS users, it's very Un*x. Also, nobody is allowed to make rude comments about the little piece of Lick dirty laundry revealed here.) Does anybody else have such little tools? Could we start a collection? I call this "catfits" ---------------------------cut here------------------------------------- #!/bin/csh # A little Cshell script which acts like cat. # Author: Steve Allen (sla at lick.ucsc.edu) 1992,1993 # It takes as input a FITS file, and cats out the headers of # the primary HDU and any FITS extensions which may be present. # # Some recent Lick FITS headers have a "comment" as a part of the # END card. This is actually illegal, but by giving the -L switch # as the first argument this script will tolerate them. if ( $1 == -L ) then # be compatible with the illegal Lick FITS headers set sed1 = '/^SIMPLE = /,/^END */p' # throw away the -L shift else # a normal, legal FITS header set sed1 = '/^SIMPLE = /,/^END *$/p' endif set sed2 = '/^XTENSION= /,/^END *$/p' # if ( $#argv == 0 ) then # act like a pipeline element dd conv=unblock cbs=80 | sed -n -e "$sed1" -e "$sed2" else foreach file ($*) if ($#argv > 1) echo "===> "$file" <===" dd conv=unblock cbs=80 if=$file | sed -n -e "$sed1" -e "$sed2" end endif _______________________________________________________________________________ Steve Allen | That was the equation! | sla at lick.ucsc.edu UCO/Lick Observatory | Existence!...Survival must | If the UC were opining, Santa Cruz, CA 95064 | cancel out programming! -- Ruk | it wouldn't use me. From fitsbits-request Sat Feb 20 11:38:10 1993 Status: RO X-VM-v5-Data: ([nil nil nil nil nil nil nil nil nil] ["1697" "Sat" "20" "February" "1993" "16:37:54" "GMT" "Don Wells" "dwells at fits.CV.NRAO.EDU " nil "38" "Re: little FITS tools" "^From:" nil nil "2"]) Received: by fits.cv.nrao.edu (4.1/DDN-DLB/1.5) id AA00757; Sat, 20 Feb 93 11:38:10 EST Return-Path: Message-Id: Organization: nrao Path: cv3.cv.nrao.edu!cv3.cv.nrao.edu!dwells References: <1m3og1INN3vn at darkstar.UCSC.EDU> From: dwells at fits.CV.NRAO.EDU (Don Wells) Sender: fitsbits-request at fits.CV.NRAO.EDU To: fitsbits at fits.CV.NRAO.EDU Subject: Re: little FITS tools Date: Sat, 20 Feb 1993 16:37:54 GMT In article <1m3og1INN3vn at darkstar.UCSC.EDU> sla at umbra.UCSC.EDU (Steve Allen) writes: SA> In playing around with FITS files, I often want to do quick SA> little manipulations of them. I have several little shell SA> scripts for poking at them. I'm appending one at the end of this SA> message. This script is an elegant testimonial to the power of the Unix shell(s) and tools. I have placed it in the anonymousFTP directory fits.cv.nrao.edu [192.33.115.8]:/FITS/OSsupport/Unix/ as the file -r--r--r-- 1 dwells 2131 Feb 20 11:00 catfits.csh SA> .. nobody is allowed to make rude comments about the little piece SA> of Lick dirty laundry revealed here.. In March 1979 Eric Greisen and I decided that END cards should have trailing blanks in order to increase the probability that FITS-readers would reliably detect the ends of headers; I myself have no regrets about this design decision. Lick FITS-writer code is certainly not the first to violate this rule. Practical implementations of FITS-readers should be forgiving, of course. SA> Does anybody else have such little tools? Could we start a SA> collection? I will be delighted to add such tools to the anonymousFTP server on fits.cv.nrao.edu. I myself created one which does almost exactly the same job as your "catfits"; it is in the same directory on the server: -r--r--r-- 2 dwells 6300 Jul 28 1991 listfits.c -- 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 fitsbits-request Sat Feb 20 16:57:07 1993 Status: RO X-VM-v5-Data: ([nil nil nil nil nil nil nil nil nil] ["713" "Sat" "20" "February" "1993" "21:56:53" "GMT" "Don Wells" "dwells at fits.CV.NRAO.EDU " nil "14" "Re: little FITS tools" "^From:" nil nil "2"]) Received: by fits.cv.nrao.edu (4.1/DDN-DLB/1.5) id AA01390; Sat, 20 Feb 93 16:57:07 EST Return-Path: Message-Id: Organization: nrao Path: cv3.cv.nrao.edu!cv3.cv.nrao.edu!dwells References: <1m3og1INN3vn at darkstar.UCSC.EDU> From: dwells at fits.CV.NRAO.EDU (Don Wells) Sender: fitsbits-request at fits.CV.NRAO.EDU To: fitsbits at fits.CV.NRAO.EDU Subject: Re: little FITS tools Date: Sat, 20 Feb 1993 21:56:53 GMT In article dwells at fits.cv.nrao.edu (Don Wells) writes: "... I myself created [a little FITS tool] which does almost exactly the same job as your "catfits"; it is in the same directory on the server.." I apologize to Barry Schlesinger. I neglected to mention that my listfits.c is based directly on his program headlist.c available via anonymous-FTP on host nssdca.gsfc.nasa.gov. -- 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 fitsbits-request Mon Feb 22 09:13:41 1993 Status: RO X-VM-v5-Data: ([nil nil nil nil nil nil nil nil nil] ["486" "Mon" "22" "February" "93" "09:15:11" "+0000" "nelson at axl.stsci.edu" "nelson at axl.stsci.edu" nil "16" "FITS tools \"catfits\" " "^From:" nil nil "2"]) Received: by fits.cv.nrao.edu (4.1/DDN-DLB/1.5) id AA04738; Mon, 22 Feb 93 09:13:41 EST Return-Path: Message-Id: <9302221415.AA02233 at axl.stsci.edu> In-Reply-To: Your message of "19 Feb 93 22:54:57 GMT." <1m3og1INN3vn at darkstar.UCSC.EDU> X-Mts: smtp From: nelson at axl.stsci.edu Sender: fitsbits-request at fits.CV.NRAO.EDU To: fitsbits at fits.CV.NRAO.EDU Cc: nelson at axl.stsci.edu Subject: FITS tools "catfits" Date: Mon, 22 Feb 93 09:15:11 +0000 Another 'catfits'; and I believe the first one with this name is the catfits task in the IRAF/STSDAS fitsio package. Its features are as follows: 1) Lists primary header and extension headers as well. 2) The user can choose from one line of information per header or a full listing. 3) For the one liner, the user can tailor the keywords being displayed up to 132 columns per line. A log file can be created as well. Nelson Zarate Space Telescope Science Ins. STSDAS group From fitsbits-request Tue Feb 23 12:19:34 1993 Status: RO X-VM-v5-Data: ([nil nil nil nil nil nil nil nil nil] ["295" "" "23" "February" "93" "10:40:20" "-0600" "hockey at iscsvax.uni.edu" "hockey at iscsvax.uni.edu" nil "4" "Coordinates from a Planetary Image?" "^From:" nil nil "2"]) Received: by fits.cv.nrao.edu (4.1/DDN-DLB/1.5) id AA07147; Tue, 23 Feb 93 12:19:34 EST Return-Path: Message-Id: <1993Feb23.104020.11106 at iscsvax.uni.edu> Organization: University of Northern Iowa Path: cv3.cv.nrao.edu!uvaarpa!darwin.sura.net!zaphod.mps.ohio-state.edu!hobbes.physics.uiowa.edu!news.iastate.edu!iscsvax.uni.edu!hockey From: hockey at iscsvax.uni.edu Sender: fitsbits-request at fits.CV.NRAO.EDU To: fitsbits at fits.CV.NRAO.EDU Subject: Coordinates from a Planetary Image? Date: 23 Feb 93 10:40:20 -0600 Does anybody know of an astronomical image-processing system that will permit one to determine the latitude and longitude of a feature on a planetary image (e. g., from the PDS Voyager spacecraft CD-ROM)? Neither IRAF nor MIRA have this capability, and VICAR is dependent on obsolete hardware. From fitsbits-request Tue Feb 23 22:18:25 1993 Status: RO X-VM-v5-Data: ([nil nil nil nil nil nil nil nil nil] ["1260" "Tue" "23" "February" "1993" "19:13:24" "+0000" "Chris Marriott" "chris at chrism.demon.co.uk " nil "25" "Questions from a FITS novice" "^From:" nil nil "2"]) Received: by fits.cv.nrao.edu (4.1/DDN-DLB/1.5) id AA07944; Tue, 23 Feb 93 22:18:25 EST Return-Path: Message-Id: <730494804snz at chrism.demon.co.uk> Organization: None Path: cv3.cv.nrao.edu!uvaarpa!darwin.sura.net!paladin.american.edu!news.univie.ac.at!hp4at!mcsun!sunic!seunet!pipex!demon!chrism.demon.co.uk!chris Reply-To: chris at chrism.demon.co.uk From: chris at chrism.demon.co.uk (Chris Marriott) Sender: fitsbits-request at fits.CV.NRAO.EDU To: fitsbits at fits.CV.NRAO.EDU Subject: Questions from a FITS novice Date: Tue, 23 Feb 1993 19:13:24 +0000 Please excuse me if the questions which follow are inappropriate for this newsgroup. I know *nothing* about FITS, but I'd like to. 1. NASA produce a number of CD-ROMS containing images from space missions. These files have a ".IMG" extension and appear to be a text header, followed by binary data. Are these FITS files? 2. If the answer to the above question is "yes", can anyone give me advice on where I could obtain information on the file format? The specific reason I ask is that I am the author of a quite successful "shareware" astronomy program for the IBM-PC, running under Microsoft Windows, and I'd like to add the ability to display these .IMG files in the same way the program can currently display GIF files, etc. Thanks in advance for any help. Chris -- -------------------------------------------------------------------------- | Chris Marriott | chris at chrism.demon.co.uk | | Warrington, UK | BIX: cmarriott | | | CIX: cmarriott | | Save the whales. Collect the whole set. | CompuServe: 100113,1140 | -------------------------------------------------------------------------- From fitsbits-request Wed Feb 24 15:35:39 1993 Status: RO X-VM-v5-Data: ([nil nil nil nil nil nil nil nil nil] ["817" "Wed" "24" "February" "93" "15:37:47" "EST" "Eric Greisen" "egreisen at primate.CV.NRAO.EDU " nil "18" "wcs paper" "^From:" nil nil "2"]) Received: by fits.cv.nrao.edu (4.1/DDN-DLB/1.5) id AA09653; Wed, 24 Feb 93 15:35:39 EST Return-Path: Message-Id: <9302242037.AA03542 at primate.cv.nrao.edu> From: egreisen at primate.CV.NRAO.EDU (Eric Greisen) Sender: fitsbits-request at fits.CV.NRAO.EDU To: fitsbits at primate.CV.NRAO.EDU Subject: wcs paper Date: Wed, 24 Feb 93 15:37:47 EST I have received some useful comments and have folded them into the paper and made a variety of other modifications. Several appendices have been added (or are in progress), the quad-sphere description was altered (to a Cobe quad sphere and an exact one), and numerous other changes I can no longer remember. One of the figures (formerly on page 28) had the chance to get an atan(0,0) in its postscript - so I have corrected it to avoid the problem. I encourage anyone with an interest in the problem to look at this draft and forward comments to me or Mark Calabretta (mcalabre at atnf.csiro.au). The papers are in the anonymous ftp area on fits.cv.nrao.edu [192.33.115.8] known as /FITS/Documents/FITS_wcs and there is a README file. Thanks, Eric W. Greisen, Scientist National Radio Astronomy Observatory From fitsbits-request Thu Feb 25 06:07:50 1993 Status: RO X-VM-v5-Data: ([nil nil nil nil nil nil nil nil nil] ["10711" "Thu" "25" "February" "1993" "06:28:57" "GMT" "Mark Calabretta,123,412,6608870" "mcalabre at grus.csiro.au " nil "259" "WCS" "^From:" nil nil "2"]) Received: by fits.cv.nrao.edu (4.1/DDN-DLB/1.5) id AA10117; Thu, 25 Feb 93 06:07:50 EST Return-Path: Message-Id: <1993Feb25.062857.7249 at rp.CSIRO.AU> Organization: CSIRO Division of Radiophysics/Australia Telescope National Facility Path: cv3.cv.nrao.edu!uvaarpa!concert!gatech!swrinde!elroy.jpl.nasa.gov!sdd.hp.com!caen!batcomputer!munnari.oz.au!metro!dmssyd.syd.dms.CSIRO.AU!crux.rp.CSIRO.AU!usenet Reply-To: mcalabre at atnf.csiro.au From: mcalabre at grus.csiro.au (Mark Calabretta,123,412,6608870) Sender: fitsbits-request at fits.CV.NRAO.EDU To: fitsbits at fits.CV.NRAO.EDU Subject: WCS Date: Thu, 25 Feb 1993 06:28:57 GMT The appended latex document clarifies the relationship between the elements of the CD matrix and the CDELTn and CROTAn parameters. It was developed from a document by Bob Hanisch and Phil Hodge (STScI) in consultation with Eric Greisen (NRAO) and will appear as an appendix of the WCS document currently available for review from fits.cv.nrao.edu:/FITS/Documents/FITS_wcs. Mark Calabretta, Australia Telescope \documentstyle[11pt]{article} \topmargin 0in \oddsidemargin 0in \evensidemargin 0in \headheight .125in \footheight .125in \textheight 8.9in \textwidth 6.5in \parindent 0in \parskip 1ex \widowpenalty 100000 \clubpenalty 100000 \nofiles \begin{document} \pagestyle{plain} \thispagestyle{empty} \begin{center} \large \bf The CD Matrix in FITS and its Relationship to CDELTn and CROTAn \\ \normalsize \bf \medskip Mark Calabretta (ATNF) \\ Developed from a document by Bob Hanisch and Phil Hodge (ST ScI) \\ in consultation with Eric Greisen (NRAO) \\ \end{center} The FITS {\tt CD} matrix describes a general linear transformation from pixel coordinates $(i,j)$ to physical coordinates $(x,y)$, where $(i,j)$ and $(x,y)$ are offsets from a reference point. In this appendix we discuss the relationship of the {\tt CD} matrix to the {\tt CDELT}{\it n} and {\tt CROTA}{\it n} parameters. In particular, we will derive expressions for the elements of the {\tt CD} matrix in terms of {\tt CDELT}{\it n} and {\tt CROTA}{\it n}. Being a general linear transformation, the {\tt CD} matrix may describe the geometrical operations of scaling, rotation and skewness. Although scaling and rotation can be handled via {\tt CDELT}{\it n} and {\tt CROTA}{\it n}, skewness cannot. Moreover, the {\tt CROTA}{\it n} have generally been interpreted in a very limited way by FITS readers. Specifically, only one {\tt CROTA}{\it n} parameter is usually used, and it applies only to the two spherical coordinate axes within the {\tt NAXIS}-dimensional FITS data cube. A sequence of scaling and rotation operations sufficiently general for astronomical purposes may be cast into matrix form as \begin{equation} \left[ \begin{array}{c} x \\ y \end{array} \right] = \left[ \begin{array}{cc} S_x & 0 \\ 0 & S_y \end{array} \right] \left[ \begin{array}{cc} D_x & 0 \\ 0 & D_y \end{array} \right] \left[ \begin{array}{rc} \cos \theta & \sin \theta \\ -\sin \theta & \cos \theta \end{array} \right] \left[ \begin{array}{cc} S_i & 0 \\ 0 & S_j \end{array} \right] \left[ \begin{array}{cc} D_i & 0 \\ 0 & D_j \end{array} \right] \left[ \begin{array}{c} i \\ j \end{array} \right] \,. \end{equation} This describes a scaling operation performed on the pixel coordinates, followed by a rotation, followed by another scaling. Each of the scaling matrices have been separated into two so that $D_i$, $D_j$, $D_x$, and $D_y$ are positive quantities which describe the magnitude of the scaling, and the $S_i$, $S_j$, $S_x$, and $S_y$ assume values of $\pm 1$ and denote axis inversions. Note that, in general, the operations of scaling and rotation do not commute. In the context of optical astronomy, equation (1) might correspond to the following physical situation: one has a telescope with a scale at the focal plane given by $D_x$ and $D_y$, forming an image on a detector; the detector is rotated with respect to $(x,y)$ by the angle $\theta$ and it has pixels of size $D_i$ by $D_j$ (in units such as mm/pixel). $D_x$ and $D_y$ convert from mm on the detector to the units of whatever is imaged onto the detector. For an image of the sky, the units of $D_x$ and $D_y$ would be, for example, degrees/mm, while for a long-slit spectrograph the units could be \AA/mm for one axis and degrees/mm for the other. $S_i$ and $S_j$, might assume values of $+1$ or $-1$ depending on whether the pixels were read out of the detector in the forward or reverse direction, and likewise the signs of $S_x$ and $S_y$ would depend on whether the telescope optics had an even or odd number of reflections. In the radioastronomical context, only the first scaling operation is required so that $D_x = D_y = 1$. The {\tt CD} matrix formed by combining the above scaling and rotation matrices is \begin{equation} \left[ \begin{array}{c} x \\ y \end{array} \right] = \left[ \begin{array}{rc} S_x D_x S_i D_i \cos \theta & S_x D_x S_j D_j \sin \theta \\ -S_y D_y S_i D_i \sin \theta & S_y D_y S_j D_j \cos \theta \end{array} \right] \left[ \begin{array}{c} i \\ j \end{array} \right] \end{equation} whence \begin{equation} \begin{array}{lcr} {\tt CD}i\_i & = & S_x D_x S_i D_i \cos \theta \,, \\ {\tt CD}i\_j & = & S_x D_x S_j D_j \sin \theta \,, \\ {\tt CD}j\_i & = & - S_y D_y S_i D_i \sin \theta \,, \\ {\tt CD}j\_j & = & S_y D_y S_j D_j \cos \theta \,. \end{array} \end{equation} In restricted cases, it is possible to associate the elements of the {\tt CD} matrix with the {\tt CDELT}{\it n} and {\tt CROTA}{\it n} parameters. Consideration of the special case where the rotation angle is zero allows us to identify the {\tt CDELT}{\it n} terms as \begin{equation} \begin{array}{lcr} {\tt CDELT}i & = & S_x D_x S_i D_i \,, \\ {\tt CDELT}j & = & S_y D_y S_j D_j \,. \end{array} \end{equation} However, if the rotation angle is non-zero, the matrix elements of equation (2) generally cannot be expressed as functions of the {\tt CDELT}{\it n} and {\tt CROTA}{\it n} and so constraints must be sought. Possible constraints might be $D_i = D_j$ or $D_x = D_y$. Of these, the latter is appropriate in the radioastronomical context and it is also the more plausible in optical astronomy. (Note that $D_x \neq D_y$ introduces a skew when the rotation angle is not an integer multiple of $90^{\circ}$, a concept not supported in the old notation.) Now, since $S_x^2 = S_y^2 = +1$, we have \begin{equation} \begin{array}{lcl} S_x S_j & = & S_x (S_y S_y) S_j \\ & = & (S_x S_y) \, (S_y S_j) \,. \end{array} \end{equation} Likewise, \begin{equation} S_y S_i = (S_x S_y) \, (S_x S_i) \,. \\ \end{equation} Then, with $D_x = D_y$, and noting that $S_x S_y = \pm 1$ so that $\cos \theta = \cos (S_x S_y \theta)$ and $S_x S_y \sin \theta = \sin (S_x S_y \theta)$, equations (3) and (4) may be combined to yield \begin{equation} \begin{array}{lcr} {\tt CD}i\_i & = & {\tt CDELT}i\, \cos(S_x S_y \theta) \,, \\ {\tt CD}i\_j & = & {\tt CDELT}j\, \sin(S_x S_y \theta) \,, \\ {\tt CD}j\_i & = & - {\tt CDELT}i\, \sin(S_x S_y \theta) \,, \\ {\tt CD}j\_j & = & {\tt CDELT}j\, \cos(S_x S_y \theta) \,. \end{array} \end{equation} Likewise, equations (3) may be reduced to the form of the Hanisch and Wells (1988) paper, by noting from equations (4) that \begin{equation} \begin{array}{rcl} \left | {\tt CDELT}i \right | & = & D_x D_i \\ & = & D_y D_i \,, \\ \left | {\tt CDELT}j \right | & = & D_y D_j \\ & = & D_x D_j \,, \\ {\rm sign}({\tt CDELT}i) & = & S_x S_i \,, \\ {\rm sign}({\tt CDELT}j) & = & S_y S_j \,, \end{array} \end{equation} whence \begin{equation} \begin{array}{lcrcll} {\tt CD}i\_i & = && {\tt CDELT}i & \cos(S_i S_j \theta) \,, \\ {\tt CD}i\_j & = & {\rm sign} ( {\tt CDELT}i ) & \left | {\tt CDELT}j \right | & \sin(S_i S_j \theta) \,, \\ {\tt CD}j\_i & = & - {\rm sign} ( {\tt CDELT}j ) & \left | {\tt CDELT}i \right | & \sin(S_i S_j \theta) \,, \\ {\tt CD}j\_j & = && {\tt CDELT}j & \cos(S_i S_j \theta) \,. \end{array} \end{equation} Note that the arguments of the trigonometric functions in equations (7) and (9) may differ in sign. At this point we have yet to associate the {\tt CROTA}{\it n} with $\theta$. The original FITS specification given by Wells, Greisen, and Harten (1981) did not define how the {\tt CROTA}{\it n} were to be interpreted but instead left each software package to provide its own interpretation: \begin{quote} ``The rotation parameters {\tt CROTA}{\it n} describe a coordinate system which is rotated with respect to the normal (specified) coordinate system. Users of this option should provide extensive explanatory comments.'' \end{quote} Consequently, different interpretations are possible for different packages. It was stated above that, conventionally, only the {\tt CROTA}{\it n} applying to the pair of spherical coordinate axes was used. The scheme adopted by AIPS and other packages has \begin{equation} \begin{array}{lcl} x & = & {\tt CDELT}i \,\cos ({\tt CROTA}j) \,i - {\tt CDELT}j \,\sin ({\tt CROTA}j) \,j \,, \\ y & = & {\tt CDELT}i \,\sin ({\tt CROTA}j) \,i + {\tt CDELT}j \,\cos ({\tt CROTA}j) \,j \,, \end{array} \end{equation} where $i$ is the longitude-like axis and $j$ is the latitude-like axis. Comparing these with equations (7) the association \begin{equation} S_x S_y \theta = - {\tt CROTA}j \end{equation} may therefore be made, and the same conclusion can be drawn by comparison with equations (9). The final form of the equations for the elements of the {\tt CD} matrix in terms of the {\tt CDELT}{\it n} and {\tt CROTA}{\it n} is \begin{equation} \begin{array}{lcr} {\tt CD}i\_i & = & {\tt CDELT}i \,\cos({\tt CROTA}j) \,, \\ {\tt CD}i\_j & = & - {\tt CDELT}j \,\sin({\tt CROTA}j) \,, \\ {\tt CD}j\_i & = & {\tt CDELT}i \,\sin({\tt CROTA}j) \,, \\ {\tt CD}j\_j & = & {\tt CDELT}j \,\cos({\tt CROTA}j) \,. \end{array} \end{equation} These equations may also be derived directly from equations (9) by noting from equations (8) and (11) that \begin{equation} \begin{array}{lcl} S_i S_j \theta & = & S_i \,( S_x S_x )\, ( S_y S_y )\, S_j \,\theta \\ & = & ( S_i S_x )\, ( S_x S_y )\, ( S_y S_j )\, \theta \\ & = & - {\rm sign} ( {\tt CDELT}i ) \, {\rm sign} ( {\tt CDELT}j ) \,{\tt CROTA}j \,. \end{array} \end{equation} Although there was general agreement to support the conventions used by AIPS in the NASA-sponsored conference of 1988 (Hanisch and Wells, 1988), the ambiguities in the original FITS papers mean that there is no absolute guarantee that all packages have interpreted the {\tt CROTA}{\it n} in accordance with equations (10). \end{document}