@@ -46,12 +46,9 @@ def register_sxt_data_collection(
4646 )
4747 return
4848 try :
49- metadata_source = (
50- self ._basepath .parent / environment .visit / self ._basepath .name
51- )
5249 ensure_dcg_exists (
5350 collection_type = "sxt" ,
54- metadata_source = metadata_source ,
51+ metadata_source = self . _basepath ,
5552 environment = environment ,
5653 machine_config = self ._machine_config ,
5754 token = self ._token ,
@@ -120,7 +117,11 @@ def post_transfer(
120117
121118 data_suffixes = [".txrm" ]
122119
123- if transferred_file .suffix in data_suffixes and environment :
120+ if (
121+ transferred_file .name .startswith ("tomo" )
122+ and transferred_file .suffix in data_suffixes
123+ and environment
124+ ):
124125 source = _get_source (transferred_file , environment )
125126 if not source :
126127 logger .warning (f"No source found for file { transferred_file } " )
@@ -197,7 +198,7 @@ def post_transfer(
197198 strict = True ,
198199 )
199200 if tilt_count_txrm :
200- metadata ["tilt_count " ] = tilt_count_txrm [0 ]
201+ metadata ["tilt_series_length " ] = tilt_count_txrm [0 ]
201202
202203 self .register_sxt_data_collection (
203204 tilt_series = transferred_file .stem ,
@@ -227,11 +228,13 @@ def post_transfer(
227228 visit_name = environment .visit ,
228229 session_id = environment .murfey_session ,
229230 data = {
230- "session_id" : environment .murfey_session ,
231231 "tag" : transferred_file .stem ,
232232 "source" : str (transferred_file .parent ),
233233 "pixel_size" : metadata .get ("pixel_size" , 100 ),
234234 "tilt_offset" : midpoint (angles ),
235+ "tilt_series_length" : metadata .get (
236+ "tilt_series_length" , len (angles )
237+ ),
235238 "txrm" : str (file_transferred_to ),
236239 },
237240 )
0 commit comments