Skip to content

v2.2.1 HEMG Fit Accuracy Fixes

Choose a tag to compare

@ratchanonth60 ratchanonth60 released this 16 Feb 01:10
· 15 commits to main since this release

Key Improvements

    1. Accurate Baseline Fitting
      Perfect Overlap: Fixed the misalignment between histogram data and fitted curves by unifying the binning system to 1,6384 bins (1:1 mapping with ADC channels).
      Enhanced HEMG Algorithm:
      Integrated Peak Detection to intelligently initialize fitting parameters.
      Added a Gaussian Core to the HEMG model to accurately capture sharp peaks.
      Upgraded to the Levenberg-Marquardt optimizer for superior stability and faster convergence.
      Optimized Fit Range (ROI) to focus on the peak area, reducing noise interference.
    1. Centralized User Interface
      New Settings Panel: All graph-related configuration (Colors, Thresholds, Widths) has been moved to a slide-out panel, cleaning up the main toolbar.
      Universal Bar Width Control: Added a single slider to control the visual thickness of histogram bars across all modes (Baseline, Calibration, Observation, Flux).
      Algorithm Selection: Added a direct toggle between Gaussian, Lorentzian, and HEMG fitting algorithms in the settings panel.
    1. Under-the-Hood Optimization
      Color Standardization: Introduced a shared
      ColorHelper
      to ensure consistent visual aesthetics across all plots.
      Code Consolidation: Eliminated duplicate
      KalmanFilter
      implementations and refactored core fitting services for better maintainability.
      Bug Fixes: Resolved axis scaling issues when switching between ADC, Voltage, and Energy units.

🛠️ Verification Done

Zero Build Errors: Full compilation confirmed with 0 warnings.
Visual Validation: Verified fit accuracy on multi-peak histograms.
Units Sync: Confirmed conversion logic remains consistent across all modes.