Updated or more timely reference files sometimes become available after the data were processed. If there are unusual features in the data, or if your analysis requires a high level of accuracy, or if wavecal observations were obtained with the science observation, then you may want to determine whether or not a better calibration is possible and then recalibrate the data.
All users should perform a StarView search and check the list of reference files used during pipeline processing against the recommended calibration reference files. The decision to recalibrate depends upon which calibration image or table changed, and whether that kind of correction is likely to affect the analysis. Before deciding to recalibrate, retrieve the recommended and used calibration files and compare them to see if the differences are important.
All information needed to calibrate your GHRS observations is contained in the science data header keywords. calhrs opens the header file and determines which set of calibration steps to PERFORM or OMIT, and which calibration reference files and tables to use during the calibration process.
You can use the current set of calibration switches and specified reference files in the header file, or you can change certain keyword values. The STSDAS task chcalpar can be used to edit calibration parameters simply and reliably.
The IRAF task imheader can be used to examine the data header file.
to> imheader rootname.d0h l+ | pageHere is an excerpt from a GHRS science data header file showing the calibration reference files and switches:
CALIBRATION REFERENCE FILES
DIOHFILE= `zref$cce1504az.r0h' / diode response header file
PHCHFILE= `zref$bcc11275z.r1h' / photocathode response header file
VIGHFILE= `zref$e751116dz.r2h' / vignetting response header file
ABSHFILE= `zref$e5v0936rz.r3h' / absolute flux header file
NETHFILE= `zref$e5v0936az.r4h' / absolute flux wavelength net header file
DQIHFILE= `zref$cce1505kz.r5h' / data quality initialization header file
CCR1 = `ztab$aau13518z.cz1' / photocathode line mapping parameters table
CCR2 = `ztab$ba412190z.cz2' / photocathode sample parameters table
CCR3 = `ztab$c7f1130oz.cz3' / detector parameters table
CCR4 = `ztab$a3d1045dz.cz4' / wavelength ranges table
CCR5 = `ztab$e3u1417oz.cz5' / spectral order constants table
CCR6 = `ztab$e3t1251bz.cz6' / dispersion constants table
CCR7 = `ztab$e3t1250tz.cz7' / thermal constants table
CCR8 = `ztab$e3t1250lz.cz8' / incidence angle coefficients table
CCR9 = `ztab$e751042hz.cz9' / echelle interpolation constants table
CCRA = `ztab$e751041qz.cza' / echelle non-interpolation constants table
CCRB = `ztab$d8b1457az.czb' / scattered light correction factors
CCRC = `ztab$e3u14301z.czc' / global wavelength coefficients table
CCRD = `ztab$e3t1028nz.czd' / photocathode blemish table
CCG2 = `mtab$a3d1145ly.cmg' / paired-pulse correction table
/ CALIBRATION SWITCHES
DQI_CORR= `PERFORM ` / data quality initialization
EXP_CORR= `PERFORM ` / division by exposure time
DIO_CORR= `PERFORM ` / diode response correction
PPC_CORR= `PERFORM ` / paired-pulse correction
MAP_CORR= `PERFORM ` / mapping function
DOP_CORR= `OMIT ` / doppler compensation
PHC_CORR= `PERFORM ` / removal of photocathode nonuniformity
VIG_CORR= `PERFORM ` / removal of vignetting nonuniformity
MER_CORR= `PERFORM ` / merging of substep bins
GWC_CORR= `PERFORM ` / use global wavelength coefficients
ADC_CORR= `PERFORM ` / application of dispersion constants
MDF_CORR= `OMIT ` / median filter of background spectra
MNF_CORR= `OMIT ` / mean filter of background spectra
PLY_CORR= `PERFORM ` / polynomial smoothing of background spectra
BCK_CORR= `PERFORM ` / background removal
IAC_CORR= `PERFORM ` / incidence angle correction
ECH_CORR= `PERFORM ` / correction for echelle ripple
FLX_CORR= `PERFORM ` / absolute flux calibration
HEL_CORR= `PERFORM ` / conversion to heliocentric wavelengths
VAC_CORR= `OMIT ` / vacuum to air correction
The HST data headers are intended to be self-documenting. The data processing steps performed are listed within the headers as is the state of the telescope and instrumentation at the time of the observation. The trailer file (.trl) contains the history of the RSDP pipeline processing, including the history of the calibration steps executed.
These files can be obtained from the HST Archive through a StarView retrieval request. Chapter 1 describes how to use the Archive.
StarView's Reference file screen contains four columns of useful information: Used and Recommended reference file names, Level of Change, and an indication if the correction associated with the files was performed. You will also find, for early science data, that not all the calibration switches currently used by the latest version of calhrs are in your raw science header. The StarView reference file screen will, however, retrieve all the latest recommended files that you need. By using chcalpar on the raw science file, the new switches and reference file keywords will automatically be placed in your header, including CCRE, SAAHFILE, and BMD_CORR keywords, which can be used to apply the model background subtraction instead of the pipeline default (see "Background Removal" on page 36-8) as well as the GWC_CORR and CCRD keywords used in the dispersion solution (see "Determine Wavelengths" on page 36-7). You will need to fill in the values of the switches and reference files within chcalpar (see "Running the STScI Recalibration Software" on page 36-16) before recalibrating, populating the names of the recommended reference files in place of those originally used by the pipeline. We are now providing information on the Level of Change (SEVERE, MODERATE, TRIVIAL) for calibration images and table rows.
Currently, calhrs looks for the incidence angle correction table for all science data
taken through the SSA and the LSA. However, a correction does not need to be
applied in the case of SSA data and the StarView Reference File screen will not,
therefore, return a recommended reference file for data taken through the SAA.
You will therefore need to set the IAC_CORR to "OMIT" before recalibrating
data taken in the small science aperture.
Reference files consist of images and tables stored in FITS format in the HST Archive. You should probably run strfits on the files retrieved from the Archive before running calhrs. A calibration reference image is an STSDAS image (IRAF imtype = "hhh"). Once strfits is run, an image consists of two files: an ASCII header and a binary data file. A reference table is an STSDAS format table. This table is a single binary file which may contain data of several types. By convention, the suffix of a reference image begins with the letter "r" and that of a reference table begins with the letter "c." More information about FITS and STSDAS formats is provided in Chapter 2. Running the STScI Recalibration Software
calhrs is a task in STSDAS. The STSDAS software runs under IRAF and is free to the astronomical community; it can be retrieved through the STSDAS web page. See Chapter 3 for information about setting up and using IRAF and -STSDAS.
The calibration task calhrs has only two user-selectable parameters: the input and output file names. If only the input name is specified, the output filenames will have the same rootname.
hr> calhrs oldrootname newrootname > outputThe calibration process can logically be thought of in terms of two distinct steps: flux calibration and wavelength calibration. The file that contains the wavelength coefficients has the suffix .c0h, while the flux-calibrated image has .c1h.
Each calibration step is described in the section "Calibration Steps Explained" on page 36-2, along with the corresponding calibration switch and various reference files required by that step.
36.3.2 SPYBALs and Wavecals
GHRS wavelength calibrations come in two varieties: SPYBAL and wavecal.
The LSA had a shutter to block light from entering the spectrograph, while the SSA was always open. Therefore, scattered light from a target in the SSA sometimes contaminated a wavelength calibration exposure if the target was very bright. Usually the lines from the spectral cal lamp are strong enough to still be detected (by the hrs.wavecal task, for example) over the contaminating light; if, however, it interferes, the user can attempt to subtract the star's spectrum to decontaminate the wavelength calibration exposure.
hrs.waveoff prints the pixel, wavelength, and sample space offsets to the screen. You can then apply the wavelength offset to the science observations by using the imcalc task to add the calculated offset to each pixel (for all the groups) in the wavelength file. See the help file for waveoff for examples on how to do this.
cl> hselect z29h0107t.c1h,z29h0108t.c1h $I,carpos,fp_split\After running zwavecal, you can use chcalpar to change the value of the header keyword CCR6 (the dispersion constants reference table) in the science raw data header (.d0h) file to point to the newly created dispersion table. At the same time, change GWC_CORR to `OMIT' and make sure that ADC_CORR is set to "PERFORM". Then re-run calhrs on the science observation. The calhrs task will produce a new set of calibrated files, including the new wavelength (.c0h) file reflecting the new dispersion solution. For example, if you had two observations, the first of which was a calibration lamp observation called z29h0107t that was requested at the same carrousel position as science observation z29h0108t, you could use the commands shown in Figure 36.3 to improve the wavelength solution.
>>> yes
z29h0107t.c1h 50680 NO
z29h0108t.c1h 50680 NO
Figure 36.3: Improving the Wavelength Solution
cl> zwavecal z29h0107t.c1h newdisp_0107
zwavecal: aperture SC2 carrousel position = 50680
wavefit: Iteration 1: 56 lines fit, chisq = 1.146993853700548
Removing 1 lines and fitting again...
wavefit: Iteration 2: 55 lines fit, chisq = 0.8818314073898266
Removing 1 lines and fitting again...
wavefit: Iteration 3: 54 lines fit, chisq = 0.7580552119929887
wavefit: maximum iterations reached.
cl> chcalpar z29h0108t.d0h
...
(ccr6 = newdisp_0107.tab) dispersion coefficients table
...
(gwc_cor= omit) Use global wavelength coefficients
...
cl> calhrs z29h0108t new_z29h0108t
To combine the groups of an FP-SPLIT observation, you can use two stsdas tasks: hrs.poffsets and hrs.specalign. The poffsets task determines the shifts needed to align the spectra either by cross-correlating features in the individual spectra, or by using the information in the .c0h file which gives the wavelength at each pixel. The specalign task combines the spectra after first shifting them to align in wavelength space. These tasks are not specific to GHRS data, but can be used on any spectra which you wish to co-align and co-add. They are, however, of particular use in combining the FP-SPLIT groups in an ACCUM mode GHRS observation since for high-signal-to-noise FP-SPLIT data, the tasks can also be used to derive the photocathode response function (i.e., the photocathode flatfield) for your observations. You can then use the photocathode response function to assess the reliability of the features in your final spectrum.
A detailed description of how to use poffsets and specalign to combine the groups of an FP-SPLIT observation can be found in the help files for the tasks. This topic was also discussed in "Putting FP-SPLITs Back Together" on page 35-32.