Skip to content

Commit

Permalink
Fix error checking
Browse files Browse the repository at this point in the history
  • Loading branch information
jguhlin committed Jun 4, 2024
1 parent e0d6eeb commit 8abf5f1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions bonito/reader.py
Original file line number Diff line number Diff line change
Expand Up @@ -145,10 +145,10 @@ def normalisation(sig, scaling_strategy=None, norm_params=None):
If no information is provided in the config, quantile scaling is default.
"""
if scaling_strategy and scaling_strategy.get("strategy") == "pa":
if norm_params.get("standardise") == 1:
if norm_params and norm_params.get("standardise") == 1:
shift = norm_params.get('mean')
scale = norm_params.get('stdev')
elif norm_params.get("standardise") == 0:
elif norm_params and norm_params.get("standardise") == 0:
shift = 0.0
scale = 1.0
else:
Expand Down

0 comments on commit 8abf5f1

Please sign in to comment.