astropy / astropy/specutils

find_lines_threshold only finding 1 line

Open
#797 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
204
Forks
134
Avg merge
12h 55m
Merged PRs (30d)
1

Description

Regardless of how low I set noise_factor, find_lines_threshold is only finding one line and gives the
following error:

lines = find_lines_threshold(spectrum-continuum, noise_factor=0.01)
lines

/Users/pogle/miniconda3/envs/science/lib/python3.8/site-packages/scipy/interpolate/interpolate.py:2536: RuntimeWarning: invalid value encountered in true_divide
norm_distances.append((x - grid[i]) /

line_center | line_type | line_center_index
-- | -- | --
563.6363636363636 | absorption | 96

Contributor guide

Open the contributing guide

Research direction

Reproduce the reported find_lines_threshold call with the spectrum-continuum input and noise_factor=0.01, then inspect the line-finding and interpolation path associated with the RuntimeWarning. Done means the call detects the expected multiple spectral lines without the reported invalid-value warning.

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
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.