next up previous 256
Next: Registering frames from a mosaic camera
Up: Some examples of Set use
Previous: Some examples of Set use

Data reduction of frames from a mosaic camera

Here we give a brief example of how the CCDPACK data reduction programs can take advantage of Set headers in frames obtained from a mosaic camera.

In this case we will assume that the original data is in the form of multi-extension FITS files; a group of data frames data-*.fit, a group of bias frames bias-*.fit and a group of flat fields flat-*.fit. Each MEF represents a single exposure, and contains one Header + Data Unit for each CCD chip in the mosaic camera. It would be possible to leave these files in their original format and allow CCDPACK to convert them on the fly, but the output files will be generated in a more manageable way (their names will be more compact) if we convert them first by hand to NDF format. We do this using the CONVERT package:

% convert
% fits2ndf in='"data-*.fit,bias-*.fit,flat-*.fit"' out='*' container=true
This creates one new HDS container file for each MEF with the same name, but with the extension .sdf instead of .fit. We next indicate to CCDPACK that we will be using Set headers:
% ccdsetup useset=yes accept
The next job is to inform CCDPACK that each HDS container file represents a single Set:
% makeset in='"data-*,bias-*,flat-*"' mode=container
This creates no new files, but adds suitable Set header information to each frame. We can now proceed to the data reduction itself:
% makebias in='bias-*' out=master-bias
This combines all the bias container files and produces one new container file called master-bias. The new file will have the same structure as the files which went to generate it, that is it will represent a single Set, and will have as many constituent frames as those files, one for each Set Index value in the inputs. The master bias Set can now be used to debias the data and flat field frames like this:
% debias in='"data-*,flat-*"' bias=master-bias out='db-*'
and master flat field generation and correction proceeds in the same way:
% makeflat in='"db_flat-*"' out=master-flat
% flatcor in='db_data-*' flat=master-flat out='*|db_|red_|'
We now have a set of HDS container files called red_data-*.sdf which contain the reduced data, one Set (=one exposure) per file.

The thing to note is that once the Set headers have been set up, the commands typed are just the same as for un-Setted data (compare Example 3 in Section [*]), but CCDPACK is taking care that frames are only combined/corrected in groups with corresponding ones; this will be clear if you look at the log output of these tasks.



next up previous 256
Next: Registering frames from a mosaic camera
Up: Some examples of Set use
Previous: Some examples of Set use

CCDPACK
Starlink User Note 139
Peter W. Draper, Mark Taylor, Alasdair Allan
7 July 2011
E-mail:starlink@jiscmail.ac.uk

Copyright © 2013 Science and Technology Facilities Council