leiden dilution: a lot of fixes

This commit is contained in:
2026-06-09 14:21:22 +02:00
parent 21f8eeae1e
commit 7ce1a0ff74
9 changed files with 406 additions and 223 deletions
+8
View File
@@ -12,11 +12,18 @@ Mod('cap_io',
Mod('cap',
'frappy_psi.ahcapbridge.AH2700',
'capacitance',
acquisition_key='averexp',
io='cap_io',
loss_module = 'loss',
freq_module = 'freq',
)
Mod('capvolt',
'frappy_psi.ahcapbridge.Voltage',
'excitation voltage',
cap = 'cap',
)
Mod('cap2_io',
'frappy_psi.ahcapbridge.IO', '',
uri='linse-leiden-ts:3001'
@@ -25,6 +32,7 @@ Mod('cap2_io',
Mod('cap2',
'frappy_psi.ahcapbridge.AH2550',
'capacitance',
acquisition_key='averexp',
io='cap2_io',
loss_module = 'loss2',
)
+230
View File
@@ -0,0 +1,230 @@
Node('leidenexp.psi.ch',
'''Leiden Dilution''',
)
ah2550_uri = 'linse-leiden-ts:3001' # capacitance bridge AH 2550
ah2700_uri = 'linse-leiden-ts:3002' # capacitance bridge AH 2700
sourcemeter_uri = 'linse-leiden-ts:3006' # k2601b used for HC experiment as heater
srbridge_uri = 'linse-leiden-ts:3008' # Stanford Research Resistance Bridge
# ls370 on port 3004: see ~/sea/tcl/leiden.config
Mod('sea_main',
'frappy_psi.sea.SeaClient',
'main sea connection for leiden.config',
config = 'leiden.config',
service = 'main',
)
for name in ['T3K', 'Tstill', 'T50mK', 'Tmxhigh', 'Tmxcx', 'Tblueo',
'Tpt50', 'Tpt3high', 'Tpt3low', 'Twhite', 'Tgreen']:
mname = name.replace('T','T_')
kwds = {}
if name == 'Tmxlow':
kwds['meaning'] = ['temperature', 20]
Mod(mname,
'frappy_psi.sea.SeaReadable', '',
io='sea_main',
sea_object='tt',
rel_paths=[name],
value=Param(unit='K'),
extra_modules = ['raw'],
**kwds
)
Mod(name.replace('T', 'R_'),
'frappy_psi.sea.SeaReadable', '',
io='sea_main',
value=Param(unit='Ohm'),
single_module=f'{mname}.raw'
)
# "if not <title>" means disabled, "if <title>" means enabled
if not 'calibsetup':
Mod('cmn',
'frappy_psi.sea.SeaReadable', '',
io = 'sea_main',
sea_object = 'cmn',
extra_modules = ['u1', 'u2', 'temp'],
)
Mod('T_cmn',
'frappy_psi.sea.SeaReadable', '',
io='sea_main',
value=Param(unit='K'),
single_module='cmn.temp',
)
Mod('V_fixp',
'frappy_psi.sea.SeaReadable', '',
io='sea_main',
value=Param(unit='V'),
single_module='cmn.u2',
)
Mod('V_cmn',
'frappy_psi.sea.SeaReadable', '',
io='sea_main',
value=Param(unit='V'),
single_module='cmn.u1',
)
Mod('drive_cmn',
'frappy_psi.picontrol.PIctrl',
'controlled cmn temperature',
input_module = 'T_cmn',
output_module = 'mix_htr',
output_min = 0,
output_max = 3e-2,
p = 2,
itime = 120,
)
Mod('drive_fixp',
'frappy_psi.picontrol.PI',
'controlled fixpoint voltage',
value=Param(unit='V'),
input_module = 'V_fixp',
output_module = 'drive_mix',
output_min = 0.0,
output_max = 0.01,
p = 1,
itime = 120,
)
if 'sr_bridge':
IO('io_sr', srbridge_uri)
Mod('res1',
'frappy_psi.bridge.Resistance',
'please add description',
io='io_sr',
port=1,
)
Mod('T_res1',
'frappy_psi.softcal.Sensor',
'',
rawsensor='res1',
calcurve='RCW575a',
)
Mod('res2',
'frappy_psi.bridge.Resistance',
'please add description',
io='io_sr',
port=3,
)
Mod('T_res2',
'frappy_psi.softcal.Sensor',
'',
rawsensor='res2',
calcurve='RC550a',
)
Mod('phase1',
'frappy_psi.bridge.Phase',
'please add description',
resistance='res1',
)
Mod('phase2',
'frappy_psi.bridge.Phase',
'please add description',
resistance='res2',
)
Mod('dev1',
'frappy_psi.bridge.Deviation',
'please add description',
resistance='res1',
)
Mod('dev2',
'frappy_psi.bridge.Deviation',
'please add description',
resistance='res2',
)
if 'keihley 2601b':
IO('io_sm', sourcemeter_uri)
Mod('source',
'frappy_psi.k2601b.SourceMeter'
'',
description = "keithley sourcemeter",
mode = 2,
vlimit = 0.5,
ilimit = .0005,
io = 'io_sm',
)
Mod('hvolt',
'frappy_psi.k2601b.Voltage'
'',
description = "Heater Voltage",
active = False,
limit = 1.0,
target = 0.0,
sourcemeter = 'source',
io = 'io_sm',
)
Mod('hcur',
'frappy_psi.k2601b.Current'
'',
description = "Heater Current Source",
active = True,
limit = 0.0001,
target = 0.0,
sourcemeter = 'source',
io = 'io_sm',
)
Mod('hres',
'frappy_psi.k2601b.Resistivity'
'',
description = "Heater Resistance",
io = 'io_sm',
)
Mod('hpow',
'frappy_psi.k2601b.Power'
'',
description = "Heater Power",
io = 'io_sm',
)
if 'cap ah2700':
# TODO: adapt names (cap...) to your experiment
IO('io_ah2700', ah2700_uri)
Mod('cap',
'frappy_psi.ahcapbridge.AH2700',
'capacitance',
acquisition_key='averexp',
io='io_ah2700',
loss_module = 'loss',
freq_module = 'freq',
)
Mod('capvolt',
'frappy_psi.ahcapbridge.Voltage',
'excitation voltage',
cap = 'cap',
)
if not 'cap_ah2550':
IO('io_ah2550', ah2550_uri)
Mod('cap2',
'frappy_psi.ahcapbridge.AH2550',
'capacitance',
acquisition_key='averexp',
io='io_ah2550',
loss_module = 'loss2',
)
+18
View File
@@ -0,0 +1,18 @@
Node('AH2550Test.psi.ch',
'AH2550 capacitance bridge test',
'tcp://5000',
)
Mod('io',
'frappy_psi.ahcapbridge.IO', '',
uri='linse-leiden-ts:3001',
timeout=1,
end_of_line=('\r\n', '\r')
)
Mod('cap',
'frappy_psi.ahcapbridge.AH2550',
'capacitance',
io='io',
loss_module = 'loss',
)
+81 -178
View File
@@ -1,98 +1,61 @@
Node('leiden.psi.ch',
'''Leiden Dilution''',
'Leiden Dilution, basic config',
'tcp://5000',
secondary = ['ws://8051']
)
ah2700_uri = 'linse-leiden-ts:3002' # used in cfg/addons/ahtwo_cfg.pt
ls370_uri = 'linse-leiden-ts:3004' # used in ~/sea/tcl/leiden.config
tcs_uri = 'linse-leiden-ts:3005'
#nanov_uri = 'linse-leiden-ts:3006' # used in ~/sea/tcl/leiden.config
k2601b_uri = 'linse-leiden-ts:3006' # used for HC experiment as heater
dilhtr_uri = 'linse-leiden-ts:3007'
srbridge_uri = 'linse-leiden-ts:3008'
IO('io_tcs', 'linse-leiden-ts:3005')
IO('io_htr', 'linse-leiden-ts:3007')
IO('io_ghs', 'linse-521e-ts:3001')
IO('io_pfeiffer', 'linse-521e-ts:3002')
Mod('sea_main',
# ah2700: linse-leiden-ts:3002, see leidenexp_cfg.py)
# ls370: 'linse-leiden-ts:3004, see ~/sea/tcl/leiden.config
# nanovolt: linse-leiden-ts:3006, see ~/sea/tcl/leiden.config
# k2601b: linse-leiden-ts:3006, see leidenexp_cfg.py ( used for HC experiment as heater)
# SR bridge: linse-leiden-ts:3008, see leidenexp_cfg.py
Mod('sea_conn', # do not use sea_main, as this is used in addons/leidenexp_cfg.py
'frappy_psi.sea.SeaClient',
'main sea connection for leiden.config',
config = 'leiden.config',
service = 'main',
)
for name in ['T3K', 'Tstill', 'T50mK', 'Tmxlow', 'Tmxhigh', 'Tmxcx', 'Tblueo',
'Tpt50', 'Tpt3high', 'Tpt3low', 'Twhite', 'Tgreen']:
mname = name.replace('T','T_')
Mod(mname,
'frappy_psi.sea.SeaReadable', '',
io='sea_main',
sea_object='tt',
rel_paths=[name],
value=Param(unit='K'),
extra_modules = ['raw'],
)
Mod(name.replace('T', 'R_'),
'frappy_psi.sea.SeaReadable', '',
io='sea_main',
value=Param(unit='Ohm'),
single_module=f'{mname}.raw'
)
Mod('T_mix',
'frappy_psi.sea.SeaReadable', '',
io='sea_conn',
sea_object='tt',
rel_paths=['Tmix'],
value=Param(unit='K'),
extra_modules = ['raw'],
meaning = ['temperature', 20],
)
#Mod('cmn',
# 'frappy_psi.sea.SeaReadable', '',
# io = 'sea_main',
# sea_object = 'cmn',
# extra_modules = ['u1', 'u2', 'temp'],
#)
#Mod('T_cmn',
# 'frappy_psi.sea.SeaReadable', '',
# io='sea_main',
# value=Param(unit='K'),
# single_module='cmn.temp',
#)
#Mod('V_fixp',
# 'frappy_psi.sea.SeaReadable', '',
# io='sea_main',
# value=Param(unit='V'),
# single_module='cmn.u2',
#)
#Mod('V_cmn',
# 'frappy_psi.sea.SeaReadable', '',
# io='sea_main',
# value=Param(unit='V'),
# single_module='cmn.u1',
#)
Mod('tcs_io',
'frappy_psi.tcs.IO',
'tcs communication',
uri=tcs_uri,
)
Mod('R_mix',
'frappy_psi.sea.SeaReadable', '',
io='sea_conn',
value=Param(unit='Ohm'),
single_module='T_mix.raw'
)
Mod('still_htr',
'frappy_psi.tcs.Heater',
'still heater',
io='tcs_io',
io='io_tcs',
channel=2,
)
Mod('mix_io',
'frappy_psi.dilhtr.IO',
'dilhtr communication',
uri=dilhtr_uri,
)
Mod('mix_htr',
'frappy_psi.dilhtr.WrappedHeater',
'mixing chamber heater',
io='mix_io',
io='io_htr',
)
Mod('drive_mix',
'frappy_psi.picontrol.PIctrl',
'controlled mix ch. temperature',
input_module = 'T_mxlow',
input_module = 'T_mix',
output_module = 'mix_htr',
output_min = 0,
output_max = 0.02,
@@ -100,125 +63,65 @@ Mod('drive_mix',
itime = 60,
)
#Mod('drive_cmn',
# 'frappy_psi.picontrol.PIctrl',
# 'controlled cmn temperature',
# input_module = 'T_cmn',
# output_module = 'mix_htr',
# output_min = 0,
# output_max = 3e-2,
# p = 2,
# itime = 120,
# )
#Mod('drive_fixp',
# 'frappy_psi.picontrol.PI',
# 'controlled fixpoint voltage',
# value=Param(unit='V'),
# input_module = 'V_fixp',
# output_module = 'drive_mix',
# output_min = 0.0,
# output_max = 0.01,
# p = 1,
# itime = 120,
# )
Mod('simio',
'frappy_psi.bridge.BridgeIO',
'communication to sim900',
uri=srbridge_uri,
for name in [
'A0', 'A1', 'A10', 'A2', 'A3', 'A4', 'A5', 'A6', 'A7', 'A8', 'A9',
'AUX1', 'He3', 'He4', 'S1', 'S2', 'S3', 'S4', 'S5',
'V0', 'V1', 'V2', 'V3', 'V4', 'V5', 'V6', 'V7', 'V8', 'V9',
'V10', 'V11', 'V12', 'V13', 'V14', 'V15', 'V16', 'V17',
'auto', 'bypass', 'circulation', 'gate18', 'ledtest', 'mixcompr', 'recovery', 'reset', 'start']:
Mod(name,
'frappy_psi.leidenghs.Valve',
f'switch or valve {name}',
io='io_ghs',
key=name,
)
Mod('res1',
'frappy_psi.bridge.Resistance',
'please add description',
io='simio',
port=1,
Mod('p0',
'frappy_psi.leidenghs.Pressure',
'test pressure p0',
io='io_ghs',
addr='p0',
scale=2**12 / 1e4,
)
Mod('res2',
'frappy_psi.bridge.Resistance',
'please add description',
io='simio',
port=3,
for pname in ['p2', 'p3', 'p4', 'p5']:
Mod(pname,
'frappy_psi.leidenghs.Pressure',
'pressure {pname}',
io='io_ghs',
addr=pname,
)
Mod('phase1',
'frappy_psi.bridge.Phase',
'please add description',
resistance='res1',
Mod('p6',
'frappy_psi.leidenghs.PressureLimit',
'test pressure with limits p6',
io='io_ghs',
addr='p6',
offset=0,
)
Mod('phase2',
'frappy_psi.bridge.Phase',
'please add description',
resistance='res2',
Mod('p7',
'frappy_psi.leidenghs.PressureLimit',
'test pressure with limits p7',
io='io_ghs',
addr='p7',
offset=0,
)
Mod('dev1',
'frappy_psi.bridge.Deviation',
'please add description',
resistance='res1',
Mod('flow',
'frappy_psi.leidenghs.PressureLimit',
'condense flow',
io='io_ghs',
addr='flow',
offset=0,
value=Param(unit='ln/min'),
scale = 2**15 / 1e2,
)
Mod('dev2',
'frappy_psi.bridge.Deviation',
'please add description',
resistance='res2',
for pname, addr in [('p8', 4), ('p9', 3), ('p10', 2)]:
Mod(pname,
'frappy_psi.pfeiffer.Pressure',
f'pressure reading {pname}',
io = 'io_pfeiffer',
channel = addr,
)
Mod('vsource_io',
'frappy_psi.k2601b.K2601bIO',
'source meter',
# uri = '129.129.156.90:5025',
uri = k2601b_uri,
)
Mod('source',
'frappy_psi.k2601b.SourceMeter'
'',
description = "keithley sourcemeter",
mode = 2,
vlimit = 0.5,
ilimit = .0005,
io = 'vsource_io',
)
Mod('hvolt',
'frappy_psi.k2601b.Voltage'
'',
description = "Heater Voltage",
active = False,
limit = 1.0,
target = 0.0,
sourcemeter = 'source',
io = 'vsource_io',
)
Mod('hcur',
'frappy_psi.k2601b.Current'
'',
description = "Heater Current Source",
active = True,
limit = 0.0001,
target = 0.0,
sourcemeter = 'source',
io = 'vsource_io',
)
Mod('hres',
'frappy_psi.k2601b.Resistivity'
'',
description = "Heater Resistance",
io = 'vsource_io',
)
Mod('hpow',
'frappy_psi.k2601b.Power'
'',
description = "Heater Power",
io = 'vsource_io',
)
+16 -16
View File
@@ -55,22 +55,22 @@
{"path": "T50mK/curve/points", "type": "floatvarar", "readonly": false, "cmd": "tt T50mK/curve/points", "visibility": 3},
{"path": "T50mK/alarm", "type": "float", "readonly": false, "cmd": "tt T50mK/alarm"},
{"path": "T50mK/raw", "type": "float"},
{"path": "Tmxlow", "type": "float", "kids": 14},
{"path": "Tmxlow/active", "type": "enum", "enum": {"inactive": 0, "active": 1}, "readonly": false, "cmd": "tt Tmxlow/active"},
{"path": "Tmxlow/autorange", "type": "bool", "readonly": false, "cmd": "tt Tmxlow/autorange", "description": "autorange (common for all channels)"},
{"path": "Tmxlow/range", "type": "text", "readonly": false, "cmd": "tt Tmxlow/range", "description": "resistance range in Ohm"},
{"path": "Tmxlow/range_num", "type": "int"},
{"path": "Tmxlow/excitation", "type": "text", "readonly": false, "cmd": "tt Tmxlow/excitation", "description": "excitation with unit, i.e. 2uV or 3pA"},
{"path": "Tmxlow/excitation_num", "type": "int"},
{"path": "Tmxlow/excitation_mode", "type": "enum", "enum": {"voltage": 0, "current": 1, "off": 2}},
{"path": "Tmxlow/pause", "type": "int", "readonly": false, "cmd": "tt Tmxlow/pause", "description": "pause time [sec] after channel change"},
{"path": "Tmxlow/filter", "type": "int", "readonly": false, "cmd": "tt Tmxlow/filter", "description": "filter average time [sec]"},
{"path": "Tmxlow/dwell", "type": "int", "readonly": false, "cmd": "tt Tmxlow/dwell", "description": "dwell time [sec]. Total time per channel: pause + filter + dwell"},
{"path": "Tmxlow/status", "type": "text"},
{"path": "Tmxlow/curve", "type": "text", "readonly": false, "cmd": "tt Tmxlow/curve", "kids": 1},
{"path": "Tmxlow/curve/points", "type": "floatvarar", "readonly": false, "cmd": "tt Tmxlow/curve/points", "visibility": 3},
{"path": "Tmxlow/alarm", "type": "float", "readonly": false, "cmd": "tt Tmxlow/alarm"},
{"path": "Tmxlow/raw", "type": "float"},
{"path": "Tmix", "type": "float", "kids": 14},
{"path": "Tmix/active", "type": "enum", "enum": {"inactive": 0, "active": 1}, "readonly": false, "cmd": "tt Tmix/active"},
{"path": "Tmix/autorange", "type": "bool", "readonly": false, "cmd": "tt Tmix/autorange", "description": "autorange (common for all channels)"},
{"path": "Tmix/range", "type": "text", "readonly": false, "cmd": "tt Tmix/range", "description": "resistance range in Ohm"},
{"path": "Tmix/range_num", "type": "int"},
{"path": "Tmix/excitation", "type": "text", "readonly": false, "cmd": "tt Tmix/excitation", "description": "excitation with unit, i.e. 2uV or 3pA"},
{"path": "Tmix/excitation_num", "type": "int"},
{"path": "Tmix/excitation_mode", "type": "enum", "enum": {"voltage": 0, "current": 1, "off": 2}},
{"path": "Tmix/pause", "type": "int", "readonly": false, "cmd": "tt Tmix/pause", "description": "pause time [sec] after channel change"},
{"path": "Tmix/filter", "type": "int", "readonly": false, "cmd": "tt Tmix/filter", "description": "filter average time [sec]"},
{"path": "Tmix/dwell", "type": "int", "readonly": false, "cmd": "tt Tmix/dwell", "description": "dwell time [sec]. Total time per channel: pause + filter + dwell"},
{"path": "Tmix/status", "type": "text"},
{"path": "Tmix/curve", "type": "text", "readonly": false, "cmd": "tt Tmix/curve", "kids": 1},
{"path": "Tmix/curve/points", "type": "floatvarar", "readonly": false, "cmd": "tt Tmix/curve/points", "visibility": 3},
{"path": "Tmix/alarm", "type": "float", "readonly": false, "cmd": "tt Tmix/alarm"},
{"path": "Tmix/raw", "type": "float"},
{"path": "Tmxhigh", "type": "float", "kids": 14},
{"path": "Tmxhigh/active", "type": "enum", "enum": {"inactive": 0, "active": 1}, "readonly": false, "cmd": "tt Tmxhigh/active"},
{"path": "Tmxhigh/autorange", "type": "bool", "readonly": false, "cmd": "tt Tmxhigh/autorange", "description": "autorange (common for all channels)"},
+15
View File
@@ -349,6 +349,21 @@ class Freq(Writable):
self.cap.write_freq(target)
class Voltage(Writable):
cap = Attached()
value = Parameter('', FloatRange(unit='V'), default=0)
def initModule(self):
super().initModule()
self.cap.addCallback('voltage', self.update_voltage) # auto update status
def update_voltage(self, voltage):
self.value = voltage
def write_target(self, target):
self.cap.write_voltage(target)
class AH2550(AHBase):
PATTERN = {
'averexp': re.compile(r'AVERAGE_AVEREXP *([0-9]*)'),
+36 -28
View File
@@ -35,6 +35,7 @@ class IO(StringIO):
_key_status = None
_pressure = None
_pressure_limits = None
pollinterval = Parameter('poll interval', FloatRange(0.1,10), default=0.5)
def initModule(self):
self.modules = []
@@ -87,32 +88,33 @@ class Base(HasIO):
self.read_value()
KEY_MAP = {'mix': 1, # mixture compressor
KEY_MAP = {'mixcompr': 1, # mixture compressor
'bypass': 2,
'15': 3,
'16': 4,
'V15': 3,
'V16': 4,
'AUX1': 5,
'gate18': 6,
'4': 7,
'5': 9,
'V4': 7,
'V5': 9,
'reset': 10,
'9': 12,
'14': 13,
'13': 15,
'V9': 12,
'V14': 13,
'V13': 15,
'ledtest': 16,
'12': 18,
'10': 19,
'11': 21,
'V12': 18,
'V10': 19,
'V11': 21,
'A0': 22,
'7': 24,
'V7': 24,
'S3': 25,
'6': 27,
'17': 28,
'8': 30,
'1': 31,
'V6': 27,
'V17': 28,
'V8': 30,
'V1': 31,
'S2': 33,
'3': 34,
'2': 36,
'0': 37,
'V3': 34,
'V2': 36,
'V0': 37,
'S1': 39,
'A9': 40,
'A8': 42,
@@ -122,6 +124,7 @@ KEY_MAP = {'mix': 1, # mixture compressor
'start': 48,
'A5': 49,
'A7': 51,
'A1': 52,
'auto': 54,
'A4': 55,
'A6': 57,
@@ -148,22 +151,27 @@ class Valve(Base, Writable):
state = self.read_value()
if state != target:
self.change('DEVMAN', self.key.value)
self.target = target
self.io.doPoll()
self.read_value()
def read_value(self):
if self.io._key_status is None:
self.io.doPoll()
return self.get_key(self.key.value)
value = self.get_key(self.key.value)
if not self.value and not self.target and value:
self.log.info('valve is on, was it a ghost? %r %r %r', self.value, self.target, value)
return value
PRESSURE_MAP = {'P1': 0,
'P2': 1,
'P3': 2,
'P4': 3,
'P5': 4,
'P6': 5,
'P7': 6,
PRESSURE_MAP = {'p0': 0,
'p2': 1,
'p3': 2,
'p4': 3,
'p5': 4,
'p6': 5,
'p7': 6,
'flow': 7,
}
@@ -187,7 +195,7 @@ class PressureLimit(Pressure, Readable):
ioClass = IO
value = Parameter('pressure values for sensors with limit', datatype=FloatRange(unit='mbar'))
value = Parameter('pressure values for sensors with limit', datatype=FloatRange(unit='mbar', fmtstr='%.1f'))
offset = Property('address of pressure sensor', datatype=EnumType({'P6': 0, 'P7': 2}))
limit_low = Parameter('low pressure limit', datatype=FloatRange(0, 2000, unit='mbar'), readonly=False)
limit_high = Parameter('high pressure limit', datatype=FloatRange(0, 2000, unit='mbar'), readonly=False)
+1 -1
View File
@@ -43,7 +43,7 @@ class IO(StringIO):
class Pressure(HasIO, Readable):
value = Parameter(unit='mbar')
channel = Property('channel number', IntRange(1, 2), default=1)
channel = Property('channel number', IntRange(1, 8), default=1)
STATUS_MAP = {
'0': (IDLE, ''),
+1
View File
@@ -290,6 +290,7 @@ class PI(HasConvergence, PImixin):
return self.input_module.read_status()
def write_target(self, target):
self._overflow = 0
super().write_target(target)
self.convergence_start()