radio-astro-tools / spectral-cube

Library for reading and analyzing astrophysical spectral data cubes
http://spectral-cube.rtfd.org
BSD 3-Clause "New" or "Revised" License
98 stars 65 forks source link

yt 3D rendering of radio data from SpectralCubeFITSDataset #925

Open HealthyPear opened 1 month ago

HealthyPear commented 1 month ago

Hi all,

I have a file from the FUGIN radio survey which I open with spectral-cube resulting in a cube with (GLAT, GLON, VELOCITY) dimensions which I slice, mask and downsample to make it easier to work with. The unit of each pixel is in Kelvin.

I attempted to follow the example here https://spectral-cube.readthedocs.io/en/latest/yt_example.html#visualization-example which uses yt to make a 3D cube rendering, but I get the error

AttributeError: 'SpectralCubeFITSDataset' object has no attribute 'camera'

From the yt documentation it is not clear to me if this is a problem of my file, or its format or if I should use other functions. I would basically want to see a 3D rendering of the gas clumps, ideally with iso contours.

Did anyone ever do this?

keflavich commented 1 month ago

The yt link has gotten quite out of date, but it would be great if we could still use it.

You might want to try https://yt-project.org/doc/analyzing/astropy_integrations.html instead.

HealthyPear commented 1 month ago

not really an expert of both these packages, I was hoping to use them for a quick check of the object I am studying...

is #586 related to this?

keflavich commented 1 month ago

Yes. If you want to try that branch out and see if it works, that would be very helpful! Otherwise, @e-koch and I can look into this a little this weekend. @jzuhone can you chime in here at all?

jzuhone commented 1 month ago

I can try to look at it next week.