Skip to content

Failure on gtapp #675

Description

@jballet

#Describe the bug
We have encountered a very basic bug that happens at setup level when fermipy tries calling gtselect via gtapp.
The error message is
2026-06-05 12:14:45 INFO GTBinnedAnalysis.run_gtapp(): Running gtselect.
Traceback (most recent call last):
File "/dsm/manip/glast/anaconda3/envs/fermi-2.5.1/lib/python3.11/site-packages/fermitools/GtApp.py", line 52, in _test_par_value
self.pars[key]
~~~~~~~~~^^^^^
File "/dsm/manip/glast/anaconda3/envs/fermi-2.5.1/lib/python3.11/site-packages/fermitools/pil.py", line 62, in getitem
return float(value)
^^^^^^^^^^^^
ValueError: could not convert string to float: 'np.float64(100.975)'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/dsm/saplxglast/home/jbb/Flight/14years/test/PbGTASetup/./pycmd.py", line 9, in
status = gta.setup()
^^^^^^^^^^^
File "/dsm/manip/glast/anaconda3/envs/fermi-2.5.1/lib/python3.11/site-packages/fermipy/gtanalysis.py", line 1096, in setup
c.setup(overwrite=overwrite)
File "/dsm/manip/glast/anaconda3/envs/fermi-2.5.1/lib/python3.11/site-packages/fermipy/gtanalysis.py", line 5184, in setup
self._select_data(overwrite=overwrite, **kwargs)
File "/dsm/manip/glast/anaconda3/envs/fermi-2.5.1/lib/python3.11/site-packages/fermipy/gtanalysis.py", line 5265, in _select_data
run_gtapp('gtselect', self.logger, kw_gtselect,
File "/dsm/manip/glast/anaconda3/envs/fermi-2.5.1/lib/python3.11/site-packages/fermipy/gtanalysis.py", line 217, in run_gtapp
gtapp[k] = v
~~~~~^^^
File "/dsm/manip/glast/anaconda3/envs/fermi-2.5.1/lib/python3.11/site-packages/fermitools/GtApp.py", line 44, in setitem
self._test_par_value(key)
File "/dsm/manip/glast/anaconda3/envs/fermi-2.5.1/lib/python3.11/site-packages/fermitools/GtApp.py", line 55, in _test_par_value
raise ValueError("for parameter %s, %s" % (key, ee.args[0]))
ValueError: for parameter ra, could not convert string to float: 'np.float64(100.975)'

This did not occur with fermipy 1.4.0.

To Reproduce

PbGTASetup.zip

Here is a very basic test harness. The ltcube file is fake, but the script fails before it needs it.

Environment (please complete the following information):

  • OS: 5.14.0-611.55.1.el9_7.x86_64
  • fermipy 1.4.1
  • fermitools 2.5.1

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions