Files
python3-damaris/tests/res_test.py
T
markusro f9d8de7697
Build Debian Packages / build (bookworm, debian12) (push) Successful in 8m56s
Build Debian Packages / build (trixie, debian13) (push) Successful in 9m3s
fix return-value/deprecated API bugs, accumulation lock leaks, code cleanup
- raise instead of silent None for unsupported operands and empty negation
- validate before acquiring lock in Accumulation operators (no RLock leak)
- Accumulation._copy_provenance helper, ADC_Result._copy_metadata for all result paths
- shared _sandbox_stdout_redirect contextmanager for sandboxed scripts
- TemperatureMonitor dead code removal (gtk helper, traceback, unused properties)
- new unit tests incl. lock-freedom regression test
- gitignore sphinx generated doc/_autosummary/ and doc/damaris/
2026-10-17 19:17:43 +02:00

26 lines
625 B
Python

import tables
import numpy
r = MeasurementResult("test")
def result():
try:
h5 = tables.open_file("test.h5", "w")
except:
print("h5 already opened")
accu = Accumulation(error=False)
for num,ts in enumerate(results):
data["accu"] = accu
data["data/ts %i"%num] = ts+0
ts.write_to_hdf(h5, "/", f"adc_{num}", f"adc_{num}")
data["fft"] = (ts+0).fft()
r[num] = ts.y[0][0]
data["test"] = r
accu+=ts
print(accu)
accu.write_to_hdf(h5, "/", "name", "title")
try:
h5.close()
except:
print("h5 already closed")