5 Correcting headers

There are reasons why you may need to edit some of the FITS headers used by Orac-dr.

The main headers to change are

RECIPE
—the data-reduction recipe;
NOFFSETS
—the number of offsets;
OBSNUM
—the number of the frame, starting from 1 on each night;
GRPNUM
—the group number, and should be given by the frame number (OBSNUM) of its first member; and
GRPMEM
—whether or not the frame participates in group processing.

For IRCAM, Michelle, UIST, UFTI, and converted ISAC files, it is possible to edit the NDF’s FITS extension using Kappa’s fitsmod command. The command is a bit long and the author regrets not defining a fitsupdate synonym. The following changes the GRPNUM keyword to have value 36 in the raw NDF frame f19991108_00042.

        % fitsmod f19991108_00042 grpnum u 36 \$C !

It’s possible to edit many files using a C-shell or Perl script to edit a series of files very quickly. If you do, it’s better to specify the values by keyword instead of position, like this

        % fitsmod ndf=f19991108_00042 edit=update keyword=grpnum value=36 \
                  position=! comment=\$C

because it is better insulated against change to fitsmod.

If the file being edited is a multi-NDF container file, you can avoid disconcerting, but harmless error messages if you change the fitsmod command to specify the HEADER NDF. Here is an example for Michelle data, which changes the number of offsets.

        % fitsmod m20011107_00079_raw.header noffsets u 5 \$C !

For Classic Cam, IRIS2, INGRID, ISAAC, NACO, NIRI, or old UFTI data, you can edit the raw FITS files. $ORAC_DIR/bin/fitsmod.pl is a documented example Perl script to edit FITS headers. The intention is for you to make a copy and edit to suit your particular header-editing requirements. For some of these instruments, it may prove easier to edit the FITS headers in the NDF form of the raw data, especially the ESO cameras, which have hierarchical headers.