Space Telescope Science Institute
ACS Data Handbook 2011
help@stsci.edu
Table of Contents Previous Next Index Print


ACS Data Handbook > Chapter 3: ACS Calibration Pipeline > 3.5 Manual Recalibration of ACS Data

3.5
3.5.1
Software Requirements
An overview of HST image data analysis software is available in the Introduction to the HST Data Handbooks. STSDAS is primarily used for image analysis of HST data; please refer to the STSDAS Web page and PyRAF Web page for downloading the latest software versions, release notes, and on-line help.
Please note that manual recalibration of post-SM4 WFC data requires a version of calacs subsequent to SM4 (May 2009). Older versions of calacs cannot process post-SM4 WFC images. The latest software is available at
http://www.stsci.edu/resources/software_hardware/stsdas
For the following examples, we use PyRAF, a Python-based command language for IRAF, to run STSDAS software packages.
Data Retrieval
The Introduction to the HST Data Handbooks contains an overview of data retrieval from the Archive.
Setting up “jref”
Before any recalibration can be done, the directory location for calibration reference files must be defined. For ACS, this directory is referred to as “jref”, and is used as a prefix in the reference file names in the image header (i.e., jref$qb12257gj_pfl.fits). In UNIX, the set environment variable, setenv, is used to set “jref” to a directory location. This must be done before starting PyRAF in the same window. For example:
Using Non-default Reference files and Calibration Switches
By default, OTFR provides calibrated images processed with the latest-available reference files. In order to use non-default reference files and calibration switch settings, manual recalibration is required. These non-default settings have to be manually updated in the uncalibrated data (raw.fits) before running calacs. The example below shows an excerpt of a raw image header containing the calibration reference file keywords and switches:
Table 3.7 shows the calibration switches as they would appear in the raw image header and their default values.
Table 3.7: Calibration Switch Selection Criteria.
DEFAULT = PERFORM
If OBSMODE = ACQ then OMIT (HRC only)
DEFAULT = OMIT
DEFAULT = PERFORM” (“OMIT” for SBC)
DEFAULT = PERFORM (“OMIT” for SBC)
DEFAULT = OMIT
DEFAULT = PERFORM
DEFAULT = OMIT
DEFAULT = PERFORM(“OMIT” for SBC)
DEFAULT = PERFORM
DEFAULT = PERFORM
DEFAULT = OMIT
DEFAULT =PERFORM
DEFAULT = PERFORM(SBC only)
DEFAULT = PERFORM (SBC only)

1
Not a part of calacs.

Post-SM4 WFC Image Artifact Correction
Certain artifacts present in post-SM4 WFC images, including amplifier crosstalk, bias shift, and bias striping, are not currently (as of Jan. 2011) handled by calacs. These artifacts must be corrected via stand-alone STSDAS routines, some of which may need one or more calibration files used by calacs; for example, the bias striping removal can be performed on the flt.fits file, but requires the WFC calibration flat-field image as specified in the header keyword PFLTFILE. This flat-field may be obtained from the ACS Reference Files Web page.
Bypassing the PHOTCORR Step
During the doPhot step, pixel values and units are not changed. This step only calculates the values of the calibrated image’s photometric header keywords, such as the inverse sensitivity conversion factor (PHOTFLAM). Please refer to Section 3.4.3, the section about Section , “doPhot - Photometry Keyword Calculation”, for more information.
When populating the photometric keywords during the doPhot step, calacs uses the STSDAS synthetic photometry package, synphot, which contains the throughput curves of all HST optical components. (For information on retrieving the SYNPHOT throughput tables, please refer to the Introduction to the HST Data Handbooks.) The SYNPHOT data set contains numerous files which may be updated on a regular basis. Some users find it cumbersome to keep up with the updates, and prefer to simply copy the photometric keyword values from the original OTFR calibrated data into the raw image’s primary header, then run calacs with the PHOTCORR switch set to OMIT
Speed of Pipeline Processing
Reprocessing HRC or SBC data will not put a burden on most computing systems since the image sizes, both science data and reference files, are relatively small. Processing WFC observations, on the other hand, will require more computing power, including both CPU run time and disk space.
Great care has been taken to minimize the memory requirements of the pipeline software to accommodate most computing configurations. Line-by-line I/O is used during pipeline processing and is particularly useful when more than one image is operated on at a time, for example, during flat fielding or co-adding images. This, unfortunately, places an extra burden on the I/O capabilities of the computing system. calacs requires up to 130MB of memory to process a single WFC exposure, while multidrizzle requires up to 400MB of memory.
As of May 2010, benchmarking of calacs and multidrizzle execution times used a system with an Intel Xeon 3.2 GHz CPU and 800 MHz DIMMs, running the RedHat Enterprise Linux 5 operating system with Python v2.5.4 and PyRAF v1.8.1. A set of six dithered WFC raw images was processed by CalACS v5.1.1, up to and including the doFlat stage, in 143 seconds. After the photometry header keywords were populated by hand as described above, this set of dithered images was combined with default settings of MultiDrizzle v3.3.7 (itself calling PyDrizzle v6.3.5) in 13 minutes, 15 seconds.
3.5.2
We present several examples of calacs reprocessing. The steps required for multidrizzle reprocessing are outlined in the Multidrizzle Handbook.
Example 1: Reprocessing a Single Exposure
The following example uses HRC data from the flat field calibration program 9019 which observed the stellar cluster 47 Tucanae. The observations are from visit 07, exposure logsheet line 12, and utilize the F814W filter. The exposures were “CR-SPLIT” into two exposures of 20 seconds each. The association table, from the Archive, for this exposure is j8bt07020_asn.fits. Typing ‘tprint j8bt07020_asn.fits’ reveals the rootnames of the two individual exposures (with rootname ending in “Q”) and the name of the cosmic ray-rejected combined image created by OTFR.
For the purposes of this first example, let us assume that the observations are not part of an association. This example will illustrate the steps required to reprocess a single exposure after changing the bias reference file from the default value to a file specified by the user.
1.
In the Unix shell window, before starting PyRAF, specify the location of the jref’ directory using the UNIX setenv command as described earlier in this section. This directory is where the calibration reference files are stored, in this example, /mydisk/myjref/. (To verify if it worked, use the printenv command.)
(Note: This must be done in the same window in which IRAF will be used. Setting ‘jref’ from within STSDAS will not work even though typing ‘show jref’ in STSDAS would suggest it might.)
 
