Compare commits
2 commits
19fd4635ce
...
fc6979ecb2
| Author | SHA1 | Date | |
|---|---|---|---|
| fc6979ecb2 | |||
| 34d82f8069 |
2 changed files with 7 additions and 7 deletions
12
AHBGOx.py
12
AHBGOx.py
|
|
@ -81,7 +81,7 @@ def main():
|
|||
nameadd = nameadd + '_mV'
|
||||
u = [1.0]*18
|
||||
|
||||
if len(args.nameadd)>0:
|
||||
if args.nameadd:
|
||||
nameadd = args.nameadd[0]
|
||||
|
||||
global trigchan
|
||||
|
|
@ -97,7 +97,7 @@ def main():
|
|||
hist[i][0]=minV + resV*i
|
||||
|
||||
with fileinput.input(files=(file), encoding="utf-8") as f:
|
||||
T='unknown'
|
||||
T = None
|
||||
B1 = []
|
||||
B2 = []
|
||||
for line in f:
|
||||
|
|
@ -105,7 +105,7 @@ def main():
|
|||
if not 'EOF' in l:
|
||||
if l[0] == 'H':
|
||||
T = adc_to_T(int(l[8]))
|
||||
elif l[0] == 'EI' and not T=='unknown':
|
||||
elif l[0] == 'EI' and T is not None:
|
||||
if conditions(l,args):
|
||||
if args.tdhist:
|
||||
B1.append(CmV(l,ch[0])*u[0])
|
||||
|
|
@ -187,10 +187,10 @@ def adc_to_T(adc):
|
|||
R1 = 10000
|
||||
b = 3940
|
||||
dac = 62690
|
||||
T = 0
|
||||
if adc/(dac-adc)-1 <= 0:
|
||||
return
|
||||
alpha = np.log(R1/R25 *(dac/(dac-adc)-1))
|
||||
T = 1/(alpha/b+1/298.15) -273.15
|
||||
return T
|
||||
return 1/(alpha/b+1/298.15) -273.15
|
||||
|
||||
|
||||
def conditions(l,args):
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ import argparse
|
|||
import matplotlib.pyplot as plt
|
||||
import numpy as np
|
||||
|
||||
###the comandline interface
|
||||
###the commandline interface
|
||||
parser = argparse.ArgumentParser(
|
||||
prog='plot_hist.py',
|
||||
description='takes a .hist file as input and creates a plot')
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue