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

Add spectral table model #733

Merged
merged 3 commits into from Oct 25, 2016
Merged

Add spectral table model #733

merged 3 commits into from Oct 25, 2016

Conversation

jjlk
Copy link
Contributor

@jjlk jjlk commented Oct 4, 2016

The purpose of this PR is to implement a spectral class initiated with energy and flux values (array). The class implementation follows closely what has been done in naima.

@cdeil cdeil added the feature label Oct 4, 2016
@cdeil cdeil changed the title Add spectral table model class, TableModel Add spectral table model Oct 4, 2016
@cdeil cdeil added this to the 0.5 milestone Oct 4, 2016
@cdeil cdeil self-assigned this Oct 4, 2016
@cdeil
Copy link
Contributor

cdeil commented Oct 4, 2016

Thanks!
Let me know when I should have a look.
Please ignore the travis-ci fails for now, they are unrelated (other recent changes in Gammapy and Sherpa).

@jjlk
Copy link
Contributor Author

jjlk commented Oct 4, 2016

Hi @cdeil,
Ready for a review!
I added a test for the TableModel class. I generate energy and flux points according to a power law (with parameters took from the PowerLaw test) and I verified that the values are the same (hope it's not machine dependant). I tried to pass the function table_model() as a pytest.fixture but failed. Thanks!

@cdeil
Copy link
Contributor

cdeil commented Oct 4, 2016

Looks good to me.
Personally I would have put the scipy import where it's used and not the initialiser, but I don't see any big advantage either way.

@joleroi - I'm assigning to you for final review.

Eventually we also want the translation to Sherpa table model so that it can be fit easily and a test that this works. But maybe just merge this now and then when someone has time to do this (and the current Sherpa issues on travis-ci are sorted out) we add it?

@cdeil cdeil assigned joleroi and unassigned cdeil Oct 4, 2016
@cdeil cdeil assigned cdeil and unassigned joleroi Oct 25, 2016
@cdeil
Copy link
Contributor

cdeil commented Oct 25, 2016

travis-ci fails are unrelated:
https://travis-ci.org/gammapy/gammapy/jobs/170448989#L1729

Merging this now.

@cdeil cdeil merged commit 0586626 into gammapy:master Oct 25, 2016
@jjlk jjlk deleted the table_model branch October 25, 2016 15:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants