tweakback - propagate the “tweaked” solutions back to the original input files.
Version 0.4.0 - replaced previous algorithm that used fitting of WCS footprints to reconstruct the transformation that was applied to the old drizzled image (to align it with another image) to obtain the new drizzled image WCS with an algorithm that is based on linearization of the exact compound operator that transforms current image coordinates to the “aligned” (to the new drizzled WCS) image coordinates.
Authors: | |
---|---|
Warren Hack, Mihai Cara | |
License: | |
http://www.stsci.edu/resources/software_hardware/pyraf/LICENSE |
Determine the name of the original, unmodified WCS solution
Generate a list of filenames from a drizzled image’s header
return useful help from a file in the script directory called __taskname__.help
Print out syntax help for running astrodrizzle
Parameters: | |
---|---|
file : str (Default = None)
|
Apply WCS solution recorded in drizzled file to distorted input images (_flt.fits files) used to create the drizzled file. This task relies on the original WCS and updated WCS to be recorded in the drizzled image’s header as the last 2 alternate WCSs.
Parameters: | |
---|---|
drzfile : str (Default = ‘’)
newname : str (Default = None)
input : str (Default = ‘’)
origwcs : str (Default = None)
wcsname : str (Default = None)
extname : str (Default = ‘SCI’)
force : bool (Default = False)
verbose : bool (Default = False)
|
See also
Notes
The algorithm used by this function is based on linearization of the exact compound operator that converts input image coordinates to the coordinates (in the input image) that would result in alignment with the new drizzled image WCS.
If no input distorted files are specified as input, this task will attempt to generate the list of filenames from the drizzled input file’s own header.
Examples
An image named acswfc_mos2_drz.fits was created from 4 images using astrodrizzle. This drizzled image was then aligned to another image using tweakreg and the header was updated using the WCSNAME = TWEAK_DRZ. The new WCS can then be used to update each of the 4 images that were combined to make up this drizzled image using:
>>> from drizzlepac import tweakback
>>> tweakback.tweakback('acswfc_mos2_drz.fits')
If the same WCS should be applied to a specific set of images, those images can be updated using:
>>> tweakback.tweakback('acswfc_mos2_drz.fits',
... input='img_mos2a_flt.fits,img_mos2e_flt.fits')
Apply WCS solution recorded in drizzled file to distorted input images (_flt.fits files) used to create the drizzled file. This task relies on the original WCS and updated WCS to be recorded in the drizzled image’s header as the last 2 alternate WCSs.
Parameters: | |
---|---|
drzfile : str (Default = ‘’)
newname : str (Default = None)
input : str (Default = ‘’)
origwcs : str (Default = None)
wcsname : str (Default = None)
extname : str (Default = ‘SCI’)
force : bool (Default = False)
verbose : bool (Default = False)
|
See also
Notes
The algorithm used by this function is based on linearization of the exact compound operator that converts input image coordinates to the coordinates (in the input image) that would result in alignment with the new drizzled image WCS.
If no input distorted files are specified as input, this task will attempt to generate the list of filenames from the drizzled input file’s own header.
Examples
An image named acswfc_mos2_drz.fits was created from 4 images using astrodrizzle. This drizzled image was then aligned to another image using tweakreg and the header was updated using the WCSNAME = TWEAK_DRZ. The new WCS can then be used to update each of the 4 images that were combined to make up this drizzled image using:
>>> from drizzlepac import tweakback
>>> tweakback.tweakback('acswfc_mos2_drz.fits')
If the same WCS should be applied to a specific set of images, those images can be updated using:
>>> tweakback.tweakback('acswfc_mos2_drz.fits',
... input='img_mos2a_flt.fits,img_mos2e_flt.fits')