Git Product home page Git Product logo

fluorescence-tools / fit2x Goto Github PK

View Code? Open in Web Editor NEW
3.0 2.0 0.0 88.84 MB

Maximum likelihood fits for low photon count data - For active develeopment visit gitlab.peulen.xyz

Home Page: https://fit2x.peulen.xyz

License: Mozilla Public License 2.0

CMake 1.67% C 22.38% Batchfile 0.13% Shell 0.09% SWIG 16.13% Python 23.47% C++ 36.13%
fluorescence mle mle-estimation lifetime-analysis lifetime flim single-molecule

fit2x's Introduction

fits2x

pipeline status Anaconda-Server Badge

Warning

fit2x is currently in early development.

General description

fit2x is a collection of models that use maximum likelihood estimators for polarization and time-resolved fluorescence decays.

fit2x implement burst integrated fluorescence lifetime fits (BIFL) with scatter. The library can be used in conjuncture with tttrlib to analyze and process single-molecule FRET (smFRET) experiments and confocal laser scanning microscopy (CLSM) data. The fit2x shared libary can be used from LabView and is wrapped by SWIG (Simplified Wrapper and Interface Generator) for common scripting languages as Python as main target language.

fit2x smfit23

Design goals

  • Low memory footprint (keep objective large datasets, e.g. FLIM in memory).
  • Platform independent C/C++ library with interfaces for scripting libraries

Capabilities

  • Polarization and time-resolved analysis
  • Stable analysis results with minimum photon counts
  • Robust and thoroughly tested maximum likelihood estimators

Examples

import fit2x
import numpy as np

irf = np.array(
    [0, 0, 0, 260, 1582, 155, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
     0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 22, 1074, 830, 10, 0, 0,
     0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
     0, 0], dtype=np.float64
)

data = np.array(
    [0, 0, 0, 1, 9, 7, 5, 5, 5, 2, 2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 
     0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 2, 2, 2, 2, 3, 0, 1, 0,
     1, 1, 1, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
)

settings = {
    'dt': 0.5079365079365079,
    'g_factor': 1.0,
    'l1': 0.1,
    'l2': 0.2,
    'convolution_stop': 31,
    'irf': irf,
    'period': 16.0,
    'background': np.zeros_like(irf)
}
fit23 = fit2x.Fit23(**settings)

# initial values
tau, gamma, r0, rho = 2.2, 0.01, 0.38, 1.22
x0 = np.array([tau, gamma, r0, rho])
fixed = np.array([0, 1, 1, 0])
# pass data and initial values to fit. 
# The return value contains the fit result 
r = fit23(
    data=data,
    initial_values=x0,
    fixed=fixed
)

Implementation

Pure pure C/C++ high performance algorithms for analysis of low photon count data.

Building and Installation

C++ shared library

The C++ shared library can be installed from source with cmake:

git clone --recursive https://github.com/fluorescence-tools/fit2x.git
mkdir fit2x/build; cd fit2x/build
cmake ..
sudo make install

Python bindings

The Python bindings can be either be installed by downloading and compiling the source code or by using a precompiled distribution for Python anaconda environment.

The following commands can be used to download and compile the source code:

git clone --recursive https://github.com/fluorescence-tools/fit2x.git
cd fit2x
sudo python setup.py install

In an anaconda environment the library can be installed by the following command:

conda install -c tpeulen fit2x

For most users the latter approach is recommended. Currently, pre-compiled packages for the anaconda distribution system are available for 64bit Windows, macOS, and Linux.

Legacy 32-bit platforms and versions of programming languages, e.g, Python 2.7 are not supported.

Documentation

The API of fit2x as well as some use cases are documented on its web page

In case you notice unusual behaviour do not hesitate to contact the authors.

License

fit2x was developed at the Seidel Lab (Heinrich Heine University). and is maintained by Thomas Peulen. fit2x is released under the open source MIT license.

Citation

If you have used fit2x in a scientific publication, we would appreciate citations to the following paper: DOI for citing fit2x

Michael Maus, Mircea Cotlet, Johan Hofkens, Thomas Gensch, Frans C. De Schryver, J. Schaffer, and C. A. M. Seidel, 2001. An Experimental Comparison of the Maximum Likelihood Estimation and Nonlinear Least-Squares Fluorescence Lifetime Analysis of Single Molecules. Anal. Chem., 73, 9, pp2078โ€“2086.

fit2x's People

Contributors

tpeulen avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.