@@ -442,26 +442,34 @@ def create_pulse_visualization_items(
442442 """
443443 items = []
444444 df = self .result_adapter .to_dataframe ()
445+
446+ # Use the full signal data for all visualizations
447+ # Note: pulse features x-coordinates (xstartmin, xendmin, etc.) are stored
448+ # in the full signal coordinate system, even when computed on ROIs
449+ x , y = obj .x , obj .y
450+
445451 for _ , row in df .iterrows ():
446452 # Start baseline
447453 xs0 , xs1 = row ["xstartmin" ], row ["xstartmax" ]
448- ys = pulse .get_range_mean_y (obj . x , obj . y , (xs0 , xs1 ))
454+ ys = pulse .get_range_mean_y (x , y , (xs0 , xs1 ))
449455 if are_values_valid ([xs0 , xs1 , ys ]):
450456 items .append (create_pulse_segment (xs0 , ys , xs1 , ys , "Start baseline" ))
451457 # End baseline
452458 xe0 , xe1 = row ["xendmin" ], row ["xendmax" ]
453- ye = pulse .get_range_mean_y (obj . x , obj . y , (xe0 , xe1 ))
459+ ye = pulse .get_range_mean_y (x , y , (xe0 , xe1 ))
454460 if are_values_valid ([xe0 , xe1 , ye ]):
455461 items .append (create_pulse_segment (xe0 , ye , xe1 , ye , "End baseline" ))
456462 if "xplateaumin" in row and "xplateaumax" in row :
457463 xp0 , xp1 = row ["xplateaumin" ], row ["xplateaumax" ]
458- yp = pulse .get_range_mean_y (obj . x , obj . y , (xp0 , xp1 ))
464+ yp = pulse .get_range_mean_y (x , y , (xp0 , xp1 ))
459465 if are_values_valid ([xp0 , xp1 , yp ]):
460466 items .append (create_pulse_segment (xp0 , yp , xp1 , yp , "Plateau" ))
461467 for metric in ("x0" , "x50" , "x100" ):
462468 if metric in row :
463- x = row [metric ]
469+ x_crossing = row [metric ]
464470 metric_str = metric .replace ("x" , "x|<sub>" ) + "%</sub>"
465- if are_values_valid ([x ]):
466- items .append (create_pulse_crossing_marker ("v" , x , metric_str ))
471+ if are_values_valid ([x_crossing ]):
472+ items .append (
473+ create_pulse_crossing_marker ("v" , x_crossing , metric_str )
474+ )
467475 return items
0 commit comments