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

Add CTA spectrum simulation example #875

Merged
merged 2 commits into from Feb 8, 2017

Conversation

Projects
None yet
3 participants
@jjlk
Contributor

jjlk commented Feb 8, 2017

Hi @cdeil ,
I don't know what we should do with this PR.

I added three new classes in a new file (scripts/cta_utils.py) to show how we can simulate CTA excess counts given a set of CTA IRF and a model (with absorption). I introduced:

  • the CTASpectrumObservation class, that is doing pretty much what SpectrumSimulation class (from @joleroi) is doing but with background estimate comming from IRF (with temporary classes I implemented for CTA). It should be merge at some point with SpectrumSimulation.
  • the Target class, it stores some parameters such as the model, the redshift, etc.
  • the ObservationParameters, which stores observation parameters (livetime, offset, energy range, etc.)
    Plus an example script.

Problem is that CTA point-like IRF are still not public (I put them on the private repo as you suggested) and still can not do test. Plus at some point we should do something less 'hacky', right?

What do you think?

@cdeil cdeil self-assigned this Feb 8, 2017

@cdeil cdeil added the feature label Feb 8, 2017

@cdeil cdeil added this to the 0.6 milestone Feb 8, 2017

@cdeil cdeil changed the title from cta simulation to Add CTA spectrum simulation example Feb 8, 2017

@cdeil cdeil assigned joleroi and unassigned cdeil Feb 8, 2017

@joleroi

This comment has been minimized.

Show comment
Hide comment
@joleroi

joleroi Feb 8, 2017

Contributor

I discussed with @jjlk on slack, and we decided to merge this and to the refactoring later. I file an issue.

Contributor

joleroi commented Feb 8, 2017

I discussed with @jjlk on slack, and we decided to merge this and to the refactoring later. I file an issue.

@joleroi joleroi merged commit 3632058 into gammapy:master Feb 8, 2017

1 of 2 checks passed

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

@joleroi joleroi referenced this pull request Feb 8, 2017

Open

Reuse SpectrumSimulation in CTASpectrumObservation #876

0 of 2 tasks complete

@jjlk jjlk deleted the jjlk:prediction branch Feb 8, 2017

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