-
Notifications
You must be signed in to change notification settings - Fork 65
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
Update volume rendering code to work with more modern yt installations #586
base: master
Are you sure you want to change the base?
Conversation
Ok, it runs, but the images are blank. This will probably take a little while to dig out of. |
@keflavich do you have a favorite VR example that we could try out? |
Not really... the GRS l=49 data were pretty good though: https://spectral-cube.readthedocs.io/en/latest/yt_example.html#sketchfab-isosurface-contours |
Is this the L1448_13CO.fits file? |
No but that one is totally fine if it looks OK |
So this is working now. But I'd like to add some tests and change the docs before we merge it. |
Hi @keflavich this is ready to go except I cannot get the test data I generated to compare to (as |
in |
af2928a
to
68e7c2b
Compare
@jzuhone - would you be able to rebase this? If you don't have time, I'm happy to take over the PR to clean it up. |
@astrofrog I can rebase it. I had trouble getting the tests to pass before, but I'll see what happens now. |
@jzuhone - thanks! When you rebase can you also set the minimum yt version in |
fb2a76c
to
f74060c
Compare
The failure last time was related: https://travis-ci.org/github/radio-astro-tools/spectral-cube/jobs/640107285#L635 We'll need another rebase, and maybe another small correction, to get this fixed. |
If it can help, I tested this PR with a following file from this radio CO survey in a conda env with
with this test code from spectral_cube import SpectralCube
import yt
input_file = "./FGN00000XXX" # change XXX with your file ID
cube = SpectralCube.read(input_file)
ytcube = cube.to_yt(spectral_factor=0.5)
ds = ytcube.dataset
# add rest of test code from example in the docs of this PR I also tried directly the interactive renderer (which is what I would like to use together with isosurfaces) import yt_idv
rc = yt_idv.render_context(height=800, width=800, gui=True)
sg = rc.add_scene(ds, "flux", no_ghost=True)
rc.run() in both cases I get
|
The API for yt's volume rendering has changed completely. This PR updates the volume rendering code for spectral cubes to reflect this.
I haven't tested this yet, so I'm marking it as WIP until I can. In the meantime, I wanted to put it up for @trhunter to play with.
Closes Issue #571.