-
-
Notifications
You must be signed in to change notification settings - Fork 129
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
Minor changes to DC loaders for future surveys #1122
Minor changes to DC loaders for future surveys #1122
Conversation
b1b1eae
to
dbe14cf
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1122 +/- ##
===========================================
+ Coverage 72.22% 86.77% +14.55%
===========================================
Files 62 63 +1
Lines 4432 4500 +68
===========================================
+ Hits 3201 3905 +704
+ Misses 1231 595 -636 ☔ View full report in Codecov by Sentry. |
# We never actually want to return something, this just flags it to pylint | ||
# that we know we're breaking out of the function when skip is selected | ||
return None | ||
return spectrum |
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.
Why the change here? It looks like this function acts on an existing spectra_map
object and thus, as the comment says, shouldn't return anything.
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.
The original idea (based on what spectra I had access to at the time) was that files were either a single extension (with data represented as a 2d array, which is what most of the GAMA spectra were) or were across multiple extensions. We've got (legacy, so cannot change the format the files were written in) files that instead require more manipulation (e.g. the WCS was only in the first extension), so we want to be able to keep a reference around to the 1d spectrum independent of the mapping.
There are at least 3 surveys where we're going to use this (MGC, SAMI, S7), so rather than hacking this into each of their loaders, I figured I'd do the change in the place where it needs to be.
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.
Gotcha, seems reasonable enough. Any chance you could add a test for the new fallback header code?
Sorry, this dropped down my todo list, as a test of the changes, I've added the first pass of the SAMI loaders we're working on to the PR, which use the changed functionality. |
9418b23
to
ed78b82
Compare
Looking at the code coverage, it seems like the SAMI loaders are never getting called during testing, so I suspect that the identifier for the new loader isn't positively identifying the files you uploaded. |
ed78b82
to
80c2b70
Compare
I've modified the tests slightly, that should directly flag whether the SAMI loaders are being used or not (which is weird because it works locally). |
Oh, it looks like the tests are being skipped, if you look at |
This should reduce the number of tests skipped, and resolve some of the weirdness with coverage seen in astropy#1122.
This should reduce the number of tests skipped, and resolve some of the weirdness with coverage seen in astropy#1122.
80c2b70
to
bb6da5d
Compare
This makes it easier to use a fallback header and access the last spectra from a wrapper loader. These changes are to support loading some of the IFS surveys (such as SAMI) that Data Central hosts.
This adds an initial version of the future SAMI loaders, in order to test the changes to the lower level DC loaders.
bb6da5d
to
ef70cdb
Compare
I've rebased this on top of #1132 to see if this actually shows the right coverage now. |
The SAMI file coverage is as expected now. |
This should reduce the number of tests skipped, and resolve some of the weirdness with coverage seen in #1122.
LGTM now that coverage is reporting properly. |
This makes it easier to use a fallback header and access the last spectra from a wrapper loader. These changes are to support loading some of the IFS surveys (such as SAMI) that Data Central hosts.