Skip to content

Commit

Permalink
Release v2025.1.13
Browse files Browse the repository at this point in the history
  • Loading branch information
cgohlke committed Jan 13, 2025
1 parent 9e12629 commit 588f268
Showing 1 changed file with 16 additions and 9 deletions.
25 changes: 16 additions & 9 deletions README.rst
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
..
This file is generated by setup.py
Read and write PicoQuant PTU files
==================================
Read and write PicoQuant PTU and related files
==============================================

Ptufile is a Python library to

Expand All @@ -15,7 +15,7 @@ measurement data and instrumentation parameters.

:Author: `Christoph Gohlke <https://www.cgohlke.com>`_
:License: BSD 3-Clause
:Version: 2024.12.28
:Version: 2025.1.13
:DOI: `10.5281/zenodo.10120021 <https://doi.org/10.5281/zenodo.10120021>`_

Quickstart
Expand All @@ -38,10 +38,10 @@ This revision was tested with the following requirements and dependencies
(other versions may work):

- `CPython <https://www.python.org>`_ 3.10.11, 3.11.9, 3.12.8, 3.13.1 64-bit
- `NumPy <https://pypi.org/project/numpy>`_ 2.1.3
- `Xarray <https://pypi.org/project/xarray>`_ 2024.11.0 (recommended)
- `NumPy <https://pypi.org/project/numpy>`_ 2.2.1
- `Xarray <https://pypi.org/project/xarray>`_ 2025.1.1 (recommended)
- `Matplotlib <https://pypi.org/project/matplotlib/>`_ 3.10.0 (optional)
- `Tifffile <https://pypi.org/project/tifffile/>`_ 2024.12.12 (optional)
- `Tifffile <https://pypi.org/project/tifffile/>`_ 2025.1.10 (optional)
- `Numcodecs <https://pypi.org/project/numcodecs/>`_ 0.14.1 (optional)
- `Python-dateutil <https://pypi.org/project/python-dateutil/>`_ 2.9.0
(optional)
Expand All @@ -50,6 +50,10 @@ This revision was tested with the following requirements and dependencies
Revisions
---------

2025.1.13

- Fall back to file size if TTResult_NumberOfRecords is zero (#2).

2024.12.28

- Add imwrite function to encode TCSPC image histogram in T3 PTU format.
Expand Down Expand Up @@ -175,6 +179,8 @@ Decode TTTR records from the PTU file to ``numpy.recarray``:
.. code-block:: python
>>> decoded = ptu.decode_records()
>>> decoded.dtype
dtype([('time', '<u8'), ('dtime', '<i2'), ('channel', 'i1'), ('marker', 'u1')])
Get global times of frame changes from markers:

Expand All @@ -188,7 +194,7 @@ Decode TTTR records to overall delay-time histograms per channel:
.. code-block:: python
>>> ptu.decode_histogram(dtype='uint8')
array([[ 5, 7, 7, ..., 10, 9, 2]], dtype=uint8)
array([[ 5, 7, 7, ..., 10, 9, 2]], shape=(2, 3126), dtype=uint8)
Get information about the FLIM image histogram in the PTU file:

Expand All @@ -213,7 +219,8 @@ Slice step sizes define binning, -1 being used to integrate along axis:
>>> ptu[:, ..., 0, ::-1]
array([[[103, ..., 38],
...
[ 47, ..., 30]]], dtype=uint16)
[ 47, ..., 30]]],
shape=(1, 256, 256), dtype=uint16)
Alternatively, decode the first channel and integrate all histogram bins
into a ``xarray.DataArray``, keeping reduced axes:
Expand All @@ -224,7 +231,7 @@ into a ``xarray.DataArray``, keeping reduced axes:
<xarray.DataArray (T: 1, Y: 256, X: 256, C: 1, H: 1)> ...
array([[[[[103]],
...
[[ 30]]]]], dtype=uint16)
[[ 30]]]]], shape=(1, 256, 256, 1, 1), dtype=uint16)
Coordinates:
* T (T) float64... 0.05625
* Y (Y) float64... -0.0001304 ... 0.0001294
Expand Down

0 comments on commit 588f268

Please sign in to comment.