From 102bb5901359b5c9a8d46c8901966a8594d2d2be Mon Sep 17 00:00:00 2001 From: Markus Zolliker Date: Mon, 3 Aug 2026 14:11:33 +0200 Subject: [PATCH] add more stuff from frappy/cfg --- addons/ah2700leiden_cfg.py | 20 +++ addons/ahtwo_cfg.py | 39 ++++++ addons/flamesample2_cfg.py | 55 +++++++++ addons/haake_add_cfg.py | 15 +++ addons/laser_cfg.py | 22 ++++ addons/leidenexp_cfg.py | 244 +++++++++++++++++++++++++++++++++++++ main/leiden_cfg.py | 135 ++++++++++++++++++++ main/leidenghs_cfg.py | 85 +++++++++++++ main/tfa_cfg.py | 20 +++ sea/cp1000_cfg.py | 14 +++ stick/fibrestick_cfg.py | 37 ++++++ stick/msparestick_cfg.py | 34 ++++++ 12 files changed, 720 insertions(+) create mode 100644 addons/ah2700leiden_cfg.py create mode 100644 addons/ahtwo_cfg.py create mode 100644 addons/flamesample2_cfg.py create mode 100644 addons/haake_add_cfg.py create mode 100644 addons/laser_cfg.py create mode 100644 addons/leidenexp_cfg.py create mode 100644 main/leiden_cfg.py create mode 100644 main/leidenghs_cfg.py create mode 100644 main/tfa_cfg.py create mode 100644 sea/cp1000_cfg.py create mode 100644 stick/fibrestick_cfg.py create mode 100644 stick/msparestick_cfg.py diff --git a/addons/ah2700leiden_cfg.py b/addons/ah2700leiden_cfg.py new file mode 100644 index 0000000..fba5a73 --- /dev/null +++ b/addons/ah2700leiden_cfg.py @@ -0,0 +1,20 @@ +Node('ah2700.frappy.psi.ch', + 'Andeen Hagerlin 2700 Capacitance Bridge', +) + +Mod('cap_io', + 'frappy_psi.ah2700.Ah2700IO', + '', + uri='linse-leiden-ts:3002', + timeout=60, +) + +# this creates also cap_freq and cap_loss +Mod('cap', + 'frappy_psi.ah2700.Capacitance', + 'capacitance', + io = 'cap_io', + loss_name='loss', + freq_name='freq', +) + diff --git a/addons/ahtwo_cfg.py b/addons/ahtwo_cfg.py new file mode 100644 index 0000000..d3c40cb --- /dev/null +++ b/addons/ahtwo_cfg.py @@ -0,0 +1,39 @@ +Node('ahtwo.frappy.psi.ch', + 'Andeen Hagerlin 2700 and 2550 Capacitance Bridges', +) + +# TODO: adapt names (cap, cap2) to your experiment + +Mod('cap_io', + 'frappy_psi.ahcapbridge.IO', '', + uri='linse-leiden-ts:3002' +) + +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' +) + +Mod('cap2', + 'frappy_psi.ahcapbridge.AH2550', + 'capacitance', + acquisition_key='averexp', + io='cap2_io', + loss_module = 'loss2', +) + diff --git a/addons/flamesample2_cfg.py b/addons/flamesample2_cfg.py new file mode 100644 index 0000000..63317c0 --- /dev/null +++ b/addons/flamesample2_cfg.py @@ -0,0 +1,55 @@ +Node('flamesample2.psi.ch', + 'flame sample low and high thermometers and heater', + interface = 'tcp://5000', +) + +Mod('lscio', + 'frappy_psi.ls372.StringIO', + 'sample channels LS372 io', + uri = 'flamedil-ls.psi.ch:7777', +) + +Mod('lsc_channel', + 'frappy_psi.ls372.Switcher', + 'channel switcher sample ls372', + io='lscio', + value = 3, +) + +Mod('ts_low', + 'frappy_psi.ls372.TemperatureLoop', + 'sample RuOX', + channel = 3, + switcher = 'lsc_channel', + minrange=13, + range=22, + tolerance = 0.1, + vexc = 3, + htrrng=4, +) + +Mod('ts_high', + 'frappy_psi.ls372.TemperatureLoop', + 'sample Cernox', + channel = 1, + switcher = 'lsc_channel', + minrange=11, + vexc = 5, + range=22, + tolerance = 0.1, + htrrng=5, + minheater=5e-4, +) + +Mod('ts', + 'frappy_psi.parmod.SwitchDriv', + 'automatically switching between ts_low and ts_high', + value=Param(unit='K'), + low='ts_low', + high='ts_high', + #min_high=0.6035, + #max_low=1.6965, + min_high=0.6, + max_low=1.7, + tolerance=0.1, +) diff --git a/addons/haake_add_cfg.py b/addons/haake_add_cfg.py new file mode 100644 index 0000000..c18905f --- /dev/null +++ b/addons/haake_add_cfg.py @@ -0,0 +1,15 @@ +Node('haake.frappy.psi.ch', + 'additional haake waterbath', +) + +Mod('haake_io', + 'frappy_psi.haake.HaakeIO', + '', + uri='sans-sample-ts:3006', +) + +Mod('T2', + 'frappy_psi.haake.TemperatureLoop', + 'second haake', + io = 'haake_io', +) diff --git a/addons/laser_cfg.py b/addons/laser_cfg.py new file mode 100644 index 0000000..e6af042 --- /dev/null +++ b/addons/laser_cfg.py @@ -0,0 +1,22 @@ +Node('pdld_laser.psi.ch', + 'PDLD laser', + interface = 'tcp://5000', +) + +Mod('laser_io', + 'frappy_psi.pdld.IO', + 'laser IO', + uri='serial:///dev/ttyUSB0?baudrate=9600', +) + +Mod('laser', + 'frappy_psi.pdld.Laser', + 'laser switch', + io='laser_io', +) + +Mod('laser_power', + 'frappy_psi.pdld.LaserPower', + 'laser power', + io='laser_io', +) diff --git a/addons/leidenexp_cfg.py b/addons/leidenexp_cfg.py new file mode 100644 index 0000000..e479c42 --- /dev/null +++ b/addons/leidenexp_cfg.py @@ -0,0 +1,244 @@ +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:3001' # k2601b used for HC experiment as heater +srbridge_uri = 'linse-leiden-ts:3008' # Stanford Research Resistance Bridge +calib_uri = 'linse-leiden-ts:3006' +# ls370 on port 3004: see ~/sea/tcl/leiden.config + +sea_cfg = 'leidenexp.addon' + +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', + 'Tpt50', 'Tpt3high', 'Tpt3low']: + 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 " means disabled, "if <title>" means enabled + +if 'calibsetup': + IO('io_cal', leiden_uri) + + Mod('V_cmn', + 'frappy_psi.lakeshore340.RawSensor', + 'voltage for cmn', + io = 'io_cal', + value = Param(unit='V'), + channel = 'B' + ) + + Mod('T_cmn', + 'frappy_psi.softcal.Function', + '', + value=Param(unit='K'), + rawsensor='V_cmn' + formula='0.85e-3 + 16.33005 / (1000 * x - 60.83)' + ) + + Mod('V_fixp', + 'frappy_psi.lakeshore340.RawSensor', + 'voltage for fixp', + io = 'io_cal', + value = Param(unit='V'), + channel = 'A' + ) + + Mod('io_mixhtr', + 'frappy.core.Proxy', + 'proxy to main frappy server', + remote_class = 'frappy_psi.dilhtr.IO', + uri = f'tcp://localhost:15118', + module='io_htr', + ) + + Mod('mix_htr4cmn', + 'frappy_psi.dilhtr.WrappedHeater', + 'mix heater', + io='io_mixhtr', + ) + + Mod('drive_cmn', + 'frappy_psi.picontrol.PIctrl', + 'controlled cmn temperature', + input_module = 'T_cmn', + output_module = 'mix_htr4cmn', + 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', + ) diff --git a/main/leiden_cfg.py b/main/leiden_cfg.py new file mode 100644 index 0000000..16dc0d4 --- /dev/null +++ b/main/leiden_cfg.py @@ -0,0 +1,135 @@ +Node('leiden.psi.ch', + 'Leiden Dilution, basic config', + 'tcp://5000', + secondary = ['ws://8051'] +) + +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') +IO('io_ccr', 'linse-521e-ts:3003') + +# 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', + uri = 'localhost:8648', # for prep8. TODO: check why this is not taken automatically +) + +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('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='io_tcs', + channel=2, + ) + +Mod('mix_htr', + 'frappy_psi.dilhtr.WrappedHeater', + 'mixing chamber heater', + io='io_htr', + ) + +Mod('drive_mix', + 'frappy_psi.picontrol.PIctrl', + 'controlled mix ch. temperature', + input_module = 'T_mix', + output_module = 'mix_htr', + output_min = 0, + output_max = 0.02, + p = 5, + itime = 60, + ) + +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('p0', + 'frappy_psi.leidenghs.Pressure', + 'test pressure p0', + io='io_ghs', + addr='p0', + scale=2**12 / 1e4, + ) + +for pname in ['p2', 'p3', 'p4', 'p5']: + Mod(pname, + 'frappy_psi.leidenghs.Pressure', + 'pressure {pname}', + io='io_ghs', + addr=pname, + ) + +Mod('p6', + 'frappy_psi.leidenghs.PressureLimit', + 'test pressure with limits p6', + io='io_ghs', + addr='p6', + offset=0, + ) + +Mod('p7', + 'frappy_psi.leidenghs.PressureLimit', + 'test pressure with limits p7', + io='io_ghs', + addr='p7', + offset=0, + ) + +Mod('flow', + 'frappy_psi.leidenghs.PressureLimit', + 'condense flow', + io='io_ghs', + addr='flow', + offset=0, + value=Param(unit='ln/min'), + scale = 2**15 / 1e2, + ) + +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('ccr_compressor', +# 'frappy_psi.cp2800.CP2800', +# 'cryocooler compressor', +# io='io_ccr', +#) diff --git a/main/leidenghs_cfg.py b/main/leidenghs_cfg.py new file mode 100644 index 0000000..2ea9e17 --- /dev/null +++ b/main/leidenghs_cfg.py @@ -0,0 +1,85 @@ +Node('leidenghs_test.test', + 'test leiden GHS driver', + 'tcp://5000', + ) + +Mod('io', + 'frappy_psi.leidenghs.IO', + 'leiden GHS communication', + uri='linse-521e-ts:3001', + ) + +for valve in {'mix': 1, # mixture compressor + 'bypass': 2, + '15': 3, + '16': 4, + 'gate18': 6, + '4': 7, + '5': 9, + 'reset': 10, + '9': 12, + '14': 13, + '13': 15, + 'ledtest': 16, + '12': 18, + '10': 19, + '11': 21, + 'A0': 22, + '7': 24, + 'S3': 25, + '6': 27, + '17': 28, + '8': 30, + '1': 31, + 'S2': 33, + '3': 34, + '2': 36, + '0': 37, + 'S1': 39, + 'A9': 40, + 'A8': 42, + 'A2': 43, + 'S5': 45, + 'A10': 46, + 'start': 48, + 'A5': 49, + 'A7': 51, + 'auto': 54, + 'A4': 55, + 'A6': 57, + 'S4': 58, + 'A3': 60, + 'He3': 61, # condense He3 + 'He4': 62, # condense He4 + 'circulation': 63, # normal circulation + 'recovery': 64, + }: + name = 'n' + valve if valve.isdecimal() else valve + Mod(name, + 'frappy_psi.leidenghs.Valve', + f'test valve {valve}', + io='io', + key=valve, + ) + +Mod('P1', + 'frappy_psi.leidenghs.Pressure', + 'test pressure P1', + io='io', + addr='P1', + ) + +Mod('P2', + 'frappy_psi.leidenghs.Pressure', + 'test pressure P2', + io='io', + addr='P2', + ) + +Mod('P6', + 'frappy_psi.leidenghs.PressureLimit', + 'test pressure with limits P6', + io='io', + addr='P6', + offset=0, + ) diff --git a/main/tfa_cfg.py b/main/tfa_cfg.py new file mode 100644 index 0000000..236d6c7 --- /dev/null +++ b/main/tfa_cfg.py @@ -0,0 +1,20 @@ +Node('TFA10.psi.ch', + 'thermofisher water bath', + 'tcp://5000', + ) + +Mod('io', + 'frappy_psi.thermofisher.ThermFishIO', + 'connection for ThermoFisher A10', + uri='tcp://ldm-fi-ts:3002', + ) + +Mod('T', + 'frappy_psi.thermofisher.TemperatureLoopA10', + 'holder temperature', + io='io', + meaning=['temperature', 20], + target=Param(max=100), + tolerance=0.5, + settling_time=20, + ) diff --git a/sea/cp1000_cfg.py b/sea/cp1000_cfg.py new file mode 100644 index 0000000..610331c --- /dev/null +++ b/sea/cp1000_cfg.py @@ -0,0 +1,14 @@ +Node('cp1000.addon.sea.psi.ch', + '''dry system''', +) +Mod('sea_addons', + 'frappy_psi.sea.SeaClient', + 'addons sea connection for cp1000.addon', + config = 'cp1000.addon', + service = 'addons', +) +Mod('cp2800', + 'frappy_psi.sea.SeaWritable', '', + io = 'sea_addons', + sea_object = 'cp2800', +) diff --git a/stick/fibrestick_cfg.py b/stick/fibrestick_cfg.py new file mode 100644 index 0000000..598c55e --- /dev/null +++ b/stick/fibrestick_cfg.py @@ -0,0 +1,37 @@ +Node('fibrestick.psi.ch', + 'stick with laser fibre', +) + +Mod('sea_stick', + 'frappy_psi.sea.SeaClient', + 'SEA stick connection', + config='fibre.stick', + service='stick', +) + +Mod('ts', + 'frappy_psi.sea.SeaReadable', '', + meaning=['temperature', 30], + io='sea_stick', + sea_object='tt', + json_file='ma11.config.json', + rel_paths=['ts'], +) + +Mod('laser_io', + 'frappy_psi.pdld.IO', + 'laser IO', + uri='serial:///dev/serial/by-path/pci-0000:00:14.0-usb-0:4.4.4.2:1.0-port0?baudrate=9600', +) + +Mod('laser', + 'frappy_psi.pdld.Laser', + 'laser switch', + io='laser_io', +) + +Mod('laser_power', + 'frappy_psi.pdld.LaserPower', + 'laser power', + io='laser_io', +) diff --git a/stick/msparestick_cfg.py b/stick/msparestick_cfg.py new file mode 100644 index 0000000..4e2a3d2 --- /dev/null +++ b/stick/msparestick_cfg.py @@ -0,0 +1,34 @@ +Node('mspare.stick.sea.psi.ch', + 'MA generic sample stick', +) + +Mod('sea_stick', + 'frappy_psi.sea.SeaClient', + 'SEA stick connection', + config='mspare.stick', + service='stick', +) + +Mod('ts', + 'frappy_psi.sea.SeaReadable', + 'sample stick temperature', + io='sea_stick', + json_file='ma6.config.json', + sea_object='tt', + rel_paths=['ts', 'setsamp'], + meaning=['temperature', 30], +) + + +""" +Mod('ts', + 'frappy_psi.parmod.Converging', + 'drivable stick T using setsamp', + meaning=['temperature', 25], + unit='K', + read='tsam.value', + write='tsam.setsamp', + settling_time=20, + tolerance=1, +) +"""