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

Stack EDISP for a set of observations #772

Merged
merged 12 commits into from Nov 16, 2016

Conversation

Projects
None yet
3 participants
@JouvinLea
Contributor

JouvinLea commented Nov 14, 2016

@cdeil
This is a PR for stacking the RMF for a set of observation and a given source position. This is coded in the same philosophy than the mean PSF. You will need it for 3D spectral analysis if you want to convert your exposure in true energy to reco energy.

@cdeil

@joleroi - Thanks!

Why does the PR title say "stack RMF for images"? There's no image involved in this PR, no?

Left two inline comments.

Show outdated Hide outdated gammapy/data/data_store.py
Show outdated Hide outdated gammapy/data/data_store.py
Show outdated Hide outdated gammapy/data/tests/test_data_store.py

@cdeil cdeil added the feature label Nov 14, 2016

@cdeil cdeil added this to the 0.5 milestone Nov 14, 2016

@JouvinLea JouvinLea changed the title from Stack RMF for images to Stack RMF for a set of observations Nov 14, 2016

@joleroi

This comment has been minimized.

Show comment
Hide comment
@joleroi

joleroi Nov 14, 2016

Contributor

@cdeil I don't know why you adressed me in the first comment, I don't have anything to do with this PR

Contributor

joleroi commented Nov 14, 2016

@cdeil I don't know why you adressed me in the first comment, I don't have anything to do with this PR

Lea Jouvin
@JouvinLea

This comment has been minimized.

Show comment
Hide comment
@JouvinLea

JouvinLea Nov 14, 2016

Contributor

@cdeil
I took your comments into account and add a test for the thresholds! Tell me if it's ok.

Contributor

JouvinLea commented Nov 14, 2016

@cdeil
I took your comments into account and add a test for the thresholds! Tell me if it's ok.

Lea Jouvin
@cdeil

I left some more inline comments. That's all from my side, @joleroi I'll leave final review and merging to you.

Show outdated Hide outdated gammapy/data/tests/test_data_store.py
Show outdated Hide outdated gammapy/data/tests/test_data_store.py
Show outdated Hide outdated gammapy/data/data_store.py
Show outdated Hide outdated gammapy/data/data_store.py
Lea Jouvin
Lea Jouvin
@joleroi

Some minor comments

Show outdated Hide outdated gammapy/data/data_store.py
Show outdated Hide outdated gammapy/data/data_store.py
Show outdated Hide outdated gammapy/data/data_store.py
Show outdated Hide outdated gammapy/data/data_store.py
@joleroi

This comment has been minimized.

Show comment
Hide comment
@joleroi

joleroi Nov 15, 2016

Contributor

@JouvinLea You pushed a new commit while I was adding some comments, so my comments are shown as outdated, sorry for that.

Contributor

joleroi commented Nov 15, 2016

@JouvinLea You pushed a new commit while I was adding some comments, so my comments are shown as outdated, sorry for that.

@cdeil cdeil changed the title from Stack RMF for a set of observations to Stack EDISP for a set of observations Nov 15, 2016

Lea Jouvin
list_aeff = list()
list_edisp = list()
list_livetime = list()
list_low_threshold = [low_reco_threshold] * len(self)

This comment has been minimized.

@JouvinLea

JouvinLea Nov 15, 2016

Contributor

@joleroi
needed in the method stack_edisp since you can have e_reco thresholds different for each observation in your spectral extraction.
Here for the moment I don't know what we have to use for thresholds so if a user want to put one he can!!

@JouvinLea

JouvinLea Nov 15, 2016

Contributor

@joleroi
needed in the method stack_edisp since you can have e_reco thresholds different for each observation in your spectral extraction.
Here for the moment I don't know what we have to use for thresholds so if a user want to put one he can!!

This comment has been minimized.

@joleroi

joleroi Nov 15, 2016

Contributor

Ok, I don't know enough about image analysis, it seemed weird to have the same threshold everywhere. Thanks for clarifying!

@joleroi

joleroi Nov 15, 2016

Contributor

Ok, I don't know enough about image analysis, it seemed weird to have the same threshold everywhere. Thanks for clarifying!

Lea Jouvin
@JouvinLea

This comment has been minimized.

Show comment
Hide comment
@JouvinLea

JouvinLea Nov 15, 2016

Contributor

@joleroi
I think I took most of your comments into account!
I don't understand the failing error for travis

Contributor

JouvinLea commented Nov 15, 2016

@joleroi
I think I took most of your comments into account!
I don't understand the failing error for travis

@joleroi

This comment has been minimized.

Show comment
Hide comment
@joleroi

joleroi Nov 15, 2016

Contributor

There is some error in the docstring of make_mean_edisp
https://travis-ci.org/gammapy/gammapy/jobs/176002042#L1665
I think you're just missing a ``` in line 730

Contributor

joleroi commented Nov 15, 2016

There is some error in the docstring of make_mean_edisp
https://travis-ci.org/gammapy/gammapy/jobs/176002042#L1665
I think you're just missing a ``` in line 730

Lea Jouvin added some commits Nov 15, 2016

Lea Jouvin
@JouvinLea

This comment has been minimized.

Show comment
Hide comment
@JouvinLea

JouvinLea Nov 15, 2016

Contributor

@joleroi
It's failing on travis but me locally the docs is ok!

Contributor

JouvinLea commented Nov 15, 2016

@joleroi
It's failing on travis but me locally the docs is ok!

@joleroi

This comment has been minimized.

Show comment
Hide comment
@joleroi

joleroi Nov 15, 2016

Contributor

When I run the sphinx build locally I also get this failure
https://travis-ci.org/gammapy/gammapy/jobs/176076832#L1665
You have to run

python setup.py build_sphinx -w 

in order to raise an error if there is a sphinx warning. Otherwise it just says

build succeeded, 1 warning.
Contributor

joleroi commented Nov 15, 2016

When I run the sphinx build locally I also get this failure
https://travis-ci.org/gammapy/gammapy/jobs/176076832#L1665
You have to run

python setup.py build_sphinx -w 

in order to raise an error if there is a sphinx warning. Otherwise it just says

build succeeded, 1 warning.
@joleroi

This comment has been minimized.

Show comment
Hide comment
@joleroi

joleroi Nov 15, 2016

Contributor

I don't have time today, but if you don't succeed I can have a look tomorrow. Sphinx errors are sometimes hard to track down.

Contributor

joleroi commented Nov 15, 2016

I don't have time today, but if you don't succeed I can have a look tomorrow. Sphinx errors are sometimes hard to track down.

Lea Jouvin
@JouvinLea

This comment has been minimized.

Show comment
Hide comment
@JouvinLea

JouvinLea Nov 16, 2016

Contributor

@cdeil
You were right it fixed the issue the line line you mentioned!!
Can we merge?

Contributor

JouvinLea commented Nov 16, 2016

@cdeil
You were right it fixed the issue the line line you mentioned!!
Can we merge?

@joleroi joleroi merged commit 48acf76 into gammapy:master Nov 16, 2016

2 checks passed

continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment