Commit 54b1822
Simplified ID lookup logic (#1716)
* add i09 look up table praiser
* move get_poly to lookuptable
* extracted EnergyMotorLookup base class from i10EnergyMotorLookup
* added new make_phase_tables function
* add test for correct table output
* remove_i09
* add docstring
* add test for helper functions
* add test for skipping
* spacing fix
* Refactor Lookuptable class documentation
Removed outdated docstring from Lookuptable class and updated initialization docstring for I10EnergyMotorLookup class.
* change lookup table schema to snake case
* replace dictionary with basemodel
* add tying
* add gap and phase
* fat finger correction
* Update ID lookup logic to use type checking
* Fix some tests
* Improve models to not use shared defaults
* undo syntax error
* Fixed test to check for success on loading i10 lut
* Simplified lut logic
* Added back generate_lookup_table function
* Fixed all tests but polarisation
* Updated doc strings
* Moved generic test from i10 to test_lookup_table_apple2
* Renamed lut_column_config to lut_config
* Updated more doc strings
* Fix default phase_file name and thus tests
* Use Pol in LookupTable rather than string
* Updated test_convert_csv_to_lookup_overwrite_name_convert_default to use Pol
* Update tests to use Pol rather str value
* Improve EnergyCoverageEntry to have a poly serializer and EnergyCoverage to use float as key
* Add type checking to i10Apple2 phase
* Removed commente out code
* Update i10 id tests to use json files rather than pickle files so they are human readable
* Remove comments
* Fixed poly test
* Fixed test_make_phase_tables_multiple_entries
* Added test_lookup_table_is_serialisable
* Update src/dodal/devices/util/lookup_tables_apple2.py
Co-authored-by: Raymond Fan <[email protected]>
* Fixed formatting
* Improved code coverage
* Simplified ID lookup table logic
* Updated doc strings, tidy tests and variable names
* Made default files a constant
* Update logging messages
* Removed duplicate test logic
* Decoupled path from LookupTableConfig, updated convert_csv_to_lookup to use file_contents again
* Updated doc strings
* Clean up imports
---------
Co-authored-by: Relm-Arrowny <[email protected]>1 parent bc36da8 commit 54b1822
File tree
5 files changed
+169
-207
lines changed- src/dodal
- beamlines
- devices
- i10
- util
- tests/devices
- i10
- util
5 files changed
+169
-207
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| 9 | + | |
| 10 | + | |
9 | 11 | | |
10 | 12 | | |
11 | 13 | | |
| |||
35 | 37 | | |
36 | 38 | | |
37 | 39 | | |
38 | | - | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
39 | 43 | | |
40 | 44 | | |
41 | 45 | | |
| |||
119 | 123 | | |
120 | 124 | | |
121 | 125 | | |
122 | | - | |
123 | | - | |
| 126 | + | |
124 | 127 | | |
125 | | - | |
126 | | - | |
127 | | - | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
128 | 131 | | |
| 132 | + | |
129 | 133 | | |
130 | 134 | | |
131 | 135 | | |
| |||
184 | 188 | | |
185 | 189 | | |
186 | 190 | | |
187 | | - | |
188 | | - | |
| 191 | + | |
189 | 192 | | |
190 | | - | |
191 | | - | |
192 | | - | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
193 | 196 | | |
| 197 | + | |
194 | 198 | | |
195 | 199 | | |
196 | 200 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
6 | 5 | | |
7 | 6 | | |
8 | 7 | | |
| |||
23 | 22 | | |
24 | 23 | | |
25 | 24 | | |
26 | | - | |
27 | | - | |
28 | | - | |
29 | | - | |
30 | | - | |
| 25 | + | |
31 | 26 | | |
32 | 27 | | |
33 | 28 | | |
| |||
37 | 32 | | |
38 | 33 | | |
39 | 34 | | |
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 | 35 | | |
70 | 36 | | |
71 | 37 | | |
| |||
102 | 68 | | |
103 | 69 | | |
104 | 70 | | |
105 | | - | |
106 | | - | |
| 71 | + | |
107 | 72 | | |
108 | 73 | | |
109 | 74 | | |
| |||
114 | 79 | | |
115 | 80 | | |
116 | 81 | | |
117 | | - | |
118 | | - | |
119 | | - | |
120 | | - | |
| 82 | + | |
| 83 | + | |
121 | 84 | | |
122 | 85 | | |
123 | 86 | | |
| |||
128 | 91 | | |
129 | 92 | | |
130 | 93 | | |
131 | | - | |
132 | | - | |
133 | | - | |
134 | | - | |
| 94 | + | |
135 | 95 | | |
136 | 96 | | |
137 | | - | |
| 97 | + | |
138 | 98 | | |
139 | 99 | | |
140 | 100 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
30 | | - | |
31 | 30 | | |
32 | 31 | | |
33 | 32 | | |
| |||
45 | 44 | | |
46 | 45 | | |
47 | 46 | | |
| 47 | + | |
48 | 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 | | - | |
| 49 | + | |
| 50 | + | |
76 | 51 | | |
77 | 52 | | |
78 | 53 | | |
| |||
90 | 65 | | |
91 | 66 | | |
92 | 67 | | |
93 | | - | |
94 | 68 | | |
95 | 69 | | |
96 | 70 | | |
| |||
139 | 113 | | |
140 | 114 | | |
141 | 115 | | |
142 | | - | |
| 116 | + | |
143 | 117 | | |
144 | 118 | | |
145 | 119 | | |
| |||
155 | 129 | | |
156 | 130 | | |
157 | 131 | | |
158 | | - | |
| 132 | + | |
159 | 133 | | |
160 | | - | |
| 134 | + | |
161 | 135 | | |
162 | 136 | | |
163 | 137 | | |
| |||
315 | 289 | | |
316 | 290 | | |
317 | 291 | | |
318 | | - | |
| 292 | + | |
319 | 293 | | |
320 | | - | |
321 | | - | |
322 | | - | |
323 | | - | |
324 | | - | |
325 | | - | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
326 | 302 | | |
327 | 303 | | |
328 | 304 | | |
329 | 305 | | |
330 | 306 | | |
331 | 307 | | |
| 308 | + | |
| 309 | + | |
332 | 310 | | |
333 | 311 | | |
334 | 312 | | |
335 | 313 | | |
336 | 314 | | |
337 | | - | |
338 | | - | |
339 | | - | |
340 | 315 | | |
341 | | - | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
342 | 323 | | |
343 | | - | |
344 | | - | |
| 324 | + | |
345 | 325 | | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
346 | 329 | | |
347 | 330 | | |
348 | 331 | | |
349 | | - | |
| 332 | + | |
350 | 333 | | |
351 | 334 | | |
352 | 335 | | |
353 | | - | |
| 336 | + | |
354 | 337 | | |
355 | 338 | | |
356 | | - | |
357 | | - | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
| 343 | + | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
| 349 | + | |
| 350 | + | |
| 351 | + | |
| 352 | + | |
| 353 | + | |
| 354 | + | |
| 355 | + | |
| 356 | + | |
358 | 357 | | |
359 | 358 | | |
360 | 359 | | |
| 360 | + | |
| 361 | + | |
| 362 | + | |
| 363 | + | |
361 | 364 | | |
362 | 365 | | |
363 | 366 | | |
| |||
376 | 379 | | |
377 | 380 | | |
378 | 381 | | |
379 | | - | |
| 382 | + | |
380 | 383 | | |
381 | 384 | | |
382 | 385 | | |
| |||
0 commit comments