Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Fix 3FHL spectral indexes for PowerLaw model #1127
@jjlk - I think in the printout there's the same mistake for 3FHL, no?
I think the corresponding 3FGL or GammaCat printout function is done better, putting the whole printout for spectral model in if / else block, not trying to combine the cases, which IMO makes the code harder to understand. So in this case I prefer completely independent if / else blocks for the spectral model printout, even if it means duplicating a few lines of code.
referenced this pull request
Sep 13, 2017
I think if I start editing here there will be merge conflicts. So I'm merging this now, and will make a follow-up commit in master, mostly to improve tests. (note how the change here didn't require a change in the tests, the tests didn't cover spectral index)
@jjlk - Félicitations pour avoir trouvé et réparé ce bug!
I think the tests are a bit better now (easier to read and extend). For the 3FHL spectral info printout, I checked the two sources that are also used in the test, I think it's better now. For the 3FGL spectral info printout, I didn't really manage to make it better, the code is very hard to read / maintain as-is, but probably correct for all cases, and quite hard to write in a better way. Moving on ... of course, future issue report or PRs to improve things welcome any time.