move a lot of stuff to git

This commit is contained in:
l_samenv
2025-01-17 17:05:02 +01:00
parent be52adfaef
commit b8218e6203
30 changed files with 647 additions and 16 deletions

View File

@ -96,7 +96,7 @@ def treat(action, instrument='', years='past', vars=None):
if not vars:
varlist = list(glob('*'))
else:
varlist = vars
varlist = vars
for variable in varlist:
if action == COMPRESS:
if os.path.isdir(logdir+variable):
@ -110,7 +110,7 @@ def treat(action, instrument='', years='past', vars=None):
if os.path.isfile(gzdir + variable + '.gz'):
expand(logdir, gzdir, variable)
else:
print '%s is missing' % (gzdir + variable + '.gz')
print(gzdir + variable + '.gz', 'is missing')
if __name__ == '__main__':
action = COMPRESS
@ -125,6 +125,8 @@ if __name__ == '__main__':
cleanup = False
elif opt == '-c':
cleanup = False
elif opt == '-n':
action = None
elif opt == '-i':
addto = instruments
elif opt == '-p':
@ -164,10 +166,10 @@ if __name__ == '__main__':
print("years: %s" % repr(years))
print("vars: %s" % ", ".join(vars))
for instrument in instruments:
print(instdir(instrument))
print('instrument:', instdir(instrument))
if cleanup:
for pat in removedirs:
print pat
print('remove', pat)
gap = 0
t0 = time.time()
t1 = t0
@ -182,4 +184,5 @@ if __name__ == '__main__':
gap += 1
time.sleep(min(1.0, now - t1)) # be nice
t1 = now
treat(action, instrument, years, vars)
if action:
treat(action, instrument, years, vars)

View File

@ -1,10 +0,0 @@
# create du.out with (for example)
#
# du -cd 1 logger/2016 > du.out
with open('du.out') as f:
duout = [line.split(None,1) for line in f.read().split('\n')]
while len(duout[-1]) != 2:
duout = duout[:-1]
for size, file in sorted([(int(size), file) for size, file in duout]):
print(size, file)

10
tcl/ah2550.addon Normal file
View File

@ -0,0 +1,10 @@
addonDesc = Andeen Hagerlin 2550 Capacitance Bridge
makenv cap -driver ah2550
makenv capslope -driver slope /cap/cap
GraphAdd cap.cap pF Cap blue
GraphAdd cap.loss tand Loss blue
GraphAdd capslope pF/min capslope blue

8
tcl/altcur.job Normal file
View File

@ -0,0 +1,8 @@
set ival 0.5
while {$ival<3 } {
cs iset $ival
wait 21
cs iset -$ival
wait 21
}

7
tcl/coil2.stick Normal file
View File

@ -0,0 +1,7 @@
stickDesc = coil reading (channel D)
stick_sensors undefined coil
catch {
eval "[hgetpropval /lnv switchgraph] 1"
}

65
tcl/dilcal.addon Normal file
View File

