GreenBankObservatory / dysh

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

spectrum plotter cannot plot in redshift space? #291

Open teuben opened 2 months ago

teuben commented 2 months ago

Feature description Wanted to try to use 'z' as the xaxis unit, instead of km/s or GHz. Since the spectrum has all the info, there is no equivalence that I could find.

Solution Add an equivalence? But this is really for the new plotter.

Additional context https://docs.astropy.org/en/latest/units/equivalencies.html only lists km/s equivalence. I was able to hack the spectral axis to make it work in the current spectrum plotter, but the plotter will also change anyways. So this is just a placeholder to remind me to look for this in the new plotter

mpound commented 1 month ago

The proper solution is to add redshift as a supported velocity frame

Astropy has some related utility in the units module: https://docs.astropy.org/en/stable/api/astropy.units.equivalencies.doppler_redshift.html And specutils supports redshift in the Spectrum1D constructor https://specutils.readthedocs.io/en/stable/api/specutils.Spectrum1D.html#specutils.Spectrum1D.redshift

Science case is any high-z work.