__init__ |
(self) |
Initialize PeakDetection instance. |
clear_threshold_cache |
(self) → None |
Reset the lru_cache on _cached_threshold_calculation. |
optimize_data_types |
(self, signal) |
Optimize signal data types to reduce memory usage. |
prepare_signals_for_processing |
(self, signals_dict) |
Prepare all signals for processing by optimizing data types. |
_find_particles_numba |
(raw_signal, threshold, lambda_bkgd, min_continuous_points, integratio |
JIT-compiled particle detection with configurable integration baseline. |
_find_particles_numba_dynamic |
(raw_signal, threshold_arr, lambda_bkgd_arr, min_continuous_points, in |
JIT-compiled particle detection for dynamic array thresholds (window) |
calculate_iterative_threshold |
(self, signal, method, alpha=1e-06, max_iters=4, manual_threshold=10.0 |
Calculate threshold using iterative background refinement with |
_rolling_background |
(self, signal, threshold, window_size) |
Calculates a dynamic rolling background excluding peaks above threshold. |
_calculate_array_threshold |
(self, lambda_bkgd_array, method, alpha, sigma=0.55) |
Fast threshold calculation for moving window arrays. |
_calculate_single_threshold |
(self, lambda_bkgd, method, alpha, sigma=0.55) |
Calculate threshold for a single background value. |
_cached_threshold_calculation |
(self, lambda_bkgd, method, alpha, isotope_key) |
Cached threshold calculation for performance. |
calculate_thresholds_batch_safe |
(self, signals_dict, params_dict, method_groups=None, isotope_mapping= |
Safe batch threshold calculation with iterative refinement and window size support. |
calculate_thresholds_batch |
(self, signals_dict, params_dict, method_groups=None) |
Wrapper for safe batch threshold processing. |
_compute_integration_level |
(lambda_bkgd, threshold, integration_method) |
Compute the integration baseline level based on the chosen method. |
split_peak_region |
(self, signal, start_idx, end_idx, lambda_bkgd, threshold, split_metho |
Dispatcher: apply the chosen splitting method to a single peak region |
_split_no_split |
(signal, start_idx, end_idx, **kwargs) |
Baseline: return the region unchanged. |
_split_watershed_1d |
(signal, start_idx, end_idx, lambda_bkgd, threshold, min_valley_ratio= |
1D Watershed peak splitting — operates directly on the raw signal |
_particle_from_region |
(time, signal, start_idx, end_idx, lambda_bkgd, threshold, integration |
Extract particle metrics from a single [start_idx, end_idx] sub-region. |
find_particles_safe |
(self, time, raw_signal, lambda_bkgd, threshold, min_width=3, min_cont |
Threading-safe particle detection with configurable integration method |
find_particles_vectorized |
(self, time, raw_signal, lambda_bkgd, threshold, min_width=3, min_cont |
Vectorized particle detection using NumPy with configurable integration |
find_particles |
(self, time, raw_signal, lambda_bkgd, threshold, min_width=3, min_cont |
Wrapper for safe particle detection. |
process_single_sample_safe |
(self, main_window, sample_name) |
Threading-safe sample processing with iterative calculation. |
process_single_sample |
(self, main_window, sample_name) |
|
detect_peaks_with_poisson |
(self, signal, alpha=1e-06, sample_name=None, element_key=None, method |
Detect peaks using Poisson-based methods with iterative calculation. |
detect_particles_incremental |
(self, main_window) |
Incremental particle detection for changed elements only. |
process_sample_incremental |
(self, main_window, sample_name, changed_elements) |
Process only changed elements for a sample incrementally. |
merge_detection_results |
(self, main_window, sample_name, new_results, changed_elements) |
Merge new detection results with existing results. |
update_current_sample_display |
(self, main_window, sample_name) |
Update display for currently selected sample. |
apply_window_size |
(self, signal, use_window_size, window_size) |
Apply window size limitation to signal if enabled. |
get_changed_elements |
(self, main_window, sample_name) |
Determine which elements need reprocessing for a sample. |
process_multi_element_particles |
(self, all_particles, time_array, sample_detected_peaks, selected_isot |
Process and identify multi-element particles. |
is_overlapping |
(self, particle, multi_particle, min_overlap_percentage=75.0) |
Check if particles overlap by at least min_overlap_percentage percent. |
detect_particles |
(self, main_window) |
Main threading-safe particle detection function. |
get_snr_color |
(self, snr) |
Get color based on signal-to-noise ratio. |