Skip to content

Commit

Permalink
scaling: ensure mad is at least 1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
iiSeymour committed Feb 4, 2022
1 parent 6f23467 commit 6e91a9d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion bonito/fast5.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ def __init__(self, read, filename, meta=False):

if len(scaled) > 8000:
med, mad = med_mad(scaled)
self.signal = (scaled - med) / mad
self.signal = (scaled - med) / max(1.0, mad)
else:
self.signal = norm_by_noisiest_section(scaled)

Expand Down

0 comments on commit 6e91a9d

Please sign in to comment.