Skip to content
53 changes: 53 additions & 0 deletions CITATION.cff
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
cff-version: 1.2.0
title: Anscombe Transform Codec
message: If you use this software, please cite it.
version: 1.0.0
repository-code: https://github.com/datajoint/anscombe-transform
abstract: >
Codec implementation of the Anscombe transform for compressing photon-limited
microscopy, radiography, and astronomy image recordings, published by DataJoint.
authors:
- family-names: Yatsenko
given-names: Dimitri
email: [email protected]
- family-names: Lecoq
given-names: Jerome
email: [email protected]
- family-names: Bennett
given-names: Davis
email: [email protected]
contact:
- family-names: Yatsenko
given-names: Dimitri
email: [email protected]
license: MIT
preferred-citation:
type: article
title: Standardized measurements for monitoring and comparing multiphoton microscope systems
authors:
- family-names: Lees
given-names: Robert M.
- family-names: Bianco
given-names: Isaac H.
- family-names: Campbell
given-names: Robert A. A.
- family-names: Orlova
given-names: Natalia
- family-names: Peterka
given-names: Darcy S.
- family-names: Pichler
given-names: Bruno
- family-names: Smith
given-names: Spencer LaVere
- family-names: Yatsenko
given-names: Dimitri
- family-names: Yu
given-names: Che-Hang
- family-names: Packer
given-names: Adam M.
journal: Nature Protocols
volume: '20'
pages: 1-38
date-published: 2025-03-17
doi: 10.1038/s41596-024-01120-w
url: https://doi.org/10.1038/s41596-024-01120-w
11 changes: 7 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,18 @@
[![PyPI version](https://badge.fury.io/py/anscombe-transform.svg)](https://badge.fury.io/py/anscombe-transform) ![tests](https://github.com/datajoint/anscombe-transform/actions/workflows/tests.yaml/badge.svg)
[![PyPI version](https://badge.fury.io/py/anscombe-transform.svg)](https://badge.fury.io/py/anscombe-transform) ![tests](https://github.com/datajoint/anscombe-transform/actions/workflows/test.yml/badge.svg)

# Anscombe transform

This codec is designed for compressing image recordings with Poisson noise, which are produced by photon-limited modalities such multiphoton microscopy, radiography, and astronomy.
This codec is designed for compressing image recordings with Poisson noise such as in microscopy, radiography, and astronomy.

The codec assumes that the video is linearly encoded with a potential offset (`zero_level`) and that the `photon_sensitivity` (the average increase in intensity per photon) is either already known or can be accurately estimated from the data.
**Status:** This is the official and actively maintained Anscombe transform codec for Zarr/Numcodecs, maintained by DataJoint.
It originated as a fork of [AllenNeuralDynamics/poisson-numcodecs](https://github.com/AllenNeuralDynamics/poisson-numcodecs) and earlier developments at https://github.com/datajoint/compress-multiphoton. It has since diverged significantly. New users should rely on this repository as the canonical source.

The codec assumes that the video is linearly encoded with a potential offset (`zero_level`) and that the `conversion_gain` (also called `photon_sensitivity`)—the average increase in intensity per photon—is either already known or can be accurately estimated from the data.

The codec re-quantizes the grayscale efficiently with a square-root-like transformation to equalize the noise variance across the grayscale levels: the [Anscombe Transform](https://en.wikipedia.org/wiki/Anscombe_transform).
This results in a smaller number of unique grayscale levels and significant improvements in the compressibility of the data without sacrificing signal accuracy.

To use the codec, one must supply two pieces of information: `zero_level` (the input value corresponding to the absence of light) and `photon_sensitivity` (levels/photon).
To use the codec, one must supply two pieces of information: `zero_level` (the input value corresponding to the absence of light) and `conversion_gain` (levels/photon).

The codec is used in Zarr as a filter prior to compression.

Expand Down