GreenBankObservatory / dysh

https://dysh.readthedocs.io
Other
9 stars 3 forks source link

WCS wrong after a smoothed spectrum is indexed #307

Closed teuben closed 1 month ago

teuben commented 3 months ago

Describe the bug After smooth (which decimates) and indexing a spectrum, the WCS is wrong.

How to Reproduce ta2 = ta.smooth('box',128) ta3 = ta2[30:40]

here ta2 looks ok, but the WCS object is not, but the freq axis is ok, and that is what ta2.plot() is using.

but in ta3 the WCS was updated with the old WCS from ta (the raw data). This is my own fault, there is an "@todo fix wcs" in the code :-)

Environment

teuben commented 3 months ago

There's another place where the WCS is present, in meta. That's the original one from the raw SDFITS file. We thus have the WCS in 3 locations. Dangerous.

mpound commented 1 month ago

Related to #373?