fitsmgmt.wcs.pixel_scale

fitsmgmt.wcs.pixel_scale(header=None, wcs=None, unit=u.arcsec, position=None)

Calculates the rough pixel scale using ~astropy.wcs.WCS.

Parameters

header : ~astropy.io.fits.Header, optional. = None

The header to extract ~astropy.wcs.WCS information. It is used when wcs is None or position is "physical". Default: None.

wcs : ~astropy.wcs.WCS, optional. = None

The ~astropy.wcs.WCS to extract the information. If None, it will be extracted from header. Default: None.

unit : ~astropy.units.Unit, optional. = u.arcsec

The desired output unit. Default is u.arcsec. If None, the output will be in radians.

position : tuple of float = None

The position (x, y) in pixel coordinates to calculate the pixel scale. If None (default), the center of the image will be used. If "physical", the physical center, i.e., the center of the image minus LTV1 and LTV2 will be used. Default: None.

Returns

pscale : ~astropy.units.Quantity or float

The pixel scale in unit/pixel. If unit is None, it will be in radians.