Cleaned up
This commit is contained in:
@@ -1,5 +1,14 @@
|
|||||||
import frappy.core as fc
|
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')
|
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)
|
||||||
@@ -4,6 +4,7 @@ from frappy.core import Readable, Parameter, FloatRange, HasIO, StringIO, Proper
|
|||||||
|
|
||||||
class TSSOP16_IO(StringIO):
|
class TSSOP16_IO(StringIO):
|
||||||
end_of_line = '\r'
|
end_of_line = '\r'
|
||||||
|
wait_before = 3.0
|
||||||
identification = [ ('*IDN?', r'0x48,ACM1219,.*') ]
|
identification = [ ('*IDN?', r'0x48,ACM1219,.*') ]
|
||||||
|
|
||||||
class TSSOP16(HasIO, Readable):
|
class TSSOP16(HasIO, Readable):
|
||||||
@@ -14,7 +15,13 @@ class TSSOP16(HasIO, Readable):
|
|||||||
pollinterval = Parameter(default=0.1)
|
pollinterval = Parameter(default=0.1)
|
||||||
|
|
||||||
def read_value(self):
|
def read_value(self):
|
||||||
l = self.communicate('readCVT')
|
try:
|
||||||
vals = l.split(',')
|
l = self.communicate('readCVT')
|
||||||
vals = [ float(v) for v in vals ]
|
vals = l.split(',')
|
||||||
return vals[0]
|
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()
|
||||||
BIN
frappy_psi/tnmr/code-reference.pdf
Normal file
BIN
frappy_psi/tnmr/code-reference.pdf
Normal file
Binary file not shown.
BIN
frappy_psi/tnmr/templates/setup_files/SCOUT/tmp.tnt
Normal file
BIN
frappy_psi/tnmr/templates/setup_files/SCOUT/tmp.tnt
Normal file
Binary file not shown.
@@ -387,7 +387,7 @@ class TNMR:
|
|||||||
return False
|
return False
|
||||||
self.set_activefile()
|
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'))
|
success = ntnmr.LoadSequence(filename if filename[-4:]=='.tps' else (filename+'.tps'))
|
||||||
if(success):
|
if(success):
|
||||||
|
|||||||
Reference in New Issue
Block a user