-
-
Notifications
You must be signed in to change notification settings - Fork 124
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
Added PFS object loader. Closes astropy/specutils#430 #431
Conversation
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.
Mostly looks good to me, although caveat it might be good to address #450 for this loader in this PR (instead of waiting for this to get merged).
Might be good to get a once-over by @SaOgaz, @drdavella or someone else who's worked with the loaders more than I, though?
_spec_pattern.match(args[0]) is not None) | ||
|
||
|
||
@data_loader(label="pfsObject", identifier=spec_identify, extensions=['fits']) |
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.
Maybe this should be subaru_pfsObject
? "PFS" is unfortunately a bit overloaded of a term now...
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.
Added some suggestions, but none of them are show-stoppers.
from specutils import Spectrum1D | ||
|
||
__all__ = ['spec_identify', 'spec_loader'] | ||
|
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.
It would be great to get a comment here with a description of what this RE matching is doing. Doesn't have to be super de-tailed, maybe just a couple examples of matching strings.
""" | ||
m = _spec_pattern.match(os.path.basename(file_name)) | ||
|
||
hdulist = fits.open(file_name, **kwargs) |
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.
Change this to a with hdulist as fits.open()
?
Thanks for addressing all of this, @gpernot - all looks good to me, so merging! |
No description provided.