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

Remove PHACountsSpectrum class #2250

merged 9 commits into from Jun 21, 2019


Copy link

@adonath adonath commented Jun 20, 2019

This PR removes the PHACountsSpectrum class and includes the following changes:

  • Add SpectrumDatasetOnOff.backscale and SpectrumDatasetOnOff.backscale_off attributes. I think here we should re-discuss, what kind of data model we actually want. E.g. change to alpha directly.
  • Move the and PHACountsSpectrum.write() methods to the SpectrumDatasetOnOff
  • Add SpectrumDatasetOnOff.obs_id attribute

The PHACounstSpectrum.rebin() method is lost, but might re-intrioduce this later as Dataset.downsample() or similar.

@adonath adonath self-assigned this Jun 20, 2019
@adonath adonath added this to the 0.13 milestone Jun 20, 2019
@adonath adonath force-pushed the remove_pha_counts_spectrum branch from 3db4f61 to a2bb784 Jun 20, 2019
@adonath adonath merged commit 221e107 into gammapy:master Jun 21, 2019
9 checks passed
Copy link

@cdeil cdeil commented Jun 24, 2019

I think here we should re-discuss, what kind of data model we actually want. E.g. change to alpha directly.

I think we should do this:

That's well-established - it's e.g. how BgStats and BgMaps work in the HAP HESS software, or what's used in the IACT and other on/off literature (see e.g.

The data members should be a_on and a_off separately, not just a ratio alpha = a_on / a_off. The names can be discussed, and half of the literature uses the inverse instead of alpha, that can be discussed as well. But that is just shuffling things around - as far as I can see one is as good as the other and there's no real gain in changing to something else?

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

Successfully merging this pull request may close these issues.

None yet

2 participants