feat: add a custom scan and metadata schema
This commit is contained in:
@@ -0,0 +1,3 @@
|
||||
from .custom_scan import CustomTestingScan
|
||||
|
||||
__all__ = ["CustomTestingScan"]
|
||||
|
||||
5
bec_testing_plugin/scans/custom_scan.py
Normal file
5
bec_testing_plugin/scans/custom_scan.py
Normal file
@@ -0,0 +1,5 @@
|
||||
from bec_server.scan_server.scans import LineScan
|
||||
|
||||
|
||||
class CustomTestingScan(LineScan):
|
||||
scan_name = "custom_testing_scan"
|
||||
@@ -0,0 +1,6 @@
|
||||
from bec_lib.metadata_schema import BasicScanMetadata
|
||||
|
||||
|
||||
class CustomScanSchema(BasicScanMetadata):
|
||||
treatment_description: str
|
||||
treatment_temperature_k: int
|
||||
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user