Skip to content

Commit

Permalink
.
Browse files Browse the repository at this point in the history
  • Loading branch information
cshanahan1 committed Dec 4, 2023
1 parent 7a09b49 commit bb44040
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions specreduce/tests/test_tracing.py
Original file line number Diff line number Diff line change
Expand Up @@ -152,10 +152,10 @@ def test_fit_trace():

# test that warning is raised when many bins are masked
mask = np.zeros(img.shape)
mask[:, 75:76] = 1
mask[:, 100] = 1
mask[:, 20] = 1
mask[:, 30] = 1
nddat = NDData(data=img, mask=mask, unit=u.DN)
warn_bins = np.arange(20)
warn_bins = ', '.join([str(x) for x in warn_bins])
msg = f"All pixels in bin {warn_bins} are masked. Falling to trace value from all-bin fit."
msg = f"All pixels in bins 20, 30, 100 are masked. Falling to trace value from all-bin fit."
with pytest.warns(UserWarning, match=msg):
FitTrace(nddat)

0 comments on commit bb44040

Please sign in to comment.