Return documentation on the wavecal function.

stistools.wavecal.mkRandomNameW(prefix='wavecal_', suffix='_tmp.fits', n=100000000)

Print a list of command-line options and arguments.


TEAL interface for the wavecal function.

stistools.wavecal.runBasic2d(wavecal, tempfnames, verbose, timestamps, fd_trailer)
stistools.wavecal.runCs11(fwv_file, infile, tempfnames, verbose, timestamps, fd_trailer)

Subtract a fraction of the science image from the wavecal image.

stistools.wavecal.runCs12(w2d_file, infile, option, verbose, timestamps, fd_trailer)
stistools.wavecal.runWavecal(w2d_file, dbg, angle, verbose, timestamps, fd_trailer)
stistools.wavecal.runX2d(cwv_file, angle, tempfnames, verbose, timestamps, fd_trailer)
stistools.wavecal.wavecal(input, wavecal, debugfile='', savetmp=False, option='linear', angle=None, verbose=False, timestamps=False, trailer='', print_version=False, print_revision=False)

Perform wavecal processing for STIS data.

input: str

Names of the flt or crj file or files for the science exposure. The SHIFTA1 and SHIFTA2 keywords will be updated in these files, based on the results of processing the wavecal file(s).

wavecal: str

Names of the associated wavecal file or files (either raw or calibrated). If this is a raw file, it will first be calibrated using cs1.e (basic2d), then with cs7.e (x2d) for first-order grating data. These calibrated files are regarded as temporary, and (unless savetmp) they will be deleted when processing has been completed.

debugfile: str

If specified, debugging information will be written to a file with this name. For echelle data this will be a FITS file, but for first-order data it will be a text file (and possibly a FITS file as well).

savetmp: bool

If wavecal is a raw wavecal file, some calibration will be performed, depending on mode. If savetmp is False (the default), the calibrated wavecal files will be deleted after wavecal processing is complete.

option: str

If the wavecal file contains more than one image set, the shifts will be interpolated between wavecal exposures that bracket the science exposure. This argument gives the interpolation option, either “linear” (the default) or “nearest”. If the science exposure was before the first or after the last exposure in the wavecal file, the shifts will be copied from the first or last exposure respectively.

angle: float or None

This argument is only relevant for echelle data for which the wavecal was taken with a long slit (e.g. 6X0.2). The angles have not been measured accurately; they vary from one grating to another, and they even vary depending on location on the detector. This argument specifies the slit angle, in degrees measured clockwise from the Y axis. Here are some approximate values:

E230M 0.9 to 1.2 E230H 4.9 to 6.9 E140H -3.8 to -5.8

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, without checking any other argument.

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 cs4.e (the calstis host executable) returned a non-zero status. If verbose is True, the value returned by cs4.e will be printed. 2 is returned if the specified input file or files were not found, of if the numbers of input and wavecal files (or of debugfiles) are not the same.