A Python application for spectral phasor analysis built with Panel 🎨 and HoloViews 📊. This tool allows you to explore spectral phasors through simulations (single/multi‑Gaussian) and analyze real experimental data via CSV spectra or TIFF hyperspectral stacks. 🧪
- 🧪 Simulations: Interactive single and multi‑component Gaussian simulations with optional noise.
- 📄 Spectra Analysis: Import CSV files containing spectral data.
- 🖼️ Image Analysis: Import TIFF hyperspectral stacks for pixel‑wise phasor analysis with bidirectional selection (Image ↔ Phasor).
You can get a quick preview of the application on GitHub Pages 👀
But we recommend running a full local version for the best experience and complete functionality! 🚀
The project uses uv ⚡ for fast Python package management. Ensure it is installed on your system.
# 📂 Clone the repository
git clone https://github.com/DBP008/spectral-phasors-analysis.git
cd spectral-phasors-analysis
# 📦 Install dependencies and run the app
uv syncuv run phasor_panel.pyThe application will launch automatically in your default browser 🌐 (usually at http://localhost:5900).
- 🌍 Global Parameters: Set the wavelength range and harmonic number.
- 📑 Tabs:
- 1️⃣ Tab 1 – Single Gaussian simulation.
- 2️⃣ Tab 2 – Multi‑Gaussian simulation with optional noise.
- 3️⃣ Tab 3 – Upload a CSV file to visualise experimental spectra.
- 4️⃣ Tab 4 – Upload a TIFF stack for image‑based phasor analysis.
- 5️⃣ Tab 5 – Two‑component phasor deconvolution.
- 6️⃣ Tab 6 – Three‑component phasor deconvolution.
- 🖱️ Interactive Plots: Click or box‑select points on the phasor plot to view corresponding spectra, and vice‑versa.
Sample datasets are provided in the data/ folder to help you get started:
Denaturation.csv: Example fluorescence spectra data acquired with a Cary Eclipse Fluorescence Spectrometer 🧬..tiffiles: Example hyperspectral stacks (lambda‑xy scans) acquired with a Leica confocal microscope 🔬.