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
Allow PVSlicer to load a SpectralCube directly #57
Conversation
sub_array = self.array[::n1,::n2,::n3] | ||
sub_mask = self.ok_mask[::n1,::n2,::n3] | ||
cmin = sub_array[sub_mask].min() | ||
cmax = sub_array[sub_mask].max() |
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.
@astrofrog - if you have time for a quick review, the block above contains the meat of the code change: basically, try slicing a spectral cube if a cube has been provided, otherwise treat the cube ndarray
and mask ndarray
independently.
@keflavich - this seems fine to me though I haven't tested it extensively. Have you had a chance to try out the new glue-based GUI I proposed? Maybe we can implement something similar there? |
I suppose we should add a test where PVSlicer is invoked directly with a cube. No, I'll go back and have a look at the GLUI (glooey) now |
7bfb716
to
5e5b9fc
Compare
Don't know what these errors are: |
these are all wcsutils update issues with dev astropy: |
I still can't reproduce this locally: |
One of the previous two commits should work. If they do, I'll merge. |
Allow PVSlicer to load a SpectralCube directly
The PVSlicer currently only works from a filename and doesn't take advantage of any of
spectral_cube
's capabilities, including masking. This PR allows it to use the cube directly.It mostly works, but I have been getting bugs that I think are unrelated in gui testing