fermi-lat / observationSim

BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

Gtobssim in fermitools-2.0.0 cannot handle small (float64) values in source maps #3

Open Alex-Broughton opened 3 years ago

Alex-Broughton commented 3 years ago

With fermitools-2.0.0/fermitools-data-0.18, and using python3, I attempted to run gtobssim with Mapcube sources. The largest of the values of the data in the source files where of order 1e-7). In the file they are stored as float64 numbers, but I believe gtobssim treats them as floats if I am not mistaken. The result is that it treats these values as zero, which throws the error below.

`$ gtobssim emin=1.e3 emax=5.e5 startdate="2008-01-01 00:00:00" infile="srcmdl_gtobssim.xml" srclist="srclist.txt" scfile=none simtime=604800 use_ac=no irfs="P8R3_SOURCE_V2" evroot=root seed=293060 Simulation start time (seconds wrt MET 0)[INDEF] INDEF

Caught St13runtime_error at the top level: MapCube: There are negative or zero-valued pixels in the FITS image read from/data/users/abrought/ML_Project/Galactic_Center_Machine_Learning/Gamma_Ray_Sims/Process_GALPROP_Output/zeroed/zeroed_masked_reprojected_pion_decay_annuli_0_5.fits`

dagorym commented 3 years ago

@Alex-Broughton could you attach the input files you are using so we can try to reproduce this?