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

If gammapy gets updated then sensitivity will be not calculated #3

Closed
HealthyPear opened this issue Jul 19, 2019 · 2 comments · Fixed by #83
Closed

If gammapy gets updated then sensitivity will be not calculated #3

HealthyPear opened this issue Jul 19, 2019 · 2 comments · Fixed by #83
Assignees
Labels
dependency stuff related to the dependencies of the package

Comments

@HealthyPear
Copy link
Member

The latest working version of gammapy for protopipe is 0.8, which could be quite old for some people.

With gammapy 0.10 came PR #1998: a change was made to the class SensitivityEstimator for which the keyword irf was dropped.

This breaks behavior in protopipe, which instead uses it.
Indeed, when launching the script make_performance.py the user gets the following error,

### Estimating sensitivity... Traceback (most recent call last): File "/Users/michele/Applications/ctasoft/protopipe/protopipe/scripts/make_performance.py", line 185, in <module> main() File "/Users/michele/Applications/ctasoft/protopipe/protopipe/scripts/make_performance.py", line 181, in main sensitivity_maker.estimate_sensitivity() File "/Users/michele/Applications/ctasoft/protopipe/protopipe/perf/irf_maker.py", line 101, in estimate_sensitivity sensitivity_estimator = SensitivityEstimator(irf=self.irf, livetime=obs_time) TypeError: __init__() got an unexpected keyword argument 'irf'

So if we want to let protopipe use the latest version of gammapy (provided that this will not break anything else, of course), at least line #101 in protopipe/protopipe/perf/irf_maker.py will need to be updated accordingly.

@HealthyPear HealthyPear added the dependency stuff related to the dependencies of the package label Jul 19, 2019
@HealthyPear HealthyPear self-assigned this Jul 19, 2019
@kosack
Copy link
Contributor

kosack commented Oct 25, 2019

they seem to split the IRF into the arf, rmf, and bkg components.
I would suggest either:

  1. update the dependencies to require gammapy=~0.10 (compatible with 0.10 - or better 0.14, since that's the latest) and update the function to call it correctly (passing in the tables separately).
  2. or just make sure the current requirements fix the gammapy version to the old version

@HealthyPear
Copy link
Member Author

This will be closed as soon as protopipe imports pyirf.

@HealthyPear HealthyPear linked a pull request Dec 1, 2020 that will close this issue
@HealthyPear HealthyPear removed a link to a pull request Dec 11, 2020
@HealthyPear HealthyPear linked a pull request Dec 11, 2020 that will close this issue
@HealthyPear HealthyPear reopened this Dec 11, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependency stuff related to the dependencies of the package
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants