Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error while executing gtmodel during enrico_sed operation #133

Open
basuparth opened this issue Mar 21, 2019 · 2 comments
Open

error while executing gtmodel during enrico_sed operation #133

basuparth opened this issue Mar 21, 2019 · 2 comments

Comments

@basuparth
Copy link

I was running enrico_sed to generate flux points and I ran into the following error. Prior to gtmodel all the other steps were executed successfully by enrico.

Error report

time -p gtmodel srcmaps=/home/parth/SINP/1ES1218+304/1ES1218+304_LAT_Analysis_PowerLaw2_srcMap.fits srcmdl=/home/parth/SINP/1ES1218+304/1ES1218+304_PowerLaw2_LAT_Analysis_out.xml outfile=/home/parth/SINP/1ES1218+304/1ES1218+304_LAT_Analysis_PowerLaw2_ModelMap.fits irfs="P8R3_SOURCE_V2" evtype=3 expcube=/home/parth/SINP/1ES1218+304/1ES1218+304_LAT_Analysis_ltCube.fits bexpmap=/home/parth/SINP/1ES1218+304/1ES1218+304_LAT_Analysis_BinnedMap.fits convol=yes resample=yes rfactor=2 outtype="CMAP" psfcorr=yes edisp=no chatter=2 clobber=yes debug=no gui=no mode="ql"

WARNING: version mismatch between CFITSIO header (v3.43) and linked library (v3.41).

Using evtype=3 (i.e., FRONT/BACK irfs)
real 61.48
user 59.56
sys 0.77
Traceback (most recent call last):
File "/home/parth/SINP/enrico/bin/enrico_sed", line 53, in
sed(config,infile)
File "/home/parth/SINP/enrico/bin/enrico_sed", line 13, in sed
run(infile)
File "/home/parth/SINP/enrico/enrico/RunGTlike.py", line 196, in run
FitRunner.ModelMap(outXml)
File "/home/parth/SINP/enrico/enrico/fitmaker.py", line 473, in ModelMap
self.obs.ModelMaps(xml)
File "/home/parth/SINP/enrico/enrico/gtfunction.py", line 424, in ModelMaps
utils.SubtractFits(self.cmapfile,self.ModelMap,self.Configuration)
File "/home/parth/SINP/enrico/enrico/utils.py", line 120, in SubtractFits
fits.writeto(abs_diff_file, data1 - data2, head)
File "/home/parth/anaconda2/envs/fermi/lib/python2.7/site-packages/astropy/utils/decorators.py", line 508, in wrapper
return function(*args, **kwargs)
File "/home/parth/anaconda2/envs/fermi/lib/python2.7/site-packages/astropy/io/fits/convenience.py", line 433, in writeto
checksum=checksum)
File "/home/parth/anaconda2/envs/fermi/lib/python2.7/site-packages/astropy/utils/decorators.py", line 508, in wrapper
return function(*args, **kwargs)
File "/home/parth/anaconda2/envs/fermi/lib/python2.7/site-packages/astropy/io/fits/hdu/base.py", line 377, in writeto
checksum=checksum)
File "/home/parth/anaconda2/envs/fermi/lib/python2.7/site-packages/astropy/utils/decorators.py", line 508, in wrapper
return function(*args, **kwargs)
File "/home/parth/anaconda2/envs/fermi/lib/python2.7/site-packages/astropy/io/fits/hdu/hdulist.py", line 872, in writeto
self.verify(option=output_verify)
File "/home/parth/anaconda2/envs/fermi/lib/python2.7/site-packages/astropy/io/fits/verify.py", line 121, in verify
raise VerifyError('\n' + '\n'.join(messages))
astropy.io.fits.verify.VerifyError:
Verification reported errors:
HDU 0:
NAXISj keyword out of range ('NAXIS3' when NAXIS == 2)
Note: astropy.io.fits uses zero-based indexing.

@davidsanchez
Copy link
Member

Hi
I am aware of this and I have no solution yet
cheers

@mireianievas
Copy link
Contributor

Is this already fixed? I see a head.remove('NAXIS3') statement in the code and I have never encountered this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants