-
Notifications
You must be signed in to change notification settings - Fork 1
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
EXP: For big cube, be a minimalist #8
EXP: For big cube, be a minimalist #8
Conversation
and avoid loading uncert and correct units [ci skip] [rtd skip]
b7873f5
to
a39bb5a
Compare
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.
If I understand the diff correctly, this skip parsing the hdulist if the cube is over 8 million spaxels? What are the consequences of that?
if not is_big_cube: | ||
sc = _return_spectrum_with_correct_units( | ||
flux, wcs, metadata, data_type, hdulist=hdulist) | ||
else: | ||
sc = Spectrum1D(flux=flux, wcs=wcs, meta=metadata) |
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.
will this also skip any necessary units stuff? Can we just set/pass hdulist=None
and still use _return_spectrum_with_correct_units
or is that still too expensive?
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.
_return_spectrum_with_correct_units
creates a new Spectrum1D
object. I have not looked into whether it does a copy or what. I was just trying some possible low hanging fruits to see if anything helps. Given the ticket is only 2 points, I didn't dig too deep here. There is a chance we do not have to disable this (and I don't think we want to disable if we can avoid it).
It skips parsing uncert and mask but flux should still be loaded. |
My diff here is only exploratory. It didn't completely fix the lag in loading and slice. I tried profiling the code on |
Gotcha 👍 |
Follow up tickets created. This is no longer necessary. |
Companion to:
Seems a little more performant when using spacetelescope#2827 instead of
main
with these changes, but slider still too laggy to be usable (but not as laggy asmain
). Subset creation at least possible (not possible onmain
).🐱