radio-astro-tools/spectral-cube — pull request #90 by jzuhone (2014-05-13 05:24:47+00:00)
Title: Making the to_yt method consistent with the latest FITS support in yt-3.0 [WIP]

I intend this PR as a "work-in-progress", since I think there ought to be more discussion about how to implement it.

Most of the functionality that was originally built into `to_yt` was dependent on creating an "in-memory" dataset. Now, yt-3.0 supports FITS datasets natively, and attempts to use as much of the information in the header as possible to construct the dataset metadata. This functionality ought to be used by `SpectralCube`.

However, there is a downside to taking this route. The center and scale are set by the properties of the dataset itself. For a spectral cube, yt will make the x and y axes in image pixel coordinates and the z axis in the units of whatever that axis happens to be (velocity, frequency, etc.). This means there is really no good way to implement the `spectral_factor` and `center` keywords as they were previously implemented.

FWIW, @samskillman is working on a refactor of yt's volume renderer which should handle the issue that the `spectral_factor` keyword was designed to.

I offer the following changes as a suggestion, but I am open to alternatives.

TODO: Update documentation