11..
22 This file is generated by setup.py
33
4- Read and write PicoQuant PTU files
5- ==================================
4+ Read and write PicoQuant PTU and related files
5+ ==============================================
66
77Ptufile is a Python library to
88
@@ -15,7 +15,7 @@ measurement data and instrumentation parameters.
1515
1616:Author: `Christoph Gohlke <https://www.cgohlke.com >`_
1717:License: BSD 3-Clause
18- :Version: 2024.12.28
18+ :Version: 2025.1.13
1919:DOI: `10.5281/zenodo.10120021 <https://doi.org/10.5281/zenodo.10120021 >`_
2020
2121Quickstart
@@ -38,10 +38,10 @@ This revision was tested with the following requirements and dependencies
3838(other versions may work):
3939
4040- `CPython <https://www.python.org >`_ 3.10.11, 3.11.9, 3.12.8, 3.13.1 64-bit
41- - `NumPy <https://pypi.org/project/numpy >`_ 2.1.3
42- - `Xarray <https://pypi.org/project/xarray >`_ 2024.11.0 (recommended)
41+ - `NumPy <https://pypi.org/project/numpy >`_ 2.2.1
42+ - `Xarray <https://pypi.org/project/xarray >`_ 2025.1.1 (recommended)
4343- `Matplotlib <https://pypi.org/project/matplotlib/ >`_ 3.10.0 (optional)
44- - `Tifffile <https://pypi.org/project/tifffile/ >`_ 2024.12.12 (optional)
44+ - `Tifffile <https://pypi.org/project/tifffile/ >`_ 2025.1.10 (optional)
4545- `Numcodecs <https://pypi.org/project/numcodecs/ >`_ 0.14.1 (optional)
4646- `Python-dateutil <https://pypi.org/project/python-dateutil/ >`_ 2.9.0
4747 (optional)
@@ -50,6 +50,10 @@ This revision was tested with the following requirements and dependencies
5050Revisions
5151---------
5252
53+ 2025.1.13
54+
55+ - Fall back to file size if TTResult_NumberOfRecords is zero (#2).
56+
53572024.12.28
5458
5559- 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``:
175179.. code-block :: python
176180
177181 >> > decoded = ptu.decode_records()
182+ >> > decoded.dtype
183+ dtype([(' time' , ' <u8' ), (' dtime' , ' <i2' ), (' channel' , ' i1' ), (' marker' , ' u1' )])
178184
179185 Get global times of frame changes from markers:
180186
@@ -188,7 +194,7 @@ Decode TTTR records to overall delay-time histograms per channel:
188194.. code-block :: python
189195
190196 >> > ptu.decode_histogram(dtype = ' uint8' )
191- array([[ 5 , 7 , 7 , ... , 10 , 9 , 2 ]], dtype = uint8)
197+ array([[ 5 , 7 , 7 , ... , 10 , 9 , 2 ]], shape = ( 2 , 3126 ), dtype = uint8)
192198
193199 Get information about the FLIM image histogram in the PTU file:
194200
@@ -213,7 +219,8 @@ Slice step sizes define binning, -1 being used to integrate along axis:
213219 >> > ptu[:, ... , 0 , ::- 1 ]
214220 array([[[103 , ... , 38 ],
215221 ...
216- [ 47 , ... , 30 ]]], dtype = uint16)
222+ [ 47 , ... , 30 ]]],
223+ shape = (1 , 256 , 256 ), dtype = uint16)
217224
218225 Alternatively, decode the first channel and integrate all histogram bins
219226into a ``xarray.DataArray ``, keeping reduced axes:
@@ -224,7 +231,7 @@ into a ``xarray.DataArray``, keeping reduced axes:
224231 < xarray.DataArray (T: 1 , Y: 256 , X: 256 , C: 1 , H: 1 )> ...
225232 array([[[[[103 ]],
226233 ...
227- [[ 30 ]]]]], dtype = uint16)
234+ [[ 30 ]]]]], shape = ( 1 , 256 , 256 , 1 , 1 ), dtype = uint16)
228235 Coordinates:
229236 * T (T) float64... 0.05625
230237 * Y (Y) float64... - 0.0001304 ... 0.0001294
0 commit comments