{"action":"created","issue":{"url":"https://api.github.com/repos/gammapy/gammapy/issues/620","repository_url":"https://api.github.com/repos/gammapy/gammapy","labels_url":"https://api.github.com/repos/gammapy/gammapy/issues/620/labels{/name}","comments_url":"https://api.github.com/repos/gammapy/gammapy/issues/620/comments","events_url":"https://api.github.com/repos/gammapy/gammapy/issues/620/events","html_url":"https://github.com/gammapy/gammapy/pull/620","id":164314678,"number":620,"title":"Fix bug with energy range used in spectral fit","user":{"login":"joleroi","id":11678435,"avatar_url":"https://avatars.githubusercontent.com/u/11678435?v=3","gravatar_id":"","url":"https://api.github.com/users/joleroi","html_url":"https://github.com/joleroi","followers_url":"https://api.github.com/users/joleroi/followers","following_url":"https://api.github.com/users/joleroi/following{/other_user}","gists_url":"https://api.github.com/users/joleroi/gists{/gist_id}","starred_url":"https://api.github.com/users/joleroi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joleroi/subscriptions","organizations_url":"https://api.github.com/users/joleroi/orgs","repos_url":"https://api.github.com/users/joleroi/repos","events_url":"https://api.github.com/users/joleroi/events{/privacy}","received_events_url":"https://api.github.com/users/joleroi/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/gammapy/gammapy/labels/bug","name":"bug","color":"fc2929"}],"state":"open","locked":false,"assignee":{"login":"registerrier","id":5047091,"avatar_url":"https://avatars.githubusercontent.com/u/5047091?v=3","gravatar_id":"","url":"https://api.github.com/users/registerrier","html_url":"https://github.com/registerrier","followers_url":"https://api.github.com/users/registerrier/followers","following_url":"https://api.github.com/users/registerrier/following{/other_user}","gists_url":"https://api.github.com/users/registerrier/gists{/gist_id}","starred_url":"https://api.github.com/users/registerrier/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/registerrier/subscriptions","organizations_url":"https://api.github.com/users/registerrier/orgs","repos_url":"https://api.github.com/users/registerrier/repos","events_url":"https://api.github.com/users/registerrier/events{/privacy}","received_events_url":"https://api.github.com/users/registerrier/received_events","type":"User","site_admin":false},"assignees":[{"login":"registerrier","id":5047091,"avatar_url":"https://avatars.githubusercontent.com/u/5047091?v=3","gravatar_id":"","url":"https://api.github.com/users/registerrier","html_url":"https://github.com/registerrier","followers_url":"https://api.github.com/users/registerrier/followers","following_url":"https://api.github.com/users/registerrier/following{/other_user}","gists_url":"https://api.github.com/users/registerrier/gists{/gist_id}","starred_url":"https://api.github.com/users/registerrier/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/registerrier/subscriptions","organizations_url":"https://api.github.com/users/registerrier/orgs","repos_url":"https://api.github.com/users/registerrier/repos","events_url":"https://api.github.com/users/registerrier/events{/privacy}","received_events_url":"https://api.github.com/users/registerrier/received_events","type":"User","site_admin":false}],"milestone":{"url":"https://api.github.com/repos/gammapy/gammapy/milestones/7","html_url":"https://github.com/gammapy/gammapy/milestones/0.5","labels_url":"https://api.github.com/repos/gammapy/gammapy/milestones/7/labels","id":1275561,"number":7,"title":"0.5","description":"","creator":{"login":"cdeil","id":852409,"avatar_url":"https://avatars.githubusercontent.com/u/852409?v=3","gravatar_id":"","url":"https://api.github.com/users/cdeil","html_url":"https://github.com/cdeil","followers_url":"https://api.github.com/users/cdeil/followers","following_url":"https://api.github.com/users/cdeil/following{/other_user}","gists_url":"https://api.github.com/users/cdeil/gists{/gist_id}","starred_url":"https://api.github.com/users/cdeil/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cdeil/subscriptions","organizations_url":"https://api.github.com/users/cdeil/orgs","repos_url":"https://api.github.com/users/cdeil/repos","events_url":"https://api.github.com/users/cdeil/events{/privacy}","received_events_url":"https://api.github.com/users/cdeil/received_events","type":"User","site_admin":false},"open_issues":17,"closed_issues":86,"state":"open","created_at":"2015-08-27T09:29:48Z","updated_at":"2016-07-07T14:25:44Z","due_on":"2016-07-09T22:00:00Z","closed_at":null},"comments":2,"created_at":"2016-07-07T13:55:13Z","updated_at":"2016-07-07T15:26:24Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/gammapy/gammapy/pulls/620","html_url":"https://github.com/gammapy/gammapy/pull/620","diff_url":"https://github.com/gammapy/gammapy/pull/620.diff","patch_url":"https://github.com/gammapy/gammapy/pull/620.patch"},"body":"This fixes a bug discovered by @registerrier, namely that the fit range attribute of ``gammapy.spectrum.SpectrumFit`` was not taken into account at all when fitting with Sherpa.\r\n\r\nI also changes the fit output insofar as one result per obs is returned, they all have the same best fit values, but differ e.g. in ``npred`` and ``fit_range`` (due to different thresholds)"},"comment":{"url":"https://api.github.com/repos/gammapy/gammapy/issues/comments/231112929","html_url":"https://github.com/gammapy/gammapy/pull/620#issuecomment-231112929","issue_url":"https://api.github.com/repos/gammapy/gammapy/issues/620","id":231112929,"user":{"login":"adonath","id":3715928,"avatar_url":"https://avatars.githubusercontent.com/u/3715928?v=3","gravatar_id":"","url":"https://api.github.com/users/adonath","html_url":"https://github.com/adonath","followers_url":"https://api.github.com/users/adonath/followers","following_url":"https://api.github.com/users/adonath/following{/other_user}","gists_url":"https://api.github.com/users/adonath/gists{/gist_id}","starred_url":"https://api.github.com/users/adonath/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/adonath/subscriptions","organizations_url":"https://api.github.com/users/adonath/orgs","repos_url":"https://api.github.com/users/adonath/repos","events_url":"https://api.github.com/users/adonath/events{/privacy}","received_events_url":"https://api.github.com/users/adonath/received_events","type":"User","site_admin":false},"created_at":"2016-07-07T15:26:24Z","updated_at":"2016-07-07T15:26:24Z","body":"@joleroi I don't know that code...and it fails on Travis-CI as well.  Seems like a wrong number was copied for the tests (or the random state was changed after copying the reference number...@cdeil, @helen-poon?)"}}
{"actor":{"display_login":"adonath"}}