@@ -124,8 +124,10 @@ def post_transfer(
124124 windows_path = data ["EpuSessionXml" ]["Samples" ]["_items" ]["SampleXml" ][0 ][
125125 "AtlasId"
126126 ]["#text" ]
127+ logger .info (f"Windows path to atlas metadata found: { windows_path } " )
127128 visit_index = windows_path .split ("\\ " ).index (environment .visit )
128129 partial_path = "/" .join (windows_path .split ("\\ " )[visit_index + 1 :])
130+ logger .info ("Partial Linux path successfully constructed from Windows path" )
129131
130132 source = _get_source (transferred_file , environment )
131133 if not source :
@@ -136,9 +138,13 @@ def post_transfer(
136138
137139 source_visit_dir = source .parent
138140
141+ logger .info (
142+ f"Looking for atlas XML file in metadata directory { str ((source_visit_dir / partial_path ).parent )} "
143+ )
139144 atlas_xml_path = list (
140145 (source_visit_dir / partial_path ).parent .glob ("Atlas_*.xml" )
141146 )[0 ]
147+ logger .info (f"Atlas XML path { str (atlas_xml_path )} found" )
142148 with open (atlas_xml_path , "rb" ) as atlas_xml :
143149 atlas_xml_data = xmltodict .parse (atlas_xml )
144150 atlas_original_pixel_size = atlas_xml_data ["MicroscopeImage" ][
@@ -147,14 +153,15 @@ def post_transfer(
147153
148154 # need to calculate the pixel size of the downscaled image
149155 atlas_pixel_size = atlas_original_pixel_size * 7.8
156+ logger .info (f"Atlas image pixel size determined to be { atlas_pixel_size } " )
150157
151158 sample = None
152159 for p in partial_path .split ("/" ):
153160 if p .startswith ("Sample" ):
154161 sample = int (p .replace ("Sample" , "" ))
155162 break
156163 else :
157- logger .warning (f"Sample could not be indetified for { transferred_file } " )
164+ logger .warning (f"Sample could not be identified for { transferred_file } " )
158165 return
159166 if source :
160167 environment .samples [source ] = SampleInfo (
0 commit comments