Skip to content

Commit

Permalink
Merge branch 'develop' into UI_update
Browse files Browse the repository at this point in the history
  • Loading branch information
HKaras committed Jan 30, 2025
2 parents 2a2457c + ca8e24c commit 934ad98
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion autodeer/delay_optimise.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,10 @@ def calculate_optimal_tau(RelaxAnalysis, MeasTime, SNR, target_step=0.015, targe
def find_all_numerical_roots(data,axis):
sign_changes = np.where(np.abs(np.diff(np.sign(data)))>0)[0]
if sign_changes.shape[0] == 0:
return axis[0]
if data[0] > 0:
return axis[-1]
else:
return axis[0]
else:
return axis[sign_changes]

Expand Down

0 comments on commit 934ad98

Please sign in to comment.