Instrument-Specific Software

Faint Object Camera


The software for the Faint Object Camera is rather extensive, and is divided into five subpackages under the foc package:

The focutility package contains a number of tasks used to convert images to the particular reference data file format (background correction, geometric correction, detector efficiency correction, etc.) needed in the pipeline calibration. (Tasks that read and write data in the internal data formats used for the ground-system calibration of the FOC can be found in the stlocal.testfoc package. These tasks will rarely be needed, except by users who are developing new calibration reference files for the FOC.)

For historical reasons, most tasks in the FOC packages have the letter "x" at the end of the task name. In HST jargon, "x" is the instrument code letter for the FOC. Because of the package organization, however, this is not necessary, and task names may be simplified in a future version of STSDAS.

FOC Geometric Processing

Geometry tasks in the focgeom package will calibrate, model, and display FOC distortion, generate calibration files for the pipeline processor, and rectify images.

Geometric distortion occurs both in the optics (the Optical Telescope Assembly, COSTAR, and the FOC relay) and in the Photon Detector Assembly (PDA).

The FOC relay produces an image on the faceplate of the PDA. The amount of optical distortion introduced is about 10 or 20 pixels maximum. This was calculated by ray tracing through the optics.

The PDA distortion is larger--about 50 pixels towards the edges of the format. Because the PDA is an electron-optic device, the distortion field is complex, variable, and cannot be modelled to an accuracy of 0.1 pixels by simple functions in two dimensions. Instead, the distortion in a real image is measured by locating--in a fairly well-lit (i.e., a long enough exposure time to ensure statistical accuracy), uniformly illuminated image---marks specially deposited on the faceplate of the PDA intensifier and lying in a regular grid (called a reseau). These marks are referred to as reseau marks. The marks on the photocathode form a regular 17 x 17 grid. Each reseau mark is approximately 3 pixels (75 microns) square.

Optical Distortion

The optical distortion has been modelled by a polynomial fit, and for each relay a file containing the fit may be found in the focgeom package directory.

The basic steps required to create a reference image for geometric correction are as follows.

  1. Find the reseau marks in a flat-field image.

  2. Create a reseau table containing a reference grid corresponding to the measured reseau positions.

  3. Evaluate the polynomial fit for optical distortion over the reference grid, thus creating a reseau table with the reference positions projected onto the sky.

  4. Fit a polynomial that maps the sky positions to the reseau positions measured in the image.

  5. Convert that polynomial fit into a geometric correction reference image.

Figure
6.4 shows the entire process, starting with a flat-field image (x1j30104t.d0h) and ending with a geometric correction reference image (zlrg.hhh). Parameters not listed take the default values. Further details are given later in this section. The discussion below is general, but this example includes specific numbers that are appropriate for the full-format COSTAR-corrected f/96 relay.


fo> dezoomx x1j30104t.d0h x1j30104t.hhh
fo> resfind x1j30104t.hhh respos.tab respos
fo> imdelete x1j30104t.hhh
fo> print ("26 986 -27 933", > "temp.lis")
fo> rgenx temp.tab "" rotref temp.lis 17 17 squa
fo> rtransformx temp.tab * rotref.tab rs -5 506 453 \
>>>  shift1=0 shift2=-10
fo> delete "temp.lis,temp.tab"
fo> revalfitx focgeom$opt151.poly optref rotref.tab \
>>>  rotref sky.tab
fo> rfitx respos.tab respos sky.tab optref zlrg.poly \
>>>  1 1090 -60 1000 xxorder=9 xyorder=9 xxterms=yes \
>>>  yxorder=9 yyorder=9 yxterms=yes
fo> p2geo zlrg.poly respos zlrg.hhh 1024 1024 pxformt="zoom" \
>>>  sampoff=0 lineoff=0 samppln=512 linepfm=1024

Creating a Reference Image for Geometric Correction

The focgeom package directory contains five files with names such as opt151.poly. The number (e.g., 151) is the focal ratio of the relay to which the file applies. These are IRAF text database files which contain the coefficients of two-dimensional polynomial (actually Chebyshev) fits. The fit describes the inverse optical distortion, that is, the mapping from full-format image pixel coordinates to the corresponding positions on the sky, also in pixels. The coordinates of points on the photocathode range from one to 1024 in each axis. For each of these files, the point (512,512) is mapped into approximately (512,512).

