Blame view
disp_local_LS350-T7Pro.py
2.89 KB
7047b0001 initial commit |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 |
import Gnuplot, time g= Gnuplot.Gnuplot(persist=1) # init graph g('set grid') #g('set log y') #g('set format y "%.1e"') g('set timefmt "%s"') g('set format x "%y/%m/%d - %H:%M:%S"') g('set xdata time') g('set xtics rotate by 90 right') g('n = 540') # set res2temp functions g('res2temp627(R) = 0.399341181655472610 + 10.8420092277810909 * (1000./R) + -26.4597939187660813 * (1000./R)**2 + 245.9828566655493379 * (1000./R)**3 + -668.069876596331596 * (1000./R)**4 + 1001.69882618263364 * (1000./R) **5 + -267.272089680656791 * (1000./R)**6') g('res2temp625(R) = 0.333548856582638109 + 11.7361551595386118 * (1000./R) + -31.32988932320903987 * (1000./R)**2 + 262.878643524833024 * (1000./R)**3 + -704.163538021035492 * (1000./R)**4 + 1056.6040485650301 * (1000./R)**5 + -307.057196729816496 * (1000./R)**6') g('res2temp628(R) = 0.463200932294057566 + 13.5049710820894688 * (1000./R) + -30.5191222755238414 * (1000./R)**2 + 231.098593852017075 * (1000./R)**3 + -550.122691885568202 * (1000./R)**4 + 806.038547554984689 * (1000./R)**5 + -198.510489917360246 * (1000./R)**6') g('res2temp16945(R) = 10**(3.2497 * (log10(1000./R))**2 + 5.1777 * log10(1000./R) + 2.499)') g('res2temp16943(R) = 10**(3.4738 * (log10(1000./R))**2 + 5.1198 * log10(1000./R) + 2.3681)') g('res2temp16944(R) = 10**(3.3674 * (log10(1000./R))**2 + 5.2874 * log10(1000./R) + 2.5165)') g('res2temp16941(R) = 10**(2.9486 * (log10(1000./R))**2 + 4.5862 * log10(1000./R) + 2.266)') g('res2temp16947(R) = 10**(3.4597 * (log10(1000./R))**2 + 5.2422 * log10(1000./R) + 2.4169)') g('pt100(R) = (R/100.-1)/0.003850+273.15') # plot g('plot for [file in system("find ../../../data/2016/ -name 20161*T7*.dat | sort")] file every n u 1:(pt100($3)) w l lt 1 title "pt100 lab"') g('replot for [file in system("find ../../../data/2016/ -name 20161*T7*.dat | sort")] file every n u 1:(res2temp628($4)) w l lt 2 title "table exp 628"') g('replot for [file in system("find ../../../data/2016/ -name 20161*T7*.dat | sort")] file every n u 1:(res2temp16947($5)) w l lt 3 title "4K 16947"') g('replot for [file in system("find ../../../data/2016/ -name 20161*T7*.dat | sort")] file every n u 1:(res2temp16941($6)) w l lt 4 title "Ecran PT1 16941"') g('replot for [file in system("find ../../../data/2016/ -name 20161*LS*.dat | sort")] file every n u 1:(res2temp16944($3)) w l lt 5 title "Regul 16944"') g('replot for [file in system("find ../../../data/2016/ -name 20161*LS*.dat | sort")] file every n u 1:(res2temp16945($4)) w l lt 6 title "Regul 16945"') g('replot for [file in system("find ../../../data/2016/ -name 20161*LS*.dat | sort")] file every n u 1:(res2temp16943($5)) w l lt 7 title "Regul 16943"') g('replot for [file in system("find ../../../data/2016/ -name 20161*LS*.dat | sort")] file every n u 1:(res2temp627($6)) w l lt 8 title "Regul 627"') # update try: |
7422dc704 replace 4 spaces ... |
39 40 41 42 43 44 |
while True: time.sleep(60) # print('updating plot ') # g('set autoscale') # g('rep') |
7047b0001 initial commit |
45 |
except KeyboardInterrupt: |
7422dc704 replace 4 spaces ... |
46 |
g.close() |