Inconsistent argument name for Doppler convention
- Dominant language
- Python
- Stars
- 204
- Forks
- 134
- Avg merge
- 12h 55m
- Merged PRs (30d)
- 1
Description
astropy's [`SpectralQuantity` ](https://docs.astropy.org/en/latest/api/astropy.coordinates.SpectralQuantity.html#astropy.coordinates.SpectralQuantity) uses ``doppler_convention`` to specify the convention used to transform between wavelength/frequency and velocity, whereas specutils adopted ``velocity_convention`` for the same purpose (see e.g., https://specutils.readthedocs.io/en/stable/_modules/specutils/spectra/spectrum_mixin.html#OneDSpectrumMixin.with_spectral_axis_unit). This can be a source of frustration as a user might need to use two different argument names for the same purpose depending on at what level they are interacting with a spectrum.
I'd propose sticking to the astropy convention, if possible.
Contributor guide
Research direction
Start with OneDSpectrumMixin.with_spectral_axis_unit in specutils/spectra/spectrum_mixin.py and compare its velocity_convention argument with Astropy's doppler_convention convention. Search the repository for related argument uses and documentation, then update the relevant references so the naming is consistent and verify the existing tests still pass.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- api
- Issue type
- Refactor
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 58/100