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

Improve error methods on spectral models #985

Merged
merged 3 commits into from Apr 24, 2017

Conversation

@adonath
Copy link
Member

@adonath adonath commented Apr 24, 2017

This PR adds analytical solutions to xxxxx_error() methods, where available. Fixes gammapy/gamma-cat#107 and #984

Copy link
Member

@cdeil cdeil left a comment

@adonath - Thanks!

I left a few inline comments. Nothing controversial I think.

Parameters
----------
emin : `~astropy.units.Quantity`

This comment has been minimized.

@cdeil

cdeil Apr 24, 2017
Member

You can make it a bit shorter if you put it like this:

 emin, emax : `~astropy.units.Quantity`
    Energy range
emin : `~astropy.units.Quantity`
Lower bound of integration range.
emax : `~astropy.units.Quantity`
Upper bound of integration range

This comment has been minimized.

@cdeil

cdeil Apr 24, 2017
Member

Put Returns section. Is it also a tuple?


val = -1 * upars['index'] + 2

if np.isclose(val.n, 0):

This comment has been minimized.

@cdeil

cdeil Apr 24, 2017
Member

Please use .nominal_value and .std_dev everywhere.
The .n and .s is really cryptic for people like me that aren't using uncertainties much.

Lower bound of integration range.
emax : `~astropy.units.Quantity`
Upper bound of integration range

This comment has been minimized.

@cdeil

cdeil Apr 24, 2017
Member

Add Returns section.

@cdeil cdeil self-assigned this Apr 24, 2017
@cdeil cdeil added this to the 0.6 milestone Apr 24, 2017
@cdeil
cdeil approved these changes Apr 24, 2017
@cdeil
Copy link
Member

@cdeil cdeil commented Apr 24, 2017

Thanks! Merging this now.

Travis-ci fails are unrelated, I'll fix those now.

@cdeil cdeil merged commit e8b5a5a into gammapy:master Apr 24, 2017
1 of 2 checks passed
1 of 2 checks passed
continuous-integration/travis-ci/pr The Travis CI build is in progress
Details
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
@adonath adonath deleted the adonath:improve_error_methods_spec_model branch Nov 20, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants