atomscale 0.16.0__tar.gz → 0.18.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {atomscale-0.16.0 → atomscale-0.18.0}/PKG-INFO +1 -1
- {atomscale-0.16.0 → atomscale-0.18.0}/docs/guides/upload-files.rst +1 -1
- {atomscale-0.16.0 → atomscale-0.18.0}/src/atomscale/client.py +27 -15
- {atomscale-0.16.0 → atomscale-0.18.0}/src/atomscale/results/__init__.py +4 -0
- atomscale-0.18.0/src/atomscale/results/metrology.py +7 -0
- atomscale-0.16.0/src/atomscale/results/metrology.py → atomscale-0.18.0/src/atomscale/results/recipe.py +3 -3
- atomscale-0.18.0/src/atomscale/results/tool_state.py +27 -0
- {atomscale-0.16.0 → atomscale-0.18.0}/src/atomscale/similarity/provider.py +1 -1
- {atomscale-0.16.0 → atomscale-0.18.0}/src/atomscale/streaming/src/timeseries.rs +4 -4
- {atomscale-0.16.0 → atomscale-0.18.0}/src/atomscale/timeseries/__init__.py +5 -1
- {atomscale-0.16.0 → atomscale-0.18.0}/src/atomscale/timeseries/align.py +4 -4
- atomscale-0.18.0/src/atomscale/timeseries/metrology.py +7 -0
- {atomscale-0.16.0 → atomscale-0.18.0}/src/atomscale/timeseries/provider.py +22 -22
- atomscale-0.18.0/src/atomscale/timeseries/recipe.py +63 -0
- {atomscale-0.16.0 → atomscale-0.18.0}/src/atomscale/timeseries/registry.py +8 -2
- atomscale-0.16.0/src/atomscale/timeseries/metrology.py → atomscale-0.18.0/src/atomscale/timeseries/tool_state.py +10 -12
- {atomscale-0.16.0 → atomscale-0.18.0}/src/atomscale.egg-info/PKG-INFO +1 -1
- {atomscale-0.16.0 → atomscale-0.18.0}/src/atomscale.egg-info/SOURCES.txt +5 -0
- {atomscale-0.16.0 → atomscale-0.18.0}/src/atomscale.egg-info/scm_file_list.json +5 -0
- atomscale-0.18.0/src/atomscale.egg-info/scm_version.json +8 -0
- {atomscale-0.16.0 → atomscale-0.18.0}/tests/conftest.py +2 -1
- {atomscale-0.16.0 → atomscale-0.18.0}/tests/test_align.py +16 -22
- {atomscale-0.16.0 → atomscale-0.18.0}/tests/test_client.py +21 -2
- atomscale-0.18.0/tests/test_metrology.py +193 -0
- atomscale-0.16.0/tests/test_metrology.py → atomscale-0.18.0/tests/test_recipe.py +40 -24
- {atomscale-0.16.0 → atomscale-0.18.0}/tests/test_timeseries_stream.py +15 -15
- atomscale-0.16.0/src/atomscale.egg-info/scm_version.json +0 -8
- {atomscale-0.16.0 → atomscale-0.18.0}/.github/workflows/release.yml +0 -0
- {atomscale-0.16.0 → atomscale-0.18.0}/.github/workflows/testing.yml +0 -0
- {atomscale-0.16.0 → atomscale-0.18.0}/.github/workflows/upgrade_dependencies.yml +0 -0
- {atomscale-0.16.0 → atomscale-0.18.0}/.gitignore +0 -0
- {atomscale-0.16.0 → atomscale-0.18.0}/.pre-commit-config.yaml +0 -0
- {atomscale-0.16.0 → atomscale-0.18.0}/CHANGELOG.md +0 -0
- {atomscale-0.16.0 → atomscale-0.18.0}/LICENSE +0 -0
- {atomscale-0.16.0 → atomscale-0.18.0}/MANIFEST.in +0 -0
- {atomscale-0.16.0 → atomscale-0.18.0}/README.md +0 -0
- {atomscale-0.16.0 → atomscale-0.18.0}/atomicds-shim-dist/pyproject.toml +0 -0
- {atomscale-0.16.0 → atomscale-0.18.0}/docs/Makefile +0 -0
- {atomscale-0.16.0 → atomscale-0.18.0}/docs/_static/AtomscaleLogoFull.png +0 -0
- {atomscale-0.16.0 → atomscale-0.18.0}/docs/_static/custom.css +0 -0
- {atomscale-0.16.0 → atomscale-0.18.0}/docs/_templates/custom-class-template.rst +0 -0
- {atomscale-0.16.0 → atomscale-0.18.0}/docs/_templates/custom-module-template.rst +0 -0
- {atomscale-0.16.0 → atomscale-0.18.0}/docs/conf.py +0 -0
- {atomscale-0.16.0 → atomscale-0.18.0}/docs/guides/analysis-results.rst +0 -0
- {atomscale-0.16.0 → atomscale-0.18.0}/docs/guides/monitor-live.rst +0 -0
- {atomscale-0.16.0 → atomscale-0.18.0}/docs/guides/quickstart.rst +0 -0
- {atomscale-0.16.0 → atomscale-0.18.0}/docs/guides/search-and-download.rst +0 -0
- {atomscale-0.16.0 → atomscale-0.18.0}/docs/guides/stream-rheed.rst +0 -0
- {atomscale-0.16.0 → atomscale-0.18.0}/docs/guides/stream-timeseries.rst +0 -0
- {atomscale-0.16.0 → atomscale-0.18.0}/docs/index.rst +0 -0
- {atomscale-0.16.0 → atomscale-0.18.0}/docs/make.bat +0 -0
- {atomscale-0.16.0 → atomscale-0.18.0}/docs/modules.rst +0 -0
- {atomscale-0.16.0 → atomscale-0.18.0}/examples/changepoints.ipynb +0 -0
- {atomscale-0.16.0 → atomscale-0.18.0}/examples/general_use.ipynb +0 -0
- {atomscale-0.16.0 → atomscale-0.18.0}/examples/rheed_streaming.ipynb +0 -0
- {atomscale-0.16.0 → atomscale-0.18.0}/examples/timeseries_polling.ipynb +0 -0
- {atomscale-0.16.0 → atomscale-0.18.0}/examples/vxwse2-placeholder/task1_films.ipynb +0 -0
- {atomscale-0.16.0 → atomscale-0.18.0}/examples/vxwse2-placeholder/task1_sapphire.ipynb +0 -0
- {atomscale-0.16.0 → atomscale-0.18.0}/examples/vxwse2-placeholder/task2_composition.ipynb +0 -0
- {atomscale-0.16.0 → atomscale-0.18.0}/pyproject.toml +0 -0
- {atomscale-0.16.0 → atomscale-0.18.0}/requirements/requirements-macos-latest_py3.10.txt +0 -0
- {atomscale-0.16.0 → atomscale-0.18.0}/requirements/requirements-macos-latest_py3.10_extras.txt +0 -0
- {atomscale-0.16.0 → atomscale-0.18.0}/requirements/requirements-macos-latest_py3.11.txt +0 -0
- {atomscale-0.16.0 → atomscale-0.18.0}/requirements/requirements-macos-latest_py3.11_extras.txt +0 -0
- {atomscale-0.16.0 → atomscale-0.18.0}/requirements/requirements-macos-latest_py3.12.txt +0 -0
- {atomscale-0.16.0 → atomscale-0.18.0}/requirements/requirements-macos-latest_py3.12_extras.txt +0 -0
- {atomscale-0.16.0 → atomscale-0.18.0}/requirements/requirements-macos-latest_py3.13.txt +0 -0
- {atomscale-0.16.0 → atomscale-0.18.0}/requirements/requirements-macos-latest_py3.13_extras.txt +0 -0
- {atomscale-0.16.0 → atomscale-0.18.0}/requirements/requirements-ubuntu-latest_py3.10.txt +0 -0
- {atomscale-0.16.0 → atomscale-0.18.0}/requirements/requirements-ubuntu-latest_py3.10_extras.txt +0 -0
- {atomscale-0.16.0 → atomscale-0.18.0}/requirements/requirements-ubuntu-latest_py3.11.txt +0 -0
- {atomscale-0.16.0 → atomscale-0.18.0}/requirements/requirements-ubuntu-latest_py3.11_extras.txt +0 -0
- {atomscale-0.16.0 → atomscale-0.18.0}/requirements/requirements-ubuntu-latest_py3.12.txt +0 -0
- {atomscale-0.16.0 → atomscale-0.18.0}/requirements/requirements-ubuntu-latest_py3.12_extras.txt +0 -0
- {atomscale-0.16.0 → atomscale-0.18.0}/requirements/requirements-ubuntu-latest_py3.13.txt +0 -0
- {atomscale-0.16.0 → atomscale-0.18.0}/requirements/requirements-ubuntu-latest_py3.13_extras.txt +0 -0
- {atomscale-0.16.0 → atomscale-0.18.0}/requirements/requirements-windows-latest_py3.10.txt +0 -0
- {atomscale-0.16.0 → atomscale-0.18.0}/requirements/requirements-windows-latest_py3.10_extras.txt +0 -0
- {atomscale-0.16.0 → atomscale-0.18.0}/requirements/requirements-windows-latest_py3.11.txt +0 -0
- {atomscale-0.16.0 → atomscale-0.18.0}/requirements/requirements-windows-latest_py3.11_extras.txt +0 -0
- {atomscale-0.16.0 → atomscale-0.18.0}/requirements/requirements-windows-latest_py3.12.txt +0 -0
- {atomscale-0.16.0 → atomscale-0.18.0}/requirements/requirements-windows-latest_py3.12_extras.txt +0 -0
- {atomscale-0.16.0 → atomscale-0.18.0}/requirements/requirements-windows-latest_py3.13.txt +0 -0
- {atomscale-0.16.0 → atomscale-0.18.0}/requirements/requirements-windows-latest_py3.13_extras.txt +0 -0
- {atomscale-0.16.0 → atomscale-0.18.0}/scripts/ci_auth_preflight.py +0 -0
- {atomscale-0.16.0 → atomscale-0.18.0}/setup.cfg +0 -0
- {atomscale-0.16.0 → atomscale-0.18.0}/src/atomicds/__init__.py +0 -0
- {atomscale-0.16.0 → atomscale-0.18.0}/src/atomscale/__init__.py +0 -0
- {atomscale-0.16.0 → atomscale-0.18.0}/src/atomscale/core/__init__.py +0 -0
- {atomscale-0.16.0 → atomscale-0.18.0}/src/atomscale/core/client.py +0 -0
- {atomscale-0.16.0 → atomscale-0.18.0}/src/atomscale/core/files.py +0 -0
- {atomscale-0.16.0 → atomscale-0.18.0}/src/atomscale/core/utils.py +0 -0
- {atomscale-0.16.0 → atomscale-0.18.0}/src/atomscale/results/changepoint.py +0 -0
- {atomscale-0.16.0 → atomscale-0.18.0}/src/atomscale/results/ellipsometry.py +0 -0
- {atomscale-0.16.0 → atomscale-0.18.0}/src/atomscale/results/embeddings.py +0 -0
- {atomscale-0.16.0 → atomscale-0.18.0}/src/atomscale/results/group.py +0 -0
- {atomscale-0.16.0 → atomscale-0.18.0}/src/atomscale/results/optical.py +0 -0
- {atomscale-0.16.0 → atomscale-0.18.0}/src/atomscale/results/photoluminescence.py +0 -0
- {atomscale-0.16.0 → atomscale-0.18.0}/src/atomscale/results/raman.py +0 -0
- {atomscale-0.16.0 → atomscale-0.18.0}/src/atomscale/results/rheed_image.py +0 -0
- {atomscale-0.16.0 → atomscale-0.18.0}/src/atomscale/results/rheed_video.py +0 -0
- {atomscale-0.16.0 → atomscale-0.18.0}/src/atomscale/results/similarity_trajectory.py +0 -0
- {atomscale-0.16.0 → atomscale-0.18.0}/src/atomscale/results/unknown.py +0 -0
- {atomscale-0.16.0 → atomscale-0.18.0}/src/atomscale/results/xps.py +0 -0
- {atomscale-0.16.0 → atomscale-0.18.0}/src/atomscale/results/xrd.py +0 -0
- {atomscale-0.16.0 → atomscale-0.18.0}/src/atomscale/similarity/__init__.py +0 -0
- {atomscale-0.16.0 → atomscale-0.18.0}/src/atomscale/similarity/embedding_provider.py +0 -0
- {atomscale-0.16.0 → atomscale-0.18.0}/src/atomscale/similarity/polling.py +0 -0
- {atomscale-0.16.0 → atomscale-0.18.0}/src/atomscale/streaming/Cargo.lock +0 -0
- {atomscale-0.16.0 → atomscale-0.18.0}/src/atomscale/streaming/Cargo.toml +0 -0
- {atomscale-0.16.0 → atomscale-0.18.0}/src/atomscale/streaming/__init__.py +0 -0
- {atomscale-0.16.0 → atomscale-0.18.0}/src/atomscale/streaming/rheed_stream.py +0 -0
- {atomscale-0.16.0 → atomscale-0.18.0}/src/atomscale/streaming/rheed_stream.pyi +0 -0
- {atomscale-0.16.0 → atomscale-0.18.0}/src/atomscale/streaming/src/initialize.rs +0 -0
- {atomscale-0.16.0 → atomscale-0.18.0}/src/atomscale/streaming/src/lib.rs +0 -0
- {atomscale-0.16.0 → atomscale-0.18.0}/src/atomscale/streaming/src/upload.rs +0 -0
- {atomscale-0.16.0 → atomscale-0.18.0}/src/atomscale/streaming/src/utils.rs +0 -0
- {atomscale-0.16.0 → atomscale-0.18.0}/src/atomscale/timeseries/_polling_utils.py +0 -0
- {atomscale-0.16.0 → atomscale-0.18.0}/src/atomscale/timeseries/ellipsometry.py +0 -0
- {atomscale-0.16.0 → atomscale-0.18.0}/src/atomscale/timeseries/optical.py +0 -0
- {atomscale-0.16.0 → atomscale-0.18.0}/src/atomscale/timeseries/polling.py +0 -0
- {atomscale-0.16.0 → atomscale-0.18.0}/src/atomscale/timeseries/rheed.py +0 -0
- {atomscale-0.16.0 → atomscale-0.18.0}/src/atomscale/timeseries/sample.py +0 -0
- {atomscale-0.16.0 → atomscale-0.18.0}/src/atomscale.egg-info/dependency_links.txt +0 -0
- {atomscale-0.16.0 → atomscale-0.18.0}/src/atomscale.egg-info/requires.txt +0 -0
- {atomscale-0.16.0 → atomscale-0.18.0}/src/atomscale.egg-info/top_level.txt +0 -0
- {atomscale-0.16.0 → atomscale-0.18.0}/tests/__init__.py +0 -0
- {atomscale-0.16.0 → atomscale-0.18.0}/tests/_mock_http_server.py +0 -0
- {atomscale-0.16.0 → atomscale-0.18.0}/tests/data/test_rheed.mp4 +0 -0
- {atomscale-0.16.0 → atomscale-0.18.0}/tests/test_atomicds_alias.py +0 -0
- {atomscale-0.16.0 → atomscale-0.18.0}/tests/test_changepoint.py +0 -0
- {atomscale-0.16.0 → atomscale-0.18.0}/tests/test_core.py +0 -0
- {atomscale-0.16.0 → atomscale-0.18.0}/tests/test_ellipsometry.py +0 -0
- {atomscale-0.16.0 → atomscale-0.18.0}/tests/test_embeddings.py +0 -0
- {atomscale-0.16.0 → atomscale-0.18.0}/tests/test_optical.py +0 -0
- {atomscale-0.16.0 → atomscale-0.18.0}/tests/test_photoluminescence.py +0 -0
- {atomscale-0.16.0 → atomscale-0.18.0}/tests/test_polling.py +0 -0
- {atomscale-0.16.0 → atomscale-0.18.0}/tests/test_raman.py +0 -0
- {atomscale-0.16.0 → atomscale-0.18.0}/tests/test_rheed_embedding.py +0 -0
- {atomscale-0.16.0 → atomscale-0.18.0}/tests/test_rheed_image.py +0 -0
- {atomscale-0.16.0 → atomscale-0.18.0}/tests/test_rheed_stream.py +0 -0
- {atomscale-0.16.0 → atomscale-0.18.0}/tests/test_rheed_timeseries.py +0 -0
- {atomscale-0.16.0 → atomscale-0.18.0}/tests/test_rheed_video.py +0 -0
- {atomscale-0.16.0 → atomscale-0.18.0}/tests/test_similarity_matches.py +0 -0
- {atomscale-0.16.0 → atomscale-0.18.0}/tests/test_similarity_trajectory.py +0 -0
- {atomscale-0.16.0 → atomscale-0.18.0}/tests/test_xps.py +0 -0
- {atomscale-0.16.0 → atomscale-0.18.0}/uv.lock +0 -0
|
@@ -25,13 +25,14 @@ from atomscale.results import (
|
|
|
25
25
|
ChangepointResult,
|
|
26
26
|
EllipsometryResult,
|
|
27
27
|
EmbeddingsResult,
|
|
28
|
-
MetrologyResult,
|
|
29
28
|
OpticalResult,
|
|
30
29
|
PhotoluminescenceResult,
|
|
31
30
|
RamanResult,
|
|
31
|
+
RecipeResult,
|
|
32
32
|
RHEEDImageResult,
|
|
33
33
|
RHEEDVideoResult,
|
|
34
34
|
SimilarityTrajectoryResult,
|
|
35
|
+
ToolStateResult,
|
|
35
36
|
UnknownResult,
|
|
36
37
|
XPSResult,
|
|
37
38
|
XRDResult,
|
|
@@ -42,7 +43,7 @@ from atomscale.results.group import PhysicalSampleResult, ProjectResult
|
|
|
42
43
|
from atomscale.timeseries.align import align_timeseries
|
|
43
44
|
from atomscale.timeseries.registry import get_provider
|
|
44
45
|
|
|
45
|
-
TimeseriesDomain = Literal["rheed", "optical", "
|
|
46
|
+
TimeseriesDomain = Literal["rheed", "optical", "tool_state"]
|
|
46
47
|
|
|
47
48
|
_RETRYABLE_STATUSES = frozenset({429, 500, 502, 503, 504})
|
|
48
49
|
|
|
@@ -135,6 +136,7 @@ class Client(BaseClient):
|
|
|
135
136
|
"recipe",
|
|
136
137
|
"optical",
|
|
137
138
|
"metrology",
|
|
139
|
+
"tool_state",
|
|
138
140
|
"ellipsometry",
|
|
139
141
|
"all",
|
|
140
142
|
] = "all",
|
|
@@ -164,7 +166,8 @@ class Client(BaseClient):
|
|
|
164
166
|
data_ids (str | list[str] | None): Data ID or list of data IDs. Defaults to None.
|
|
165
167
|
physical_sample_ids (str | list[str] | None): Physical sample ID or list of IDs. Defaults to None.
|
|
166
168
|
project_ids (str | list[str] | None): Project ID or list of IDs. Defaults to None.
|
|
167
|
-
data_type
|
|
169
|
+
data_type: Type of data. ``"tool_state"`` is canonical;
|
|
170
|
+
``"metrology"`` remains accepted as a deprecated compatibility alias.
|
|
168
171
|
status (Literal["success", "pending", "error", "running", "all"]): Analyzed status of the data. Defaults to "all".
|
|
169
172
|
growth_length (tuple[int | None, int | None]): Minimum and maximum values of the growth length in seconds.
|
|
170
173
|
Defaults to (None, None) which will include all non-video data.
|
|
@@ -193,7 +196,16 @@ class Client(BaseClient):
|
|
|
193
196
|
"data_ids": data_ids,
|
|
194
197
|
"physical_sample_ids": physical_sample_ids,
|
|
195
198
|
"project_ids": project_ids,
|
|
196
|
-
"
|
|
199
|
+
# Map the legacy "metrology" filter to its renamed "tool_state"
|
|
200
|
+
# char-source so it resolves against the current backend, which
|
|
201
|
+
# validates this param as an enum that no longer accepts "metrology".
|
|
202
|
+
"data_type": (
|
|
203
|
+
None
|
|
204
|
+
if data_type == "all"
|
|
205
|
+
else "tool_state"
|
|
206
|
+
if data_type == "metrology"
|
|
207
|
+
else data_type
|
|
208
|
+
),
|
|
197
209
|
"status": status,
|
|
198
210
|
"growth_length_min": growth_length[0],
|
|
199
211
|
"growth_length_max": growth_length[1],
|
|
@@ -302,7 +314,8 @@ class Client(BaseClient):
|
|
|
302
314
|
| PhotoluminescenceResult
|
|
303
315
|
| RamanResult
|
|
304
316
|
| OpticalResult
|
|
305
|
-
|
|
|
317
|
+
| ToolStateResult
|
|
318
|
+
| RecipeResult
|
|
306
319
|
| EllipsometryResult
|
|
307
320
|
| UnknownResult
|
|
308
321
|
]:
|
|
@@ -1174,6 +1187,7 @@ class Client(BaseClient):
|
|
|
1174
1187
|
"rheed_rotating",
|
|
1175
1188
|
"rheed_xscan",
|
|
1176
1189
|
"metrology",
|
|
1190
|
+
"tool_state",
|
|
1177
1191
|
"recipe",
|
|
1178
1192
|
"optical",
|
|
1179
1193
|
"ellipsometry",
|
|
@@ -1187,7 +1201,8 @@ class Client(BaseClient):
|
|
|
1187
1201
|
| RamanResult
|
|
1188
1202
|
| XRDResult
|
|
1189
1203
|
| OpticalResult
|
|
1190
|
-
|
|
|
1204
|
+
| ToolStateResult
|
|
1205
|
+
| RecipeResult
|
|
1191
1206
|
| EllipsometryResult
|
|
1192
1207
|
| UnknownResult
|
|
1193
1208
|
| None
|
|
@@ -1267,18 +1282,15 @@ class Client(BaseClient):
|
|
|
1267
1282
|
"rheed_rotating",
|
|
1268
1283
|
"rheed_xscan",
|
|
1269
1284
|
"metrology",
|
|
1285
|
+
"tool_state",
|
|
1270
1286
|
"recipe",
|
|
1271
1287
|
"optical",
|
|
1272
1288
|
"ellipsometry",
|
|
1273
1289
|
]:
|
|
1274
|
-
#
|
|
1275
|
-
|
|
1276
|
-
|
|
1277
|
-
|
|
1278
|
-
else "metrology"
|
|
1279
|
-
if data_type == "recipe"
|
|
1280
|
-
else data_type
|
|
1281
|
-
)
|
|
1290
|
+
# Each data_type resolves to its own provider/endpoint. Legacy
|
|
1291
|
+
# "metrology" catalogue entries map to the canonical tool-state
|
|
1292
|
+
# provider. Recipe remains distinct on its own endpoint.
|
|
1293
|
+
timeseries_type = "rheed" if "rheed" in data_type else data_type
|
|
1282
1294
|
provider = get_provider(timeseries_type)
|
|
1283
1295
|
|
|
1284
1296
|
# Get timeseries data
|
|
@@ -1610,7 +1622,7 @@ class Client(BaseClient):
|
|
|
1610
1622
|
Download raw or processed files for any data type to disk.
|
|
1611
1623
|
|
|
1612
1624
|
Works for every data_type the platform stores (RHEED video, XPS / XRD /
|
|
1613
|
-
PL / Raman / optical /
|
|
1625
|
+
PL / Raman / optical / tool-state / ellipsometry / etc.) — the underlying
|
|
1614
1626
|
``data_entries/{raw_data|processed_data}/{data_id}`` endpoint is
|
|
1615
1627
|
data-type-agnostic and returns whatever file format the backend has on
|
|
1616
1628
|
record.
|
|
@@ -6,6 +6,7 @@ from .metrology import MetrologyResult
|
|
|
6
6
|
from .optical import OpticalResult
|
|
7
7
|
from .photoluminescence import PhotoluminescenceResult
|
|
8
8
|
from .raman import RamanResult
|
|
9
|
+
from .recipe import RecipeResult
|
|
9
10
|
from .rheed_image import (
|
|
10
11
|
RHEEDImageCollection,
|
|
11
12
|
RHEEDImageResult,
|
|
@@ -14,6 +15,7 @@ from .rheed_image import (
|
|
|
14
15
|
)
|
|
15
16
|
from .rheed_video import RHEEDVideoResult
|
|
16
17
|
from .similarity_trajectory import SimilarityTrajectoryResult
|
|
18
|
+
from .tool_state import ToolStateResult
|
|
17
19
|
from .unknown import UnknownResult
|
|
18
20
|
from .xps import XPSResult
|
|
19
21
|
from .xrd import XRDResult
|
|
@@ -31,7 +33,9 @@ __all__ = [
|
|
|
31
33
|
"RHEEDImageResult",
|
|
32
34
|
"RHEEDVideoResult",
|
|
33
35
|
"RamanResult",
|
|
36
|
+
"RecipeResult",
|
|
34
37
|
"SimilarityTrajectoryResult",
|
|
38
|
+
"ToolStateResult",
|
|
35
39
|
"UnknownResult",
|
|
36
40
|
"XPSResult",
|
|
37
41
|
"XRDResult",
|
|
@@ -6,18 +6,18 @@ from monty.json import MSONable
|
|
|
6
6
|
from pandas import DataFrame
|
|
7
7
|
|
|
8
8
|
|
|
9
|
-
class
|
|
9
|
+
class RecipeResult(MSONable):
|
|
10
10
|
def __init__(
|
|
11
11
|
self,
|
|
12
12
|
data_id: UUID | str,
|
|
13
13
|
timeseries_data: DataFrame,
|
|
14
14
|
collected_datetime: str | None = None,
|
|
15
15
|
):
|
|
16
|
-
"""
|
|
16
|
+
"""Recipe result
|
|
17
17
|
|
|
18
18
|
Args:
|
|
19
19
|
data_id (UUID | str): Data ID for the entry in the data catalogue.
|
|
20
|
-
timeseries_data (DataFrame): Pandas DataFrame with timeseries
|
|
20
|
+
timeseries_data (DataFrame): Pandas DataFrame with the recipe (process-plan setpoint) timeseries expanded from the ingested recipe file.
|
|
21
21
|
collected_datetime (str | None): Datetime when the data was collected.
|
|
22
22
|
"""
|
|
23
23
|
self.data_id = data_id
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
3
|
+
from uuid import UUID
|
|
4
|
+
|
|
5
|
+
from monty.json import MSONable
|
|
6
|
+
from pandas import DataFrame
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
class ToolStateResult(MSONable):
|
|
10
|
+
"""Processed tool-state timeseries returned by the Atomscale API."""
|
|
11
|
+
|
|
12
|
+
def __init__(
|
|
13
|
+
self,
|
|
14
|
+
data_id: UUID | str,
|
|
15
|
+
timeseries_data: DataFrame,
|
|
16
|
+
collected_datetime: str | None = None,
|
|
17
|
+
):
|
|
18
|
+
"""Initialize a tool-state result.
|
|
19
|
+
|
|
20
|
+
Args:
|
|
21
|
+
data_id: Data ID for the entry in the data catalogue.
|
|
22
|
+
timeseries_data: Sensor readback timeseries for the processed tool-state data.
|
|
23
|
+
collected_datetime: Datetime when the data was collected.
|
|
24
|
+
"""
|
|
25
|
+
self.data_id = data_id
|
|
26
|
+
self.timeseries_data = timeseries_data
|
|
27
|
+
self.collected_datetime = collected_datetime
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"""Provider classes for similarity trajectory data.
|
|
2
2
|
|
|
3
3
|
Note on unix-time units: the similarity API emits ``unix_times`` in
|
|
4
|
-
**seconds** (raw DB values), unlike the
|
|
4
|
+
**seconds** (raw DB values), unlike the tool-state / optical /
|
|
5
5
|
ellipsometry endpoints which ship ``unix_timestamp_ms`` in milliseconds.
|
|
6
6
|
The column is renamed to ``UNIX Timestamp`` (unit-less display name);
|
|
7
7
|
the magnitude-based fallback in :func:`align._infer_absolute_time`
|
|
@@ -118,7 +118,7 @@ impl TimeseriesStreamer {
|
|
|
118
118
|
///
|
|
119
119
|
/// Initialize a new time series stream on the server.
|
|
120
120
|
///
|
|
121
|
-
/// Creates data_catalogue and
|
|
121
|
+
/// Creates data_catalogue and processed_tool_state_catalogue entries.
|
|
122
122
|
/// Returns data_id to use for subsequent push() calls.
|
|
123
123
|
///
|
|
124
124
|
/// Args:
|
|
@@ -169,7 +169,7 @@ impl TimeseriesStreamer {
|
|
|
169
169
|
project_id: project_id.clone(),
|
|
170
170
|
};
|
|
171
171
|
|
|
172
|
-
let url = format!("{}/
|
|
172
|
+
let url = format!("{}/tool-state/stream/initialize", self.endpoint);
|
|
173
173
|
|
|
174
174
|
let result = self.rt.block_on(async {
|
|
175
175
|
let resp = self
|
|
@@ -455,7 +455,7 @@ impl TimeseriesStreamer {
|
|
|
455
455
|
#[pyo3(signature = (data_id))]
|
|
456
456
|
#[pyo3(text_signature = "(data_id)")]
|
|
457
457
|
fn finalize(&self, data_id: String) -> PyResult<()> {
|
|
458
|
-
let url = format!("{}/
|
|
458
|
+
let url = format!("{}/tool-state/stream/{}/finalize", self.endpoint, data_id);
|
|
459
459
|
|
|
460
460
|
let result = self.rt.block_on(async {
|
|
461
461
|
let resp = self
|
|
@@ -589,7 +589,7 @@ impl TimeseriesStreamer {
|
|
|
589
589
|
fn spawn_upload_tracked(&self, payload: ChunkPayload) -> JoinHandle<Result<()>> {
|
|
590
590
|
let client = self.client.clone();
|
|
591
591
|
let api_key = self.api_key.clone();
|
|
592
|
-
let url = format!("{}/
|
|
592
|
+
let url = format!("{}/tool-state/stream/chunk", self.endpoint);
|
|
593
593
|
|
|
594
594
|
debug!(
|
|
595
595
|
"[timeseries_stream] spawn: chunk {} for channel '{}'",
|
|
@@ -10,7 +10,7 @@ Convention for time-valued fields:
|
|
|
10
10
|
seconds quantity, not just a number".
|
|
11
11
|
* In pandas DataFrame columns: ``int64`` for whole-millisecond
|
|
12
12
|
``UNIX Timestamp`` values (lossless and fast). Magnitude is
|
|
13
|
-
milliseconds for
|
|
13
|
+
milliseconds for tool-state / optical / ellipsometry, seconds for
|
|
14
14
|
similarity. Column name disambiguates the unit via
|
|
15
15
|
:func:`align._infer_absolute_time`.
|
|
16
16
|
|
|
@@ -29,15 +29,19 @@ from .polling import (
|
|
|
29
29
|
start_polling_thread,
|
|
30
30
|
)
|
|
31
31
|
from .provider import TimeseriesProvider, properties_payload_to_dataframe
|
|
32
|
+
from .recipe import RecipeProvider
|
|
32
33
|
from .registry import get_provider
|
|
33
34
|
from .rheed import RHEEDProvider
|
|
35
|
+
from .tool_state import ToolStateProvider
|
|
34
36
|
|
|
35
37
|
__all__ = [
|
|
36
38
|
"EllipsometryProvider",
|
|
37
39
|
"MetrologyProvider",
|
|
38
40
|
"OpticalProvider",
|
|
39
41
|
"RHEEDProvider",
|
|
42
|
+
"RecipeProvider",
|
|
40
43
|
"TimeseriesProvider",
|
|
44
|
+
"ToolStateProvider",
|
|
41
45
|
"aiter_poll",
|
|
42
46
|
"align_timeseries",
|
|
43
47
|
"get_provider",
|
|
@@ -6,9 +6,9 @@ import pandas as pd
|
|
|
6
6
|
|
|
7
7
|
from atomscale.results import (
|
|
8
8
|
EllipsometryResult,
|
|
9
|
-
MetrologyResult,
|
|
10
9
|
OpticalResult,
|
|
11
10
|
RHEEDVideoResult,
|
|
11
|
+
ToolStateResult,
|
|
12
12
|
)
|
|
13
13
|
|
|
14
14
|
# Column names whose suffix encodes the unit. Order matters: more specific
|
|
@@ -148,8 +148,8 @@ def _extract_timeseries(result):
|
|
|
148
148
|
elif isinstance(result, OpticalResult):
|
|
149
149
|
domain = "optical"
|
|
150
150
|
timeseries = result.timeseries_data
|
|
151
|
-
elif isinstance(result,
|
|
152
|
-
domain = "
|
|
151
|
+
elif isinstance(result, ToolStateResult):
|
|
152
|
+
domain = "tool_state"
|
|
153
153
|
timeseries = result.timeseries_data
|
|
154
154
|
elif isinstance(result, EllipsometryResult):
|
|
155
155
|
domain = "ellipsometry"
|
|
@@ -236,7 +236,7 @@ def align_timeseries(
|
|
|
236
236
|
"""Align timeseries results by time index.
|
|
237
237
|
|
|
238
238
|
Args:
|
|
239
|
-
results: Iterable of result objects (RHEEDVideoResult, OpticalResult,
|
|
239
|
+
results: Iterable of result objects (RHEEDVideoResult, OpticalResult, ToolStateResult).
|
|
240
240
|
how: Join strategy for the outer alignment. Defaults to "outer".
|
|
241
241
|
|
|
242
242
|
Returns:
|
|
@@ -124,29 +124,29 @@ def properties_payload_to_dataframe(
|
|
|
124
124
|
continue
|
|
125
125
|
|
|
126
126
|
ts_ms = _to_int64_ms(kept_ts)
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
#
|
|
133
|
-
#
|
|
134
|
-
#
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
127
|
+
rel_ms = np.asarray(
|
|
128
|
+
[float(r) if r is not None else np.nan for r in kept_rel],
|
|
129
|
+
dtype=np.float64,
|
|
130
|
+
)
|
|
131
|
+
|
|
132
|
+
# Collapse duplicate timestamps within this property. Two samples that
|
|
133
|
+
# share a unix-ms make the per-property index non-unique, which breaks
|
|
134
|
+
# the outer-join below: pandas cannot reindex a duplicate-labelled axis
|
|
135
|
+
# onto the merged index and raises "cannot reindex on an axis with
|
|
136
|
+
# duplicate labels". Sort by time and keep the last reading at each
|
|
137
|
+
# instant (latest value wins; this also gives the np.interp time anchor
|
|
138
|
+
# a strictly-increasing x-axis).
|
|
139
|
+
prop_df = pd.DataFrame({"value": kept_values, "rel": rel_ms}, index=ts_ms)
|
|
140
|
+
prop_df = prop_df.sort_index(kind="stable")
|
|
141
|
+
prop_df = prop_df[~prop_df.index.duplicated(keep="last")]
|
|
142
|
+
|
|
143
|
+
series_by_name[name] = prop_df["value"].rename(name)
|
|
144
|
+
|
|
145
|
+
if len(prop_df) > longest_len:
|
|
146
|
+
longest_len = len(prop_df)
|
|
144
147
|
longest_name = name
|
|
145
|
-
longest_ts_ms =
|
|
146
|
-
longest_rel = np.
|
|
147
|
-
[float(r) if r is not None else np.nan for r in kept_rel],
|
|
148
|
-
dtype=np.float64,
|
|
149
|
-
)
|
|
148
|
+
longest_ts_ms = prop_df.index.to_numpy(dtype=np.int64)
|
|
149
|
+
longest_rel = prop_df["rel"].to_numpy(dtype=np.float64)
|
|
150
150
|
|
|
151
151
|
if not series_by_name:
|
|
152
152
|
return DataFrame()
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
3
|
+
from collections.abc import Mapping
|
|
4
|
+
from typing import Any
|
|
5
|
+
|
|
6
|
+
from pandas import DataFrame
|
|
7
|
+
|
|
8
|
+
from atomscale.core import BaseClient
|
|
9
|
+
from atomscale.results.recipe import RecipeResult
|
|
10
|
+
from atomscale.timeseries.provider import (
|
|
11
|
+
TimeseriesProvider,
|
|
12
|
+
properties_payload_to_dataframe,
|
|
13
|
+
series_payload_to_dataframe,
|
|
14
|
+
)
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
class RecipeProvider(TimeseriesProvider[RecipeResult]):
|
|
18
|
+
TYPE = "recipe"
|
|
19
|
+
|
|
20
|
+
# Recipe (process-plan) timeseries share tool-state's property-centric
|
|
21
|
+
# payload shape, so parsing is identical; only the endpoint and the result
|
|
22
|
+
# type differ. Property values keep their API names; only the time columns
|
|
23
|
+
# are renamed to user-facing display labels.
|
|
24
|
+
RENAME_MAP: Mapping[str, str] = {
|
|
25
|
+
"relative_time_seconds": "Time",
|
|
26
|
+
"unix_timestamp_ms": "UNIX Timestamp",
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
def fetch_raw(self, client: BaseClient, data_id: str) -> Any:
|
|
30
|
+
# Recipe has its own endpoint, distinct from tool-state: a recipe is the
|
|
31
|
+
# process *plan* (setpoints), tool-state is the observed sensor readback.
|
|
32
|
+
return client._get(sub_url=f"recipe/{data_id}/timeseries/")
|
|
33
|
+
|
|
34
|
+
def to_dataframe(self, raw: Any) -> DataFrame:
|
|
35
|
+
if not raw:
|
|
36
|
+
return DataFrame()
|
|
37
|
+
if not isinstance(raw, dict):
|
|
38
|
+
raise ValueError(
|
|
39
|
+
f"{type(self).__name__} payload must be a dict; got "
|
|
40
|
+
f"{type(raw).__name__}."
|
|
41
|
+
)
|
|
42
|
+
if "properties" in raw:
|
|
43
|
+
parsed = properties_payload_to_dataframe(raw["properties"])
|
|
44
|
+
elif "series" in raw:
|
|
45
|
+
parsed = series_payload_to_dataframe(raw["series"])
|
|
46
|
+
else:
|
|
47
|
+
raise ValueError(
|
|
48
|
+
f"{type(self).__name__} payload missing both 'properties' and "
|
|
49
|
+
f"'series' keys. Got: {list(raw.keys())}."
|
|
50
|
+
)
|
|
51
|
+
return parsed.rename(columns=self.RENAME_MAP)
|
|
52
|
+
|
|
53
|
+
def build_result(
|
|
54
|
+
self,
|
|
55
|
+
client: BaseClient, # noqa: ARG002
|
|
56
|
+
data_id: str,
|
|
57
|
+
data_type: str, # noqa: ARG002
|
|
58
|
+
ts_df: DataFrame,
|
|
59
|
+
) -> RecipeResult:
|
|
60
|
+
return RecipeResult(
|
|
61
|
+
data_id=data_id,
|
|
62
|
+
timeseries_data=ts_df,
|
|
63
|
+
)
|
|
@@ -5,15 +5,21 @@ from __future__ import annotations
|
|
|
5
5
|
from atomscale.similarity.provider import SimilarityTrajectoryProvider
|
|
6
6
|
|
|
7
7
|
from .ellipsometry import EllipsometryProvider
|
|
8
|
-
from .metrology import MetrologyProvider
|
|
9
8
|
from .optical import OpticalProvider
|
|
10
9
|
from .provider import TimeseriesProvider
|
|
10
|
+
from .recipe import RecipeProvider
|
|
11
11
|
from .rheed import RHEEDProvider
|
|
12
|
+
from .tool_state import ToolStateProvider
|
|
12
13
|
|
|
13
14
|
_PROVIDER_CLASSES: dict[str, type[TimeseriesProvider]] = {
|
|
14
15
|
RHEEDProvider.TYPE: RHEEDProvider,
|
|
15
16
|
OpticalProvider.TYPE: OpticalProvider,
|
|
16
|
-
|
|
17
|
+
ToolStateProvider.TYPE: ToolStateProvider,
|
|
18
|
+
# Accept data catalogue entries created before the backend enum migration.
|
|
19
|
+
"metrology": ToolStateProvider,
|
|
20
|
+
# Recipe (process plan) is a distinct first-class type, served from its own
|
|
21
|
+
# /recipe endpoint — not folded into tool-state.
|
|
22
|
+
RecipeProvider.TYPE: RecipeProvider,
|
|
17
23
|
EllipsometryProvider.TYPE: EllipsometryProvider,
|
|
18
24
|
SimilarityTrajectoryProvider.TYPE: SimilarityTrajectoryProvider,
|
|
19
25
|
}
|
|
@@ -6,7 +6,7 @@ from typing import Any
|
|
|
6
6
|
from pandas import DataFrame
|
|
7
7
|
|
|
8
8
|
from atomscale.core import BaseClient
|
|
9
|
-
from atomscale.results.
|
|
9
|
+
from atomscale.results.tool_state import ToolStateResult
|
|
10
10
|
from atomscale.timeseries.provider import (
|
|
11
11
|
TimeseriesProvider,
|
|
12
12
|
properties_payload_to_dataframe,
|
|
@@ -14,19 +14,20 @@ from atomscale.timeseries.provider import (
|
|
|
14
14
|
)
|
|
15
15
|
|
|
16
16
|
|
|
17
|
-
class
|
|
18
|
-
|
|
17
|
+
class ToolStateProvider(TimeseriesProvider[ToolStateResult]):
|
|
18
|
+
"""Fetch and parse observed tool-state sensor readbacks."""
|
|
19
19
|
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
#
|
|
20
|
+
TYPE = "tool_state"
|
|
21
|
+
|
|
22
|
+
# Property values retain their human-readable API names. Only the time
|
|
23
|
+
# columns are renamed to the SDK's user-facing display labels.
|
|
23
24
|
RENAME_MAP: Mapping[str, str] = {
|
|
24
25
|
"relative_time_seconds": "Time",
|
|
25
26
|
"unix_timestamp_ms": "UNIX Timestamp",
|
|
26
27
|
}
|
|
27
28
|
|
|
28
29
|
def fetch_raw(self, client: BaseClient, data_id: str) -> Any:
|
|
29
|
-
return client._get(sub_url=f"
|
|
30
|
+
return client._get(sub_url=f"tool-state/{data_id}/timeseries/")
|
|
30
31
|
|
|
31
32
|
def to_dataframe(self, raw: Any) -> DataFrame:
|
|
32
33
|
if not raw:
|
|
@@ -53,8 +54,5 @@ class MetrologyProvider(TimeseriesProvider[MetrologyResult]):
|
|
|
53
54
|
data_id: str,
|
|
54
55
|
data_type: str, # noqa: ARG002
|
|
55
56
|
ts_df: DataFrame,
|
|
56
|
-
) ->
|
|
57
|
-
return
|
|
58
|
-
data_id=data_id,
|
|
59
|
-
timeseries_data=ts_df,
|
|
60
|
-
)
|
|
57
|
+
) -> ToolStateResult:
|
|
58
|
+
return ToolStateResult(data_id=data_id, timeseries_data=ts_df)
|
|
@@ -81,9 +81,11 @@ src/atomscale/results/metrology.py
|
|
|
81
81
|
src/atomscale/results/optical.py
|
|
82
82
|
src/atomscale/results/photoluminescence.py
|
|
83
83
|
src/atomscale/results/raman.py
|
|
84
|
+
src/atomscale/results/recipe.py
|
|
84
85
|
src/atomscale/results/rheed_image.py
|
|
85
86
|
src/atomscale/results/rheed_video.py
|
|
86
87
|
src/atomscale/results/similarity_trajectory.py
|
|
88
|
+
src/atomscale/results/tool_state.py
|
|
87
89
|
src/atomscale/results/unknown.py
|
|
88
90
|
src/atomscale/results/xps.py
|
|
89
91
|
src/atomscale/results/xrd.py
|
|
@@ -109,9 +111,11 @@ src/atomscale/timeseries/metrology.py
|
|
|
109
111
|
src/atomscale/timeseries/optical.py
|
|
110
112
|
src/atomscale/timeseries/polling.py
|
|
111
113
|
src/atomscale/timeseries/provider.py
|
|
114
|
+
src/atomscale/timeseries/recipe.py
|
|
112
115
|
src/atomscale/timeseries/registry.py
|
|
113
116
|
src/atomscale/timeseries/rheed.py
|
|
114
117
|
src/atomscale/timeseries/sample.py
|
|
118
|
+
src/atomscale/timeseries/tool_state.py
|
|
115
119
|
tests/__init__.py
|
|
116
120
|
tests/_mock_http_server.py
|
|
117
121
|
tests/conftest.py
|
|
@@ -127,6 +131,7 @@ tests/test_optical.py
|
|
|
127
131
|
tests/test_photoluminescence.py
|
|
128
132
|
tests/test_polling.py
|
|
129
133
|
tests/test_raman.py
|
|
134
|
+
tests/test_recipe.py
|
|
130
135
|
tests/test_rheed_embedding.py
|
|
131
136
|
tests/test_rheed_image.py
|
|
132
137
|
tests/test_rheed_stream.py
|
|
@@ -75,9 +75,11 @@
|
|
|
75
75
|
"src/atomscale/results/optical.py",
|
|
76
76
|
"src/atomscale/results/photoluminescence.py",
|
|
77
77
|
"src/atomscale/results/raman.py",
|
|
78
|
+
"src/atomscale/results/recipe.py",
|
|
78
79
|
"src/atomscale/results/rheed_image.py",
|
|
79
80
|
"src/atomscale/results/rheed_video.py",
|
|
80
81
|
"src/atomscale/results/similarity_trajectory.py",
|
|
82
|
+
"src/atomscale/results/tool_state.py",
|
|
81
83
|
"src/atomscale/results/unknown.py",
|
|
82
84
|
"src/atomscale/results/xps.py",
|
|
83
85
|
"src/atomscale/results/xrd.py",
|
|
@@ -103,9 +105,11 @@
|
|
|
103
105
|
"src/atomscale/timeseries/optical.py",
|
|
104
106
|
"src/atomscale/timeseries/polling.py",
|
|
105
107
|
"src/atomscale/timeseries/provider.py",
|
|
108
|
+
"src/atomscale/timeseries/recipe.py",
|
|
106
109
|
"src/atomscale/timeseries/registry.py",
|
|
107
110
|
"src/atomscale/timeseries/rheed.py",
|
|
108
111
|
"src/atomscale/timeseries/sample.py",
|
|
112
|
+
"src/atomscale/timeseries/tool_state.py",
|
|
109
113
|
"tests/__init__.py",
|
|
110
114
|
"tests/_mock_http_server.py",
|
|
111
115
|
"tests/conftest.py",
|
|
@@ -122,6 +126,7 @@
|
|
|
122
126
|
"tests/test_photoluminescence.py",
|
|
123
127
|
"tests/test_polling.py",
|
|
124
128
|
"tests/test_raman.py",
|
|
129
|
+
"tests/test_recipe.py",
|
|
125
130
|
"tests/test_rheed_embedding.py",
|
|
126
131
|
"tests/test_rheed_image.py",
|
|
127
132
|
"tests/test_rheed_stream.py",
|