Skip to content

Commit 3d82ed5

Browse files
authored
Need the data source not the metadata source (#467)
1 parent 153719e commit 3d82ed5

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/murfey/client/contexts/spa_metadata.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -149,10 +149,13 @@ def post_transfer(
149149
atlas=Path(partial_path), sample=sample
150150
)
151151
url = f"{str(environment.url.geturl())}/visits/{environment.visit}/{environment.murfey_session}/register_data_collection_group"
152+
dcg_tag = "/".join(
153+
p for p in transferred_file.parent.parts if p != environment.visit
154+
)
152155
dcg_data = {
153156
"experiment_type": "single particle",
154157
"experiment_type_id": 37,
155-
"tag": str(source),
158+
"tag": dcg_tag,
156159
"atlas": str(
157160
_atlas_destination(environment, source, transferred_file)
158161
/ environment.samples[source].atlas
@@ -169,7 +172,7 @@ def post_transfer(
169172
capture_post(
170173
f"{str(environment.url.geturl())}/sessions/{environment.murfey_session}/grid_square/{gs}",
171174
json={
172-
"tag": str(source),
175+
"tag": dcg_tag,
173176
"x_location": pos_data[0],
174177
"y_location": pos_data[1],
175178
"x_stage_position": pos_data[2],

0 commit comments

Comments
 (0)