Skip to content

Commit 2da2b4d

Browse files
committed
DCGs are based on atlas jpg name
1 parent 2d13a05 commit 2da2b4d

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

src/murfey/client/contexts/atlas.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -59,9 +59,9 @@ def post_transfer(
5959
source = _get_source(transferred_file, environment)
6060
if source:
6161
atlas_mrc = transferred_file.with_suffix(".mrc")
62-
transferred_atlas_name = _atlas_destination(
62+
transferred_atlas_jpg = _atlas_destination(
6363
environment, source, atlas_mrc, self._token
64-
) / atlas_mrc.relative_to(source.parent)
64+
) / atlas_mrc.relative_to(source.parent).with_suffix(".jpg")
6565

6666
with open(transferred_file, "rb") as atlas_xml:
6767
atlas_xml_data = xmltodict.parse(atlas_xml)
@@ -87,7 +87,7 @@ def post_transfer(
8787
dcg_data = {
8888
"experiment_type_id": 44, # Atlas
8989
"tag": str(transferred_file.parent),
90-
"atlas": str(transferred_atlas_name).replace("//", "/"),
90+
"atlas": str(transferred_atlas_jpg).replace("//", "/"),
9191
"sample": sample,
9292
"atlas_pixel_size": atlas_pixel_size,
9393
}
@@ -101,5 +101,5 @@ def post_transfer(
101101
data=dcg_data,
102102
)
103103
logger.info(
104-
f"Registered data collection group for atlas {str(transferred_atlas_name)!r}"
104+
f"Registered data collection group for atlas {str(transferred_atlas_jpg)!r}"
105105
)

tests/client/contexts/test_atlas.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ def test_atlas_context_xml(mock_capture_post, tmp_path):
7777
dcg_data = {
7878
"experiment_type_id": 44, # Atlas
7979
"tag": str(atlas_xml.parent),
80-
"atlas": f"{tmp_path}/destination/{atlas_xml.relative_to(tmp_path).with_suffix('.mrc')}",
80+
"atlas": f"{tmp_path}/destination/{atlas_xml.relative_to(tmp_path).with_suffix('.jpg')}",
8181
"sample": 2,
8282
"atlas_pixel_size": atlas_pixel_size * 7.8,
8383
}

0 commit comments

Comments
 (0)