Skip to content

Commit 8fc913d

Browse files
authored
Add searches for root and bluesky run containers (#37)
1 parent 566a7bf commit 8fc913d

File tree

10 files changed

+474
-6
lines changed

10 files changed

+474
-6
lines changed
File renamed without changes.
File renamed without changes.
File renamed without changes.

resources/search_root.json

Lines changed: 189 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,189 @@
1+
{
2+
"data": [
3+
{
4+
"id": "4866611f-e6d9-4517-bedf-fc5526df57ad",
5+
"attributes": {
6+
"ancestors": [],
7+
"structure_family": "container",
8+
"specs": [
9+
{
10+
"name": "BlueskyRun",
11+
"version": "3.0"
12+
}
13+
],
14+
"metadata": {
15+
"start": {
16+
"uid": "4866611f-e6d9-4517-bedf-fc5526df57ad",
17+
"time": 1762787606.0709949,
18+
"versions": {
19+
"ophyd": "1.11.0",
20+
"ophyd_async": "0.13.6",
21+
"bluesky": "1.14.6"
22+
},
23+
"instrument": "adsim",
24+
"instrument_session": "cm12345-2",
25+
"data_session_directory": "/home/abi/data",
26+
"detector_file_template": "{instrument}-{scan_id}-{device_name}",
27+
"scan_file": "adsim-2",
28+
"scan_id": 2,
29+
"plan_type": "generator",
30+
"plan_name": "spec_scan",
31+
"detectors": [
32+
"det"
33+
],
34+
"motors": [
35+
"stage-x"
36+
],
37+
"num_points": 5,
38+
"num_intervals": 4,
39+
"plan_args": {
40+
"detectors": [
41+
"det"
42+
],
43+
"spec": "Line(axis=<ophyd_async.epics.motor.Motor object at 0x740d310d2b50>, start=0.0, stop=10.0, num=5)"
44+
},
45+
"hints": {
46+
"dimensions": [
47+
[
48+
[
49+
"stage-x"
50+
],
51+
"primary"
52+
]
53+
]
54+
},
55+
"shape": [
56+
5
57+
]
58+
},
59+
"stop": {
60+
"uid": "def4aa81-db42-497d-92e9-1d519d252c7e",
61+
"time": 1762787618.4661725,
62+
"run_start": "4866611f-e6d9-4517-bedf-fc5526df57ad",
63+
"exit_status": "success",
64+
"reason": "",
65+
"num_events": {
66+
"primary": 5
67+
}
68+
}
69+
},
70+
"structure": {
71+
"contents": null,
72+
"count": 1
73+
},
74+
"access_blob": {},
75+
"sorting": [
76+
{
77+
"key": "",
78+
"direction": 1
79+
}
80+
],
81+
"data_sources": null
82+
},
83+
"links": {
84+
"self": "http://0.0.0.0:8000/api/v1/metadata/4866611f-e6d9-4517-bedf-fc5526df57ad",
85+
"search": "http://0.0.0.0:8000/api/v1/search/4866611f-e6d9-4517-bedf-fc5526df57ad",
86+
"full": "http://0.0.0.0:8000/api/v1/container/full/4866611f-e6d9-4517-bedf-fc5526df57ad"
87+
},
88+
"meta": null
89+
},
90+
{
91+
"id": "1e37c0ed-e87e-470d-be18-9d7f62f69127",
92+
"attributes": {
93+
"ancestors": [],
94+
"structure_family": "container",
95+
"specs": [
96+
{
97+
"name": "BlueskyRun",
98+
"version": "3.0"
99+
}
100+
],
101+
"metadata": {
102+
"start": {
103+
"uid": "1e37c0ed-e87e-470d-be18-9d7f62f69127",
104+
"time": 1762786856.890415,
105+
"versions": {
106+
"ophyd": "1.11.0",
107+
"ophyd_async": "0.13.6",
108+
"bluesky": "1.14.6"
109+
},
110+
"instrument": "adsim",
111+
"instrument_session": "cm12345-2",
112+
"data_session_directory": "/tmp",
113+
"detector_file_template": "{instrument}-{scan_id}-{device_name}",
114+
"scan_file": "adsim-2",
115+
"scan_id": 2,
116+
"plan_type": "generator",
117+
"plan_name": "spec_scan",
118+
"detectors": [
119+
"det"
120+
],
121+
"motors": [
122+
"stage-x"
123+
],
124+
"num_points": 10,
125+
"num_intervals": 9,
126+
"plan_args": {
127+
"detectors": [
128+
"det"
129+
],
130+
"spec": "Line(axis=<ophyd_async.epics.motor.Motor object at 0x74c545aeba10>, start=0.0, stop=10.0, num=10)"
131+
},
132+
"hints": {
133+
"dimensions": [
134+
[
135+
[
136+
"stage-x"
137+
],
138+
"primary"
139+
]
140+
]
141+
},
142+
"shape": [
143+
10
144+
]
145+
},
146+
"stop": {
147+
"uid": "4754ca2e-75df-4686-8084-7d8cbcc0bf5e",
148+
"time": 1762786871.6394713,
149+
"run_start": "1e37c0ed-e87e-470d-be18-9d7f62f69127",
150+
"exit_status": "success",
151+
"reason": "",
152+
"num_events": {
153+
"primary": 10
154+
}
155+
}
156+
},
157+
"structure": {
158+
"contents": null,
159+
"count": 1
160+
},
161+
"access_blob": {},
162+
"sorting": [
163+
{
164+
"key": "",
165+
"direction": 1
166+
}
167+
],
168+
"data_sources": null
169+
},
170+
"links": {
171+
"self": "http://0.0.0.0:8000/api/v1/metadata/1e37c0ed-e87e-470d-be18-9d7f62f69127",
172+
"search": "http://0.0.0.0:8000/api/v1/search/1e37c0ed-e87e-470d-be18-9d7f62f69127",
173+
"full": "http://0.0.0.0:8000/api/v1/container/full/1e37c0ed-e87e-470d-be18-9d7f62f69127"
174+
},
175+
"meta": null
176+
}
177+
],
178+
"error": null,
179+
"links": {
180+
"self": "http://127.0.0.1:8000/api/v1/search/?page[offset]=0&page[limit]=100",
181+
"first": "http://127.0.0.1:8000/api/v1/search/?page[offset]=0&page[limit]=100",
182+
"last": "http://127.0.0.1:8000/api/v1/search/?page[offset]=0&page[limit]=100",
183+
"next": null,
184+
"prev": null
185+
},
186+
"meta": {
187+
"count": 2
188+
}
189+
}
Lines changed: 187 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,187 @@
1+
{
2+
"data": [
3+
{
4+
"id": "primary",
5+
"attributes": {
6+
"ancestors": [
7+
"5d8f5c3e-0e00-4c5c-816d-70b4b0f41498"
8+
],
9+
"structure_family": "container",
10+
"specs": [
11+
{
12+
"name": "BlueskyEventStream",
13+
"version": "3.0"
14+
},
15+
{
16+
"name": "composite",
17+
"version": null
18+
}
19+
],
20+
"metadata": {
21+
"configuration": {
22+
"det": {
23+
"data": {
24+
"det-driver-acquire_period": 0.005,
25+
"det-driver-acquire_time": 0.1
26+
},
27+
"timestamps": {
28+
"det-driver-acquire_period": 1761820563.802417,
29+
"det-driver-acquire_time": 1761820563.802396
30+
},
31+
"data_keys": {
32+
"det-driver-acquire_period": {
33+
"dtype": "number",
34+
"shape": [],
35+
"dtype_numpy": "<f8",
36+
"source": "ca://BL01T-DI-CAM-01:DET:AcquirePeriod_RBV",
37+
"units": "",
38+
"precision": 3
39+
},
40+
"det-driver-acquire_time": {
41+
"dtype": "number",
42+
"shape": [],
43+
"dtype_numpy": "<f8",
44+
"source": "ca://BL01T-DI-CAM-01:DET:AcquireTime_RBV",
45+
"units": "",
46+
"precision": 3
47+
}
48+
}
49+
},
50+
"stage-x": {
51+
"data": {
52+
"stage-x-motor_egu": "degrees",
53+
"stage-x-velocity": 1,
54+
"stage-x-offset": 0
55+
},
56+
"timestamps": {
57+
"stage-x-motor_egu": 1761820562.387004,
58+
"stage-x-velocity": 631152000,
59+
"stage-x-offset": 631152000
60+
},
61+
"data_keys": {
62+
"stage-x-motor_egu": {
63+
"dtype": "string",
64+
"shape": [],
65+
"dtype_numpy": "|S40",
66+
"source": "ca://BL01T-MO-SIMC-01:M1.EGU"
67+
},
68+
"stage-x-velocity": {
69+
"dtype": "number",
70+
"shape": [],
71+
"dtype_numpy": "<f8",
72+
"source": "ca://BL01T-MO-SIMC-01:M1.VELO",
73+
"units": "degrees",
74+
"precision": 5,
75+
"limits": {
76+
"control": {
77+
"low": 0.1,
78+
"high": 0
79+
},
80+
"display": {
81+
"low": 0.1,
82+
"high": 0
83+
}
84+
}
85+
},
86+
"stage-x-offset": {
87+
"dtype": "number",
88+
"shape": [],
89+
"dtype_numpy": "<f8",
90+
"source": "ca://BL01T-MO-SIMC-01:M1.OFF",
91+
"units": "degrees",
92+
"precision": 5,
93+
"limits": {
94+
"control": {
95+
"low": -9007199254740991,
96+
"high": 9007199254740991
97+
},
98+
"display": {
99+
"low": -9007199254740991,
100+
"high": 9007199254740991
101+
}
102+
}
103+
}
104+
}
105+
}
106+
},
107+
"data_keys": {
108+
"det": {
109+
"source": "ca://BL01T-DI-CAM-01:HDF5:FullFileName_RBV",
110+
"shape": [
111+
1,
112+
1024,
113+
1024
114+
],
115+
"dtype": "array",
116+
"dtype_numpy": "|i1",
117+
"object_name": "det",
118+
"external": "STREAM:"
119+
},
120+
"stage-x": {
121+
"dtype": "number",
122+
"shape": [],
123+
"dtype_numpy": "<f8",
124+
"source": "ca://BL01T-MO-SIMC-01:M1.RBV",
125+
"units": "degrees",
126+
"precision": 5,
127+
"limits": {
128+
"control": {
129+
"low": -20000,
130+
"high": 20000
131+
},
132+
"display": {
133+
"low": -20000,
134+
"high": 20000
135+
}
136+
},
137+
"object_name": "stage-x"
138+
}
139+
},
140+
"time": 1761823736.1328046,
141+
"uid": "97c7bb0c-8ebf-4d98-b506-abf20f382eb5",
142+
"hints": {
143+
"det": {
144+
"fields": [
145+
"det"
146+
]
147+
},
148+
"stage-x": {
149+
"fields": [
150+
"stage-x"
151+
]
152+
}
153+
}
154+
},
155+
"structure": {
156+
"contents": null,
157+
"count": 2
158+
},
159+
"access_blob": {},
160+
"sorting": [
161+
{
162+
"key": "",
163+
"direction": 1
164+
}
165+
],
166+
"data_sources": null
167+
},
168+
"links": {
169+
"self": "http://127.0.0.1:8000/api/v1/metadata/5d8f5c3e-0e00-4c5c-816d-70b4b0f41498/primary",
170+
"search": "http://127.0.0.1:8000/api/v1/search/5d8f5c3e-0e00-4c5c-816d-70b4b0f41498/primary",
171+
"full": "http://127.0.0.1:8000/api/v1/container/full/5d8f5c3e-0e00-4c5c-816d-70b4b0f41498/primary"
172+
},
173+
"meta": null
174+
}
175+
],
176+
"error": null,
177+
"links": {
178+
"self": "http://127.0.0.1:8000/api/v1/search/5d8f5c3e-0e00-4c5c-816d-70b4b0f41498?page[offset]=0&page[limit]=100",
179+
"first": "http://127.0.0.1:8000/api/v1/search/5d8f5c3e-0e00-4c5c-816d-70b4b0f41498?page[offset]=0&page[limit]=100",
180+
"last": "http://127.0.0.1:8000/api/v1/search/5d8f5c3e-0e00-4c5c-816d-70b4b0f41498?page[offset]=0&page[limit]=100",
181+
"next": null,
182+
"prev": null
183+
},
184+
"meta": {
185+
"count": 1
186+
}
187+
}

0 commit comments

Comments
 (0)