Quick Start
Prerequisites
- Python 3.8 or higher
- Operating System: Windows, macOS, or Linux
- RAM: 8GB minimum (16GB+ recommended for large datasets)
- Storage: 500MB for application + 250MB for database
Installation Steps
1. Clone or Download the Repository
git clone https://github.com/aaroncelestian/RamanLab.git
cd RamanLab
2. Create a Virtual Environment (Recommended)
It is strongly recommended to create a dedicated virtual environment:
python -m venv ramanlab_env
Activate the environment:
macOS/Linux:
source ramanlab_env/bin/activate
Windows:
ramanlab_env\Scripts\activate
You should see (ramanlab_env) in your terminal prompt when the environment is active.
3. Install Dependencies
pip install -r requirements_qt6.txt
4. Verify Installation (Recommended)
python check_dependencies.py
This will check:
- ✅ Python version compatibility
- ✅ All required packages and versions
- ✅ PySide6 framework availability
- ✅ System resources (RAM, CPU, disk)
- ✅ Database files presence
- ✅ Component availability
5. Download the Database File (Required)
The main Raman spectra database is not included in the repository due to its size (200MB+).
Installation locations (choose one):
- Option 1 (Recommended): User Documents folder
- Windows:
C:\Users\<YourUsername>\Documents\RamanLab_PySide6\RamanLab_Database_20250602.pkl
- macOS:
~/Documents/RamanLab_PySide6/RamanLab_Database_20250602.pkl
- Linux:
~/Documents/RamanLab_PySide6/RamanLab_Database_20250602.pkl
- Option 2: Application directory - Place
RamanLab_Database_20250602.pkl in the same folder as the Python scripts
6. Launch RamanLab
python main_qt6.py
Optional: Install Desktop Icon
For convenient access, install a desktop shortcut/application icon:
python install_desktop_icon.py
This will create:
- Windows: Desktop shortcut (.lnk) with icon
- macOS: Application bundle in ~/Applications
- Linux: Desktop entry in applications menu and desktop
To uninstall the icon:
python install_desktop_icon.py --uninstall
Advanced Modules
Multi-Spectrum Manager
Launch from the main window: File → Multi-Spectrum Manager
- Load multiple spectra at once
- Compare spectra side-by-side
- Batch processing capabilities
- Export combined data
Cluster Analysis
python raman_cluster_analysis_qt6.py
- Load a folder of spectra or a database
- Select clustering method (Hierarchical, K-means, UMAP)
- Adjust parameters and run analysis
- Visualize results with dendrograms or scatter plots
- Export cluster assignments
2D Map Analysis
python map_analysis_2d_qt6.py
- Load spatial Raman mapping data
- Define peak regions of interest
- Generate intensity, position, or width maps
- Apply cosmic ray removal
- Export maps as images or data files
Database Browser
python database_browser_qt6.py
- Browse all 6,939+ reference spectra
- Search by name, chemical family, or metadata
- View detailed spectrum information
- Export filtered subsets
- View database statistics
Polarization Analyzer
python raman_polarization_analyzer_qt6.py
- Load polarization-dependent measurements
- Analyze crystal orientation
- Calculate Raman tensors
- Visualize angular dependencies
File Formats
Supported Import Formats
- Text files (.txt): Tab or comma-delimited
- CSV files (.csv): Comma-separated values
- Database files (.pkl): RamanLab pickle format
Expected Data Format
# Optional header lines (start with #)
Wavenumber Intensity
100.0 1234.5
101.0 1245.8
...
Export Formats
- Processed spectra: .txt with metadata headers
- Peak parameters: .csv with detailed fit results
- Database exports: .pkl with full metadata
- Images: PNG, PDF, SVG for publication
Troubleshooting
Dependency Check Failures
Problem: check_dependencies.py reports missing or outdated packages
Solution:
- Ensure virtual environment is activated (if you created one)
- Install all requirements:
pip install -r requirements_qt6.txt
- Upgrade outdated packages:
pip install --upgrade <package-name>
- Check Python version:
python --version (should be 3.8 or higher)
"Database Not Found" Warning
Problem: Application starts with empty database (0 spectra)
Solution:
- Download
RamanLab_Database_20250602.pkl from Zenodo
- Place in
Documents/RamanLab_PySide6/ folder
- Restart RamanLab
Import Errors
Problem: Cannot import database files
Solution:
- Ensure file is .pkl format (not .sqlite)
- Check file has 'spectra' dictionary key
- Try re-downloading the database file
Performance Issues
Problem: Slow processing on large datasets
Solutions:
- Enable parallel processing (default)
- Use data truncation to reduce wavenumber range
- Apply spectral downsampling for clustering
- Check
performance_fixes_summary.txt
Window Too Large for Screen
Problem: Application window doesn't fit on laptop screens
Solution:
- Minimum resolution: 1024x600
- Scroll areas enabled for small screens
- Resize window as needed