SoFiA-2 icon indicating copy to clipboard operation
SoFiA-2 copied to clipboard

Treating w50/w20 consistently regardless of spectral axis type?

Open kmhess opened this issue 3 years ago • 1 comments

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?

kmhess avatar Feb 09 '22 12:02 kmhess

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.

SoFiA-Admin avatar Feb 10 '22 02:02 SoFiA-Admin