Skip to content

Commit

Permalink
fallback for std 0
Browse files Browse the repository at this point in the history
  • Loading branch information
brisvag committed Aug 3, 2023
1 parent 3124d95 commit aa42f18
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions stemia/imod/find_NAD_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@ def cli(input, k_values, iterations, std):
if std is None:
with mrcfile.open(input, header_only=True) as mrc:
std = mrc.header.rms.item()
if std == 0:
with mrcfile.open(input) as mrc:
std = mrc.data.std()

ks = [float(k) for k in k_values.split(',')]
max_it = max(float(it) for it in iterations.split(','))
Expand Down

0 comments on commit aa42f18

Please sign in to comment.