feat: add a custom scan and metadata schema

This commit is contained in:
2025-05-28 16:35:00 +02:00
parent cc3188f66f
commit 2a95393b1d
5 changed files with 16 additions and 1 deletions

View File

@@ -0,0 +1,3 @@
from .custom_scan import CustomTestingScan
__all__ = ["CustomTestingScan"]

View File

@@ -0,0 +1,5 @@
from bec_server.scan_server.scans import LineScan
class CustomTestingScan(LineScan):
scan_name = "custom_testing_scan"

View File

@@ -0,0 +1,6 @@
from bec_lib.metadata_schema import BasicScanMetadata
class CustomScanSchema(BasicScanMetadata):
treatment_description: str
treatment_temperature_k: int

View File

@@ -1,10 +1,11 @@
# from .metadata_schema_template import ExampleSchema
from .custom_test_scan_schema import CustomScanSchema
METADATA_SCHEMA_REGISTRY = {
# Add models which should be used to validate scan metadata here.
# Make a model according to the template, and import it as above
# Then associate it with a scan like so:
# "example_scan": ExampleSchema
"custom_testing_scan": CustomScanSchema
}
# Define a default schema type which should be used as the fallback for everything: