Commit 1fdd7db
Add a device that will calculate a beam centre (#1757)
* Add centring with the ellipse method as a device
* Add DeviceManager as alternative to make_all_devices (#1549)
* Proof of concept device manager
* Use fixtures parameter instead of **kwargs
* Expand dependencies
* Pre-optional handling
* 'Working' optional dependencies
* Docs, comments and warnings
* Check for positional only arguments
* Handle connections and support new loader in cli
* Convert adsim to new loading
* Add auto_connect to device manager
* Remove references to connecting from device manager
* DeviceResult wrappers
* Demo adsim
* build_and_connect method
* Multiple manager CLI
* FIXTUEES
* Use device decorator for timeouts
* Type build_and_connect and rely on fixtures for path provider
* mostly reformatting
* Make fixture generators lazy
* Apologise for build_order method
* Return function from fixture decorator
* Add timeout parameter to build_and_connect
* Remove dead comment
* Use set in expand_dependencies to prevent repetition
* Check for duplicate factory names
* Add Ophyd v1 support
* Connect Ophyd v1 devices
* Move device_manager to new module
Instead of burying it amongst the beamlines.
* Remove test code from device_manager module
* Remove debugging and commented code
* Merge connectionspec and connectionparameters
* Add or_raise method to DeviceBuildResult
* Add docstrings
* Use or_raise to handle build errors
* Only set device name if required
* Add TODOs to remove v1 support
* Make v1 device timeout configurable
* Default to waiting for v1 device connection
* Add repr to v1 device factory
* Split DeviceBuildResult devices and connection specs
Makes access to the devices easier and makes it easier to build parameters
* Remove device_type property from factories
* Include fixture overrides in built devices
* Fix duplication in factory repr
* Add initial device_manager tests
* Revert adsim changes for now
* Enough tests to get full coverage
Maybe enough tests to cover basic use
* Create DeviceManager in fixture
* Add test for docstrings
* Reformat tests
* Linting et al
* Support single device manager name in CLI
* Ignore mock type warnings
* Appease pre-commit lints
* Add tests for device manager use in CLI
* Make 'devices' default name for device manager in CLI
* Clean up TODO comments
* Set return_value when creating mocks
* Fix typing in v1_init decorator
* Use ParamSpec when passing through __call__
* Handle or ignore var args
* Update tests
* Rename ignore skip test
* Simplify LazyFixture __getitem__
* Used UserDict as base class for LazyFixtures
* Make pyright happy
* Remove need for type ignore
---------
Co-authored-by: Robert Tuck <robert.tuck@diamond.ac.uk>
* Prevent Eiger from being disarmed multiple times at once (#1719)
* Eiger changes from i04 beamline
* Add test for two eiger stops being called at the same time
* Revert async arming changes
* Fix tests
---------
Co-authored-by: Dominic Oram <dominic.oram@diamond.ac.uk>
* Create a device that will give the max pixel from an AD camera (#1723)
* first try
* add trigger function which writes to soft signals
* small changes
* get rid of max pixel location
* add tests - need modifying as made with copilot
* make triggerable for blesky plan
* start to add max-pixel device in i04 (WIP because on beamline)
* Finish adding device to i04.py
* Add changes from beamline testing - from github
* add comment for kernal size
* attemt own tests
* add my tests
* add assert called onece tests
* make changes from Dom's comments
* add greyscale test
* remove print statements in test
* Fix merge issue
---------
Co-authored-by: Dominic Oram <dominic.oram@diamond.ac.uk>
* test planning
* change file names
* change so that the centring deviceuses the same preprocessing function as the max pixel device (to blur and convert to greyscale)
* fix max pixel test which was failing after function change
* add more tests
* more tests
* tests working now
* fix: linting issues and add more to docstring
* fix import
* fix: patch
* add trigger test
* add device to i04.py
* Add changes from tests
* responding to Ollie comments
* get rid of comments from beamline testing
* fix issue relating to using time.sleep and use asyncio.sleep instead
* get rid of uneeded awaits
* change lints
* Tidy some things up from review
* Separate zoom controller out
* Tidy up and add test
* Use a small move time for mock zoom controller
* Fix import
* Fix tests
* Fix linting
* Fix linting
* Address review comments
---------
Co-authored-by: Peter Holloway <peter.holloway@diamond.ac.uk>
Co-authored-by: Robert Tuck <robert.tuck@diamond.ac.uk>
Co-authored-by: olliesilvester <122091460+olliesilvester@users.noreply.github.com>
Co-authored-by: Dominic Oram <dominic.oram@diamond.ac.uk>1 parent 8b911e5 commit 1fdd7db
File tree
8 files changed
+325
-40
lines changed- src/dodal
- beamlines
- devices
- i04
- oav
- tests
- devices/i04
- test_data
8 files changed
+325
-40
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
| 24 | + | |
24 | 25 | | |
25 | 26 | | |
26 | 27 | | |
| |||
29 | 30 | | |
30 | 31 | | |
31 | 32 | | |
32 | | - | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
33 | 37 | | |
34 | 38 | | |
35 | 39 | | |
| |||
271 | 275 | | |
272 | 276 | | |
273 | 277 | | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
274 | 286 | | |
275 | 287 | | |
276 | 288 | | |
| |||
412 | 424 | | |
413 | 425 | | |
414 | 426 | | |
| 427 | + | |
| 428 | + | |
| 429 | + | |
| 430 | + | |
| 431 | + | |
| 432 | + | |
| 433 | + | |
| 434 | + | |
| 435 | + | |
| 436 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 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 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
2 | 1 | | |
3 | 2 | | |
4 | 3 | | |
5 | 4 | | |
6 | 5 | | |
7 | 6 | | |
8 | 7 | | |
9 | | - | |
10 | | - | |
11 | | - | |
| 8 | + | |
12 | 9 | | |
13 | 10 | | |
14 | 11 | | |
| |||
19 | 16 | | |
20 | 17 | | |
21 | 18 | | |
22 | | - | |
23 | | - | |
24 | | - | |
25 | | - | |
26 | | - | |
27 | | - | |
28 | | - | |
29 | | - | |
30 | | - | |
31 | | - | |
32 | | - | |
33 | 19 | | |
34 | 20 | | |
35 | | - | |
36 | | - | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
37 | 24 | | |
38 | 25 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
1 | 2 | | |
2 | 3 | | |
3 | 4 | | |
4 | 5 | | |
5 | 6 | | |
6 | 7 | | |
| 8 | + | |
| 9 | + | |
7 | 10 | | |
8 | 11 | | |
9 | 12 | | |
10 | 13 | | |
| 14 | + | |
11 | 15 | | |
12 | 16 | | |
13 | 17 | | |
| |||
22 | 26 | | |
23 | 27 | | |
24 | 28 | | |
| 29 | + | |
25 | 30 | | |
26 | 31 | | |
27 | 32 | | |
| |||
56 | 61 | | |
57 | 62 | | |
58 | 63 | | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
59 | 93 | | |
60 | 94 | | |
61 | 95 | | |
62 | 96 | | |
63 | 97 | | |
64 | 98 | | |
65 | 99 | | |
66 | | - | |
| 100 | + | |
67 | 101 | | |
68 | 102 | | |
| 103 | + | |
| 104 | + | |
69 | 105 | | |
70 | 106 | | |
71 | 107 | | |
72 | 108 | | |
73 | 109 | | |
| 110 | + | |
74 | 111 | | |
75 | 112 | | |
76 | 113 | | |
77 | 114 | | |
78 | 115 | | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
79 | 143 | | |
80 | 144 | | |
81 | 145 | | |
| |||
118 | 182 | | |
119 | 183 | | |
120 | 184 | | |
| 185 | + | |
121 | 186 | | |
122 | 187 | | |
123 | 188 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| 5 | + | |
5 | 6 | | |
6 | 7 | | |
7 | 8 | | |
| |||
119 | 120 | | |
120 | 121 | | |
121 | 122 | | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
0 commit comments