From b39f8db262f3765d4a9dbe9f4b40fdf66d3a6f73 Mon Sep 17 00:00:00 2001 From: Daniel Hatton Date: Mon, 27 Jan 2025 13:25:36 +0000 Subject: [PATCH] Need the data source not the metadata source --- src/murfey/client/contexts/spa_metadata.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/murfey/client/contexts/spa_metadata.py b/src/murfey/client/contexts/spa_metadata.py index 760eef1c8..fc7b3c764 100644 --- a/src/murfey/client/contexts/spa_metadata.py +++ b/src/murfey/client/contexts/spa_metadata.py @@ -149,10 +149,13 @@ def post_transfer( atlas=Path(partial_path), sample=sample ) url = f"{str(environment.url.geturl())}/visits/{environment.visit}/{environment.murfey_session}/register_data_collection_group" + dcg_tag = "/".join( + p for p in transferred_file.parent.parts if p != environment.visit + ) dcg_data = { "experiment_type": "single particle", "experiment_type_id": 37, - "tag": str(source), + "tag": dcg_tag, "atlas": str( _atlas_destination(environment, source, transferred_file) / environment.samples[source].atlas @@ -169,7 +172,7 @@ def post_transfer( capture_post( f"{str(environment.url.geturl())}/sessions/{environment.murfey_session}/grid_square/{gs}", json={ - "tag": str(source), + "tag": dcg_tag, "x_location": pos_data[0], "y_location": pos_data[1], "x_stage_position": pos_data[2],