Skip to main content

Photon Flux Estimation

A Python library for estimating photon flux from multiphoton imaging data. This package provides tools to compute photon sensitivity and generate photon flux visualizations from imaging data.

Installation

pip install photon-flux-estimation

Features

  • Compute photon sensitivity from imaging data
  • Generate photon transfer curve visualizations
  • Calculate photon flux estimates
  • Visualize coefficient of variation
  • Demo notebook with DANDI dataset integration

Usage

from photon_flux_estimation import PhotonFluxAnalyzer

# Load your imaging data (height, width, time)
movie = your_data_loading_function()

# Create estimator and compute sensitivity
estimator = PhotonFluxEstimator(movie)
results = estimator.compute_sensitivity()

print(f"Sensitivity: {results['sensitivity']:.2f}")
print(f"Zero level: {results['zero_level']:.2f}")

# Get photon flux movie
photon_flux = estimator.compute_photon_flux()

# Generate visualization
from photon_flux_estimation import (
    plot_photon_transfer_curve,
    plot_average_intensity,
    plot_coefficient_variation,
    plot_photon_flux,
)

plot_average_intensity(
    movie=movie,
    title="Average Intensity",
    save_path=str(figure_filename) + "-A.png",
)
plot_photon_transfer_curve(
    results=results,
    title="Photon Transfer Curve",
    save_path=str(figure_filename) + "-B.png",
)
plot_coefficient_variation(
    movie=movie,
    results=results,
    title="Coefficient of Variation",
    save_path=str(figure_filename) + "-C.png",
)
plot_photon_flux(
    movie=movie,
    results=results,
    title="Average Photon Flux",
    save_path=str(figure_filename) + "-D.png",
)

Citation

This package is based on code from the compress-multiphoton repository. If you use this package in your research, please cite both this package and the original repository.

Documentation

For detailed documentation and examples, please see the demo notebook.

License

MIT License. See LICENSE for details.

Metadata

Release files for photon-flux-estimation 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for photon-flux-estimation 0.1.1
File Size Uploaded Provenance Actions
photon_flux_estimation-0.1.1.tar.gz 8.2 kB With provenance Details for photon_flux_estimation-0.1.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for photon-flux-estimation 0.1.1
File Interpreter ABI Platform Actions
photon_flux_estimation-0.1.1-py3-none-any.whl Python 3 none any Details for photon_flux_estimation-0.1.1-py3-none-any.whl

Total release size: 16.1 kB

Release files / photon_flux_estimation-0.1.1.tar.gz

Download URL photon_flux_estimation-0.1.1.tar.gz
Size 8.2 kB
Tags Source
SHA-256 checksum
How to use checksums
ed2798d479fd5f66c54ae08118d93c0cf1c5df9bdd8755fab40bb85d38ccbc3c
BLAKE2b-256 checksum
How to use checksums
caa93b45fab19dfb54be1a310b183cf77d5525953c0fd894115088c9dce00f89
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.12.9

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Mar 31, 2025.

Transparency log

Release files / photon_flux_estimation-0.1.1-py3-none-any.whl

Download URL photon_flux_estimation-0.1.1-py3-none-any.whl
Size 7.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
9c6a392ae4bf96a10384a8162c64418030419534569420074e254823766d353b
BLAKE2b-256 checksum
How to use checksums
6f90c632de5ccf909acd96de6cf3c59927a3e44df7bda8a13118b1de439e0732
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.12.9

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Mar 31, 2025.

Transparency log

Security for photon-flux-estimation 0.1.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for photon_flux_estimation-0.1.1.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Mar 31, 2025.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page