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

Fix Fermi catalog flux points upper limits #1026

merged 2 commits into from May 16, 2017


Copy link

@adonath adonath commented May 16, 2017

This PR fixes the Fermi-LAT flux points upper limit computation. When plotting Fermi-LAT spectra and flux points I noticed, that the flux upper limits where not compatible with the ones I computed myself.
I found that the flux_ul and eflux_ul columns were not filled correctly in the catalog object .flux_points property.

The flux_errp column in the Fermi catalogs is set to flux_errp = 0.5 * (flux_ul - flux) (see here, page 30). So the upper limit column has to be computed from that.

3fgl_j0000 2m3738_before

3fgl_j0000 2m3738_after


In addition I removed that the flux column is set to NaN, where a flux ul are present, because the information is actually filled in the catalogs and can be useful for flux point fitting.

@adonath adonath self-assigned this May 16, 2017
@adonath adonath added the bug label May 16, 2017
@adonath adonath added this to the 0.7 milestone May 16, 2017
@adonath adonath requested a review from cdeil May 16, 2017
@cdeil cdeil changed the title Fix Fermi flux points ul computation Fix Fermi catalog flux points upper limit May 16, 2017
cdeil approved these changes May 16, 2017
Copy link

@cdeil cdeil left a comment

Good catch!

OK to merge.

(You only show an example plot for 3FGL compared to Gammapy. You could also compare to example SED plots given in the other catalog papers to make sure it's now really OK for all Fermi catalogs.)

Copy link

@cdeil cdeil commented May 16, 2017

travis-ci fails are unrelated (from the cta spec notebook, fixed in master already just now).
Merging this now.

@adonath - Thanks!

@cdeil cdeil merged commit 874da66 into gammapy:master May 16, 2017
1 of 2 checks passed
1 of 2 checks passed
continuous-integration/travis-ci/pr The Travis CI build could not complete due to an error
continuous-integration/appveyor/pr AppVeyor build succeeded
@cdeil cdeil changed the title Fix Fermi catalog flux points upper limit Fix Fermi catalog flux points upper limits May 21, 2017
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