@ -0,0 +1,65 @@
addonDesc = ULT calibration setup
# LakeShore 372 Thermometers 1-6
makenv res1 -driver 372_lsc -port dilsc-ls2.psi.ch:7777 {
lsc_sensor rx1 1 -sensor U08127 -excitation 20uV -filter 10
lsc_sensor rx2 2 -sensor raw -excitation 20uV -filter 10
lsc_sensor rx3 3 -sensor raw -excitation 20uV -filter 10
lsc_sensor rx4 4 -sensor raw -excitation 20uV -filter 10
lsc_sensor rx5 5 -sensor raw -excitation 20uV -filter 10
#lsc_sensor rx6 6 -sensor raw -excitation 20uV -filter 10
# heater output 0 (=sample heater) for channel 4 (still)
lsc_loop set -loop 0 -channel 1 -maxheater 100mA -resist 100
}
# LakeShore 372 Thermometers 7-13
makenv res2 -driver 372_lsc -port linse-se1-ls.psi.ch:7777 {
lsc_sensor rx7 1 -sensor raw -excitation 20uV -filter 10
lsc_sensor rx8 2 -sensor x165053 -excitation 20uV -filter 10
lsc_sensor rx9 3 -sensor raw -excitation 20uV -filter 10
lsc_sensor rx10 4 -sensor raw -excitation 20uV -filter 10
lsc_sensor rx13 5 -sensor raw -excitation 20uV -filter 10
# heater output 0 (=sample heater) for channel 4 (still)
lsc_loop set -loop 0 -channel 1 -maxheater 0.5W -resist 15
}
# Stuff for calibrations with fixed point device
#defineTemperature tmix
makenv cmn -driver cmnnanov -port ldmse-d910-ts.psi.ch:3001
GraphAdd cmn.u1 V cmn
GraphAdd cmn.u2 V fixp
makenv softloop -driver piloop -invar "/cmn/temp" -outvar "res2 set/manualpower" \
-inpfunc 1 -outfunc 1 -outlinear 1e-7 -precision 1e-15 -outmin 1e-11 -outmax 0.1
GraphAdd cmn.temp K
GraphAdd softloop.reg K cmn_reg
GraphAdd softloop.target K cmn_target
GraphAdd res2.rx8 K T_rx8
GraphAdd res1.rx1.raw Ohm
GraphAdd res1.rx2.raw Ohm
GraphAdd res1.rx3.raw Ohm
GraphAdd res1.rx4.raw Ohm
GraphAdd res1.rx5.raw Ohm
#GraphAdd res1.rx6.raw Ohm
GraphAdd res2.rx7.raw Ohm
GraphAdd res2.rx8.raw Ohm
GraphAdd res2.rx9.raw Ohm
GraphAdd res2.rx10.raw Ohm
#GraphAdd res2.rx11.raw Ohm
#GraphAdd res2.rx12.raw Ohm
GraphAdd res2.rx13.raw Ohm

6
tcl/dilscf.config Normal file
View File

@ -0,0 +1,6 @@
deviceDesc = DILSC through Frappy
set ::secop_version 4
makenv frappy -driver secop -port dilsc:5000

51
tcl/drivers/sdvm.tcl Normal file
View File

