Commit a8f1c3d
Continuous measurement (#214)
* core(in-progress): saving a checkmark of work towards implementing a continuous expt feature. Much of the heavy lifting has been done, but changes still need to be verified, validated, and added to our automatic testing if possible. File changes to abstract expt include new continuous preallocate, reallocate, and continuous save point methods; to runinfo include a new continuous_expt boolean attribute, and to experiment.py allow for continuous expt runs.
* most minor change to new naming convention.
* feat(core): adding ability for continuous measurement expts. Now by setting runinfo.continuous_expt to True, experimentalists can run their experiment designs continuously, and continue to extend their datasets indefinitely. This needs to be tested for how long/what number of continuous experiments can be run before the reallocation resizing bogs down, if ever. Also may want to consider changing the continuous_count var in experiment.py to a runinfo attribute to keep track of the number of repetitions without have to infer it through extraction of dataset size. I will likely find a solution for this where it will only added to continuous expts to not include it unnecessarily in the metadata of other experiments. Furthermore, not all data types/sizes have been tested with our new continuous_save_point function, and so one could still encounter bugs using this feature as we continue to flush it out. If so, please report them along with the circumstance you encountered it with in addition to the error message.
* chore(core): fixed minor issues, naming convention, and added runinfo.run_count attribute for continuous experiments.
* chore(core): fixed one more layer of continuous_preallocate; however, the lower layers likely still need updating. Furthermore, modifying experiment to be able to test the increasing lag times between experiments. Pushing to test on cint-transport overnight, hopefully this will provide a consistent testing environment since my computer was lagging out and artificially increasing runtimes temporarily.
* fix(measurement): updated continuous experiment to account for desired data formatting protocols.
* feat(core): implemented continuous measurement ability which works at all scan levels. Still need to ensure that it is the highest level scan; however, despite needing this check the continuous scan works well when set up properly.
* fix(core): Now continuous scan must be the highest level scan and not have empty scans below it. --Make sure this is what we want!
* chore(core): fix runinfo flake8 issue.
* refactor(core): feat continuous measurement scan now implemented with minimal changes to experiment.py. Furthermore, new data points are now not just saved to the hdf5 file, but captured by local arrays.
* fix(measurement): updated continuous scan to append values to attributes, write to proper locations in hdf5 of 1 value at a time, and allow for continuous experiments to have a pre-selected stop_at value for testing and/or increased experimental control.
* test(measurement)(scans): adding notebook for testing continuous scans timing over long runs (out to 100,000) with different kinds of experiment set ups, as well as plotting their deltas.
* chore(test): removing continuous_scan_time_test.ipynb notebook since it is not something we want to pull to the main branch and was simply for us to evaluate the efficacy of continuous scan as a method.
* test(refactor): updated tests to reflect expected behavior of saving protocols in abstract expt.
* fix(refactor)(measurement)(tests): fixed bug in save_point where average experiments would be treated as generic experiments.
* fixed sparse sweep but restoring old working condition of continuous scan saving.
* chore(measurement): updating continuous scan to use n_max instead of stop at. Adding runinfo attributes for replacing commonly used continuous scan required functions. Also refactoring check for empty property scan between continuous scans.
* chore(core): updated runinfo to match bug fix pr.
* refactor(core)(measurement): refactored abstract experiments save point, and runinfo to streamline code calls and partition functionalities into a more organized architecture.
* fix(core): fixed errors with abstract and runinfo changes causes test cases to fail.
* refactor(measurement): continuing to refactor for continuous scan and measurement changes. Removed continuous_dims and continuous ndims from runinfo for a work around. Still determining if scan.n can be incremented.
* feat(core)(measurement): average experiment can now be run continuously by implementing a continuous scan.
* fix(measurement): fixing runinfo attribute to no longer fail sparse expt test.
* refactor(measurement)(docs): refactored continuous scan iterator to return incrementing integers (0, 1, 2, 3...) instead of endless 0s. Furthermore added a doc string for ContinuousScan and its iterator method. Also updated doc strings to have improved formatting and added one for AbstractScans iterator method as well.
* refactor(measurement): updating continuous scan and measurement to use i and n attributes rather than run_count. Both are incrementing infinitely in the iterate function. Updated the docstring for this.
* fix(plotting)(docs): added continuous measurement scan demo nb with liveplotting. Updated basic_plots.py to support this. Renamed advanced demo notebooks numbering sequence to begin with an a.
* chore: renaming advanced demo notebook to account for advanced demo nb 02 that jasmine already added.
* chore: renaming a03 notebook in file title to match file name.
---------
Co-authored-by: i-am-mounce <[email protected]>
Co-authored-by: [email protected] <[email protected]>1 parent 786b025 commit a8f1c3d
File tree
12 files changed
+712
-109
lines changed- demo_notebooks/advanced
- pyscan
- measurement
- plotting
- test/measurement
12 files changed
+712
-109
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
19 | | - | |
| 19 | + | |
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
| |||
File renamed without changes.
Lines changed: 276 additions & 0 deletions
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
13 | | - | |
| 13 | + | |
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
| 45 | + | |
45 | 46 | | |
46 | 47 | | |
47 | 48 | | |
| |||
81 | 82 | | |
82 | 83 | | |
83 | 84 | | |
84 | | - | |
85 | | - | |
86 | | - | |
87 | 85 | | |
88 | 86 | | |
89 | | - | |
90 | | - | |
91 | | - | |
92 | | - | |
93 | | - | |
94 | 87 | | |
95 | 88 | | |
96 | 89 | | |
97 | | - | |
| 90 | + | |
98 | 91 | | |
99 | 92 | | |
100 | 93 | | |
| |||
103 | 96 | | |
104 | 97 | | |
105 | 98 | | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
106 | 102 | | |
107 | 103 | | |
108 | 104 | | |
109 | 105 | | |
110 | 106 | | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
111 | 110 | | |
112 | 111 | | |
113 | 112 | | |
114 | 113 | | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
115 | 117 | | |
116 | 118 | | |
117 | 119 | | |
118 | 120 | | |
119 | 121 | | |
120 | 122 | | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
121 | 126 | | |
122 | 127 | | |
123 | 128 | | |
| |||
148 | 153 | | |
149 | 154 | | |
150 | 155 | | |
151 | | - | |
| 156 | + | |
152 | 157 | | |
153 | 158 | | |
154 | 159 | | |
155 | 160 | | |
156 | | - | |
| 161 | + | |
157 | 162 | | |
158 | 163 | | |
159 | 164 | | |
160 | 165 | | |
161 | | - | |
| 166 | + | |
162 | 167 | | |
163 | 168 | | |
164 | 169 | | |
165 | 170 | | |
166 | | - | |
| 171 | + | |
167 | 172 | | |
168 | 173 | | |
169 | 174 | | |
| |||
172 | 177 | | |
173 | 178 | | |
174 | 179 | | |
175 | | - | |
176 | | - | |
177 | | - | |
178 | 180 | | |
179 | 181 | | |
180 | 182 | | |
| |||
183 | 185 | | |
184 | 186 | | |
185 | 187 | | |
186 | | - | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
187 | 192 | | |
188 | | - | |
| 193 | + | |
189 | 194 | | |
190 | 195 | | |
191 | 196 | | |
192 | 197 | | |
193 | 198 | | |
194 | 199 | | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
195 | 203 | | |
196 | 204 | | |
197 | 205 | | |
198 | 206 | | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
199 | 210 | | |
200 | 211 | | |
201 | 212 | | |
202 | 213 | | |
203 | 214 | | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
204 | 218 | | |
205 | 219 | | |
206 | 220 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| 5 | + | |
5 | 6 | | |
6 | 7 | | |
7 | 8 | | |
| |||
62 | 63 | | |
63 | 64 | | |
64 | 65 | | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
65 | 69 | | |
66 | 70 | | |
67 | 71 | | |
| |||
102 | 106 | | |
103 | 107 | | |
104 | 108 | | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
105 | 135 | | |
106 | 136 | | |
107 | 137 | | |
| |||
117 | 147 | | |
118 | 148 | | |
119 | 149 | | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
120 | 154 | | |
121 | 155 | | |
122 | 156 | | |
| |||
132 | 166 | | |
133 | 167 | | |
134 | 168 | | |
135 | | - | |
| 169 | + | |
136 | 170 | | |
137 | 171 | | |
138 | 172 | | |
| |||
152 | 186 | | |
153 | 187 | | |
154 | 188 | | |
| 189 | + | |
| 190 | + | |
155 | 191 | | |
156 | 192 | | |
157 | 193 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
14 | | - | |
| 14 | + | |
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
19 | | - | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
20 | 22 | | |
21 | 23 | | |
22 | 24 | | |
23 | 25 | | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
24 | 29 | | |
25 | 30 | | |
26 | 31 | | |
| |||
72 | 77 | | |
73 | 78 | | |
74 | 79 | | |
75 | | - | |
| 80 | + | |
| 81 | + | |
76 | 82 | | |
77 | 83 | | |
78 | 84 | | |
| |||
85 | 91 | | |
86 | 92 | | |
87 | 93 | | |
88 | | - | |
| 94 | + | |
| 95 | + | |
89 | 96 | | |
90 | 97 | | |
91 | 98 | | |
| |||
141 | 148 | | |
142 | 149 | | |
143 | 150 | | |
144 | | - | |
| 151 | + | |
| 152 | + | |
145 | 153 | | |
146 | 154 | | |
147 | | - | |
| 155 | + | |
148 | 156 | | |
149 | 157 | | |
150 | 158 | | |
| |||
156 | 164 | | |
157 | 165 | | |
158 | 166 | | |
159 | | - | |
| 167 | + | |
| 168 | + | |
160 | 169 | | |
161 | 170 | | |
162 | 171 | | |
| |||
170 | 179 | | |
171 | 180 | | |
172 | 181 | | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
173 | 235 | | |
174 | | - | |
| 236 | + | |
| 237 | + | |
175 | 238 | | |
176 | 239 | | |
177 | 240 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
84 | 84 | | |
85 | 85 | | |
86 | 86 | | |
87 | | - | |
| 87 | + | |
88 | 88 | | |
89 | 89 | | |
90 | 90 | | |
| |||
0 commit comments