Skip to content

Commit

Permalink
Update Check T2
Browse files Browse the repository at this point in the history
  • Loading branch information
HKaras committed Oct 2, 2024
1 parent 5d5c41e commit 918de5e
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions autodeer/gui/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -960,15 +960,21 @@ def check_T2(self, fitresult):

test_result = fitresult.check_decay()

if test_result:
if test_result == 0:
if self.waitCondition is not None: # Wake up the runner thread
self.waitCondition.wakeAll()
else:
return None
elif test_result == -1: # The trace needs to be longer
test_dt = fitresult.axis[1] - fitresult.axis[0]
test_dt *= 1e3
new_dt = ad.round_step(test_dt*2,self.waveform_precision)
if self.worker is not None:
self.worker.run_T2_relax(dt=new_dt)
elif test_result == 1: # The trace needs to be shorter
test_dt = fitresult.axis[1] - fitresult.axis[0]
test_dt *= 1e3
new_dt = ad.round_step(test_dt/2,self.waveform_precision)

if self.worker is not None:
self.worker.run_CP_relax(dt=new_dt)

def check_CP(self, fitresult):
# Check if the CP measurment is too short.
Expand Down

0 comments on commit 918de5e

Please sign in to comment.