fermi-lat / Fermitools-conda

Conda recipe files for the Fermi Sciencetools software analysis package: Fermitools
https://fermi.gsfc.nasa.gov/ssc/data/analysis/
BSD 3-Clause "New" or "Revised" License
34 stars 16 forks source link

Problem with gtltcube and CFITSIO #105

Closed carmeloevoli closed 3 years ago

carmeloevoli commented 3 years ago

Hi, I have a problem with gtltcube which gives this error:

Caught N3tip12TipExceptionE at the top level: Could not open FITS extension "myevents_fermi_healpix.fits[EVENTS]" (CFITSIO ERROR 301: illegal HDU number)

I used the spacecraft data L2102260113087E6D776947_SC00.fits and I built the myevents_fermi_healpix.fits with gtbin with the following settings

This is gtbin version HEAD
Type of output file (CCUBE|CMAP|LC|PHA1|PHA2|HEALPIX) [] HEALPIX
Event data file name[]  myevents_fermi.fits
Output file name[] myevents_fermi_healpix.fits
Spacecraft data file name[] L2102260113087E6D776947_SC00.fits
Ordering Scheme (RING|NESTED) [] NESTED
Order of the map (int between 0 and 12, included)[8] 8
Coordinate system (CEL - celestial, GAL -galactic) (CEL|GAL) [] GAL 
Region, leave empty for all-sky[] 
Do you want Energy binning ?[] yes 
Algorithm for defining energy bins (FILE|LIN|LOG) [] LOG 
Start value for first energy bin in MeV[] 100
Stop value for last energy bin in MeV[] 1000000
Number of logarithmically uniform energy bins[] 64

I hope you can help me to find the problem.

nmirabal commented 3 years ago

gtltcube is expecting an event file not the output of gtbin. You can read an example here

https://fermi.gsfc.nasa.gov/ssc/data/analysis/scitools/binned_likelihood_tutorial.html

carmeloevoli commented 3 years ago

Thanks! It was really useful.