git-svn-id: svn+ssh://asterix.ieap.uni-kiel.de/home/subversion/stephan/solo/eda/cospi/host@8348 bc5caf13-1734-44f8-af43-603852e9ee25
56 lines
1.2 KiB
Awk
Executable file
56 lines
1.2 KiB
Awk
Executable file
#!/usr/bin/awk -f
|
|
|
|
BEGIN{U="MDDM"}
|
|
@include "RPi.awk"
|
|
|
|
BEGIN {
|
|
maxthr = 100
|
|
T = 3600
|
|
dT0 = 0
|
|
tmax=300
|
|
min_dtime=65534
|
|
|
|
pmin = 900
|
|
pmax = 1100
|
|
min_B = -0.045
|
|
|
|
# pressure correction
|
|
g = 0.002
|
|
}
|
|
|
|
isH() { iTime = Time - pTime }
|
|
|
|
isP() >= 2 {
|
|
if (p && iTime>0) {
|
|
dt = iTime
|
|
if (dt>tmax) dt = tmax
|
|
tt += dt
|
|
tp += dt*p
|
|
}
|
|
if (iTime > tmax || tt+dT0 >= T) {
|
|
if (tt>0) printf "%.0f %g %g %g %g %g %g %.1f\n", T0+tt/2, R0/tt, sqrt(R0+1)/tt, R1/tt, sqrt(R1+1)/tt, R2/tt, sqrt(R2+1)/tt, tp/tt
|
|
if (iTime > tmax) dT0=0
|
|
else dT0 = tt-T
|
|
tp = 0
|
|
tt = 0
|
|
R0 = 0
|
|
R1 = 0
|
|
R2 = 0
|
|
T0 = Time
|
|
}
|
|
if (!p) T0=Time
|
|
p = Pressure
|
|
w = exp(g*(p-1013))
|
|
pTime = Time
|
|
iTime = 0
|
|
}
|
|
|
|
p && isEE() && iTime>=0 && iTime<=tmax && $2==0 {
|
|
if (A[0] < muonthr && A[3] < muonthr) next
|
|
if (A[0] > maxthr || A[1] > maxthr || A[2] > maxthr || A[3] > maxthr) next
|
|
if (A[0] > muonthr && B[0] <= min_B) next
|
|
if (A[1] > muonthr && B[1] <= min_B) next
|
|
if (A[1] >= muonthr && A[2] < muonthr && A[1] > min_B) R1 += w
|
|
if (A[2] >= muonthr && A[1] < muonthr && A[1] > min_B) R2 += w
|
|
if (A[0] >= muonthr && A[3] >= muonthr) R0 += w
|
|
}
|