[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: FITS header values
Chris,
I am writing this to the group so everyone understands the compromises that
we have made.
What you say below may be true for the general use of cfitsio, but it is
not true for the implementation that Rob has made under my direction.
I write 3 files. One contains some boiler plate items like site, site
latitude and longitude, etc., and then the things that are special to this
frame but common to both cameras. things like RATIME, IMAGETYP, etc.. The
other two are special to the cameras and contain things like the measured
exposure time for each camera, the filter, gain and noise for the camera, etc..
I then pass two file names. At present these say the 0 camera is a V
camera and the 1 camera is an I. But it is set up in such a way to
accommodate B, V, I, and R cameras, two in any order. Rob determines the
JD time and writes out files of the form abcd1234567.fits. Where a is
site, b is filter, c is processing stage, d is spare, and the number is the
Julian date and fraction in thousandths of a day.
The way we have it set up, the last fits header value wins. So one can
just keep appending items to the files and the last one is the one
used. But note, I do not use cfitsio, Rob has set up a general way, and I
just pass his program stuff. So it is not flexible as indicated below.
So the way we have it set up, I can make changes to the "boiler
plate". These can just be put in one or all of the five files. But there
is limited control over the format as that is determined by how Rob has set
it up. Note I did not request flexibility. If I wanted to program it then
I would write it in c or some such. I don't want to have to learn to do
this. Rob has given me just what I asked for, and I am very pleased with
his work. ;^)
Tom
At 04:29 PM 4/10/01 -0700, you wrote:
>Tom,
>
>You gave some reason for writing the header lines in the
>order you do. There are a few ways around that.
>
>If using cfitsio you can change the value of a header line
>after it is written. Suppose you write out lines
> xxx=1
> yyy=2
> zzz=3
>Later you can write out
> xxx=4
>and you do NOT get two xxx lines. What you get is
> xxx=4
> yyy=2
> zzz=3
>
>You can use this to control the order in which the lines
>appear in the file. In the above example you wanted xxx
>to be first but your program did not have a correct value
>for it until later. cfitsio does not actually write to
>disk unless it needs to, then it writes blocks at a time, not
>lines at a time. So re-writing lines likely will not cause
>extra disk activity.
>
>In the Mark III real-time driver because it did drift scan,
>I did not know the value of NAXIS2 until the last scan line
>was written to disk so I "re-wrote" the line just before closing
>the file. Even so NAXIS still appears near the top of the file.
>
>There is another feature of cfitsio that can save a programmer
>some time: When you create a new FITS file you can specify a
>"model file" that is read up and used to build default header lines
>that can be "re-written" if need be. Now you don't need to waste
>code for writing "boiler plate". You can also make chanes to this
>boiler plate without changing your code.
>
>
>
> > -----Original Message-----
> > From: Tom Droege [mailto:tdroege@veriomail.com]
> > Sent: Tuesday, April 10, 2001 2:18 PM
> > To: Stupendous Man; tass@listserv.wwa.com
> > Subject: Re: FITS header values
> >
> >
> > The Plan
> >
> > I have a terrible bias toward those that give me specific
> > instructions as
> > to what to do. When done in public, there seems little
> > chance that I will
> > be led astray in my trust. This forum has a nice effect on
> > those that say
> > "fooey" or do not think things out. They seem to get quickly stomped
> > on. Michael has done his penance and has presented what
> > appears to be a
> > nice plan to me. Jure and Michael have told me what to do. It is my
> > intent to just copy the items given by them. I also agree
> > with Arne's
> > request to bunch like things together. I will shortly put up the new
> > version of the header.
> >
> > Tom Droege
> >
> >
> > At 01:13 PM 4/10/01 -0400, you wrote:
> >
> > > Arne pointed out that we really should adhere to the new
> > >FITS header conventions, rather than say "fooey." I can't
> > >justify any other course of action, in all seriousness.
> > >Okay, what does that mean?
> > >
> > > The new FITS WCS conventions are described in a set of 3
> > >papers by Calabretta and Griesen. The one most relevant to
> > >our purposes is (yet to be?) published in Astronomy and Astrophysics.
> > >One can find a preprint at
> >
> >