Skip to main content

A python wrapper for flimlib's C functions

Project description

FLIMLib

FLIMLib is a curve fitting library used for Fluorescent Lifetime Imaging or FLIM. It is developed by Paul Barber (UCL and KCL, London) and the Advanced Technology Group at the Oxford Institute for Radiation Oncology, University of Oxford, as well as the Laboratory for Optical and Computational Instrumentation at the University of Wisconsin-Madison. FLIMLib is used for FLIM functionality in the Time Resolved Imaging (TRI2) software, as well as in the FLIMJ plugin for ImageJ.

For exponential lifetime fitting there are three core algorithms within FLIMLib:

  1. A triple integral method that does a very fast estimate of a single exponential lifetime component.
  2. A Levenberg-Marquardt algorithm or LMA that uses an iterative, least-squares-minimization approach to generate a fit. This works with single, double and triple exponential models, as well as stretched exponential.
  3. A Bayesian algorithm that combines evidence from each single photon to estimate lifetimes etc. It offers better performance with low photon counts.

There is also code to perform 'global' analysis over a number of signals simultaneously (e.g. over an image), where the lifetimes can be considered constant across the data set, but the amplitudes are allowed to vary for each signal. There is also a completely generic global analysis function. A third algorithm is available to perform phasor analysis.

In addition there is a non-negative linear least squares algorithm that is useful for spectral unmixing in combined spectral-lifetime imaging (SLIM).

