Skip to content

Commit 96c7c90

Browse files
authored
Update beamline acronym and change data stream access
Template of validation script.
1 parent 7de9b44 commit 96c7c90

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

data_validation.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,21 +5,21 @@
55
from prefect.blocks.system import Secret
66
from tiled.client import from_profile
77

8-
BEAMLINE_OR_ENDSTATION = "!!! Set the endstation or beamline_TLA here !!!"
8+
BEAMLINE_OR_ENDSTATION = "arpes"
99

1010

1111
@task(retries=2, retry_delay_seconds=10)
1212
def read_all_streams(uid, beamline_acronym=BEAMLINE_OR_ENDSTATION):
1313
logger = get_run_logger()
1414
api_key = Secret.load(f"tiled-{beamline_acronym}-api-key", _sync=True).get()
1515
tiled_client = from_profile("nsls2", api_key=api_key)
16-
run = tiled_client[beamline_acronym]["raw"][uid]
16+
run = tiled_client[beamline_acronym]["migration"][uid]
1717
logger.info(f"Validating uid {run.metadata['start']['uid']}")
1818
start_time = ttime.monotonic()
1919
for stream in run:
2020
logger.info(f"{stream}:")
2121
stream_start_time = ttime.monotonic()
22-
stream_data = run[stream].read()
22+
# stream_data = run[stream].read()
2323
stream_elapsed_time = ttime.monotonic() - stream_start_time
2424
logger.info(f"{stream} elapsed_time = {stream_elapsed_time}")
2525
logger.info(f"{stream} nbytes = {stream_data.nbytes:_}")

0 commit comments

Comments
 (0)