# To launch PyRAF, simply type “pyraf” at the UNIX prompt. From then on, the PyRAF prompt will appear as “-->”
% pyraf
2. To determine which bias reference file name was specified in the image header by OTFR, use the task hselect. (The field value $I simply echoes the image name.) .
3.
Edit the global image header (group 0) of the raw image to enter the name of the new bias file1, for instance, mybias.fits, stored in the “jref” directory. (For the sake of organization, before proceeding, create a subdirectory for recalibration of that image.)
4.
Set the PHOTCORR processing step to ‘OMIT’ and copy a few useful photometric group keywords from the calibrated image (processed by OTFR) to the raw image. (See Section , “Bypassing the PHOTCORR Step” for more information.) The PHOTFLAM keyword will be useful for photometric calibration during image analysis, and PHOTMODE is useful as a concise description of the observation mode. (Note: For WFC images, the keywords need to be edited for both groups.)
5.
Load the acs package and run calacs.
The product will be a calibrated image with the flt.fits extension.
Example 2: Reprocessing Multiple Exposures Taken with “CR-SPLIT” Within an Association
This example uses the same data from Example 1 and illustrates the steps required to reprocess an ACS association after changing the bias reference file from the default value to a file specified by the user. The steps required are similar to the previous example, with a few modifications. (Note: PyRAF output comments which are similar to Example 1 have been omitted.)
1.
The contents of the association table show the two images (rootnames ending in “Q”) that belong to the association. The MEMTYPE value “EXP-CRJ” indicate that those two images were created from a “CR-SPLIT” exposure. The cosmic ray-combined product created in OTFR by calacs (with MEMTYPE = “PROD-CRJ”) has the rootname J8BT07021. .
2.
3.
4.
As in Example 1, the PHOTCORR step is set to ‘OMIT’ and the photometric keywords are copied from the calibrated image to the raw image.
--> # In this example, the calibrated data from the archive was kept in the subdirectory "calib." The PHOTFLAM value from one image is used for both since they have the same observing mode.
5.
Run calacs on the image association.
The product is two separate calibrated images with the flt extension (j8bt07oyq_flt.fits, j8bt07oyq_flt.fits) and a single cr-combined image with the CRJ extension (j8bt07021_crj.fits).
Example 3: Combining Exposures from Multiple Associations
This example illustrates the steps required to combine two separate sets of repeated observations to create a cosmic ray-rejected combined image (crj.fits). We use the same data from the previous example (visit 01, exposure logsheet line 20, association table j8is01020_asn.fits), as well as data from visit 01, exposure logsheet line 40, of the same program (association table j8is01040_asn.fits). All four exposures are 1.0 seconds.
 
1.
2.
Merge the two association tables using tmerge, then edit the merged table as shown below with tedit.
3 J8IS01021 PROD-RPT yes # Remove this line
6 J8IS01041 PROD-RPT yes # Rename the resulting summed image.
5 J8IS01xx1 PROD-CRJ yes
3.
Set the PHOTCORR processing step to ‘OMIT’, then copy the PHOTFLAM and PHOTMODE keyword values from one of the calibrated images to the raw images.
4.
Run calacs on the new image association.
The product is four calibrated images with the flt extension and a single cosmic ray-combined image with the crj extension (j8is01xx1_crj.fits).
Example 4: Reprocessing Images taken as part of a Dither Pattern
The following example uses WFC data from the GOODS program 9425. These observations are from visit 54, exposure 219; the target name was “CDF-South”, observed with the F606W filter. The images were part of a 2-point line dither pattern with an exposure time of 480 seconds each, with rootnames j8e654c0q and j8e654c4q.
This example illustrates the steps needed to reprocess data which is part of a dither pattern, using a non-default dark reference file.
1.
2.
3.
4.
As in the earlier examples, set the PHOTCORR processing step to OMIT and copy the photometric keywords from calibrated images (retrieved from the Archive) to the raw images. The example below pulls the values of PHOTMODE and PHOTFLAM for groups 1 and 2 of the WFC chip—this is just to show that the same PHOTFLAM and PHOTMODE values are used for both ACS chips.
5.
Run calacs on the image association.
The result will be two calibrated images with the flt.fits extension, processed using the alternate dark file, mydark.fits. In subsequent processing (see Multidrizzle Handbook for details), multidrizzle will combine these flt.fits files into a single drz.fits image.

1
For the purposes of this example, the default bias reference file, m4r1753rj_bia.fits, was simply renamed to mybias.fits

2
For the purposes of this example, the default dark reference file, mbn1046bj_drk.fits, was renamed to mydark.fits.


Table of Contents Previous Next Index Print