Specutils model fitting fails to handle slope parameter units
- Dominant language
- Python
- Stars
- 204
- Forks
- 134
- Avg merge
- 12h 55m
- Merged PRs (30d)
- 1
Description
In fitting.fitmodels, [_add_units_to_model()](https://github.com/astropy/specutils/blob/feb7050c3007ad49260e99df55923dc0f69d513e/specutils/fitting/fitmodels.py#L690) throws an error when trying to handle a slope parameter in e.g. a 1D linear model, since the slope parameter has units of [y units / x units] and thus fails both of the current criteria (input parameter units match either x units or y units).
Contributor guide
Research direction
Start in specutils/fitting/fitmodels.py at _add_units_to_model() around line 690 and trace how units are checked for fitted parameters. Reproduce the failure with a 1D linear model whose slope has y/x units. Done means slope parameters with combined units are accepted without the reported error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- data
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100