Skip to content

Commit

Permalink
use abs(model) for hard-thresholding in model2comps
Browse files Browse the repository at this point in the history
  • Loading branch information
landmanbester committed Mar 25, 2024
1 parent e163f52 commit d851b6f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pfb/workers/model2comps.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ def _model2comps(**kw):
wsums[...] = 1.0

if opts.min_val is not None:
model = np.where(model >= opts.min_val, model, 0.0)
model = np.where(np.abs(model) >= opts.min_val, model, 0.0)

if not np.any(model):
raise ValueError(f'Model is empty or has no components above {opts.min_val}')
Expand Down

0 comments on commit d851b6f

Please sign in to comment.