-
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
moment() drops the 3rd axis [or: cubes must have a 3rd axis > 1] #367
Comments
What information is missing? You mean the frequency axis information? I think you're right, that should be preserved in the header. Can it reasonably be put into CRPIX/CRVAL/CDELT, or will most programs misinterpret that as indicating the presence of a cube? |
yes, NAXIS=2. I'd argue we could try NAXIS=3 and NAXIS3=1 and use an appropriate description for the compressed CRVAL/CDELT. Both MIRIAD and CASA do it that way. Sounds like a DtU17 hackday option. |
I think there's a larger question here. Moments are 2D images and thus should they be read into spectral-cube? By default, I would say "this is working as intended. go use astropy.fits for dealing with images" However, moment0 straddle that case where you could talk about a 1 plane image with bandwidth equal to the original image. Moment1++ isn't a good fit to this 3D cubes though. |
I've never been a fan of Maybe we can provide an option for writing out in "cube" or "flat" format? I would default to "flat". We'd implement this in a special-case |
ok, that's what i needed to hear :-) moments are 2D images, not cubes (but as I said, both casa and miriad can do a little more with them since they do retain some useful compressed information). |
@teuben What sort of functionality, apart from the obvious read/write, would you be looking for in |
We already carry some meta-data along in the moments. Perhaps it can be kept there? Along with the spectral axis information, things like the spectral range used to create the moment 0 would be useful too. |
I agree that it might be nice to have a |
@low-sky that last issue sounds like a feature request. It's pretty implementable. Make an issue. |
Since moment() always drops information on the 3rd axis, I cannot read the results back. Is this an intended design, or meant to be resolvable?
The text was updated successfully, but these errors were encountered: