Cleaned up

This commit is contained in:
2025-07-21 10:12:47 +02:00
parent ccd15f50e7
commit 730aa61789
7 changed files with 22 additions and 6 deletions

View File

@@ -1,5 +1,14 @@
import frappy.core as fc
docstring = 'NMR pulse sequence.\
Each pulse ``block`` consists of first a pulse with parameters pulse_width (microseconds), pulse_height (amplitude; for the SCOUT, percentage of max), and phase_cycle, and then a delay with parameter delay_time (microseconds).\
\
For scans, use the custom command, ``\
\
'
Node('example_TNMR.psi.ch', 'The NMR system running the Scout and controlled with TNMR', interface='tcp://5000')
Mod('tnmr_otf_module', 'frappy_psi.tnmr.OTFModule.ProgrammedSequence', 'NMR Sequence')
Mod('tnmr_otf_module', 'frappy_psi.tnmr.OTFModule.ProgrammedSequence', 'NMR Sequence')
print('TNMR Module loaded - please refer to the following docstring for help:\n'+docstring)

View File

@@ -4,6 +4,7 @@ from frappy.core import Readable, Parameter, FloatRange, HasIO, StringIO, Proper
class TSSOP16_IO(StringIO):
end_of_line = '\r'
wait_before = 3.0
identification = [ ('*IDN?', r'0x48,ACM1219,.*') ]
class TSSOP16(HasIO, Readable):
@@ -14,7 +15,13 @@ class TSSOP16(HasIO, Readable):
pollinterval = Parameter(default=0.1)
def read_value(self):
l = self.communicate('readCVT')
vals = l.split(',')
vals = [ float(v) for v in vals ]
return vals[0]
try:
l = self.communicate('readCVT')
vals = l.split(',')
vals = [ float(v) for v in vals ]
return vals[0]
except:
self.io.closeConnection()
self.io.connectStart()
time.sleep(3.0)
return self.read_value()

Binary file not shown.

Binary file not shown.

View File

@@ -387,7 +387,7 @@ class TNMR:
return False
self.set_activefile()
self.load_dashboard(TEMPLATE_FILE_PATH + 'scout_dashboard.txt')
self.load_dashboard(TEMPLATE_FILE_PATH + 'dashboard.txt')
success = ntnmr.LoadSequence(filename if filename[-4:]=='.tps' else (filename+'.tps'))
if(success):