UPDATEWCS - User Interface
- stwcs.updatewcs.updatewcs(input, vacorr=True, tddcorr=True, npolcorr=True, d2imcorr=True, checkfiles=True, verbose=False, use_db=True, all_wcs=False, remove_duplicates=True)
Updates HST science files with the best available calibration information. This allows users to retrieve from the archive self contained science files which do not require additional reference files.
Basic WCS keywords are updated in the process and new keywords (following WCS Paper IV and the SIP convention) as well as new extensions are added to the science files. Duplicate HeaderletHDU extensions (each containing a separate WCS) can also be deleted from the file as well. These duplicates generally are unintended, but if left in place, they can cause an Exception to be thrown when the user works with these extensions later.
Examples
>>> from stwcs import updatewcs >>> updatewcs.updatewcs(filename)
Dependencies
stsci.tools
astropy.io.fits
astropy.wcs
requests
lxml
- Parameters:
input (a python list of file names or a string (wild card) – characters allowed) input files may be in fits, geis or waiver fits format
vacorr (bool) – If True, vecocity aberration correction will be applied
tddcorr (bool) – If True, time dependent distortion correction will be applied
npolcorr (bool) – If True, a Lookup table distortion will be applied
d2imcorr (bool) – If True, detector to image correction will be applied
checkfiles (bool) – If True, the format of the input files will be checked, geis and waiver fits files will be converted to MEF format. Default value is True for standalone mode.
use_db (bool) – If True, attempt to add astrometric solutions from the MAST astrometry database. Default value is True.
all_wcs (bool) – This parameter only gets used if
use_db=True
to control what WCS solutions from the Astrometry database gets appended to the file. If True, all solutions get appended. If False, only solutions based on the IDCTAB from the file’s PRIMARY header will be appended.remove_duplicates (bool, optional) – This parameter only gets used if
use_db=True
to remove any duplicate headerlet extensions. These extensions contain WCS solutions that are identical to the WCS found in other extensions of the image.