Advertisement
Guest User

Untitled

a guest
Mar 28th, 2017
51
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.23 KB | None | 0 0
  1. """Example conversion from pixel coordinates to ra/dec."""
  2. from astropy.io import fits
  3. from astropy.wcs import WCS
  4.  
  5. x, y = 250, 250
  6.  
  7. f = fits.open('f242_e0_c98.fits')
  8. mywcs = WCS(f[0].header)
  9. ra, dec = mywcs.all_pix2world([[x, y]], 0)[0]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement