Compare commits
2 commits
24eef33ad2
...
d7d69de548
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d7d69de548 | ||
|
|
149fde3ebd |
2 changed files with 44 additions and 5 deletions
|
|
@ -262,15 +262,16 @@ function doHIST(Ch, x) {
|
|||
}
|
||||
|
||||
BEGIN {
|
||||
NCh=12
|
||||
for (i=0; i<NCh; i++) name[i] = substr("CBAFEDIHGLKJ",i+1,1)
|
||||
NDCh = 24
|
||||
NCh = 48
|
||||
for (i=0; i<NCh; i++) name[i] = int(i/24) substr("ABCDEFGH",i%8+1,1) (int(i/8)%3)
|
||||
minV=-100
|
||||
maxV=5000
|
||||
resV=0.25
|
||||
# AHEPAM BGO slice 1 only:
|
||||
NCh = 24
|
||||
NDCh = 0
|
||||
for (i=0; i<NCh; i++) name[i] = "1:" i
|
||||
#NCh = 24
|
||||
#NDCh = 0
|
||||
#for (i=0; i<NCh; i++) name[i] = "1:" i
|
||||
}
|
||||
|
||||
function print_HIST(fn) {
|
||||
|
|
|
|||
38
dorn_hk.py
Executable file
38
dorn_hk.py
Executable file
|
|
@ -0,0 +1,38 @@
|
|||
#! /usr/bin/python3
|
||||
|
||||
import dorn
|
||||
import sys, getopt
|
||||
|
||||
oo,ff = getopt.getopt(sys.argv[1:], "saw:n:c:",
|
||||
["seth", "ahbgo", "what=", "slice=", "channels="])
|
||||
|
||||
what="print"
|
||||
sl = None
|
||||
ch = list(range(7))
|
||||
|
||||
for o,v in oo:
|
||||
if o=="-s" or o=="--seth":
|
||||
dorn.CONFIG.seth()
|
||||
if o=="-a" or o=="--ahbgo":
|
||||
dorn.CONFIG.ahbgo()
|
||||
if o=="-w" or o=="--what":
|
||||
what = v
|
||||
if o=="-n" or o=="--slice":
|
||||
sl = int(v)
|
||||
if o=="-c" or o=="--channels":
|
||||
ch = list(map(int, v.split(",")))
|
||||
|
||||
T = 0
|
||||
for fn in ff:
|
||||
with open(fn) as f:
|
||||
for l in f:
|
||||
if l[:2] == "H ":
|
||||
T = int(l.split()[1])
|
||||
continue
|
||||
if not T:
|
||||
continue
|
||||
h = dorn.hk(sl, what=what, data=l)
|
||||
if not h:
|
||||
continue
|
||||
for c in ch:
|
||||
print(T, c, h[c])
|
||||
Loading…
Add table
Add a link
Reference in a new issue