@@ -203,7 +203,7 @@ def evaluate_marker_annotation(
203203 if len (find_annotations (a , cochlea , subtype )["center_strings" ]) != 0 ]
204204 print (f"Evaluating data for cochlea { cochlea } in { cochlea_annotations } ." )
205205
206- # Find the threholds from the annotated blocks and save it if specified.
206+ # Find the thresholds from the annotated blocks and save them if specified.
207207 intensity_dic = find_thresholds (cochlea_annotations , cochlea , data_seg ,
208208 table_measurement , column = column , pattern = subtype )
209209 if threshold_save_dir is not None :
@@ -212,6 +212,14 @@ def evaluate_marker_annotation(
212212 with open (threshold_out_path , "w" ) as f :
213213 json .dump (intensity_dic , f , sort_keys = True , indent = 4 )
214214
215+ # load measurement table of output segmentation
216+ if "output_seg" in list (COCHLEAE [cochlea ].keys ()):
217+ output_seg = COCHLEAE [cochlea ]["output_seg" ]
218+ table_measurement_path = f"{ cochlea } /tables/{ output_seg } /subtype_ratio.tsv"
219+ table_path_s3 , fs = get_s3_path (table_measurement_path )
220+ with fs .open (table_path_s3 , "r" ) as f :
221+ table_measurement = pd .read_csv (f , sep = "\t " )
222+
215223 # Apply the threshold to all SGNs.
216224 table_seg = apply_nearest_threshold (
217225 intensity_dic , table_seg , table_measurement , column = column , suffix = subtype ,
0 commit comments