Hi. I’m trying to open some of the model maps of Fermi LAT data made by fermitools, and there’s some problem of opening it.
When i try to open the image file(fits) made by gtmodel outtype=ccube(it’s fermitools option), the image values won’t give me the proper ones every time i open the file using astropy.
Problem is, whenever i open it with fits viewer, the numbers are correct, but using astropy, numbers are quite weird.
For example, if i open the model file using fits viewer, the number for each pixels are
0.798225 0.80624 0.81207
0.825374 0.826063 0.827172
0.860138 0.865281 0.86977
for the first 3x3 matrix.
But opening it using astropy, using fits.open, then i get numbers for corresponding array elements to be
array([[1061968001, 1062102462, 1062200277],
[1062774961, 1062906993, 1063001653],
[1063546681, 1063657674, 1063732791]], dtype=‘>i4’)
I don’t see any scaling laws between those two groups of numbers, and i’m just guessing that it might be the problem with one of the header components. I’m uploading my header tables for the gtmodel file.
SIMPLE = T / File conforms to NOST standard
BITPIX = -32 / Bits per pixel
NAXIS = 3 / No data is associated with this header
NAXIS1 = 200 / Length of data axis 1
NAXIS2 = 200 / Length of data axis 2
NAXIS3 = 24 / Length of data axis 3
EXTEND = T / Extensions may be present
COMMENT FITS (Flexible Image Transport System) format is defined in ‘Astronomy
COMMENT and Astrophysics’, volume 376, page 359; bibcode: 2001A&A…376…359H
CTYPE1 = ‘GLON-AIT’ / RA—%%%, %%% is the projection, e.g., AIT
CRPIX1 = 100.5 / Reference pixel
CRVAL1 = 359.947801 / RA at the reference pixel
CDELT1 = -0.2 / X-axis incr per pixel at ref pixel (deg)
CUNIT1 = 'deg ’ / Physical unit of X-axis
CTYPE2 = ‘GLAT-AIT’ / DEC—%%%, %%% is the projection, e.g., AIT
CRPIX2 = 100.5 / Reference pixel
CRVAL2 = -0.036992 / DEC at the reference pixel
CDELT2 = 0.2 / Y-axis incr per pixel at ref pixel (deg)
CUNIT2 = 'deg ’ / Physical unit of Y-axis
CTYPE3 = ‘photon energy’ / log_MeV
CRPIX3 = 1. / Reference pixel
CRVAL3 = 300. / energy at the reference pixel
CDELT3 = 50. / z-axis logrithmic incr per pixel
CUNIT3 = 'log_MeV ’ / Physical unit of Y-axis
CROTA2 = 0. / Image rotation (deg)
DATE = ‘2023-11-22T09:55:19’ /
TELESCOP= 'GLAST ’ / Name of telescope generating data
INSTRUME= 'LAT ’ / Name of instrument generating data
DATE-OBS= ’ ’ / Start Date and Time of the observation (UTC)
DATE-END= ’ ’ / End Date and Time of the observation (UTC)
EQUINOX = 2000. / Equinox of RA & DEC specifications
CREATOR = 'gtmodel ’ / Software and version creating file
HISTORY $Id: LatCountsMapTemplate,v 1.2 2004/09/24 03:54:20 jc
HISTORY hiang E
CHECKSUM= ‘0000000000000000’ / HDU checksum updated 2023-11-22T00:55:19
DATASUM = ‘3894447489’ / data unit checksum updated 2023-11-22T00:55:19
SIMPLE = T / File conforms to NOST standard
BITPIX = 32 / Bits per pixel
EXTEND = T / Extensions may be present
COMMENT FITS (Flexible Image Transport System) format is defined in ‘Astronomy
COMMENT and Astrophysics’, volume 376, page 359; bibcode: 2001A&A…376…359H
CTYPE1 = ‘GLON-AIT’ / RA—%%%, %%% is the projection, e.g., AIT
CRPIX1 = 100.5 / Reference pixel
CRVAL1 = 359.947801 / RA at the reference pixel
CDELT1 = -0.2 / X-axis incr per pixel at ref pixel (deg)
CUNIT1 = 'deg ’ / Physical unit of X-axis
CTYPE2 = ‘GLAT-AIT’ / DEC—%%%, %%% is the projection, e.g., AIT
CRPIX2 = 100.5 / Reference pixel
CRVAL2 = -0.036992 / DEC at the reference pixel
CDELT2 = 0.2 / Y-axis incr per pixel at ref pixel (deg)
CUNIT2 = 'deg ’ / Physical unit of Y-axis
CTYPE3 = ‘photon energy’ / log_MeV
CRPIX3 = 1. / Reference pixel
CRVAL3 = 300. / energy at the reference pixel
CDELT3 = 50. / z-axis logrithmic incr per pixel
CUNIT3 = 'log_MeV ’ / Physical unit of Y-axis
CROTA2 = 0. / Image rotation (deg)
DATE = ‘2023-11-21T11:55:15’ /
TELESCOP= 'GLAST ’ / Name of telescope generating data
INSTRUME= 'LAT ’ / Name of instrument generating data
DATE-OBS= ’ ’ / Start Date and Time of the observation (UTC)
DATE-END= ’ ’ / End Date and Time of the observation (UTC)
EQUINOX = 2000. / Equinox of RA & DEC specifications
CREATOR = ‘gtsrcmaps’ / Software and version creating file
HISTORY $Id: LatCountsMapTemplate,v 1.2 2004/09/24 03:54:20 jc
HISTORY hiang E
CHECKSUM= ‘JkF8Mj95JjC5Jj95’ / HDU checksum updated 2023-11-22T00:55:19
DATASUM = ‘1817100391’ / data unit checksum updated 2023-11-21T02:55:15
DSTYP1 = ‘POS(RA,DEC)’
DSUNI1 = 'deg ’
DSVAL1 = ‘CIRCLE(266.41,-29,50)’
DSTYP2 = 'TIME ’
DSUNI2 = 's ’
DSVAL2 = 'TABLE ’
DSREF2 = ':GTI ’
DSTYP3 = ‘BIT_MASK(EVENT_TYPE,3,P8R3)’
DSUNI3 = ‘DIMENSIONLESS’
DSVAL3 = '1:1 ’
DSTYP4 = 'ENERGY ’
DSUNI4 = 'MeV ’
DSVAL4 = ‘300:500000’
DSTYP5 = ‘ZENITH_ANGLE’
DSUNI5 = 'deg ’
DSVAL5 = '0:90 ’
DSTYP6 = ‘IRF_VERSION’
DSUNI6 = ‘DIMENSIONLESS’
DSVAL6 = ‘P8R3_ULTRACLEANVETO_V3’
DSTYP7 = ‘BIT_MASK(EVENT_CLASS,1024,P8R3)’
DSUNI7 = ‘DIMENSIONLESS’
DSVAL7 = '1:1 ’
NDSKEYS = 7
This is quite of problem because i’m having some of the difficulties to compare model maps and counts maps. Although i can scrap some of the model map informations using fits viewer, since it gives me the correct numbers, but i’m wondering what would be the problem opening this file with astropy. Thank you.