radio-tools/spectral-cube — pull request #50 by keflavich (2014-04-17 15:19:11+00:00)
Title: Refactor Moments to follow the usual conventions

Moment 1 and Moment 0 are unaffected by this change, but they are now in their own functions. Moment 2 might actually be computed correctly now, but it requires computing moment1 first.

Open question: Is it more efficient to compute moment 1 for all pixels, then compute moment 2 using the cached answer to moment 1? Or, is it best to do one loop over all lines-of-sight and compute the moments there?

Also, this may all become moot with the slab-based moment computations.