A fast, interactive fitting tool for TRPL data with full instrument response function (IRF) reconvolution.
TRPL Fitter is a Python-based desktop and web app for analyzing time-resolved photoluminescence (TRPL) data.
It performs reconvolution fitting to extract lifetimes and decay parameters while accounting for the instrument response function (IRF) of your measurement system.
Built with Dash, it provides an intuitive GUI for loading, visualizing, and fitting TRPL datasets interactively via a web browser.
- Full reconvolution fitting - accounts for IRF and response broadening
- Interactive visualization - inspect fits, residuals, and IRFs in real time
- Multi-exponential decay models - single or multi-component fits
- Save and export results - lifetimes, amplitudes, χ², plots
- Standalone app or Python module - run as an executable or import functions
- Cross-platform: Windows, macOS, and Linux support
- Built using: Python 3.11+, Dash, NumPy, SciPy, Plotly, PyInstaller
Installation (with uv recommended)
# Clone the repository
git clone https://github.com/RossHaroldson/TRPLFitter.git
cd TRPLFitter
# Create and activate environment
uv sync
# Run the app
uv run trplThe app will automatically start on http://127.0.0.1:8055 - open it in your browser.
# Clone the repository
git clone https://github.com/RossHaroldson/TRPLFitter.git
cd TRPLFitter
# Create an isolated Python environment with the .venv folder.
python -m venv .venv
# Activate that environment so Python/pip operate inside it.
.\.venv\Scripts\Activate.ps1
# Update pip (package installer) to the latest version available.
python -m pip install --upgrade pip
# Install TRPLFitter and its dependencies into the active environment.
python -m pip install -e .# Clone the repository
git clone https://github.com/RossHaroldson/TRPLFitter.git
cd TRPLFitter
# Create an isolated Python environment with the .venv folder.
python3 -m venv .venv
# Activate that environment so Python/pip operate inside it.
source .venv/bin/activate
# Update pip (package installer) to the latest version available.
python -m pip install --upgrade pip
# Install TRPLFitter and its dependencies into the active environment.
python -m pip install -e .python -m trplfitterStart the web server and go to the locally hosted web address (e.g. https://127.0.0.1:8055/)
- Upload your .csv text file that contains the time, measurement counts, and the IRF measurement. (If you don't have an IRF measurement you can enable "Use Gaussian IRF" or "Use Double Gaussian IRF" to fit the IRF to a Gaussian function.)
- Choose the proper Time, TRPL, and IRF columns via the drop down menus
- Choose the model you want to use and how many exponential components if applicable via the NEXP dropdown menu
- Enable or disable "FIT T0" to fit for a small delay if necessary. (It is recommended to leave this disabled)
- Enable or disable "FIT BG" to fit for a background level in the measurement. (Its recommended to leave this disabled unless you know for sure there is a background level)
- You can disable auto-fit and modify the fit timeout duration.
- You can modify the initial guess value, lower, and upper bounds for each parameter.
- You can fix a parameter and it will show up in blue font.
- The fitted parameters are reported in the table on the right side of the page.
- Fitted parameters with red font denote a parameter's 95% confidence interval greater than the fitted value itself. (This suggests that the fitted parameter's value isn't well optimized or necessary)
- You can use the plot controls to zoom, pan, save, etc...
- A more detailed report is generated at the bottom of the page that can be saved or copy and pasted.
You can download prebuilt executables under Releases or build your own with pyinstaller.
Activate the same virtual environment. Build a fresh standalone executable using the PyInstaller spec.
.\.venv\Scripts\Activate.ps1
pyinstaller --clean TRPLFitter.specThe portable executable is written to dist\TRPLFitter.exe.
src/trplfitter/– Python package (Dash server, callbacks, layout, control entry point).src/trplfitter/legacy/– Archived Tkinter UI (tkinter_app.py) kept for reference only.assets/– Dash static assets (CSS themes, icon, bundled sample dataset).TRPLFitter.spec– PyInstaller specification used for reproducible builds.
Released under the MIT License.

