Commit 8df2c1b
Safely save frames and images (#148)
* Allow server cameras to be streamable by removing precaution checks
* Unify interface, naming between get_microscope/camera(_class)
* Remove unused _init_attr_dict/get_attrs from microscope client/server
* Do not force server-side attributes to be callable, use them first: these 3 lines took ~3h
* EAFP: Allow camera to call functions whether they are registered or not
* EAFP: Allow camera to call unregistered functions - fixes server cameras
* Remove unnecessary print debug statement
* Add **streamable** description to `config.md` documentation
* Encapsulate FastADT paths in separate prop/method
* Add new TrackingArtist to be used with plotting multi-runs
* Working multi-tracking FastADT frame! Still needs polish
* Change `ClickEvent` to dataclass, implement `ClickEvent.xy`
* Optimize clicking logic in FastADT experiment
* Streamline the `calibrate_beamshift_live` function
* Streamline `CalibBeamShift.plot`
* Improvements to `CalibBeamShift` readability (WIP)
* Add option to calibrate beamshift with vsp
* Fix errors, add beam center
* Switch calibration output format from pickle to yaml
* Allow delay during calibrate beamshift
* Add necessary reflections to fix plotting
* Final tweaks
* Make the yaml produced by CalibBeamShift human-readable
* Update src/instamatic/calibrate/calibrate_beamshift.py
Co-authored-by: Stef Smeets <stefsmeets@users.noreply.github.com>
* Update src/instamatic/calibrate/calibrate_beamshift.py
Co-authored-by: Stef Smeets <stefsmeets@users.noreply.github.com>
* Minor post-review type-hint improvements + ruff
* Add `instamatic.utils.iterating` with `sawtooth` iterating function
* Make the `click_dispatcher:ClickEvent.xy` a property
* Rephrase `VideoStreamProcessor.temporary` using `blocked` context
* Fix the bug where canceling FastADT did not remove its elements
* Fix the bug where colors of crystal tracking repeated after 10
* Remove debug message
* Attempt to generalize collecting, revert as needed
* Fix: rotation speed for negative target pace is negative, rounds to 0
* Rename tracking "mode" to "algo"; if continuous, track w/ movie
* Generalize FastADT run collection (+fix resulting bugs)
* Revert change: use stills for continuous tracking
* Minor fixes and code quality improvements
* Clean, remove unused code
* Fix tracking failing for beam not in the center at alignment
* Fix Run.__str__, clean up code, method, call order
* Log all behavior in two separate message windows.
* Fix ignore msg1,2 variables in headless FastADT experiment
* Update in tests `tracking_mode` -> `tracking_algo`
* Add estimated time required dialog in FastADT message 2
* Display which experiment is being collected in multi-expt
* Display which experiment is being collected in multi-expt
* Trace variables only after everything was defined to avoid Exceptions
* Fix: leaving input empty even temporarily caused exception
* Fix: do not define ExperimentalFastADT.q to receive it from parent
* Fix: Add LiveVideoStream, FakeVideoStream to camera init to fix instamatic.camera script
* Fix: properly defined VideoStreamFrame.app as "advertised"
* Move `get_frame/image` from jobs to VideoStreanFrame: to fix it/avoid crashes
* Prevent repeated calls to alpha_wobble from crashing GUI
* Overwriting prevention mechanism was not needed
* Do not overwrite `self.wobble_stop_event` if not putting in queue
* FastADT: Save tracking images to tracking/ directory
* Remove development imports from videostream_processor.py
---------
Co-authored-by: Stef Smeets <stefsmeets@users.noreply.github.com>1 parent c2f086a commit 8df2c1b
File tree
8 files changed
+77
-72
lines changed- src/instamatic
- camera
- experiments/fast_adt
- gui
8 files changed
+77
-72
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
| 4 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
| 18 | + | |
18 | 19 | | |
19 | 20 | | |
20 | 21 | | |
| |||
392 | 393 | | |
393 | 394 | | |
394 | 395 | | |
395 | | - | |
| 396 | + | |
| 397 | + | |
396 | 398 | | |
397 | 399 | | |
398 | 400 | | |
| |||
404 | 406 | | |
405 | 407 | | |
406 | 408 | | |
407 | | - | |
| 409 | + | |
408 | 410 | | |
409 | | - | |
| 411 | + | |
410 | 412 | | |
411 | 413 | | |
412 | 414 | | |
413 | 415 | | |
414 | 416 | | |
415 | 417 | | |
| 418 | + | |
| 419 | + | |
| 420 | + | |
416 | 421 | | |
417 | 422 | | |
418 | 423 | | |
| |||
428 | 433 | | |
429 | 434 | | |
430 | 435 | | |
| 436 | + | |
| 437 | + | |
| 438 | + | |
| 439 | + | |
| 440 | + | |
| 441 | + | |
| 442 | + | |
| 443 | + | |
| 444 | + | |
| 445 | + | |
431 | 446 | | |
432 | 447 | | |
433 | 448 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
| 3 | + | |
3 | 4 | | |
| 5 | + | |
4 | 6 | | |
5 | 7 | | |
| 8 | + | |
6 | 9 | | |
7 | 10 | | |
8 | 11 | | |
| |||
282 | 285 | | |
283 | 286 | | |
284 | 287 | | |
285 | | - | |
286 | | - | |
287 | | - | |
288 | | - | |
289 | | - | |
290 | | - | |
291 | | - | |
292 | | - | |
293 | | - | |
294 | | - | |
295 | | - | |
296 | | - | |
297 | | - | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
298 | 303 | | |
299 | 304 | | |
300 | 305 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
4 | 3 | | |
5 | | - | |
6 | 4 | | |
7 | 5 | | |
8 | 6 | | |
| |||
91 | 89 | | |
92 | 90 | | |
93 | 91 | | |
94 | | - | |
95 | 92 | | |
96 | 93 | | |
97 | 94 | | |
| |||
241 | 238 | | |
242 | 239 | | |
243 | 240 | | |
244 | | - | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
245 | 245 | | |
246 | 246 | | |
247 | 247 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
131 | 131 | | |
132 | 132 | | |
133 | 133 | | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
134 | 138 | | |
135 | | - | |
| 139 | + | |
136 | 140 | | |
137 | 141 | | |
138 | 142 | | |
139 | | - | |
| 143 | + | |
140 | 144 | | |
141 | 145 | | |
142 | | - | |
143 | | - | |
144 | 146 | | |
145 | 147 | | |
146 | | - | |
147 | | - | |
148 | 148 | | |
149 | 149 | | |
150 | 150 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | | - | |
11 | | - | |
12 | | - | |
13 | | - | |
14 | | - | |
15 | | - | |
16 | 10 | | |
17 | 11 | | |
18 | 12 | | |
| |||
34 | 28 | | |
35 | 29 | | |
36 | 30 | | |
37 | | - | |
38 | | - | |
39 | | - | |
40 | | - | |
41 | | - | |
42 | | - | |
43 | | - | |
44 | | - | |
45 | | - | |
46 | | - | |
47 | | - | |
48 | | - | |
49 | | - | |
50 | | - | |
51 | | - | |
52 | | - | |
53 | | - | |
54 | | - | |
55 | | - | |
56 | | - | |
57 | | - | |
58 | | - | |
59 | | - | |
60 | | - | |
61 | | - | |
62 | | - | |
63 | | - | |
64 | | - | |
65 | | - | |
66 | | - | |
67 | | - | |
68 | 31 | | |
69 | 32 | | |
70 | 33 | | |
| |||
95 | 58 | | |
96 | 59 | | |
97 | 60 | | |
98 | | - | |
99 | | - | |
100 | 61 | | |
101 | 62 | | |
102 | 63 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| 5 | + | |
| 6 | + | |
5 | 7 | | |
6 | 8 | | |
7 | 9 | | |
8 | | - | |
| 10 | + | |
9 | 11 | | |
10 | 12 | | |
11 | 13 | | |
12 | 14 | | |
13 | 15 | | |
| 16 | + | |
| 17 | + | |
14 | 18 | | |
15 | 19 | | |
16 | 20 | | |
| 21 | + | |
17 | 22 | | |
18 | 23 | | |
19 | 24 | | |
| |||
221 | 226 | | |
222 | 227 | | |
223 | 228 | | |
224 | | - | |
| 229 | + | |
225 | 230 | | |
226 | | - | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
227 | 240 | | |
228 | | - | |
| 241 | + | |
229 | 242 | | |
230 | | - | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
231 | 256 | | |
232 | 257 | | |
233 | 258 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | | - | |
12 | 11 | | |
13 | 12 | | |
14 | 13 | | |
| |||
0 commit comments