lsurf.detectors.analysis.compute_statistics
- lsurf.detectors.analysis.compute_statistics(events)[source]
Compute summary statistics for detection events.
- Parameters:
events (list of DetectionEvent) – Detection events to analyze.
- Returns:
stats – Dictionary containing: - count: number of events - total_intensity: sum of intensities - mean_time: average arrival time - std_time: arrival time standard deviation - min_time: earliest arrival - max_time: latest arrival - mean_wavelength: average wavelength - time_spread: max_time - min_time
- Return type:
Examples
>>> stats = compute_statistics(detector.events) >>> print(f"Detected {stats['count']} rays") >>> print(f"Total intensity: {stats['total_intensity']:.3e}") >>> print(f"Time spread: {stats['time_spread']:.3e} s")