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
Add LightCurve class #564
@cnachi - Thanks!
For me, the example doesn't work.
On Python 2 I get this error:
To fix it, you will have to add the following line after the imports at the top of
__all__ = ['LightCurve']
(see any other file in Gammapy for examples)
On Python 3 I get this error:
If you don't have your editor set up yet to do Python code formatting automatically, you can install and use the autopep8 tool to fix up your code:
This will indent with four spaces and never use tabs, as is recommended by the Python style guide (which is called PEP8).
Then the example should work.
Next step is to add a test.
Maybe you could start by copy & pasting lines from here, as an example?
To run the test, execute the following command from the top level in the repo (where the
Let me know how it goes ... getting the testing part to work is probably the hardest step. If you have time tomorrow, we're again in the same room.
I will have other comments about your code and docstrings ... it's normal that the first few pull requests go through several rounds of feedback as you learn how we do things in Gammapy. But the first step is to get the example working and have a place where to put tests.