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

Added PFS object loader. Closes astropy/specutils#430 #431

Merged
merged 3 commits into from
Feb 26, 2019

Conversation

gpernot
Copy link
Contributor

@gpernot gpernot commented Jan 3, 2019

No description provided.

Copy link
Member

@eteq eteq left a 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'])
Copy link
Member

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...

Copy link
Contributor

@SaOgaz SaOgaz left a 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']

Copy link
Contributor

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)
Copy link
Contributor

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()?

@eteq
Copy link
Member

eteq commented Feb 26, 2019

Thanks for addressing all of this, @gpernot - all looks good to me, so merging!

@eteq eteq merged commit ceeef25 into astropy:master Feb 26, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants