fitsjd


Fitsjd is a small utility program which outputs the Julian Day of the mid exposure time, the WCS values and the image dimensions of FITS images.  It is written in C programming language under the Linux operating system and makes use of the  cfitsio library.  Program itself does not use anything specific for Linux so it should be possible to compile it on every operating system  where cfitsio runs.

Calculating the time of mid exposure is not so easy as one might imagine.  The problem is that until recently there was no standard or even recommendation how exactly should the time of the mid exposure be specified in the FITS header.  Fitsjd uses the same subroutine as fitsblink for the time calculation.  This complies with the FITS headers generated by the software which comes along of some CCD cameras.

Here is the description taken from the fitsblink manual.  Fitsjd

The use is very simple:

fitsjd [-w] [-j] files

If no switches are specified fitsjd outputs only image dimensions from NAXIS1 and NAXIS2 keywords, like this:

[jure@astro 1999-03-20]$ fitsjd a107119.fts
a107119.fts 1536 1024

The -w switch will make fitsjd output WCS values and image dimensions:

[jure@astro 1999-03-20]$ fitsjd -w a107119.fts
a107119.fts 124.89989394 20.06401144 768.00000000 512.00000000 0.00065686 0.00065670 -0.24529917 1536 1024

The celestial coordinates are all expressed in decimal degrees and are a direct copy of the header values.  The order of the output parameters is

Filename CRVAL1 CRVAL2 CRPIX1 CRPIX2 CDELT1 CDELT2 CROTA1 NAXIS1 NAXIS2

The -j switch will make fitsjd output the Julian Day of mid exposure and image dimensions:

[jure@astro 1999-03-20]$ fitsjd -j a107119.fts
a107119.fts 2451258.28049769 1536 1024

Finally, both switches will output all of the above information.

[jure@astro 1999-03-20]$ fitsjd -j -w a107119.fts
a107119.fts 2451258.28049769 124.89989394 20.06401144 768.00000000 512.00000000 0.00065686 0.00065670 -0.24529917 1536 1024

In this case the order of output parameters is

Filename Time CRVAL1 CRVAL2 CRPIX1 CRPIX2 CDELT1 CDELT2 CROTA1 NAXIS1 NAXIS2

Input files can be specified explicitly or using regular expressions, so if you want print just file names and times for certain files, you can do something like this.

[jure@astro 1999-03-20]$ fitsjd -j [abc]107119.fts | awk '{print $1, $2}'
a107119.fts 2451258.28049769
b107119.fts 2451258.29671296
c107119.fts 2451258.31748843

If you want to use listasteroids.pl and showasteroids.pl you need to download fitsjd, too. If you use Windows, you can download compiled version, prepared by Bob Denny.


jure@ing.iac.es Back to index