You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add ptu support and pyproject.toml, deprecate cython (#213)
A user requested the ability to load ptu (t2) files from a PicoQuant PicoHarp.
The test suite covers HydraHarp (t2, t3) and PicoHarp (t2) but the code should
be as general as the underlying ptufile package.
In the process of setting this up I debugged a bit and made a few changes:
* rewrite fib4.pyx as fib4.py, which deprecates cython
* bump minimum Python version to 3.11 to support ptufile
* migrated from setup.py to pyproject.toml (tested on Linux)
* set up tox.ini for running the test suite
* set up ruff, ty, and codespell placeholders for gradual linting
(remove the exclusions as desired)
* fix some stray numpy bugs (np.float_ deprecation)
* remove distutils due to deprecation in Python 3.12
* do version generation through setuptools_scm
* ensure the test suite fully passes for all versions supported
* ensure the CI check stage works up through testing
Deprecating cython
There was only one function that required cython. I have replaced it with a
pure numpy implementation that seems to perform equivalently and gets the same
results for both random and test data.
In tests/test_file_format.py:test_pt3_basic the behavior is the same as before
(expected 2037 is actually 2037.5) but I have no insight as to why that
happened in the first place. The correlation data (last two lines of that test)
pass on my machine though. So all I can say is that no observable behavior has
changed for loading pt3 or running dividAndConquer, not that the trace value is
actually correct.
0 commit comments