Skip to content

Commit

Permalink
Update end_of_run_export.py
Browse files Browse the repository at this point in the history
Testing import from overlays
  • Loading branch information
cjtitus authored Nov 6, 2024
1 parent 82573a1 commit 08fceba
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions end_of_run_export.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,19 @@ def export_all_streams(uid, beamline_acronym="ucal"):
header, data = get_header_and_data(run)
exportToAthena(export_path, data, header)

@task(retries=2, retry_delay_seconds=10)
def export_tes(uid, beamline_acronym="ucal"):
from ucalpost.databroker.run import get_config_dict
tiled_client = initialize_tiled_client()
run = tiled_client[beamline_acronym]["raw"][uid]
if "tes" not in run.start.get("detectors", []):
print("No TES in run, skipping!")
return
else:
print(f'Noise UID: {get_config_dict(run)["tes_noise_uid"]}')
print(f'Cal UID: {get_config_dict(run)["tes_calibration_uid"]}')

@flow
def general_data_export(uid, beamline_acronym="ucal"):
export_all_streams(uid, beamline_acronym)
export_tes(uid, beamline_acronym)

0 comments on commit 08fceba

Please sign in to comment.