next up previous 64
Next: Acknowledgements
Up: Finding the Air Mass and Zenith Distance
Previous: Information required


Examining files

Files containing observations come in a number of different formats. The procedures for inspecting them to determine the values of the keywords that they contain differ for different formats. The following notes cover some of the more common formats, though they are not comprehensive. Note that you can convert a data file between any of the formats mentioned below (and others) using the CONVERT package (see SUN/55[12]).

Starlink NDF and HDS files
If you are using Starlink applications such as PHOTOM (see Section [*]) or GAIA (see Section [*]) to measure instrumental magnitudes in CCD frames then you will probably have converted them to the $n$-dimensional Data Format (NDF; see SUN/33[77]) which itself is a special case of Starlink's Hierarchical Data System (HDS; see SUN/92[78]). HDS files, including NDF ones, usually have file type `.sdf'. In this case, the file name specified to applications, such as those in KAPPA, must omit the `.sdf' file type.

If the observations were originally formatted as FITS files (see below) prior to being converted to the NDF format then all the FITS keywords are preserved in an extension to the NDF file and usually this extension will contain any information about the air mass etc. Application fitslist in KAPPA (see SUN/95[11]) will list the FITS extension of an NDF. Briefly, if you have not previously started KAPPA type kappa. Then type fitslist filename (remembering to omit the file type).

If you know the name of the required keyword then you can use the Unix command grep to extract just the required line from the output produced by fitslist. For example, if the required keyword was `AIRMASS' you would type:

% fitslist filename
$\vert$ grep -i AIRMASS

If you cannot find the required datum in the FITS keywords then it is worth reading the FITS comments to see if they give any useful information.

You can examine the entire contents of an HDS file using hdstrace (see SUN/102[10]). This option will be useful if the file is not an NDF which was created from a FITS file. Simply type hdstrace filename (again remembering to omit the file type). hdstrace is a flexible utility and you should refer to SUN/102 for a full description.

FITS files
The FITS18 (Flexible Image Transport System) format is in widespread use in astronomy. The original observations which you brought away from the observatory after your observing run are perhaps most likely to be in this format.

Application fitshead in KAPPA (see SUN/95[11]) will list all the header information, including the keywords, in a FITS file. Briefly, if you have not previously started KAPPA type kappa. Then type fitshead filename. Alternatively, and perhaps even more simply, the header information can be displayed using Unix command more. The resulting display is perfectly readable, though perhaps not very æsthetic. This technique works best with a window which is eighty characters wide.

A description of the FITS format is beyond the scope of this note. However, briefly, a FITS file comprises a primary dataset and optionally one or more extensions. fitshead allows you to access the header information for the primary dataset and all the extensions. Conversely, often only the primary header information can be conveniently accessed with more.

Figaro DST files
Figaro DST files are another special case of the Starlink HDS format and can be examined with hdstrace. See above for details. The air mass, zenith distance and similar information are most likely to be found in the .FITS or .OBS structures.

IRAF files
A given IRAF (Image Reduction Analysis Facility) dataset is comprised of two files. One file has type `.pix', the other `.imh'. The .pix file contains the `bulk data' for the dataset; the array comprising the two-dimensional image in the case of CCD photometry. The .imh file contains all the header information. It is a simple text file and the keywords have a similar format to FITS keywords. It can be listed using standard Unix commands such as more or cat.



next up previous 64
Next: Acknowledgements
Up: Finding the Air Mass and Zenith Distance
Previous: Information required

The CCD Photometric Calibration Cookbook
Starlink Cookbook 6
J. Palmer & A.C. Davenhall
31st August 2001
E-mail:ussc@star.rl.ac.uk

Copyright © 2001 Council for the Central Laboratory of the Research Councils