Skip to content

Improvements and new features

Choose a tag to compare

@aaroncelestian aaroncelestian released this 15 Oct 07:44
· 95 commits to main since this release

New Features & Improvements
🎯 Universal Drag-and-Drop Support
Drag-and-drop file loading now works across all major RamanLab windows:

Main RamanLab Window: Drag spectrum files (.txt, .dat, .csv) directly onto the application to load and plot them instantly
Spectral Deconvolution: Drop spectrum files for immediate peak fitting analysis
2D Map Analysis: Drop single-file Raman map data for quick visualization
Benefits:

Faster workflow - no need to navigate File → Open dialogs
Intuitive interface - just drag files from Finder/Explorer
Visual feedback with cursor state changes
Status bar updates confirm successful loading
Technical Implementation:

Custom
DragDropCentralWidget
for QMainWindow compatibility
Disabled text widget drop interception to prevent file paths appearing as text
Consistent drag-and-drop behavior across all modules

🗺️ 2D Map Analysis Enhancements
Fixed critical position handling bug:

Issue: Integer position values caused crashes when calculating spatial coordinates
Fix: Implemented robust float conversion with proper error handling
Impact: Map analysis now handles all position data types reliably
Improvements:

More stable spatial coordinate calculations
Better error messages for malformed data
Enhanced data validation during map import

📊 Cluster Analysis Improvements
Enhanced cluster visualization and export:

Cluster-specific exports: Save individual cluster spectra to separate files
Improved labeling: Better cluster identification in plots and exports
Batch processing: Export all clusters at once with organized file naming
Better user experience:

Clearer cluster selection interface
More informative export dialogs
Organized output file structure
Bug Fixes
Fixed drag-and-drop not working in main RamanLab window (QMainWindow vs QDialog behavior)
Fixed file paths appearing as text in QTextEdit widgets during drag operations
Fixed float/integer position handling in 2D map analysis causing crashes
Fixed cursor not changing to "+" icon during drag operations
Corrected method name in Spectral Deconvolution drag-and-drop handler

Technical Details
Files Modified:

raman_analysis_app_qt6.py

  • Added DragDropCentralWidget class, disabled QTextEdit drops
    peak_fitting_qt6.py
  • Fixed drag-and-drop event handling
    map_analysis_2d/ui/main_window.py
  • Fixed drag-and-drop, float position handling
    map_analysis_2d/core/file_io.py - Enhanced position data type conversion
    Upgrade Notes:

No breaking changes
All existing functionality preserved
Drag-and-drop is opt-in (traditional File → Open still works)