-
Notifications
You must be signed in to change notification settings - Fork 75
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
Cubeviz parser to load all sorts of s3d cubes #911
Conversation
Concept of loading spectrum1d as cube in CubevizExample Get slider working correctly SpectralCube to specutils transition in cubeviz Manga cube loaded using Spectrum1D, still some things to iron out Add support for loading Spectrum1D cubes Fix codestyle checks Use correct axes without np swapaxes Set correct RA and Dec to x y axes, respectively Remove excess commits and get slider working
unit = u.Unit(hdulist[1].header.get('BUNIT', 'count')) | ||
flux = hdulist[1].data << unit | ||
wcs = WCS(hdulist[1].header, hdulist) | ||
data = Data(flux=flux, coords=wcs) # Spectrum1D too slow |
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 decided to bypass Spectrum1D
parsing because of two problems:
- Spec1D read is slow compared to astropy.io fits.open astropy/specutils#688 (this will be fixed once Speed up jwst s3d loader astropy/specutils#874 is merged)
- Even if I wait patiently for it to load, Glue tries to swap something in the data translation phase (
Spectrum1D
->Data
) and fails.
This is what I tried (something like that):
sp = Spectrum1D.read(file_obj, format='JWST s3d')
app.add_data(sp, data_label)
Because I did not pass in Spectrum1D
, but rather native Glue
object, line list and unit conversion plugins break because they make certain assumption of the data types.
ebb29b0
to
8f33857
Compare
p.s. Ginga can load the cubes fine and without lag. It does not use |
Codecov Report
@@ Coverage Diff @@
## main #911 +/- ##
==========================================
- Coverage 68.38% 67.92% -0.47%
==========================================
Files 66 66
Lines 4799 4823 +24
==========================================
- Hits 3282 3276 -6
- Misses 1517 1547 +30
Continue to review full report at Codecov.
|
I think it is clearer if we look at javerbukh#9 |
See javerbukh#9
Description
This pull request is to address s3d load failures reported by @havok2063 .
This builds on what work @javerbukh started in #547 .
Good news: I got all the files to load.
Bad news: This is very hacky and broke two plugins.
🐱 🐱
Checklist for package maintainer(s)
This checklist is meant to remind the package maintainer(s) who will review this pull request of some common things to look for. This list is not exhaustive.
trivial
label.CHANGES.rst
?