The positions of reseau marks in a flat field may be found using the resfind task in the focgeom package. This task combines an extrapolation technique with subroutines from rfindx to locate reseau marks. It is not necessary for all the reseau positions to be found. In fact, if some reseau marks are ill defined or obscured, it is usually better to leave their positions undefined.

Now we must create a reference grid of reseau positions. This grid is where the observed reseau marks would end up after geometric correction if we only corrected for PDA distortion and not optical distortion. A reference grid may be created with the rgenx task using the parameter setting gridtype = "squa" and a coordfile that contains one row with four numbers, the first and last X and Y positions of the reference reseau marks. The values should be chosen to give a spacing of 60 pixels between the individual reseau marks. The example above shows an appropriate choice for these numbers for a full-format image. This will create a grid parallel to the image axes, and you would then use rtransformx to rotate the grid to approximately line up with the observed reseau grid.

The next step is to run revalfitx to evaluate the optical distortion polynomial fit at the positions in the rotated reference grid (identified by entry name rotref). The result is the set of positions on the sky (but in pixel coordinates) that would be imaged by the optical system onto the rotated reference grid. Note that the .poly files in focgeom were designed to be run with revalfitx parameter setting direction = "forward". These positions projected onto the sky (entry name optref) together with the observed reseau positions (entry name respos) then fully describe the distortion, to the extent that we can know it based only on the reseau marks. The dimensions of the optref grid and the respos grid are the same, e.g., 17 columns by 17 rows. For each position in optref there is a corresponding position in respos, although some of the latter may be undefined (i.e., set to INDEF).

Next run rfitx to fit a polynomial between the reference positions projected onto the sky and the reseau positions measured in the image. The input reseau table input1 is the set of positions obtained by resfind, while the reference reseau table input2 is the rotated reference grid projected onto the sky.

Finally, run p2geo to convert the polynomial fit output from rfitx into a geometric correction reference image.

Spectrograph Mode

For spectrograph mode observations, the model describes the distorted appearance on the PDA faceplate of slit images of a line source. Ray tracing on a 5 x 5 grid performed by Matra/LAS showed the distortion to be linear to within about one pixel. It is assumed that the physical slit entrance aperture is perfectly straight. No account is taken of how the slit maps onto the sky. There is not yet any task that applies the spectrographic optical distortion to reseau positions.

A distortion model must be generated so that a spectrograph image can be rectified, oriented so that the slit images from a line source are parallel to AXIS1 and at the same time the wavelength dispersion is uniform in the AXIS2 direction.

Generating a spectrograph geometric reference file is a four step operation.

  1. Correct an image of an emission-line source for PDA distortion.

  2. Measure the angle of the long slit lines to AXIS1 using the slitangle task. Rotate the square reference file by the negative of the previously-measured angle using the rtransformx task. Geometrically correcting the spectrograph image with this file will produce an image having spectral lines parallel to AXIS1, however, the dispersion may not be linear.

  3. Identify lines in the central section of the spectrum using the task noao.twodspec.longslit.identify. Extend the line identification along the slit using longslit.reidentify.

  4. Fit a polynomial function to the dispersion relation using longslit.fitcoords, and evaluate the fit over a uniform grid using revalfitx.

Producing FOC Photometric Files

For reasons of convenience, the calibration for normal imaging mode is done in two stages: relative DE and an absolute sensitivity. The latter does not change the data values themselves--it only computes a factor to be added to the image header.

Relative DE: The relative detector efficiency (DE) files (also known as the "UNI" files) are images normalized to unity that describes the variation in the detector response over the imaging area when illuminated uniformly with almost monochromatic light. In principle, the non-uniformity of the source should be corrected so that we have the response to a uniform illumination. We start with a flat-field image and perform the following steps:

  1. Subtract dark count. The imarith task can be used to multiply the dark count image by the exposure time and subtract it from the observed flat field.

  2. Run flall.

Absolute Sensitivity: During pipeline calibration, a factor is computed that may be used to convert from image counts to flux density as seen by the telescope. This factor is written into the header of the calibrated image using the keyword PHOTFLAM. The synphot package contains tasks (e.g., evalband task) for computing this factor based on the instrument configuration, and calfoc calls the synphot subroutine to obtain this factor. The factor has been checked using in-flight data. This was done by comparing the counts in actual stellar images with the counts predicted by PHOTFLAM.

Three factors contribute to the absolute sensitivity:

FOC Geometric Processing
Optical Distortion
Spectrograph Mode
Producing FOC Photometric Files

Generated with WebMaker