specutils icon indicating copy to clipboard operation
specutils copied to clipboard

Spectrum1D.wavelength vs Spectrum1D.spectral_axis

Open camipacifici opened this issue 2 years ago • 4 comments

Spectrum1D.spectral_axis returns the x axis in the provided units. Spectrum1D.wavelength returns the x axis in Angstrom by default. Although this is written in the docs here (https://specutils.readthedocs.io/en/stable/api/specutils.Spectrum1D.html) it is pretty confusing. Do we want to do something about this?

camipacifici avatar Jan 10 '23 19:01 camipacifici

Get rid of wavelength?

pllim avatar Feb 13 '23 22:02 pllim

wavelength, frequency, and velocity are supposed to be convenience properties that take the data as input through spectral_axis and auto-converts, but it sounds like they may be misleading? @camipacifici is this the case just for wavelength, or do you also find the other two confusing as well?

nmearl avatar Feb 16 '23 01:02 nmearl

Too many ways to access basically the same info. I don't see why user cannot do one extra call themselves to use astropy.units.Quantity.to() method if they want different units. I think we should just keep spectral_axis and remove the rest.

pllim avatar Feb 22 '23 01:02 pllim

Sorry, I completely forgot to reply. I do not really use frequency and velocity so I cannot comment on those. I think wavelength is misleading because it is something a user might intuitively call, but they would not know their units could change.

camipacifici avatar Mar 07 '23 15:03 camipacifici