SoFiA-2
SoFiA-2 copied to clipboard
Treating w50/w20 consistently regardless of spectral axis type?
The units of w50 and w20 are in pixels even when wcs=True if the original FITS cube spectral axis is in velocity. However, if the spectral axis is in frequency, w50/w20 are in Hz. Should the output be consistent? Either freq/velocity depending on the spectral axis or in pixels regardless of the spectral axis?
I can’t quite reproduce your result. My w₂₀ and w₅₀ are in units of m/s when I run SoFiA on the test data cube. However, looking at the source code, for some reason the decision of whether line widths are multiplied by the channel width or not is driven by the parameter.physical setting, not the parameter.wcs setting, as I would have expected:
https://github.com/SoFiA-Admin/SoFiA-2/blob/5e583e9471226df189510d23e6a178c0ef69bad8/src/DataCube.c#L4685-L4691
I don’t quite remember why I set it up this way, but we may want to discuss whether this behaviour is useful or needs to be changed.