Photonscore. Contact
Home / Documentation / Python API
API reference · Python

Your data is a photon list, not a picture

Every acquisition leaves the instrument as a stream of events — each one carrying a position and an arrival time. Nothing is binned, gated or fitted before you see it, which means the analysis is yours to define: choose the spatial binning after the fact, gate the decay differently for two regions of the same image, or fit a model our software has never heard of.

Demo dataset
lily-of-the-valley.photons

58,092,587 photons · τ 0.83 – 1.43 ns · 412 MB

Every example on this page runs against that file, so you can follow along before an instrument is on your bench.

quickstart.py
import photonscore as ps
import matplotlib.pyplot as plt

f = ps.File("lily-of-the-valley.photons")
photons = f.photons()
tau = ps.flim.lifetime(photons, components=2)
plt.imshow(tau.tau[0], cmap="turbo", vmin=0.5, vmax=4.0)
Three bindings, one file format
Python 3.10 – 3.14

Photon lists as NumPy structured arrays.

pip install photonscore
You are here
MATLAB R2021b+

A toolbox that hands you struct arrays and the usual plotting.

photonscore.mltbx
View reference →
.NET 8 / 9 / 10

Spans over memory-mapped photon records — no copy on read.

dotnet add package Photonscore
View reference →

Reference not generated yet

The Python reference is generated from the source docstrings. Until that step is wired into the build, the prose documentation at Documentation is the authoritative description.

Need the module rather than the reference?

Every binding, for every platform, on the downloads page.

Go to downloads