fitsmgmt.wcs.center_radec
fitsmgmt.wcs.center_radec(
ccd_or_header,
center_of_image=True,
ra_key='RA',
dec_key='DEC',
equinox=None,
frame=None,
equinox_key='EPOCH',
frame_key='RADECSYS',
ra_unit=u.hourangle,
dec_unit=u.deg,
mode='all',
verbose=True,
plain=False,
)Returns the central ra/dec from header or ~astropy.wcs.WCS.
Notes
Even though RA or DEC is in sexagesimal, e.g., “20 53 20”, astropy correctly reads it in such a form, so no worries.
Parameters
ccd_or_header :~astropy.nddata.CCDDataor~astropy.io.fits.Header-
The CCDData or header to extract central RA/DEC from keywords or
~astropy.wcs.WCS. center_of_image :bool= True-
If
True,~astropy.wcs.WCSinformation will be extracted from the ccd or header, rather than relying on thera_keyanddec_keykeywords directly. IfFalse,ra_keyanddec_keyfrom the header will be understood as the “center” and the RA, DEC of that location will be returned. equinox :str= None-
The
equinoxandframefor SkyCoord. Default (None) will use the default of SkyCoord. Important only ifcenter_of_image=False. Default:None. frame :str= None-
The
equinoxandframefor SkyCoord. Default (None) will use the default of SkyCoord. Important only ifcenter_of_image=False. Default:None. ra_key :str= 'RA'-
Header keys used when
center_of_image=False. dec_key :str= 'RA'-
Header keys used when
center_of_image=False. equinox_key :str= 'RA'-
Header keys used when
center_of_image=False. frame_key :str= 'RA'-
Header keys used when
center_of_image=False. ra_unit :~astropy.units.Unit= u.hourangle-
Units of RA and DEC values read from header keywords when
center_of_image=False. dec_unit :~astropy.units.Unit= u.hourangle-
Units of RA and DEC values read from header keywords when
center_of_image=False. mode : all or wcs = 'all'-
Whether to do the transformation including distortions (
'all') or only including only the core~astropy.wcs.WCStransformation ('wcs'). Important only ifcenter_of_image=True. Default:'all'. plain :bool, optional. = False-
If
True, only the values of RA/DEC in degrees will be returned. Otherwise (default), a~astropy.coordinates.SkyCoordobject will be returned. Default:False.