@ -0,0 +1,51 @@
# software dvm
namespace eval sdvm {
}
if {![namespace exists trun]} {
source drivers/trun.tcl
}
proc stdConfig::sdvm args {
variable name
variable path
variable node
scanargs $args var -invar -outvar
# custinp, custout:
# custom input / output function
# log: allow choice between linear and logarithmic
# none: only linear
# else: a custom function. the last arguments are either
# <value> forward conversion
# inv <value> inverted conversion
variable hostport none
controller dumprot
}
obj dvm -upd out
prop lastinput 0
prop custinp $custinp1
prop custinp $custinp2
kids "$title settings" {
node dctime par $dctime
prop help {time held at one polarity [sec]}
node current par $current
prop help {set current in A}
node invar -text out
default 0
prop check piloop::setinvar
prop write stdSct::completeUpdate
prop visible false
node outvar -text par $outvar
prop visible false

30
tcl/drivers/srsbga244.tcl Normal file
View File

@ -0,0 +1,30 @@
namespace eval srsbga244 {} {
}
proc stdConfig::srsbga244 {} {
controller std "" 5
prop read srsbga244::read
prop update srsbga244::update
obj He3 rd
prop cmd RATO?1%
kids He3 {
# node prx rd -text
# prop cmd PRX
node press rd
prop cmd PRES?bar
}
}
proc srsbga244::read {} {
sct send "[sct cmd]\r\n"
return update
}
proc srsbga244::update {} {
sct update [sct result]
return idle
}

64
tcl/dryrex.config Normal file
View File

@ -0,0 +1,64 @@
deviceDesc = dry system
if {"[sicsdescriptor t]" != "notfound"} {
clientput [listexe]
stopexe t
clientput success
success
clientput "removeobject t"
removeobject t
}
# --- configuration script
config listen 1
# create the device
# change X77456 for X154360 when calibration exists
## Configuration for attocube testing:
#makenv tt -driver [lsdriver] {
# lsc_sensor tm A -sensor X71741 -sensorname top
# lsc_sensor ts B -sensor X68433 -sensorname bottom
# lsc_sensor tc C -sensor X154360 -sensorname middle
# lsc_loop set -loop 1 -channel B -maxheater 25W -resist 25Ohm
#}
# Configuration for braid thermal conductivity measurements:
makenv tt -driver [lsdriver] {
lsc_sensor ts B -sensor X154360 -sensorname stage2
lsc_loop set -loop 1 -channel B -maxheater 25W -loopname braid -resist 50Ohm
}
tt set/limit 315
tt set/prop 15
tt set/integ 10
catch {
enableTable 0
}
makenv tx -driver 370_lsc {
lsc_sensor S1 -channel 1 -sensor ruox002
lsc_sensor S2 -channel 3 -sensor ruox001
#please set sample Thermpmeter to the real calib
GraphAdd tx.S1 K S1 yellow
GraphAdd tx.S2 K S2 cyan
}
# --- compressor ---
makenv cp2800 cp2800
GraphAdd cp2800.inp_water_t C InpWater_C red
GraphAdd cp2800.out_water_t C OutWater_C blue
GraphAdd cp2800.oil_t C Oil_C green
GraphAdd cp2800.helium_t C Helium_C magenta
GraphAdd cp2800.high_side_p_min psi High_psi_min red
GraphAdd cp2800.high_side_p_max psi High_psi_max orange
GraphAdd cp2800.low_side_p_min psi Low_psi_min green
GraphAdd cp2800.low_side_p_max psi Low_psi_max dark_green

55
tcl/fitest.config Normal file
View File

@ -0,0 +1,55 @@
deviceDesc = FI control (new FI control from valentin)
makenv tt -driver fictrl -port ldm-fi-ts:3001 {
voltscale 17.8
min_resist 0.02
max_resist 0.05
current_offset -1.11
voltage_offset 0.05
}
defineTemperature tt
#GraphAdd tt.t1 K T1
#GraphAdd tt.t2 K T2
#GraphAdd tt.t3 K T3
GraphAdd tt.t4 K T4
GraphAdd tt.target K T_set
#GraphAdd tt.t1.raw mV V1
#GraphAdd tt.t2.raw mV V2
#GraphAdd tt.t3.raw mV V3
GraphAdd tt.t4.raw mV V4
GraphAdd tt.tref K_2
GraphAdd tt.tout K_2
GraphAdd tt.power W power
GraphAdd tt.htr % htr
GraphAdd tt.resist Ohm resist
GraphAdd pv mbar p_vac
GraphAdd tt.s1 i s1
GraphAdd tt.s2 i s2
GraphAdd tt.s3 i s2
GraphAdd tt.s4 i s2
#GraphAdd tt.cool i cool
GraphAdd tt.slope K/min
GraphAdd tt.sramp K/min
#GraphAdd tt.powerset W
#GraphAdd tt.powerprop W
GraphAdd tt.maxpower W
tt t1/curve type-c
tt t2/curve type-c
tt t3/curve type-k
tt t4/curve type-k
tt ctrlchan 4
tt ramp 99
makenv pv -driver pfeiffertpg -port ldm-fi-ts:3002
makenv table -driver table /tt/t1 {
"tt smooth" "300:500 400:160 500:120 700:60 1000:30"
"tt prop" "300:6 500:3 700:1.5 1000:1"
"tt int" "300:40 500:20 700:10 1000:10"
"tt maxpower" "300:150 500:200 1000:500 1400:2000 1800:3000"
}

8
tcl/flowsas.config Normal file
View File

@ -0,0 +1,8 @@
deviceDesc = flowsas
set ::secop_version 4
makenv secop -driver secop
#debug _secop
#dolater 0 _secop poll /secop 1 read test

6
tcl/frappy.addon Normal file
View File

@ -0,0 +1,6 @@
addonDesc = FRAPPY history recorder for addons
set ::secop_version 4
set nr [string range $serverport end-1 end]
makenv frappy_main -driver secop -port [frappy_port addons]

5
tcl/frappy.stick Normal file
View File

@ -0,0 +1,5 @@
stickDesc = FRAPPY history recorder for stick
set ::secop_version 4
makenv frappy_main -driver secop -port [frappy_port stick]

18
tcl/heatramp.job Normal file
View File

@ -0,0 +1,18 @@
hola reset
proc measure { T } {
clientput set heater to $T W
tt setsamp/manualpower $T
wait 3600
clientput DONE!
}
wait 3600
hola file "20240912_thermalcond.dat"
hola command measure
hola vars tt res.s1 res.s2 res.s3 res.s4 res.s5 tt.setsamp/power
hola measpars 600 tt res.s1 res.s2 res.s3 res.s4 res.s5 tt.setsamp/power
hola open tt res.s1 res.s2 res.s3 res.s4 res.s5 tt.setsamp/power
hola do 0.0 0.012 0.025 0.05 0.075 0.1 0.125 0.15 0.175 0.2 0.225 0.25 0.275 0.3 0.325 0.35 0.375 0.4 0.425 0.45 0.475 0.5 0.0

8
tcl/iv.addon Normal file
View File

@ -0,0 +1,8 @@
addonDesc = k2601b current source and k2182a voltmeter
makenv cs -driver k2601b
makenv vm -driver nanov
GraphAdd vm.u1 V Voltage
GraphAdd cs.iset A Current

7
tcl/ls372flamedil.addon Normal file
View File

@ -0,0 +1,7 @@
addonDesc = additional LakeShore 372
makenv ts -driver 372_lsc -port flamedil-ls.psi.ch:7777 {
lsc_sensor t2 1 -sensor rx198 -excitation 20uV -filter 1
lsc_sensor ts 3 -sensor cx198 -excitation 20uV -filter 1
}

16
tcl/ls372sc.addon Normal file
View File

@ -0,0 +1,16 @@
addonDesc = additional LakeShore 372
#-sensor abs: converted value will be absolute value (-sensor raw does respect sign)
makenv ls_dilsc -driver 372_lsc -port dilsc-ls2.psi.ch:7777 {
lsc_sensor plato 7 -sensor QT2-PS1_RuO -excitation 20uV -filter 1 -dwell 3
#lsc_sensor chip 2 -sensor 2023-BC1_2 -excitation 20uV -filter 1 -dwell 3
#lsc_sensor chip 8 -sensor 2024-BC1-V2 -excitation 20uV -filter 1 -dwell 3
#lsc_loop heater_plato -loop 0 -channel 1 -maxheater 10mA -resist 320 -loopname plato
#lsc_sensor plato 8 -sensor U08910 -excitation 20uV -filter 1 -dwell 3
lsc_sensor puck A -sensor U08127 -excitation 20uV -filter 1 -dwell 3
lsc_loop heater_plato -loop 0 -channel A -maxheater 10mA -resist 84 -loopname plato
}
GraphAdd ls_dilsc.plato.raw Ohm T_plato.raw
GraphAdd ls_dilsc.chip.raw Ohm T_chip.raw

41
tcl/ma10b.config Normal file
View File

@ -0,0 +1,41 @@
deviceDesc = MA10 + FRAPPY history recorder for magfield
set ::secop_version 4
set ins [result instrument]
if {[string match "prep*" $ins]} {
set nr [string range $ins end end]
} else {
error "runs on prep0-9 only"
}
makenv frappy_main -driver secop -port localhost:1511$nr
makeHePump
deviceDesc = 10 Tesla vertical cryomagnet
defineTemperature tt
device stick_menu "ma10 dil2 dil3 dil4 heliox oven2 coil"
makenv tt -driver [lsdriver] {
lsc_sensor tm A -sensor x112386 -sensorname VTI
lsc_sensor ts C -sensorname sample
lsc_sensor ts_2 D -sensor code -sensorname sample2
lsc_loop set -loop 1 -channel A -maxheater 32W -resist 80Ohm -color green
if {[lsdriver] eq "336_lsc"} {
lsc_loop setsamp -loop 2 -channel C -maxheater 62.5W -resist 20Ohm -color dark_green
}
}
tt set/limit 310
makeCCU4 ma10 nv_release_blocked
hupdate /nv/set 1.8
# increase motor current
cc mc 75
makenv table -driver table /tt/tm {
"tt set/prop" "50:50 300:20"
"tt set/integ" "10:50 50:20 300:5"
"tt dblctrl/int2" "2:10 20:50 50:300 120:500 300:800"
"tt dblctrl/prop_up" "20:0.1 50:0.4"
"tt dblctrl/prop_lo" "20:0.1 50:0.8"
}

View File

@ -1,3 +1,3 @@
\stickDesc = MA6 stick with heater and pt-1000 sensor
stickDesc = MA6 stick with heater and pt-1000 sensor
stick_sensors x63161 pt-1000

13
tcl/pestick.stick Normal file
View File

@ -0,0 +1,13 @@
stickDesc = PE stick via Frappy / for MB11 / VarioxB
set ::secop_version 4
set ins [result instrument]
if {[string match "prep*" $ins]} {
set nr [string range $ins end end]
makenv frappy_stick -driver secop -port localhost:1521$nr
} elseif {[lindex [split [info hostname] .] 0] ne $ins} {
error "runs on instruments or prep0-9 only"
} else {
makenv frappy_stick -driver secop -port localhost:15201
}

11
tcl/ppms_frappy2.config Normal file
View File

@ -0,0 +1,11 @@
deviceDesc = PPMS FRAPPY history recorder, with stick
set ::secop_version 4
makenv frappy_main -driver secop -port pc12694:5000
makenv frappy_stick -driver secop -port localhost:15201
#makenv frappy_addons -driver secop -port localhost:15301
#debug _secop
#dolater 0 _secop poll /secop 1 read test

50
tcl/rrr.job Normal file
View File

@ -0,0 +1,50 @@
set Tmax 300
set Tmin 4.0
set Tramp 5
set Imax 1.0
proc measres {iset dv} {
cs iset $iset
wait 15
set Vpos [result vm u1]
cs iset -$iset
wait 15
set Vneg [result vm u1]
set res [expr ($Vpos - $Vneg) / (2. * $iset)]
set inew [expr $dv/ ($Vpos - $Vneg) * $iset]
return [list $res $inew]
}
tt set/ramp $Tramp
set iset 1.0
set resistance 0
set rhigh 0
set rlow 1
cs Enable 1
while {[result tt] > [expr $Tmin * 1.1] | [result tt] < $Tmax } {
set test [measres $iset 1E-7]
set resistance [lindex $test 0]
set iset [format "%.3f" [lindex $test 1]]
if {$iset > $Imax} {
set iset $Imax
}
clientput [result tt] ${resistance}
if {[result tt] > 290} {
set rhigh $resistance
set thigh [result tt]
}
if {[result tt] < 6.0} {
set rlow $resistance
set tlow [result tt]
}
}
clientput resistance at ${thigh} K : ${rhigh} Ohm
clientput resistance at ${tlow} K : ${rlow} Ohm
clientput RRR : [ expr $rhigh / $rlow ]

28
tcl/srrr.job Normal file
View File

@ -0,0 +1,28 @@
proc measres {iset dv} {
cs iset $iset
wait 15
set Vpos [result vm u1]
cs iset -$iset
wait 15
set Vneg [result vm u1]
set res [expr ($Vpos - $Vneg) / (2. * $iset)]
set inew [expr $dv/ ($Vpos - $Vneg) * $iset]
return [list $res $inew]
}
set iset 1.0
set resistance 0
cs Enable 1
while {0 < 1 } {
set test [measres $iset 1E-7]
set resistance [lindex $test 0]
set iset [format "%.3f" [lindex $test 1]]
if {$iset > 1.0} {
set iset 1.0
}
clientput ${resistance} Ohm
}

7
tcl/srsbga244.addon Normal file
View File

@ -0,0 +1,7 @@
addonDesc = SRS binary gas analyser 244 RS232
makenv bga -driver srsbga244 -port ldmprep12-ts:3004
GraphAdd bga % He3 blue
GraphAdd bga.press bar bga

13
tcl/test_vf.config Normal file
View File

@ -0,0 +1,13 @@
deviceDesc = test ILL furnace with iono pi max
set ::secop_version 4
makenv secop -driver secop
makenv hvac -driver pfeiffertpg
makenv softloop -driver piloop -invar "/t" -outvar "htr target" \
-inpfunc 0 -outfunc 0 -outlinear 1e-9 -precision 1e-10 -outmin 0 -outmax 30 -int 100 -prop 200
GraphAdd hvac mbar hvac blue

15
tcl/tramp.job Normal file
View File

@ -0,0 +1,15 @@
hola reset
proc measure { T } {
clientput set T to $T
drive tt $T
clientput DONE!
}
hola file "20230706_CCR2ht.dat"
hola command measure
hola vars tt tm te tk tt.set/power
hola measpars 90 tt tm te tk tt.set/power
hola open tt tm te tk tt.set/power
hola do 480 steps -20 40

29
tcl/uzhstick_v2.config Normal file
View File

@ -0,0 +1,29 @@
\deviceDesc = UZH_pulsed_magnet_chamber
#defineTemperature cf
#makenv cf -driver itcm -port lollypop-ts.psi.ch:3001
makenv tt -driver 336_lsc {
lsc_sensor tm A -sensor X131175 -sensorname magnet
# lsc_sensor ts B -sensor x148906 -sensorname sample
# lsc_sensor ts C -sensor X148903 -sensorname sample
#lsc_loop set -loop 1 -channel A -maxheater 60W -resist 40Ohm -color green
}
#tt set/prop 25
#tt set/integ 20
#tt dblctrl/int2 100
#makeCCU4 lollyp he nv
#cc hav 1
#cc hea 1
#nv ctrl/adjust_minpulse 0
#nv ctrl/openpulse 0
#nv ctrl/prop_o 0.5
#nv ctrl/prop_c 0.5
#hupdate /hepump 3
#hepump calib 1
#dolater 1 hepump 3

58
tcl/varioxb_sea.config Normal file
View File

@ -0,0 +1,58 @@
deviceDesc = 100mm Variox
device stick_menu "mb11 dil5 varioxb_sea"
defineTemperature tvs
makenv tvs -driver itctemp -port linvb-ts:3001 -controller _tt DB6.T1 DB1.H1
GraphAdd tvs K T_VTIs red
GraphAdd tvs.set K T_stat_set orange
GraphAdd tvs.pow W pow_tvs red
#GraphAdd tvs.raw Ohm R_tvs red
makenv tvd -driver itctemp -port linvb-ts:3001 -controller _tt DB7.T1 DB2.H1
GraphAdd tvd K T_VTId magenta
GraphAdd tvd.set K T_dyn_set violet
GraphAdd tvd.pow W pow_tvd magenta
#GraphAdd tvd.raw Ohm R_tvd magenta
makenv pstat -driver itcpress -port linvb-ts:3001 -controller _tt DB5.P1 DB3.G1
GraphAdd pstat mbar p_stat
GraphAdd pstat.pos % nv_stat
GraphAdd pstat.set mbar p_stat_set
makenv pdyn -driver itcpress -port linvb-ts:3001 -controller _tt DB8.P1 DB4.G1
GraphAdd pdyn mbar p_dyn
GraphAdd pdyn.pos % nv_dyn
GraphAdd pdyn.set mbar p_dyn_set
makeIpsLev -port linvb-ts:3002 -controller _ta -slot DB4
makenv tneck1 -driver itctemp -port linvb-ts:3002 -controller _ta MB1.T1 MB0.H1
makenv tneck2 -driver itctemp -port linvb-ts:3002 -controller _ta DB6.T1 DB1.H1
makenv tnvs -driver itctemp -port linvb-ts:3002 -controller _ta DB7.T1 DB2.H1
makenv tnvd -driver itctemp -port lnivb-ts:3002 -controller _ta DB8.T1 DB3.H1
makeN2Fill ccu4ilm {
ln2fill lowlevel 30
ln2fill highlevel 95
ln2fill minfillminutes 8
ln2fill maxfillminutes 40
ln2fill minholdhours 24
ln2fill maxholdhours 96
# appendVars ln2fill.smooth/%/N2smooth/13
}
GraphAdd tneck1 K_2 T_neck1
GraphAdd tneck1.pow W pow_neck1
GraphAdd tneck2 K_2 T_neck2
GraphAdd tneck2.pow W pow_neck2
GraphAdd tnvs K_2 T_nvs
#GraphAdd tnvs.pow W pow_nvs
GraphAdd tnvd K_2 T_nvd
#GraphAdd tnvd.pow W pow_nvd
setstickrot linvb-ts:3004

9
tcl/varioxb_sea.stick Normal file
View File

@ -0,0 +1,9 @@
stickDesc = stick for Variox B
defineTemperature ts
makenv ts -driver itctemp -port linvb-ts:3001 -controller _tt MB1.T1 MB0.H1
GraphAdd ts K T_sam blue
GraphAdd ts.set K T_sam_set cyan
GraphAdd ts.pow W pow_ts blue
GraphAdd ts.raw Ohm R_ts blue