You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Improve ASI detector support and reduce excessive logging (#111)
* use serval to interface with timepix3 cameras
* Simplify HZanoli's changes, auto-determine `self.exposure_cooldown` from config
* Stop the passive collection during single-frame acquisition instead of setting `self.grabber.frametime = 0` to avoid failing 0-second frames
* In `CameraServal`, always request `tiff` (faster than pgm), removing need for 'asic' config
Reading tiff is faster than pgm virtually always, especially if PixelDepth = 2**N (benchmark: https://chatgpt.com/canvas/shared/67b4942e54808191bf08685ce305112d):
bit_depth pgm png tiff
1 117.41 ± 6.32 ms nan ± nan ms 0.17 ± 0.03 ms
4 117.24 ± 11.10 ms nan ± nan ms 0.17 ± 0.04 ms
6 151.23 ± 48.35 ms nan ± nan ms 0.16 ± 0.01 ms
8 0.08 ± 0.22 ms 1.41 ± 0.09 ms 0.20 ± 0.07 ms
10 153.95 ± 13.69 ms nan ± nan ms 0.63 ± 0.10 ms
12 153.15 ± 23.07 ms nan ± nan ms 0.46 ± 0.17 ms
14 150.50 ± 17.25 ms nan ± nan ms 0.68 ± 0.11 ms
16 1.84 ± 0.20 ms 2.10 ± 0.15 ms 0.42 ± 0.15 ms
20 nan ± nan ms nan ± nan ms 2.17 ± 0.22 ms
24 nan ± nan ms nan ± nan ms 2.21 ± 0.21 ms
32 nan ± nan ms nan ± nan ms 2.22 ± 0.19 ms
* Serval: restrict exposure to 0.001-10 (common medi/timepix limit AFAIK)
* Detector_config.asic is unnecessary if Serval always saves tiff
* Fix `serval.yaml`: {PixelDepth: 24, BothCounters: True} are mutually incompatible
* Filter out external DEBUG log records: reduces log size by 100MB/s
* In `THANKS.md`, fix the link so that it points into instamatic contributions
* In `about` frame, fix links and make other text copy-able
* Auto-adapt `Copyable` width to prevent main widget stretching
* Apply ruff suggestions to `main.py`
* @hzanoli: in `get_movie`, exposure and trigger periods both have to match
* With new `block`-based mechanism, these lines are no longer needed
* Make tem_server serializer import absolute to allow running as script
* Improve the comments in `serval.yaml` config file
Co-authored-by: Henrique Zanoli <henrique.zanoli@amscins.com>
* Handle 0 <= exposure < 10, fix `get_movie` (TODO test)
* Prevent tk from trying to write into a closed `console_frame:Writer`
* Synchronize `_get_image_single`, `get_movie` to prevent threading race issues
* Improve typing, readability on `camera_serval`, follow ruff format
* Log instamatic debug if -v, other debug if -vv, paths if -vvv
* Fix typo, consistenly use `option.verbose`
* Defer formatting of log messages until necessary
Co-authored-by: Stef Smeets <stefsmeets@users.noreply.github.com>
* Reorder image getters in `CameraServal.get_image` (todo fix manually)
Co-authored-by: Stef Smeets <stefsmeets@users.noreply.github.com>
* Update `videostream.py`: block passive preview when collecting movie
* Remove `CameraServal.lock` as synchronisation is now done at `VideoStream`
* `VideoStream`: Stop requesting media after it has been collected
* `VideoStream`: callback with request to avoid confusion, add `test_get_movie`
* Generalize `VideoStream.get_image` and `.get_movie` into `_get_media`
* `CameraServal` tested, make `get_movie` return `np.ndarray`s not `Image`s
* `CameraServal`: add unified `_get_images`, allow movies > MAX_EXPOSURE
* `CameraServal`: single image is communicated via `n_triggers = Ignore`
* Fix typos, consistently use param name `n_frames` rather than `n_triggers`
* Try to squeeze frame definition in 2 lines
Co-authored-by: Stef Smeets <stefsmeets@users.noreply.github.com>
* Add missing `MovieRequest` docstring
---------
Co-authored-by: Henrique Zanoli <henrique.zanoli@amscins.com>
Co-authored-by: Stef Smeets <stefsmeets@users.noreply.github.com>
0 commit comments