Removal of Bias Striping Noise from Post-SM4 ACS WFC Images
All images taken with the Advanced Camera for Surveys Wide Field Channel (ACS/WFC) after Servicing Mission 4 show a row-correlated noise due to the CCD Electronics Box Replacement (CEB-R). The CEB-R includes an Application-Specific Integrated Circuit (ASIC) that generates the bias and reference voltages for the Wide Field Channel CCDs. The ASIC voltages suffer from low-frequency noise, at 1mHz to 1Hz (Loose 2011).
This noise contribution, first seen in CEB-R thermal vac testing, does not matter for bias voltages going to the CCDs because the fluctuations are cancelled out by correlated double sampling (CDS) during the CCD readout. However, there is one reference voltage from the ASIC that is used to offset the signal, applied after the CDS stage. Here, the noise does not cancel out, and manifests as a slow moving variation of the baseline. A power spectrum analysis reveals this to be very nearly "1/f"-noise, also known as "pink noise."
In practice, we observe a horizontal "striping" in all post-SM4 WFC images, virtually uniform along rows for all four amplifiers reading out the two WFC CCDs. Because the amplifiers are in the corners of the WFC footprint, the row striping noise in WFC1 is mirror-reversed in the WFC2 rows. An example of this phenomenon is shown in Figure 1. The 1/f power spectrum of this striping noise means that the fluctations are increasingly stronger on increasingly larger scales.
Figure 1: The WFC1 readout from a post-SM4 bias frame, which has been subtracted by the calibration superbias (nearly stripe-free) to remove fixed bias structure and thereby highlight the striping noise.
During a year of monitoring after SM4, the striping noise amplitude has remained highly stable. The amplitude distribution of the stripes is shown in Figure 2. This distribution is well fit across most of its range by a Gaussian profile with sigma = 0.75 electrons (Fig. 2, red). There is a modest negative skewness that brings the overall standard deviation to 0.9 electrons. This is less than 25% of the WFC read noise, and for most WFC science will present negligible effect (e.g., for small aperture photometry with local background estimation). However, the highly correlated nature of the striping noise can strongly impact certain science cases such as faint isophotal analyses or weak lensing studies relying upon precise ellipticity measurements for faint galaxies. For this reason, the ACS Team has tested several algorithms for post-SM4 striping removal, and we are making available the preferred algorithm.
Figure 2: Histogram of WFC stripe-noise intensity as measured from a year of post-SM4 BIAS images.
Striping Mitigation Software
CALACS performs stripe removal on full frame WFC images using the overscan regions; however, it is limited in precision to ~0.4 electrons. Any remaining low level striping noise below ~0.4 electrons requires fitting the stripes across the science area. In essence, this represents a row-by-row determination of the background, with the advantage that the mirror-imaging of the stripe noise between CCDs allows us to fit two spatially separated rows (8192 total columns) simultaneously. This improved de-stripe script will execute the de-striping in the middle of CALACS processing, and if desired will also include the ACS CTE correction.
For images where the sky background is low to moderate (<35 electrons), and where the astronomical scene is relatively clean, the algorithm does an excellent job of suppressing the striping noise. However for bright backgrounds and/or complicated scenes where a uniform sky is nonexistent (e.g., WFC-spanning nebulosity or background gradient) or difficult to isolate (e.g., WFC-spanning globular cluster), this algorithm can do more harm than good. We have implemented a possible way to work around this by adding a masking capability, but users should still be cautious. As an a posteriori check, we suggest that you compare the difference between corrected and uncorrected WFC images with the histogram shown in Figure 2. If the code is correcting the image with a much broader striping distribution than 0.9 electrons, we recommend that you do not use the striping correction code. In such cases, it is likely that the low level striping will not significantly impact your science.
For a more comprehensive treatment of the bias striping and its mitigation, we refer the reader to Grogin et al. (2011).
Installation and Caveats
Acs_destripe_plus is part of the
acstools package in Ureka.
You will need
acstools version 1.8.0.dev36309 or later, which can only be found in the
SSBX/SSBDEV versions of Ureka after Dec 15, 2014 (SSBREL should contain these updates in late 2015).
Please view the instructions on downloading/updating Ureka.
Please bear in mind the following caveats if you are planning to use this code:
- This code is intended for use on post-SM4 ACS/WFC raw images ONLY (full frame or sub-array). Since CALACS does not remove stripes for sub-array images, this software tool is the only way to de-stripe sub-array images.
- It is known to perform poorly in the presence of high backgrounds and/or complicated scenes. To alleviate this we have added masking capabilities, but you are still able to run the code without a mask.
- In addition to de-striping, this code also performs an approximate correction for WFC intra-CCD amplifier crosstalk (A<-->B and C<-->D cross-talk) assuming GAIN=2 cross-talk properties.
- 2K subarray data is currently the only WFC subarray that can apply the CTE correction. If you process a different size subarray it will not be CTE corrected.
The following tutorial will guide you in correcting your post-SM4 ACS/WFC images for bias striping. This script uses the publicly available algorithm described in Grogin et al. (2011).
Step 1: Preparing the inputs
The new version of the de-striping code can only be run on RAW format images, and the filename must end in “_raw.fits”. You will also need copies of all the reference files CALACS requires for processing. With the exception of the post-flash reference file (which you will only need for post-flashed data, we will address this case later on) you should be able to fetch all necessary calibration files from the HST Archive by selecting “Best Reference Files” under the File Options section when you request the raw files.
You will need to setup a JREF directory where you can put any necessary reference files you received from the Archive. CALACS is already setup to look for these files in this directory and the header keywords for the references files are already prefaced with “jref$’. In a UNIX C-shell environment you can use the ‘setenv’ command as follows:
>>setenv jref /mydisk/myjref/
where /mydisk/myjref is the directory containing your reference files.
Next you will need to make sure you are using the SSBX or SSBDEV environment. To make the switch into the correct environment after installing Ureka, run the following command in your terminal:
>>ur_setup common ssbx
or if you’d prefer to run ssbdev:
>>ur_setup common ssbdev
If your images have been post-flashed, you will need to take a few extra steps. You will not receive the post-flash reference file from the HST Archive (this should change in future releases of CALACS), so you will need to manually download this file and update the FLSHFILE header keyword. The post-flash reference files can be found on the HST CRDS page. To find the right file for your images go to the ACS tab, then the flshfile tab. Then choose the file for your detector (ACS/WFC) whose USEAFTER date most closely precedes the date your images were taken.
Once you have downloaded the file, you can place it in your JREF folder. You will also need to update the header keyword. To do this start a python or Ipython session and run the following commands. Make sure to run the ‘fits.setval’ command for every post-flashed file:
>>from astropy.io import fits
where ref_file_name is the file name of your post-flash reference file.
Step 2: Running acs_destripe_plus
There are two ways to run the python task
The script is both an executable that can be run from a terminal command line, and
a python function that can be called in a python session. When using python you can
either run this task as a traditional python fuction, or use the TEAL interface (we will
not cover the TEAL interface here, but instructions can be found in the python help).
The ACS de-stripe task is now able to take a mask file. Any pixel tagged with a 0
in the mask file will be ignored by ACS de-stripe when it is calculating the stripe values.
All other pixels should have a value of 1. You can also shut off the ACS CTE correction,
as it can be CPU intensive and time consuming (CTE correction is on by default if your
image is full frame or a WFC 2K subarray). Below we show several different examples
using these different settings.
Any WFC image – no masking, with CTE correction if full frame or 2K subarray
>>from acstools import acs_destripe_plus
Full Frame WFC image – with masking, with CTE correction
>>acs_destripe_plus file_raw.fits --sci1_mask mymask_sci1.fits --sci2_mask mymask_sci2.fits
>> from acstools import acs_destripe_plus
>> acs_destripe_plus.destripe_plus('file_raw.fits', scimask1='mymask_sci1.fits', scimask2='mymask_sci2.fits')
Subarray WFC image – with masking, with CTE correction if 2K subarray
>>acs_destripe_plus file_raw.fits --sci1_mask mymask_sci1.fits
>> from acstools import acs_destripe_plus
>> acs_destripe_plus.destripe_plus('file_raw.fits', scimask1='mymask_sci1.fits')
WFC image – no masking, no CTE correction
>> acs_destripe_plus file_raw.fits --nocte
>> from acstools import acs_destripe_plus
>> acs_destripe_plus.destripe_plus('file_raw.fits', cte_correct=False)
Step 3: After Running acs_destripe_plus
You should now have a finished flt and flc (if you ran the CTE correction) product in your working directory. These products should be the same as the Archive product, but with the addition of the de-striping.
As previously stated, for a quantitative assessment of the stripe removal fidelity, we suggest differencing the output SCI extensions with default CALACS processed version and comparing the difference image histogram (the removed stripes) with the distribution plotted in Figure 2. If your distribution of stripe values is significantly broader, we recommend that you work on tailoring a mask file. If you’re distribution is still too broad even after careful masking, we recommend you use the default CALACS output rather than the de-striped FLT.
Feedback and suggestions
We explicitly request that the community provide us with feedback and input on the performance of the algorithm, its applicability, and any suggestions that might be beneficial. To do this, please send a message to the STScI Help Desk and it will be forwarded to the ACS Team.