-
Notifications
You must be signed in to change notification settings - Fork 0
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
Light curve OGIP read/write #8
base: master
Are you sure you want to change the base?
Conversation
ogip/spec.py
Outdated
f = fits.open(fn) | ||
if 'RATE' in f['SPECTRUM'].data.names: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you please put this change in a different PR so it can be assessed separately?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, it's a good start!
Co-authored-by: Volodymyr <[email protected]>
Correct to_long_string some style
lc = ogip.lc.Rate(fn) | ||
k = fn.rfind('.') | ||
new_fn = fn[0:k] + '_ogip.' + fn[k + 1:] | ||
lc.to_fits(new_fn) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
could you check something basic about the content, at least that it's non-zero, there is total sum, etc?
It may also be Anyway, the interface will have to be unified later on. |
I created the module lc.py that reads and writes a light curve in OGIP format.
There is an example of usage in tools.ipynb and in test_lc.py (this one not yet tested)
As I needed to access class properties while reading, I found it more natural to build the object from the filename, rather than from a staticmethod as in spectrum.py
TODO: