destripe_plus¶

acstools.acs_destripe_plus.
destripe_plus
(inputfile, suffix='strp', stat='pmode1', maxiter=15, sigrej=2.0, lower=None, upper=None, binwidth=0.3, scimask1=None, scimask2=None, dqbits=None, rpt_clean=0, atol=0.01, cte_correct=True, keep_intermediate_files=False, clobber=False, verbose=True)¶ Calibrate postSM4 ACS/WFC exposure(s) and use standalone ACS Destripe.
This takes a RAW image and generates a FLT file containing its calibrated and destriped counterpart. If CTE correction is performed, FLC will also be present.
 Parameters
inputfile (str or list of str) –
Input filenames in one of these formats:
a Python list of filenames
a partial filename with wildcards (‘*raw.fits’)
filename of an ASN table (‘j12345670_asn.fits’)
an atfile (
@input
)
suffix (str) – The string to use to add to each input file name to indicate an output product of
acs_destripe
. This only affects the intermediate output file that will be automatically renamed to*blv_tmp.fits
during the processing.stat ({ 'pmode1', 'pmode2', 'mean', 'mode', 'median', 'midpt' } (Default = 'pmode1')) –
Specifies the statistics to be used for computation of the background in image rows:
’pmode1’  SEXTRACTORlike mode estimate based on a modified Pearson’s rule:
2.5*median1.5*mean
;’pmode2’  mode estimate based on Pearson’s rule:
3*median2*mean
;’mean’  the mean of the distribution of the “good” pixels (after clipping, masking, etc.);
’mode’  the mode of the distribution of the “good” pixels;
’median’  the median of the distribution of the “good” pixels;
’midpt’  estimate of the median of the distribution of the “good” pixels based on an algorithm similar to IRAF’s
imagestats
task (CDF(midpt)=1/2
).
Note
The midpoint and mode are computed in two passes through the image. In the first pass the standard deviation of the pixels is calculated and used with the binwidth parameter to compute the resolution of the data histogram. The midpoint is estimated by integrating the histogram and computing by interpolation the data value at which exactly half the pixels are below that data value and half are above it. The mode is computed by locating the maximum of the data histogram and fitting the peak by parabolic interpolation.
maxiter (int) – This parameter controls the maximum number of iterations to perform when computing the statistics used to compute the rowbyrow corrections.
sigrej (float) – This parameters sets the sigma level for the rejection applied during each iteration of statistics computations for the rowbyrow corrections.
lower (float, None (Default = None)) – Lower limit of usable pixel values for computing the background. This value should be specified in the units of the input image(s).
upper (float, None (Default = None)) – Upper limit of usable pixel values for computing the background. This value should be specified in the units of the input image(s).
binwidth (float (Default = 0.1)) – Histogram’s bin width, in sigma units, used to sample the distribution of pixel brightness values in order to compute the background statistics. This parameter is aplicable only to stat parameter values of
'mode'
or'midpt'
.scimask1 (str or list of str) – Mask images for calibrated
SCI,1
, one for each input file. Pixels with zero values will be masked out, in addition to clipping.scimask2 (str or list of str) – Mask images for calibrated
SCI,2
, one for each input file. Pixels with zero values will be masked out, in addition to clipping. This is not used for subarrays.dqbits (int, str, None (Default = None)) –
Integer sum of all the DQ bit values from the input image’s DQ array that should be considered “good” when building masks for destriping computations. For example, if pixels in the DQ array can be combinations of 1, 2, 4, and 8 flags and one wants to consider DQ “defects” having flags 2 and 4 as being acceptable for destriping computations, then
dqbits
should be set to 2+4=6. Then a DQ pixel having values 2,4, or 6 will be considered a good pixel, while a DQ pixel with a value, e.g., 1+2=3, 4+8=12, etc. will be flagged as a “bad” pixel.Alternatively, one can enter a comma or ‘+’separated list of integer bit flags that should be added to obtain the final “good” bits. For example, both
4,8
and4+8
are equivalent to settingdqbits
to 12.Setdqbits
to 0 to make all nonzero pixels in the DQ mask to be considered “bad” pixels, and the corresponding image pixels not to be used for destriping computations.Default value (None
) will turn off the use of image’s DQ array for destriping computations.In order to reverse the meaning of thedqbits
parameter from indicating values of the “good” DQ flags to indicating the “bad” DQ flags, prepend ‘~’ to the string value. For example, in order not to use pixels with DQ flags 4 and 8 for sky computations and to consider as “good” all other pixels (regardless of their DQ flag), setdqbits
to~4+8
, or~4,8
. To obtain the same effect with anint
input value (except for 0), enter (4+8+1)=9. Following this convention, adqbits
string value of'~0'
would be equivalent to settingdqbits=None
.Note
DQ masks (if used), will be combined with user masks specified in the
scimask1
andscimask2
parameters (if any).rpt_clean (int) – An integer indicating how many additional times stripe cleaning should be performed on the input image. Default = 0.
atol (float, None) – The threshold for maximum absolute value of bias stripe correction below which repeated cleanings can stop. When
atol
isNone
cleaning will be repeatedrpt_clean
number of times. Default = 0.01 [e].cte_correct (bool) – Perform CTE correction.
keep_intermediate_files (bool) – Keep destriped BLV_TMP and BLC_TMP files around for CRREJ, if needed. Set to
True
if you want to runcrrej_plus()
.clobber (bool) – Specify whether or not to ‘clobber’ (delete then replace) previously generated products with the same names.
verbose (bool) – Print informational messages. Default = True.
 Raises
ImportError –
stsci.tools
not found.IOError – Input file does not exist.
ValueError – Invalid header values or CALACS version.