From 588f268f1a81cc798b63ac3064c55f084d9a1e81 Mon Sep 17 00:00:00 2001 From: Christoph Gohlke Date: Mon, 13 Jan 2025 18:57:40 +0000 Subject: [PATCH] Release v2025.1.13 --- README.rst | 25 ++++++++++++++++--------- 1 file changed, 16 insertions(+), 9 deletions(-) diff --git a/README.rst b/README.rst index 9399e30..73010fa 100644 --- a/README.rst +++ b/README.rst @@ -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 @@ -15,7 +15,7 @@ measurement data and instrumentation parameters. :Author: `Christoph Gohlke `_ :License: BSD 3-Clause -:Version: 2024.12.28 +:Version: 2025.1.13 :DOI: `10.5281/zenodo.10120021 `_ Quickstart @@ -38,10 +38,10 @@ This revision was tested with the following requirements and dependencies (other versions may work): - `CPython `_ 3.10.11, 3.11.9, 3.12.8, 3.13.1 64-bit -- `NumPy `_ 2.1.3 -- `Xarray `_ 2024.11.0 (recommended) +- `NumPy `_ 2.2.1 +- `Xarray `_ 2025.1.1 (recommended) - `Matplotlib `_ 3.10.0 (optional) -- `Tifffile `_ 2024.12.12 (optional) +- `Tifffile `_ 2025.1.10 (optional) - `Numcodecs `_ 0.14.1 (optional) - `Python-dateutil `_ 2.9.0 (optional) @@ -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. @@ -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', '>> 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: @@ -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: @@ -224,7 +231,7 @@ into a ``xarray.DataArray``, keeping reduced axes: ... 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