Image Class¶

Classes to keep track of all WCS and catalog information.
Used by TweakReg
.
Authors: | Warren Hack, Mihai Cara |
---|---|
License: | http://www.stsci.edu/resources/software_hardware/pyraf/LICENSE |
-
class
drizzlepac.imgclasses.
Image
(filename, input_catalogs=None, exclusions=None, **kwargs)[source]¶ Bases:
object
Primary class to keep track of all WCS and catalog information for a single input image. This class also performs all matching and fitting.
Methods
buildDefaultRefWCS
()Generate a default reference WCS for this image. buildSkyCatalog
()Convert sky catalog for all chips into a single catalog for the entire field-of-view of this image. clean
()Remove intermediate files created. close
()Close any open file handles and flush updates to disk get_shiftfile_row
()Return the information for a shiftfile for this image to provide compatability with the IRAF-based MultiDrizzle. get_wcs
()Helper method to return a list of all the input WCS objects associated with this image. get_xy_catnames
()Return a string with the names of input_xy catalog names match
(refimage, quiet_identity, **kwargs)Uses xyxymatch to cross-match sources between this catalog and a reference catalog (refCatalog). openFile
([openDQ])Open file and set up filehandle for image file performFit
(**kwargs)Perform a fit between the matched sources. sortSkyCatalog
()Sort and clip the source catalog based on the flux range specified by the user. transformToRef
(ref_wcs[, force])Transform sky coords from ALL chips into X,Y coords in reference WCS. updateHeader
([wcsname, reusename])Update header of image with shifts computed by perform_fit(). writeHeaderlet
(**kwargs)Write and/or attach a headerlet based on update to PRIMARY WCS write_fit_catalog
()Write out the catalog of all sources and resids used in the final fit. write_outxy
(filename)Write out the output(transformed) XY catalog for this image to a file. write_skycatalog
(filename)Write out the all_radec catalog for this image to a file. compute_fit_rms -
buildSkyCatalog
()[source]¶ Convert sky catalog for all chips into a single catalog for the entire field-of-view of this image.
-
get_shiftfile_row
()[source]¶ Return the information for a shiftfile for this image to provide compatability with the IRAF-based MultiDrizzle.
-
get_wcs
()[source]¶ Helper method to return a list of all the input WCS objects associated with this image.
-
match
(refimage, quiet_identity, **kwargs)[source]¶ Uses xyxymatch to cross-match sources between this catalog and a reference catalog (refCatalog).
-
performFit
(**kwargs)[source]¶ Perform a fit between the matched sources.
Parameters: - kwargs : dict
Parameter necessary to perform the fit; namely, fitgeometry.
Notes
- This task still needs to implement (eventually) interactive iteration of
- the fit to remove outliers.
-
sortSkyCatalog
()[source]¶ Sort and clip the source catalog based on the flux range specified by the user. It keeps a copy of the original full list in order to support iteration.
-
transformToRef
(ref_wcs, force=False)[source]¶ Transform sky coords from ALL chips into X,Y coords in reference WCS.
-
updateHeader
(wcsname=None, reusename=False)[source]¶ Update header of image with shifts computed by perform_fit().
-
-
class
drizzlepac.imgclasses.
RefImage
(wcs_list, catalog, xycatalog=None, cat_origin=None, **kwargs)[source]¶ Bases:
object
This class provides all the information needed by to define a reference tangent plane and list of source positions on the sky.
Warning
When
wcs_list
is a Python list ofWCS
objects, each element must be an instance ofstwcs.wcsutil.HSTWCS
.Methods
clean
()Remove intermediate files created get_shiftfile_row
()Return the information for a shiftfile for this image to provide compatability with the IRAF-based MultiDrizzle. transformToRef
()Transform reference catalog sky positions (self.all_radec) to reference tangent plane (self.wcs) to create output X,Y positions. write_skycatalog
(filename[, show_flux, show_id])Write out the all_radec catalog for this image to a file. append_not_matched_sources clear_dirty_flag close set_dirty -
get_shiftfile_row
()[source]¶ Return the information for a shiftfile for this image to provide compatability with the IRAF-based MultiDrizzle.
-