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
Restructure spectrum package and command line tool #436
this PR changes
the structure of gammapy.spectrum
the structire of the gammapy-spectrum command line tool
changed the title from
Restructure gammapy.spectrum and gammapy-spectrum command line tool
Restructure spectrum package and command line tool
Feb 6, 2016
@joleroi - Now that you've made a change in gammapy-extra, but this PR from gammapy hasn't landed yet, the build is broken:
I really need to change the setup, so that gammapy-extra is a git submodule ... this will give us versioning for gammapy-extra and sanity.
@cdeil Sorry for breaking everything
Can you please have a look at gammapy/spectrum/results.py (and for now only at this). There are not test yet (only one example) but next I want to add a test that runs an entire crab analysis and does stuff with the results, so the results classes will be tested in this high-level test (You said: High-level tests over unit-tests).
Is there any functionality in spectrum/spectrum_results.py that you need and is not covered in the new stuff? Otherwise I would think about removing it, because having spectrum_results.py and results.py is confusing (Luigi already stumbled over this).
I had a quick look. It's super-hard to review this in isolation and give useful feedback.
I'd much prefer to merge in master, and let me just use this for an hour tomorrow and look around the docs and code. Then I can give suggestions like I did in #419.
@joleroi - Would this be OK for you?
Yes, I don't think unit tests make sense as long as the API is still heavily changing. That's not just me ... you can find many opinions that unit tests don't make sense during prototyping, because you'd spend so much time refactoring the tests over and over as the API changes.
I'm not sure ... could you leave it in for now and I'll have a detailed look tomorrow?
added a commit
this pull request
Feb 9, 2016
Feb 9, 2016
What about this docs page?
Has it been superceded by this one?
Or do you want to keep both?
When I wanted to try out the new spectrum fitting code, https://gammapy.readthedocs.org/en/latest/spectrum/spectral_fitting.html is what I found first,
This is the template render package I mentioned:
As I said, I'd start by adding the code to make a webpage with the most common plot and numbers for a single analysis, with the plots FitSpectrum generates and prints on the console.