OPUS dei v3.0 — A powerful command-line tool for converting Bruker OPUS spectral files to accessible formats.
OPUS Converter is designed to efficiently process Bruker OPUS binary files and convert them into more accessible formats for spectral analysis. Whether you're dealing with dozens or tens of thousands of spectral files, this tool provides an intelligent, user-friendly interface with adaptive processing capabilities.
- 📁 Recursive File Discovery — Automatically finds OPUS files in all subdirectories
- ⚡ Smart Batch Processing — Adaptive interface that scales from small to massive datasets
- 🎯 Flexible Output Formats — Choose exactly the formats you need
- 📊 Real-time Progress Tracking — ETA calculations and processing statistics
- 🛡️ Error Resilience — Continues processing even when individual files fail
- 🎨 Beautiful Terminal Interface — Colourful, informative output using modern CLI design
# Clone the repository
git clone https://github.com/magonji/opus-dei.git
cd opus-dei
# Install dependencies
pip install -r requirements.txt
# Run the converter
python opus-dei.py- Python 3.7 or higher
- Required packages:
numpy questionary colorama
Simply run the script and follow the interactive prompts:
python opus-dei.pyThe program will guide you through three main steps:
Browse and select the folder containing your OPUS files. The program recursively searches through all subdirectories to find files with numerical extensions (e.g., spectrum.0, data.1, sample.15).
Choose your preferred output format(s):
- 📊 Both .dpt and .mzz files — Complete conversion with both formats
- 📈 Only .dpt files — Full resolution tab-delimited text files
- 🗜️ Only .mzz files — Space-efficient compressed format (1 cm⁻¹ resolution)
The tool automatically adapts its interface based on your dataset size:
- Small batches (≤100 files): Individual file progress tracking
- Large batches (>100 files): Progress bar with ETA and statistics
- Format: Tab-delimited text file
- Content: Full resolution wavenumber and absorption data
- Use case: Direct import into analysis software (Origin, MATLAB, Python, R)
- File size: Larger, but preserves all spectral information
- Format: ZIP-compressed custom format
- Content: Rounded wavenumbers (1 cm⁻¹ resolution) with intensity data
- Use case: Long-term storage, large dataset management
- File size: Significantly smaller, optimised for storage efficiency
The program parses Bruker OPUS binary files by:
- Reading the file header to locate data blocks
- Extracting absorption spectra and metadata
- Processing wavenumber ranges and spectral parameters
- Handling various block types (sample, reference, parameters, etc.)
- Memory efficient: Processes files individually to handle large datasets
- Error handling: Robust error management with detailed reporting
- Cross-platform: Works on Windows, macOS, and Linux
- Unicode support: Handles international characters in file paths
opus-dei/
├── opus-dei.py # Main application
├── requirements.txt # Python dependencies
├── README.md # This file
└── examples/ # Example files and usageContributions are welcome! Please feel free to submit a Pull Request. For major changes, please open an issue first to discuss what you would like to change.
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
Perfect for:
- Laboratory data archival — Converting proprietary formats for long-term storage
- Spectral database preparation — Preparing datasets for machine learning or statistical analysis
- Format migration — Moving from OPUS to open formats for better accessibility
- High-throughput processing — Handling large batches from automated measurements
- Cross-platform compatibility — Accessing OPUS data on non-Windows systems
- Requires OPUS files to have numerical file extensions (standard OPUS convention)
- .mzz format uses 1 cm⁻¹ resolution (suitable for most FTIR applications)
- Designed specifically for absorption spectra (AB data blocks)
- Issues: Please report bugs or request features via GitHub Issues
- Email: [email protected]
- Institution: University of Glasgow
This project is licensed under the MIT License - see the LICENSE file for details.
If you use this software in your research, please consider citing:
@software{opus-dei_2025,
author = {González-Jiménez, Mario},
title = {OPUS dei: A tool for converting Bruker OPUS spectral files},
url = {https://github.com/magonji/opus-dei},
version = {3.0},
year = {2025},
institution = {University of Glasgow}
}- Developed at the University of Glasgow
- Inspired by the need for open-source spectral data processing tools
- Built with love for the spectroscopy community
Made with lots of ❤️ for the spectroscopy community/Bruker sufferers
Transform your OPUS files with style ✨