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

Apply containment correction in true energy #1343

Merged
merged 1 commit into from Mar 20, 2018

Conversation

Projects
None yet
2 participants
@joleroi
Contributor

joleroi commented Mar 20, 2018

This PR adresses #1338
It reverts #1002

@joleroi joleroi added the feature label Mar 20, 2018

@joleroi joleroi added this to the 0.8 milestone Mar 20, 2018

@joleroi joleroi self-assigned this Mar 20, 2018

@joleroi joleroi requested a review from registerrier Mar 20, 2018

@@ -226,9 +226,6 @@ def _predict_counts_helper(self, obs, model, forward_folded=True):
else:
raise ValueError('Predicted counts {}'.format(counts))
# Apply AREASCAL column
counts *= obs.on_vector.areascal

This comment has been minimized.

@registerrier

registerrier Mar 20, 2018

Contributor

Here it is assumed that the areascal will be always empty. This is probably fine. But one might issue a warning in case there is an areascal vector in the PHACountSpectrum, no?

This comment has been minimized.

@joleroi

joleroi Mar 20, 2018

Contributor

I put the application of areascal back. For us it will mostly be 1, but if it's there it seems better to use it than instead of raising a warning.

self._on_vector.areascal = areascal
self._off_vector.areascal = areascal
self.containment = containment

This comment has been minimized.

@registerrier

registerrier Mar 20, 2018

Contributor

Wouldn't it be better to make self.containment a numpy array?

This comment has been minimized.

@joleroi

joleroi Mar 20, 2018

Contributor

yes

@registerrier

Merge?

@joleroi joleroi merged commit 9c5a865 into gammapy:master Mar 20, 2018

2 checks passed

continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details

@joleroi joleroi deleted the joleroi:areascal branch Mar 20, 2018

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