Perform basic 2-D calibration of STIS data.
In Python without TEAL:
>>> import stistools >>> stistools.basic2d.basic2d("o66p01020_raw.fits", verbose=True, ... trailer="o66p01020.trl")
In Python with TEAL:
>>> from stistools import basic2d >>> from stsci.tools import teal >>> teal.teal("basic2d")
From command line:
% ./basic2d.py -v -s o66p01020_raw.fits o66p01020_flt.fits % ./basic2d.py -r
- stistools.basic2d.basic2d(input, output='', outblev='', dqicorr='perform', atodcorr='omit', blevcorr='perform', doppcorr='perform', lorscorr='perform', glincorr='perform', lflgcorr='perform', biascorr='perform', darkcorr='perform', flatcorr='perform', shadcorr='omit', photcorr='perform', statflag=True, darkscale='', verbose=False, timestamps=False, trailer='', print_version=False, print_revision=False)¶
Perform basic 2-D calibration of STIS raw data.
Some calibration steps are relevant only for CCD or only for MAMA, and since an output file of calstis or basic2d may be used as the input, some steps may have already been done. Most calibration steps will not be done if they are not relevant or if they have already been done, regardless of the value of the calibration switch (e.g. flatcorr).
- input: str
Name of the input raw file.
- output: str
Name of the output file, or "" (the default). If no name was specified, the output name will be constructed from the input name.
- outblev: str
Name of the output text file for blev info, or "" (the default).
- dqicorr: str
If "perform", update the DQ array.
- atodcorr: str
The analog-to-digital correction is ignored because it was never implemented.
- blevcorr: str
If "perform", subtract a bias level based on the overscan values. (CCD only.)
- doppcorr: str
If "perform", convolve reference files (bpixtab, darkfile, flatfile) as needed with the Doppler shift offset throughout the exposure, if Doppler correction was done on-board. (MAMA only, because for the CCD Doppler correction is not done on-board.)
- lorscorr: str
If "perform", bin high-res data to lo-res. (MAMA only.)
- glincorr: str
If "perform", correct for global non-linearity. (MAMA only.)
- lflgcorr: str
If "perform", flag local non-linearity. (MAMA only.)
- biascorr: str
If "perform", subtract the bias image. (CCD only.)
- darkcorr: str
If "perform", subtract the dark image, scaled by the exposure time and possibly also a temperature-dependent factor.
- flatcorr: str
If "perform", divide by the flat field image.
- shadcorr: str
The shutter shading correction is ignored because it was never implemented.
- photcorr: str
If "perform", determine the photometric parameters and populate keywords PHOTFLAM, PHOTZPT, PHOTPLAM and PHOTBW. (Imaging only.)
- statflag: bool
If True, compute statistics for image arrays and update keywords.
- darkscale: str
This may be used to override the time and/or temperature dependent scale factor that would normally be applied to the dark image before subtracting from the raw data. It's a string rather than a float in order to accept a different scale factor for each image set in the input data. calstis reads the value or values (separated by blanks) from the string, and if the value is greater than zero, it will be used instead of the value determined from the temperature and time. (CCD or NUV-MAMA only.)
- verbose: bool
If True, calstis will print more info.
- timestamps: bool
If True, calstis will print the date and time at various points during processing.
- trailer: str
If specified, the standard output and standard error will be written to this file instead of to the terminal. Note, however, that if print_version or print_revision is specified, the value will be printed to the terminal, and any name given for the trailer will be ignored.
- print_version: bool
If True, calstis will print the version number (a string) and then return 0.
- print_revision: bool
If True, calstis will print the full version string and then return 0.
- status: int
0 is OK. 1 is returned if cs1.e (the calstis host executable) returned a non-zero status. If verbose is True, the value returned by cs1.e will be printed. 2 is returned if the specified input file or files were not found, or if there is a mismatch between the number of input, output, and/or outblev files specified.
Return documentation on the basic2d function.
Print a list of command-line options and arguments.
TEAL interface for the basic2d function.