-
-
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
fix: SDSS-V SpectrumList format ambiguity, mwmVisit BOSS load fail #1185
Merged
Merged
Changes from all commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
b6851a6
fix: mwmVisit BOSS HDU default loader fail
rileythai 51e8a2e
fix: SDSS-V SpectrumList loader ambiguity + add: BOSS-only mwm test c…
rileythai 4bee136
add: changelog -> CHANGES.rst
rileythai b70c393
fix: HDU unspecified print message
rileythai 62747c4
feat: condense loaders into only SpectrumList of 1D flux
rileythai 8df1f77
Merge branch 'mwmvisit-boss-fix' of github.com:rileythai/specutils-sd…
rileythai bafede9
chore: changelog update
rileythai 122b368
revert: readd all Spectrum1D loaders and tests
rileythai 0c5fe8f
feat: visit specification on mwmVisit load
rileythai 32534a2
Merge branch 'mwmvisit-boss-fix' of github.com:rileythai/specutils-sd…
rileythai ca4d8c3
revert: completely rollback to initial case
rileythai 62152c0
Merge branch 'main' into mwmvisit-boss-fix
rileythai 65b5709
Merge branch 'mwmvisit-boss-fix' of github.com:rileythai/specutils-sd…
rileythai 9960f98
fix: test cases
rileythai 87fa13f
fix: split test cases for user warning + remove useless warning
rileythai File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
With the
multi
removed, what is the difference between this data loader and the above data loader at line 318? Same with themwm
data loaders?With this removal, what would be the correct
format
to specify to load all data extensions? Is it now the default? Jdaviz only supports usingformat
during data load to provide hints to the type of filepath.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.
My goal with this was to simplify the interface. The difference previously was that
multi
loaded every valid HDU extension, whereas the singleSpectrumList
ones would load just a specified HDU. Since it's aSpectrumList
, I felt the default loader for that type should just load every extension.Across both the
Spectrum1D
andSpectrumList
loaders there should be a single format (SDSS-V [DATATYPE]
), which should be detected automagically and no longer needs to be manually specified onSpectrumList
.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 issue might be mostly in Specviz. I'd like to retain the workflow of passing Specviz a single file and having it load all spectra from all extensions. Specviz uses the following https://github.com/spacetelescope/jdaviz/blob/main/jdaviz/configs/specviz/plugins/parsers.py#L78-L87 to load a specutils object from a file, which first attempts to load a Spectrum1D with a format option, and on fail, tries to load the SpectrumList with a format option.
With the
multi
option, I can explicitly tell Specviz to load using the SpectrumList loader, which will break will this change. Specviz only allows me to pass in aformat
keyword to specutils. Previously usingSDSS-V mwm multi
on themwmStar
files allowed me to load all spectra, since it triggered line 87. With this, it only loads the first spectrum from the first extension found.In my mind, the easiest fix would be to reintroduce the
multi
here, but maybe it's more appropriate to fix Specviz instead. @rosteen since you're a maintainer/dev of bothspecutils
andjdaviz
, do you have thoughts on the best approach, and/or where the fix should go?I am testing with the mwmStar and mwmVisit files for id 61731453, which has spectra in both the BOSS and APOGEE extensions. the mwmStar file has 1 spectrum per extension. The mwmVisit file has 1 spectrum in the BOSS extension, and 3 spectra in the APOGEE extension, loaded as a SpectrumList of 2 Spectrum1D objects, with
flux.shapes
of((4648,), (3, 8575))
.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.
I'm planning to catch up on this this afternoon, I might have thoughts then.