Skip to content

Commit

Permalink
Remove inf uncertainty replacement
Browse files Browse the repository at this point in the history
  • Loading branch information
rosteen committed Nov 22, 2024
1 parent d48c4a7 commit e0e8258
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions jdaviz/configs/cubeviz/plugins/parsers.py
Original file line number Diff line number Diff line change
Expand Up @@ -453,13 +453,7 @@ def _parse_spectrum1d_3d(app, file_obj, data_label=None,
if attr == "mask":
flux = val << u.dimensionless_unscaled # DQ flags have no unit
elif attr == "uncertainty":
bad_locs = None
if isinstance(val, InverseVariance):
bad_locs = val.array[np.where(val.array == 0)]
flux = val.represent_as(StdDevUncertainty).quantity
if bad_locs is not None:
# Prefer 0 over inf for the masked out values here
flux[bad_locs] = 0
else:
flux = val

Expand Down

0 comments on commit e0e8258

Please sign in to comment.