Created

Embed URL

HTTPS clone URL

SSH clone URL

You can clone with HTTPS or SSH.

Download Gist
View gist:3083110
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60
In [1]: from astropy import wcs
 
In [2]: from astropy.io import fits
 
In [3]: hdulist = fits.open('XMMLSS_00-nd-int.fits')
 
In [4]: w = wcs.WCS(hdulist[0].header)
 
In [5]: w.to_header()
Out[5]:
WCSAXES = 2 / Number of coordinate axes
CRPIX1 = 1920.5 / Pixel coordinate of reference point
CRPIX2 = 1920.5 / Pixel coordinate of reference point
CDELT1 = -0.000416666666667 / [deg] Coordinate increment at reference point
CDELT2 = 0.000416666666667 / [deg] Coordinate increment at reference point
CUNIT1 = 'deg' / Units of coordinate increment and value
CUNIT2 = 'deg' / Units of coordinate increment and value
CTYPE1 = 'RA---TAN' / Right ascension, gnomonic projection
CTYPE2 = 'DEC--TAN' / Declination, gnomonic projection
CRVAL1 = 36.661 / [deg] Coordinate value at reference point
CRVAL2 = -4.48 / [deg] Coordinate value at reference point
LONPOLE = 180 / [deg] Native longitude of celestial pole
LATPOLE = -4.48 / [deg] Native latitude of celestial pole
RESTFRQ = 0 / [Hz] Line rest frequency
RESTWAV = 0 / [Hz] Line rest wavelength
EQUINOX = 2000 / [yr] Equinox of equatorial coordinates
 
In [6]: import locale
 
In [7]: locale.setlocale(locale.LC_ALL, ('fr_FR', 'UTF-8'))
Out[7]: 'fr_FR.UTF-8'
 
In [8]: w.to_header()
Out[8]: WARNING: Output verification result: [astropy.io.fits.verify]
WARNING: VerifyWarning: Card 'CRPIX1' is not FITS standard (invalid value string: 1920,5 / Pixel coordinate of reference point). Fixed 'CRPIX1' card to meet the FITS standard. [astropy.io.fits.verify]
WARNING: Note: PyFITS uses zero-based indexing.
[astropy.io.fits.verify]
WARNING: VerifyWarning: Card 'CRPIX2' is not FITS standard (invalid value string: 1920,5 / Pixel coordinate of reference point). Fixed 'CRPIX2' card to meet the FITS standard. [astropy.io.fits.verify]
WARNING: VerifyWarning: Card 'CDELT1' is not FITS standard (invalid value string: -0,000416666666667 / [deg] Coordinate increment at reference point). Fixed 'CDELT1' card to meet the FITS standard. [astropy.io.fits.verify]
WARNING: VerifyWarning: Card 'CDELT2' is not FITS standard (invalid value string: 0,000416666666667 / [deg] Coordinate increment at reference point). Fixed 'CDELT2' card to meet the FITS standard. [astropy.io.fits.verify]
WARNING: VerifyWarning: Card 'CRVAL1' is not FITS standard (invalid value string: 36,661 / [deg] Coordinate value at reference point). Fixed 'CRVAL1' card to meet the FITS standard. [astropy.io.fits.verify]
WARNING: VerifyWarning: Card 'CRVAL2' is not FITS standard (invalid value string: -4,48 / [deg] Coordinate value at reference point). Fixed 'CRVAL2' card to meet the FITS standard. [astropy.io.fits.verify]
WARNING: VerifyWarning: Card 'LATPOLE' is not FITS standard (invalid value string: -4,48 / [deg] Native latitude of celestial pole). Fixed 'LATPOLE' card to meet the FITS standard. [astropy.io.fits.verify]
 
WCSAXES = 2 / Number of coordinate axes
CRPIX1 = '1920,5 ' / Pixel coordinate of reference point
CRPIX2 = '1920,5 ' / Pixel coordinate of reference point
CDELT1 = '-0,000416666666667' / [deg] Coordinate increment at reference point
CDELT2 = '0,000416666666667' / [deg] Coordinate increment at reference point
CUNIT1 = 'deg' / Units of coordinate increment and value
CUNIT2 = 'deg' / Units of coordinate increment and value
CTYPE1 = 'RA---TAN' / Right ascension, gnomonic projection
CTYPE2 = 'DEC--TAN' / Declination, gnomonic projection
CRVAL1 = '36,661 ' / [deg] Coordinate value at reference point
CRVAL2 = '-4,48 ' / [deg] Coordinate value at reference point
LONPOLE = 180 / [deg] Native longitude of celestial pole
LATPOLE = '-4,48 ' / [deg] Native latitude of celestial pole
RESTFRQ = 0 / [Hz] Line rest frequency
RESTWAV = 0 / [Hz] Line rest wavelength
EQUINOX = 2000 / [yr] Equinox of equatorial coordinates
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.