The FLIMLib library code is written in C89 compatible C and is thread-safe for fitting multiple pixels concurrently. A Java interface (generated by SWIG is privided to call the library from Java code: FLIMLib.java provide a subset of function calls used by the FLIMJ plugin for ImageJ.

Additionally, there is wrapper code in FLIMLib.i to wrap the external functions in flimlib.def. This code generates swig wrapper files which enable you to call these functions from Java.

See also

Directory contents

Directory Contents
src/main/c The source files for the FLIMLib library
src/main/cpp The C++ include file for a FLIMLib class for use in C++ projects
target/generated-sources/main The Java API and C++ wrapper generated by SWIG
src/main/java The rest of the Java API source files
src/main/python The Python API source files (ctypes-based)
src/main/swig The SWIG sources that directs Java API generation
src/flimlib-cmd/c The source files for the standalone executable wrapper for the library
src/flimlib-cmd/cpp The source files for the standalone executable written in C++
src/matlab Wrapper and example code for use of the library with Matlab
test_files .dat and .ini settings file for testing
target/natives Compiled library binary

Building the source (C++/Java)

You need JDK, Maven, CMake, SWIG, and C and C++ toolchains (GCC on Linux, Command Line Tools or Xcode on macOS, Visual Studio (with C++ Desktop Development) on Windows) to be installed.

To build the library and standalone program using maven:

mvn clean install

Running the standalone executable

  1. Copy the executable to the test_files folder for convenience

    cp target/build/bin/flimlib-cmd ./test_files
    
  2. Run the program with the test files

    cd ./test_files
    ./flimlib-cmd test.ini transient.dat
    

Using from a Java project

To depend on FLIMLib from Maven, simply copy the following to appropriate places in your pom.xml:

<properties>
  <flimlib.version>2.1.0</flimlib.version>
</properties>

<!-- FLIMLib Java interface -->
<dependency>
  <groupId>flimlib</groupId>
  <artifactId>flimlib</artifactId>
  <version>${flimlib.version}</version>
</dependency>
<!-- FLIMLib native binary -->
<dependency>
  <groupId>flimlib</groupId>
  <artifactId>flimlib</artifactId>
  <version>${flimlib.version}</version>
  <classifier>${scijava.natives.classifier}</classifier>
  <!-- Or one of the following if you would like to manually specify the binary platform -->
  <!-- <classifier>native-linux_64</classifier> -->
  <!-- <classifier>native-windows_64</classifier> -->
  <!-- <classifier>native-osx_64</classifier> -->
</dependency>

Note that the native binary is platform-dependent. So you may want to make sure that the <classifier> attribute is either automatically detected by the parent scijava pom (${scijava.natives.classifier}) or manually filled in to match your platform.

Using from Python

The Python API is a ctypes-based wrapper around a few of the library functions.

pip install flimlib
import flimlib

To get started, see the help (docstrings) for these functions:

  • flimlib.GCI_marquardt_fitting_engine() (Levenberg-Marquardt)
  • flimlib.GCI_triple_integral_fitting_engine() (RLD: rapid lifetime determination)
  • flimlib.GCI_Phasor() (phasor analysis)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

flimlib-2.2.5.tar.gz (214.5 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

flimlib-2.2.5-cp313-cp313-win_amd64.whl (147.8 kB view details)

Uploaded CPython 3.13Windows x86-64

flimlib-2.2.5-cp313-cp313-win32.whl (117.5 kB view details)

Uploaded CPython 3.13Windows x86

flimlib-2.2.5-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (508.7 kB view details)

Uploaded CPython 3.13manylinux: glibc 2.17+ x86-64

flimlib-2.2.5-cp313-cp313-macosx_10_13_universal2.whl (368.5 kB view details)

Uploaded CPython 3.13macOS 10.13+ universal2 (ARM64, x86-64)

flimlib-2.2.5-cp312-cp312-win_amd64.whl (147.8 kB view details)

Uploaded CPython 3.12Windows x86-64

flimlib-2.2.5-cp312-cp312-win32.whl (117.5 kB view details)

Uploaded CPython 3.12Windows x86

flimlib-2.2.5-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (508.7 kB view details)

Uploaded CPython 3.12manylinux: glibc 2.17+ x86-64

flimlib-2.2.5-cp312-cp312-macosx_10_13_universal2.whl (368.5 kB view details)

Uploaded CPython 3.12macOS 10.13+ universal2 (ARM64, x86-64)

flimlib-2.2.5-cp311-cp311-win_amd64.whl (147.8 kB view details)

Uploaded CPython 3.11Windows x86-64

flimlib-2.2.5-cp311-cp311-win32.whl (117.5 kB view details)

Uploaded CPython 3.11Windows x86

flimlib-2.2.5-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (508.4 kB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ x86-64

flimlib-2.2.5-cp311-cp311-macosx_10_9_universal2.whl (367.2 kB view details)

Uploaded CPython 3.11macOS 10.9+ universal2 (ARM64, x86-64)

flimlib-2.2.5-cp310-cp310-win_amd64.whl (147.8 kB view details)

Uploaded CPython 3.10Windows x86-64

flimlib-2.2.5-cp310-cp310-win32.whl (117.5 kB view details)

Uploaded CPython 3.10Windows x86

flimlib-2.2.5-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (508.4 kB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ x86-64

flimlib-2.2.5-cp310-cp310-macosx_10_9_universal2.whl (367.2 kB view details)

Uploaded CPython 3.10macOS 10.9+ universal2 (ARM64, x86-64)

flimlib-2.2.5-cp39-cp39-win_amd64.whl (147.8 kB view details)

Uploaded CPython 3.9Windows x86-64

flimlib-2.2.5-cp39-cp39-win32.whl (117.5 kB view details)

Uploaded CPython 3.9Windows x86

flimlib-2.2.5-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (508.2 kB view details)

Uploaded CPython 3.9manylinux: glibc 2.17+ x86-64

flimlib-2.2.5-cp39-cp39-macosx_10_9_universal2.whl (367.2 kB view details)

Uploaded CPython 3.9macOS 10.9+ universal2 (ARM64, x86-64)

File details

Details for the file flimlib-2.2.5.tar.gz.

File metadata

  • Download URL: flimlib-2.2.5.tar.gz
  • Upload date:
  • Size: 214.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.8

File hashes

Hashes for flimlib-2.2.5.tar.gz
Algorithm Hash digest
SHA256 85bdfb5e4fdcdcaf8ae65ebad4d47abce9e738adb50e390d261787ab4367daa5
MD5 86c425bdac4eb57263985835586f6cf8
BLAKE2b-256 d9fc6d43b780e90888dfa5776056f40e8042164e8e3070bf4c2c7f74315c2825

See more details on using hashes here.

File details

Details for the file flimlib-2.2.5-cp313-cp313-win_amd64.whl.

File metadata

  • Download URL: flimlib-2.2.5-cp313-cp313-win_amd64.whl
  • Upload date:
  • Size: 147.8 kB
  • Tags: CPython 3.13, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.8

File hashes

Hashes for flimlib-2.2.5-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 01ee5e8f88a96ed9eee6cab8b64cfb0fd4a47b15a15a89cec6730fce23e3474e
MD5 62965aa48b2091b01ba0b38b7fccb477
BLAKE2b-256 0f3263f30ff9e57a13291ee46aab7628ec06e83b37568a1d03898023130eaef5

See more details on using hashes here.

File details

Details for the file flimlib-2.2.5-cp313-cp313-win32.whl.

File metadata

  • Download URL: flimlib-2.2.5-cp313-cp313-win32.whl
  • Upload date:
  • Size: 117.5 kB
  • Tags: CPython 3.13, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.8

File hashes

Hashes for flimlib-2.2.5-cp313-cp313-win32.whl
Algorithm Hash digest
SHA256 efc668bcc20eb450943109c068c66add13fe21c47ce7bef2b6e4e586eac98001
MD5 dc40cfc8349af26b87cfa70299ff56a8
BLAKE2b-256 fa98c17b1eb2944e79a5dca1d2e60e42fe0c1b6794b0413969d03ab7e14201c8

See more details on using hashes here.

File details

Details for the file flimlib-2.2.5-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for flimlib-2.2.5-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 cc88881da1380a98f6399622e49cda037003932db2b31b08b2422680f5712118
MD5 bfcb9abe1af3a189fb313f9cf6a32898
BLAKE2b-256 663e5fcd599228b3d5e97f55c530e18dfe17c4798f27c5f0ab0e8b23517c3057

See more details on using hashes here.

File details

Details for the file flimlib-2.2.5-cp313-cp313-macosx_10_13_universal2.whl.

File metadata

File hashes

Hashes for flimlib-2.2.5-cp313-cp313-macosx_10_13_universal2.whl
Algorithm Hash digest
SHA256 b9d6d38bacd84f38425149fd6cba29000dd13abad734244fc8b493c794b00aa8
MD5 290edbd84d84d8e91dc1a085646ac207
BLAKE2b-256 801ed4a2c6bb20f31e9e4e882609e2f15ad06b9583f25b3c03144eaf9824b272

See more details on using hashes here.

File details

Details for the file flimlib-2.2.5-cp312-cp312-win_amd64.whl.

File metadata

  • Download URL: flimlib-2.2.5-cp312-cp312-win_amd64.whl
  • Upload date:
  • Size: 147.8 kB
  • Tags: CPython 3.12, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.8

File hashes

Hashes for flimlib-2.2.5-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 9717cc91e8ea174c9679a1f1d34405de6876436aa4dcee1140fbe950b48196d7
MD5 ae81e27dbbfcb14e3985ea76eae50358
BLAKE2b-256 d61feaee9fcad2ffc7fc6a03cb05a7f3289981fbb2d730d6cedf5ad1675cabc2

See more details on using hashes here.

File details

Details for the file flimlib-2.2.5-cp312-cp312-win32.whl.

File metadata

  • Download URL: flimlib-2.2.5-cp312-cp312-win32.whl
  • Upload date:
  • Size: 117.5 kB
  • Tags: CPython 3.12, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.8

File hashes

Hashes for flimlib-2.2.5-cp312-cp312-win32.whl
Algorithm Hash digest
SHA256 5400285e1e09e088fdd0b5271db9696c7e7d7468a4f088d32e6405c922109832
MD5 28fba297e7eb28f30778ced74d2247f1
BLAKE2b-256 aaa2965a4a08a818f6f51bdd37130bcdc6614f400fd315f18f59620d5bdae33b

See more details on using hashes here.

File details

Details for the file flimlib-2.2.5-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for flimlib-2.2.5-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 667be77542f3e12e3757c66b03e8af26ca08c4d35d6de82c1a753a9f97954541
MD5 f8f94ee047be709043c7beb47be7a315
BLAKE2b-256 40cbc746a014258642b4e25d1a7be24f616b54ac515b1ce92dfcdc0bf2d73098

See more details on using hashes here.

File details

Details for the file flimlib-2.2.5-cp312-cp312-macosx_10_13_universal2.whl.

File metadata

File hashes

Hashes for flimlib-2.2.5-cp312-cp312-macosx_10_13_universal2.whl
Algorithm Hash digest
SHA256 abada6fc24f833fefa6a4654ff564109cbca6c7240235f597e07886f173dcb71
MD5 587951e13d3228046c66a62754660bde
BLAKE2b-256 38104695b6b80e044af171b425a8b4e81e34547579afc0775812ee54a1158bf2

See more details on using hashes here.

File details

Details for the file flimlib-2.2.5-cp311-cp311-win_amd64.whl.

File metadata

  • Download URL: flimlib-2.2.5-cp311-cp311-win_amd64.whl
  • Upload date:
  • Size: 147.8 kB
  • Tags: CPython 3.11, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.8

File hashes

Hashes for flimlib-2.2.5-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 dd2987b5cdbbebc2801b963029aae8d2ce97fba7c28fe825c143c75f66c7b351
MD5 5f9a4d10686c76d0241f7dbf3d61e462
BLAKE2b-256 5490afc399bb1f16f0bbbef7a745fcb6be3e594f333d64e6a2acaa30d00250a9

See more details on using hashes here.

File details

Details for the file flimlib-2.2.5-cp311-cp311-win32.whl.

File metadata

  • Download URL: flimlib-2.2.5-cp311-cp311-win32.whl
  • Upload date:
  • Size: 117.5 kB
  • Tags: CPython 3.11, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.8

File hashes

Hashes for flimlib-2.2.5-cp311-cp311-win32.whl
Algorithm Hash digest
SHA256 1a6758cd32c8917dbe8e8a48e7b39550cd65b309f87a4ff7fff5f80193c0e594
MD5 dc5285ce65706c34f53762a53b5e5cbf
BLAKE2b-256 96b48aa0bca2b8fc5ed1c3b54911975be3d7c71fe642462440804b0b5216277b

See more details on using hashes here.

File details

Details for the file flimlib-2.2.5-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for flimlib-2.2.5-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 30994f962d3ccc105c952ef7bc4a16e93a4e22fa828296dac13eb1512c3f97a2
MD5 f41f45d2ba899e860041a2206193705d
BLAKE2b-256 13d43df48dda2216c7c79dabe3da5f7ae891b9379df0f33002b2fd469a09bd66

See more details on using hashes here.

File details

Details for the file flimlib-2.2.5-cp311-cp311-macosx_10_9_universal2.whl.

File metadata

File hashes

Hashes for flimlib-2.2.5-cp311-cp311-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 59c25d615b4499beb6819c1b6bd895a700dd906f12e42a8e697f145c0f3c9ae4
MD5 91f105076153a55d5e0f5dd5ffa71fa1
BLAKE2b-256 e8f2def6e4115918bc3c9c5ffe11d0a427bfd945ce90c449c47f5ebdc369cf8f

See more details on using hashes here.

File details

Details for the file flimlib-2.2.5-cp310-cp310-win_amd64.whl.

File metadata

  • Download URL: flimlib-2.2.5-cp310-cp310-win_amd64.whl
  • Upload date:
  • Size: 147.8 kB
  • Tags: CPython 3.10, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.8

File hashes

Hashes for flimlib-2.2.5-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 91b927a2a09b421c568731c10ea45a7f01eb23cc739e5e677d8c8122d86c8ce3
MD5 a27d1f5c3257d81acb9d20022606415e
BLAKE2b-256 8bd4476f1012a5309436585509b1062669febaaf9cd75f1b3d80f48abd4a8dd0

See more details on using hashes here.

File details

Details for the file flimlib-2.2.5-cp310-cp310-win32.whl.

File metadata

  • Download URL: flimlib-2.2.5-cp310-cp310-win32.whl
  • Upload date:
  • Size: 117.5 kB
  • Tags: CPython 3.10, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.8

File hashes

Hashes for flimlib-2.2.5-cp310-cp310-win32.whl
Algorithm Hash digest
SHA256 e9565b703a05350d7700f003c1c819d352841c564c4626cc3b037f1a6e6982bd
MD5 fdfcb175f38e2dad1eaa860cf5935d01
BLAKE2b-256 f80d822a3c80e4efeffc7f525dbc631325d3df8edf86a71289605570ebb59ec5

See more details on using hashes here.

File details

Details for the file flimlib-2.2.5-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for flimlib-2.2.5-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 e6a13a390f7e5df534480d706e3a9855e952a5b6d57c747c4045da81c16e0a8b
MD5 207c2a1fada599e08e2ca3df32c999b6
BLAKE2b-256 f8f4431e3406dcc75ce803eb93aa09b9f42aabcca8455cbc7e6a7dd5deb6d90b

See more details on using hashes here.

File details

Details for the file flimlib-2.2.5-cp310-cp310-macosx_10_9_universal2.whl.

File metadata

File hashes

Hashes for flimlib-2.2.5-cp310-cp310-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 064465023b5ed4c342124c82a5a2215c0aac2baf5c3f02cc88d1c6506c85b80d
MD5 9a8c5a1d9bba8f0842874774bfdd4cf2
BLAKE2b-256 0d034890abcb3877686a596b8aec4bdd144b96ee22347363b9084cdb69739fd4

See more details on using hashes here.

File details

Details for the file flimlib-2.2.5-cp39-cp39-win_amd64.whl.

File metadata

  • Download URL: flimlib-2.2.5-cp39-cp39-win_amd64.whl
  • Upload date:
  • Size: 147.8 kB
  • Tags: CPython 3.9, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.8

File hashes

Hashes for flimlib-2.2.5-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 c1e0d0b443c881c6a1a0447e83c9f61378919b1dc9c7e20cffebccab2fc20ff6
MD5 bef4d360ec999519bc294825d2789d41
BLAKE2b-256 765245ac8d1cf44d549bf141592714d39cae2797004c7e936b2280e8c34e1301

See more details on using hashes here.

File details

Details for the file flimlib-2.2.5-cp39-cp39-win32.whl.

File metadata

  • Download URL: flimlib-2.2.5-cp39-cp39-win32.whl
  • Upload date:
  • Size: 117.5 kB
  • Tags: CPython 3.9, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.8

File hashes

Hashes for flimlib-2.2.5-cp39-cp39-win32.whl
Algorithm Hash digest
SHA256 4ea40db18da391f002838d2146f17fe79996e8cae4ee402e65c38d593700a15e
MD5 6e465b83acac912e4fdd5c421f5dbed1
BLAKE2b-256 b2870795ea2dc80a014b46b92c32923156298010057164a658a81f8d199aecc8

See more details on using hashes here.

File details

Details for the file flimlib-2.2.5-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for flimlib-2.2.5-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 865d0dd59baad972050020092721945a2b4e1bca0735d653d0903cd2441ad200
MD5 e169e88a2f09fe19df16b686190cf5ae
BLAKE2b-256 f9cdcb6486bfc301aa593e6d7f388233ec7f1593642ebccc8a3a7d9135fa9e74

See more details on using hashes here.

File details

Details for the file flimlib-2.2.5-cp39-cp39-macosx_10_9_universal2.whl.

File metadata

File hashes

Hashes for flimlib-2.2.5-cp39-cp39-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 8dd52df9a9bc3a0e817882fc4a0fd2b764267c0aa5f4b2ced386e9257c301519
MD5 c0c02184f9a2edd8b5658c8e5c99e871
BLAKE2b-256 d8e1575ae8bc170df83efdae1b6548da974ef7db678e61f1ebd11c299b2b0d7b

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page