Skip to content
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

Merged
merged 5 commits into from Aug 10, 2015

Conversation

keflavich
Copy link
Contributor

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

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()
Copy link
Contributor Author

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.

@astrofrog
Copy link
Member

@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?

@keflavich
Copy link
Contributor Author

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

@keflavich
Copy link
Contributor Author

Don't know what these errors are:
https://travis-ci.org/radio-astro-tools/pvextractor/jobs/74810312#L887 sphinx syntax error?

@keflavich
Copy link
Contributor Author

these are all wcsutils update issues with dev astropy:
https://travis-ci.org/radio-astro-tools/pvextractor/jobs/74810318#L585

@keflavich
Copy link
Contributor Author

I still can't reproduce this locally:
https://travis-ci.org/radio-astro-tools/pvextractor/jobs/74865459#L885

@keflavich
Copy link
Contributor Author

One of the previous two commits should work. If they do, I'll merge.

keflavich added a commit that referenced this pull request Aug 10, 2015
Allow PVSlicer to load a SpectralCube directly
@keflavich keflavich merged commit fa0347a into radio-astro-tools:master Aug 10, 2015
@keflavich keflavich deleted the gui_from_cube branch August 10, 2015 11:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants