Adds lazy loading functionality to SpectrumList - #1338
Open
havok2063 wants to merge 13 commits into
Open
Conversation
…nto lazyloader
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This PR splits off the lazy-loading and string label features from #1303 into a separate PR so they can be merged earlier than the Roman data loaders. The SSC Roman spectral data format is still changing. Once those crystallize into a final form, I'll update that PR to focus only on the Roman data loaders.
The PR updates SpectrumList to
I've implemented lazy data loaders for the
JWST x1d/c1d multiformat and some of the SDSS data products. With the lazy loading+label feature, Jdaviz could now more directly rely on specutils to read in data products, and handle the nuances of particular files, rather than Jdaviz having to codify all cases separately. For the JWST files, the string labels are created as[hdu_ext_name]_[idx]for non-table data, e.g.EXTRACT1D_1hduX_[row_idx]for table data without a SOURCEID column, e.g.hdu1_1hduX_source_[sourceid]for table data with a SOURCEID column, e.ghdu1_source_123This is because the string labels need to be unique for each item in a spectrum list.
Note: the sphinx docs are the same as the old PR, and still reference Roman data loaders.
SDSS example of lazy loading + alt id
This uses the extension name as alt string labels.