`star_utils:get_phot_info` should raise non-zero `ierr` if L < 0
- Dominant language
- Fortran
- Stars
- 249
- Forks
- 82
- Avg merge
- 1d 3h
- Merged PRs (30d)
- 3
Description
The various code paths in `star_utils:get_phot_info` currently avoid dealing with a negative luminosity (which causes problems in e.g. `set_phot_info` when trying to evaluate Teff ~ (L/4πR²σ)⁰·²⁵) by limiting the output luminosity to `max(1, L)`. As @adamjermyn suggested in [PR 278](https://github.com/MESAHub/mesa/pull/278), we should probably rather have the various routines raise a non-zero `ierr` rather than make up a value of `L` and pretend everything is OK.
Contributor guide
Research direction
Locate star_utils:get_phot_info and its callers, especially set_phot_info, and compare the proposed direction in PR 278. Trace each negative-luminosity path and verify that it returns a non-zero ierr instead of substituting max(1, L); done means callers can detect the error before evaluating the invalid Teff expression.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- fortran
- Domain
- hpc
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100