PicoHarp TCSPC lifetime fitting tool
Project description
LifetimeFittingTool
This is a quick tool I wrote to take some of my TCSPC fluorescence lifetime fitting tools from spectraImport.ipynb and make them usable for other people. It can read PicoHarp .phd files thanks to adreasnow/picoharp-phd and also reads the plain .txt
output it can save.
The app itself is a basic least squares regression tool but allows you to fit in linear or logarithmic space, supports up to 4 decays, and can export images as well as .csv files of the fitted histograms
Requirements
- Python (I'm not sure how old you could go, but I know it runs on >3.9)
- Matplotlib
- Numpy
- PyQt5
- Scipy
These can be installed pretty easily via pip
pip install matplotlib numpy scipy pyqt5
or conda
conda install matplotlib numpy scipy pyqt5
The Maths
Uses the form of the function:
$$ fl(t)=I_0 exp\bigg(-\frac{t}{\tau}\bigg) $$
Where:
- $t =$ Time
- $\tau =$ Fluorescence lifetime
- $I_0 =$ Initial photon concentration
For the corrected fitting procedure, the convolved function is calculated as:
$$ fl=fl(t)_{IRF}\otimes fl(t) $$
$$ fl_{fitted}=\sum_{i=1}^{\text{# exponents}} C_i\cdot fl(t)_i $$
Where:
- $fl(t)_{IRF} =$ Fitted instrument response function
- $fl(t)_i =$ Fitted function for each decay
- $C_i =$ Linear coefficient for each decay
$\chi^2$ is calculated as per fluortools
$$ \chi^2 = \sum_{j=1}^{n} (c_j-\hat{c_j})^2/\hat{c_j}\ \chi^2_{red}=\frac{\chi^2}{n} $$
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for lifetimefitting-0.0.10-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 15334bfc44b2df488573335acb7caa5fd423024e36b1e09fcb55fdd9ed82e70e |
|
MD5 | 6052aefc4783e93d577fc26a23f3df82 |
|
BLAKE2b-256 | e1c293c7863c9fb94c26720e26ef2276f49df8cb8aaf141c55644c3bb5179fc9 |