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 6894ec8 commit 7a09b49
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions specreduce/tracing.py
Original file line number Diff line number Diff line change
Expand Up @@ -346,15 +346,15 @@ def __post_init__(self):
# TODO: implement smoothing with provided width
y_bins[i] = ilum2[z_i.argmax()]

# warn about fully-masked bins
# warn about fully-masked bins (which, currently, means any bin with a single masked value)
if len(warn_bins) > 0:
plural = 's' if len(warn_bins) > 1 else ''
# if there are a ton of bins, we don't want to print them all out
print(warn_bins)
if len(warn_bins) > 20:
warn_bins = warn_bins[0: 10] + ['...'] + warn_bins[10: 19]
warnings.warn(f"All pixels in bin{plural} {', '.join([str(x) for x in warn_bins])}"
" are masked. Falling to trace value from all-bin fit.")
" are masked. Falling to trace value from all-bin fit.")

# recenter bin positions
x_bins = (x_bins[:-1] + x_bins[1:]) / 2
Expand Down

0 comments on commit 7a09b49

Please sign in to comment.