WCSFootprint

class grizli.utils.WCSFootprint(wcs, ext=1, label=None)[source]

Bases: object

Helper functions for dealing with WCS footprints

Initialize a WCSObject.

Parameters
wcspywcs.WCS or str or pyfits.HDUList

The WCS object or the path to a FITS file or an HDUList object.

extint, optional

The extension number to use when reading from a FITS file. Default is 1.

labelstr, optional

A label for the WCS object. Default is None.

Attributes
wcspywcs.WCS

The WCS object.

fpnumpy.ndarray

The footprint of the WCS object.

cosdecfloat

The cosine of the declination of the first point in the footprint.

labelstr or None

The label for the WCS object.

pixel_scalefloat

The pixel scale of the WCS object.

Methods

add_naxis(header)

Add the NAXIS information from the FITS header to the WCS object.

Attributes Summary

centroid

path

Path object

polygon

Polygon object.

region

Polygon string in DS9 region format

Methods Summary

add_naxis(header)

If NAXIS keywords not found in an image header, assume the parent image dimensions are 2*CRPIX

get_patch(**kwargs)

PathPatch object

Attributes Documentation

centroid
path

Path object

polygon

Polygon object.

region

Polygon string in DS9 region format

Methods Documentation

static add_naxis(header)[source]

If NAXIS keywords not found in an image header, assume the parent image dimensions are 2*CRPIX

Parameters
headerHeader

FITS header object.

get_patch(**kwargs)[source]

PathPatch object