template_logwl_resample: default delta_log_wavelength can result in unfeasibly large array
- Dominant language
- Python
- Stars
- 204
- Forks
- 134
- Avg merge
- 12h 55m
- Merged PRs (30d)
- 1
Description
`analysis.correlation.template_logwl_resample` (which is called internally by `template_correlate`) defaults to `delta_log_wavelength=None` which in turn adopts the _smallest_ delta wavelength from the input array. If this smallest delta wavelength is particularly small, this then tries to create an array sometimes too large for memory. The manual solution is to pass `delta_log_wavelength` manually to `template_logwl_resample` (or `resample=dict(delta_log_wavelength=1e-4)` to `template_correlate`). We should either check to see if the smallest delta wavelength is an outlier or catch the memory error and raise a useful error message to the user.
Contributor guide
Research direction
Start with analysis.correlation.template_logwl_resample and its internal use by template_correlate; reproduce the oversized allocation using an input with a very small delta wavelength. Review how delta_log_wavelength and resample are handled, then verify that the chosen behavior either detects the outlier or reports a useful memory-related error without attempting an infeasible array.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- data
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100