Compare commits

..

No commits in common. "c69b231dddc925c2a29194d67c4b7ee74e2c0ef1" and "de178db0a1e72cde1fe901e0c2037985be49bcc8" have entirely different histories.

6 changed files with 11 additions and 23 deletions

View file

@ -1,7 +1,5 @@
#!/usr/bin/gawk -i
@include "../pressure.awk"
/^EDB /{skip_ED++}
skip_ED && /^ED / {next}

View file

@ -34,11 +34,6 @@ doScut=100
%.HDORN: %.AHA HDORN.awk
./HDORN.awk 'isHDORN(){doHDORN()}' $< > $@
HDINST=--seth
HDTYPE=cooked
%.HD: %.AHA
../dorn_hk.py $(HDINST) --what=$(HDTYPE) $< | tr -d '[],' > $@
SIGMA=600
%.HD4BIAS: %.HDORN

16
dorn.py
View file

@ -187,23 +187,23 @@ def hk(sl, what="print", data=None):
if isinstance(data, str):
# HDORN … data line
if "x" in data:
return sl, None
return
data = data.split()
if data[0] != "HDORN":
return sl, None
return
data = list(map(int, data[1:]))
if sl is None:
sl = data[0] & 3;
if data[0] & 3 != sl:
return sl, None
return None
if what=="data":
return sl, data
return data
ND = CONFIG.n_adc()
NV = ND
data = [d & 0xfff for d in data]
data = [data[ND*i+1:ND*i+1+NV] for i in range(8)]
if what=="raw":
return sl, data
return data
Vref = CONFIG.Vref(sl)/4096
ddata = []
for a in range(8):
@ -237,9 +237,9 @@ def hk(sl, what="print", data=None):
V[H[0]] = data[a][c]
if what=="cooked":
return sl, data
return data
if what=="dict":
return sl, ddata
return ddata
r = []
for a in range(8):
@ -249,7 +249,7 @@ def hk(sl, what="print", data=None):
if what=="print":
sys.stderr.write("".join(r))
return sl, r
return r
def dorn_config(a, v=None, mes=None, slice=0):
verb = CONFIG.verbose

View file

@ -30,11 +30,11 @@ def hk_file(f):
continue
if not T:
continue
s, h = dorn.hk(sl, what=what, data=l)
h = dorn.hk(sl, what=what, data=l)
if not h:
continue
for c in ch:
print(T, s, c, h[c])
print(T, c, h[c])
if not ff:
hk_file(sys.stdin)

0
pressure.awk Executable file → Normal file
View file

View file

@ -181,7 +181,6 @@ class messagelog(asyncore.dispatcher):
self.bind(("", port))
self.logfile = None
self.open_logfile(fn)
self.jobs = []
def writable(self):
return False
@ -214,10 +213,6 @@ class messagelog(asyncore.dispatcher):
if self.sync>1:
os.fsync(self.logfile.fileno())
self.blocks += 1
if self.Jobs:
t = time.time()
for j in self.Jobs:
j.poll(t)
def Status(self, name):
return "%s socket %s file %s blocks %d" % (name, repr(self), repr(self.logfile), self.blocks)