safety
This commit is contained in:
@@ -155,8 +155,8 @@ class TNMR:
|
||||
print('Zero-going...')
|
||||
ntnmr = self.get_instance()
|
||||
if not(self.acquisition_running()):
|
||||
print('Reset')
|
||||
ntnmr.Reset() # to avoid hardware issues? EDIT: Doesn't seem to do much...
|
||||
#print('Reset')
|
||||
#ntnmr.Reset() # to avoid hardware issues? EDIT: Doesn't seem to do much...
|
||||
if(CHECK_MODE == 'data'):
|
||||
print('Artificially setting the zeroth point to NULL for error detection.')
|
||||
ntnmr.SetDataPoint(1, [0,0])
|
||||
@@ -258,7 +258,7 @@ class TNMR:
|
||||
"""
|
||||
print('I: Saving')
|
||||
if filepath == '':
|
||||
self.get_instance().Save
|
||||
self.get_instance().Save()
|
||||
else:
|
||||
self.get_instance().SaveAs(filepath)
|
||||
print(f'I: Saved to file {filepath}')
|
||||
@@ -378,6 +378,11 @@ class TNMR:
|
||||
"""
|
||||
|
||||
ntnmr = self.get_instance()
|
||||
|
||||
if (self.acquisition_running()):
|
||||
ntnmr.Abort()
|
||||
print('W: Aborting currently running acquisition!')
|
||||
|
||||
print(f'Loading sequence at {filename}')
|
||||
ntnmr.CloseActiveFile()
|
||||
success = ntnmr.OpenFile(TEMPLATE_FILE_PATH + 'tmp.tnt')
|
||||
@@ -411,6 +416,10 @@ class TNMR:
|
||||
else:
|
||||
print('W: Filenames do not match for sequence!')
|
||||
return False
|
||||
|
||||
d = self.get_data()
|
||||
ntnmr.ZeroFill(len(d[0])) # to clear everything out.
|
||||
|
||||
return True
|
||||
|
||||
def load_dashboard(self, dashboard_fn):
|
||||
|
||||
Reference in New Issue
Block a user