Commit Graph
13 Commits
Author SHA1 Message Date
markusro 27d05496ab fix y_square latent bug: keep it always a list of per-channel arrays
Accumulation.__neg__ passed y_2 = numpy.array(self.y_square), storing a
2D ndarray. A later __iadd__ on an accumulation with ndarray y_square
crashed with AttributeError at the y_square.append sites (992, 1064).

- __neg__ now passes a per-channel copy (values unchanged: sums of
  squares are invariant under negation)
- __init__ normalizes ndarray y_2 to a list, so external callers cannot
  reintroduce the bug
- y_square annotated as _YChannels

Clears the remaining pyrefly errors at Accumulation.py:992 and :1064
(74 -> 72). Unit tests reproduce both crashes and pass with the fix.

Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
2026-10-18 15:11:58 +02:00
markusro c797aeb387 add type hints to data classes and fix get_ydata override conflict
- signature-only type hints for ADC_Result, MeasurementResult,
  Accumulation, and the Drawable base class (x: ndarray | list, y: list)
- get_ydata now takes channel: int = 0 across the hierarchy
  (Drawable, Accumulation, MeasurementResult, Error_Result), fixing
  the LSP violation flagged by pyrefly
- widen _XArray alias to ndarray | list: internal copy constructors
  pass self.x[:] which is that union
- add hinted files to pyrefly project-includes

pyrefly errors in the covered files drop from 102 to 74; the rest is
PyTables stub noise and pre-existing latent bugs left for separate fixes.

Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
2026-10-18 15:09:57 +02:00
markusro f9d8de7697 fix return-value/deprecated API bugs, accumulation lock leaks, code cleanup
Build Debian Packages / build (bookworm, debian12) (push) Successful in 8m56s
Build Debian Packages / build (trixie, debian13) (push) Successful in 9m3s
- 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
markusro ddb3f00abb fixed inconsistencies in returned objects: missing channels, is_clipped
Build Debian Packages / build (bookworm, debian12) (push) Failing after 8s
Build Debian Packages / build (trixie, debian13) (push) Canceled after 8s
2026-10-01 21:10:49 +02:00
markusro 5cd8df89be Fix file handle leaks (Fixes #35) 2026-07-12 10:54:06 +02:00
markusro 08e1fe2a1a Small fixes
Merge branch 'main' of gitea.pkm.physik.tu-darmstadt.de:IPKM/python3-damaris
2026-07-09 14:45:28 +02:00
markusro 064036241b small fixes 2026-07-09 14:45:25 +02:00
markusro c181e15aa8 fixed some python2 to python3 changes as well as dat time formats 2026-07-06 20:40:59 +02:00
markusro b46debad69 Fixed #13 and #14
Build Debian Packages / build (trixie, debian13) (push) Successful in 14m2s
Build Debian Packages / build (bookworm, debian12) (push) Successful in 14m11s
Build Debian Packages / build (bullseye, debian11) (push) Has been cancelled
2026-07-05 14:07:57 +02:00
markusro d3b1a9e3fd Show message if ADC_Data is clipped (solves #16)
Build Debian Packages / build (bookworm, debian12) (push) Successful in 14m38s
Build Debian Packages / build (trixie, debian13) (push) Successful in 14m40s
Build Debian Packages / build (bullseye, debian11) (push) Has been cancelled
2026-07-05 13:44:20 +02:00
markusro 58e7846bbe description is plotted better now 2026-07-04 20:50:57 +02:00
markusro efb15606c6 These were not too critical errors as we normal only do + and -
Build Debian Packages / build (trixie, debian13) (push) Successful in 13m14s
Build Debian Packages / build (bookworm, debian12) (push) Successful in 13m23s
Build Debian Packages / build (bullseye, debian11) (push) Has been cancelled
operations in the experiments.

- Identified and fixed multiple logic and syntax errors in the `Accumulation` class similar to those recently found in `ADC_Result`.
- Implemented missing arithmetic operators (`*`, `/`, `//`) and their inplace/reverse counterparts for the `Accumulation` class.
- Verified that all arithmetic operations correctly maintain statistical data (sum of squares) where mathematically possible.
2026-07-04 16:26:56 +02:00
markusro 6abb338c4a move to a more standard python packaging structure
Build Debian Packages / build (bookworm, debian12) (push) Successful in 13m3s
Build Debian Packages / build (trixie, debian13) (push) Successful in 13m46s
Build Debian Packages / build (bullseye, debian11) (push) Has been cancelled
2026-04-07 17:09:10 +02:00