multicolorfits.sky_to_pixel#
- multicolorfits.sky_to_pixel(headerin, rain, decin, precise=False, checksys=False, incoordsys='fk5', incoordequinox='J2000.0', forceimagesys=None, originindex=0)[source]#
Helper function to convert sky coordinates to pixel coordinates. Now uses SkyCoord.
Allowed SkyCoord frame systems: [‘altaz’, ‘barycentrictrueecliptic’, ‘cirs’, ‘fk4’, ‘fk4noeterms’, ‘fk5’, ‘galactic’, ‘galactocentric’, ‘gcrs’, ‘geocentrictrueecliptic’, ‘hcrs’, ‘heliocentrictrueecliptic’, ‘icrs’, ‘itrs’, ‘precessedgeocentric’, ‘supergalactic’]
- Parameters:
headerin (astropy.io.fits.header) – Header object
rain (float) – Input Right Ascension, in decimal
decin (float) – Input Declination, in decimal
precise (bool) – False (default) to round to nearest integer pixel. True to return fraction of pixel.
checksys (bool) – When True, checks that the input coordinate frame is the same as the header frame (e.g., fk5, icrs, etc.)
incoordsys (str) – SkyCoord frame system, default = ‘fk5’
incoordequinox (str) – equinox, default = ‘J2000.0’
forceimagesys (str) – SkyCoord frame system. User can specify a frame forceimagesys to use (in case no RADESYS in the header, or if it’s known to be wrong…)
originindex (int) – Default = 0. Pixel origin to use for calculations (0 or 1)
- Returns:
list – [X-pixel, Y-pixel]