trattoria


Nametrattoria JSON
Version 0.3.7 PyPI version JSON
download
home_pagehttps://github.com/GCBallesteros/trattoria
SummaryThe fastest streaming algorithms for your TTTR data
upload_time2023-07-17 13:15:23
maintainer
docs_urlNone
authorGuillem Ballesteros
requires_python>=3.8,<3.12
licenseMIT
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # 🍕 Trattoria 🍕
Trattoria delivers you the fastest streaming algorithms to analyze your TTTR data. We
currenlty support the following algorithms:
- __Second order autocorrelations__: Calculate the autocorrelation between two channels of
  your TCSPC.
- __Third Order autocorrelations__: Calculate the coincidences between 3 channels. A sync
version is provided were it uses the fact that the sync channel is periodic and known.
- __Intensity time trace__: Calculate the intensity on each (or all) channels versus time.
- __Zero finder__: Given two uncorrelated channels (e.g. a laser behind a 50/50 splitter)
  compute the delay between the input channels.
- __Lifetime__: Compute the lifetime histogram from a pulsed excitation experiment.

## Supported file formats
Currently Trattoria can only read PTU files from PicoQuant. If you want support
for more or want to help providing it please put a ticket on the tttr-toolbox
project.

## Installing
```
pip install trattoria
```

## Examples
The entry point to Trattoria is the PTUFile class. This class has methods that
give us access to the algorithms. Each of the algorithms takes as input a
parameter object and returns a results object. For a complete list of the
functionality see the `examples` folder.

```python
from pathlib import Path

import trattoria

import matplotlib.pyplot as plt

ptu_filepath = Path("/path/to/some.ptu")
ptu = trattoria.PTUFile(ptu_filepath)

timetrace_params = trattoria.TimeTraceParameters(
    resolution=10.0,
    channel=None,
)
tt_res = ptu.timetrace(timetrace_params)

plt.plot(tt_res.t, tt_res.tt / timetrace_params.resolution)
plt.xlabel("Time (s)")
plt.ylabel("Intensity (Hz)")
plt.show()
```

The examples folders contains examples of all the functionality available in
Trattoria.  For more details check the docstrings in `core.py`.

## Design
Trattoria is just a very thin wrapper around the
[trattoria-core](https://github.com/GCBallesteros/trattoria-core) library which
itselfs provides a lower level interface to the the
[tttr-toolbox](https://github.com/GCBallesteros/tttr-toolbox/tree/master/tttr-toolbox)
library. A Rust project that provides the compiled components that allows us to
go fast.

## Changelog
### 0.3.5
- Bug fix. The last 1024\*16 where being ignored for performance reasons. This has
  has been fixed upstream in `tttr-toolbox` and this version of Trattoria uses the
  upgraded version of `trattoria-core`.
- `trattoria-core` dropped support for Python 3.6 and 3.7 and therefore Trattoria too.

### 0.3.4
- The g2 algorithm now supports a mode flag. With "symmetric" we use the
  prefered version of the algorithm that returns negative and positive delays.
  "asymmetric" returns only positive delays but is faster. Default is
  "symmetric".

### 0.3.3
- The underlying TTTR Toolbox and Trattoria Core were refactored to support
  multiple custom ranges or records at once. `start_range` and `stop_range`
  have disappeared in favor of `record_ranges`. It takes a list of tuples of
  integers or `None`.


## Citing


            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/GCBallesteros/trattoria",
    "name": "trattoria",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.8,<3.12",
    "maintainer_email": "",
    "keywords": "",
    "author": "Guillem Ballesteros",
    "author_email": "dev+pypi@maxwellrules.com",
    "download_url": "https://files.pythonhosted.org/packages/8d/a3/2b37a7833e7a2e3a61b694be35b11c5ad9e9d7970f902cf4bec43161cb11/trattoria-0.3.7.tar.gz",
    "platform": null,
    "description": "# \ud83c\udf55 Trattoria \ud83c\udf55\nTrattoria delivers you the fastest streaming algorithms to analyze your TTTR data. We\ncurrenlty support the following algorithms:\n- __Second order autocorrelations__: Calculate the autocorrelation between two channels of\n  your TCSPC.\n- __Third Order autocorrelations__: Calculate the coincidences between 3 channels. A sync\nversion is provided were it uses the fact that the sync channel is periodic and known.\n- __Intensity time trace__: Calculate the intensity on each (or all) channels versus time.\n- __Zero finder__: Given two uncorrelated channels (e.g. a laser behind a 50/50 splitter)\n  compute the delay between the input channels.\n- __Lifetime__: Compute the lifetime histogram from a pulsed excitation experiment.\n\n## Supported file formats\nCurrently Trattoria can only read PTU files from PicoQuant. If you want support\nfor more or want to help providing it please put a ticket on the tttr-toolbox\nproject.\n\n## Installing\n```\npip install trattoria\n```\n\n## Examples\nThe entry point to Trattoria is the PTUFile class. This class has methods that\ngive us access to the algorithms. Each of the algorithms takes as input a\nparameter object and returns a results object. For a complete list of the\nfunctionality see the `examples` folder.\n\n```python\nfrom pathlib import Path\n\nimport trattoria\n\nimport matplotlib.pyplot as plt\n\nptu_filepath = Path(\"/path/to/some.ptu\")\nptu = trattoria.PTUFile(ptu_filepath)\n\ntimetrace_params = trattoria.TimeTraceParameters(\n    resolution=10.0,\n    channel=None,\n)\ntt_res = ptu.timetrace(timetrace_params)\n\nplt.plot(tt_res.t, tt_res.tt / timetrace_params.resolution)\nplt.xlabel(\"Time (s)\")\nplt.ylabel(\"Intensity (Hz)\")\nplt.show()\n```\n\nThe examples folders contains examples of all the functionality available in\nTrattoria.  For more details check the docstrings in `core.py`.\n\n## Design\nTrattoria is just a very thin wrapper around the\n[trattoria-core](https://github.com/GCBallesteros/trattoria-core) library which\nitselfs provides a lower level interface to the the\n[tttr-toolbox](https://github.com/GCBallesteros/tttr-toolbox/tree/master/tttr-toolbox)\nlibrary. A Rust project that provides the compiled components that allows us to\ngo fast.\n\n## Changelog\n### 0.3.5\n- Bug fix. The last 1024\\*16 where being ignored for performance reasons. This has\n  has been fixed upstream in `tttr-toolbox` and this version of Trattoria uses the\n  upgraded version of `trattoria-core`.\n- `trattoria-core` dropped support for Python 3.6 and 3.7 and therefore Trattoria too.\n\n### 0.3.4\n- The g2 algorithm now supports a mode flag. With \"symmetric\" we use the\n  prefered version of the algorithm that returns negative and positive delays.\n  \"asymmetric\" returns only positive delays but is faster. Default is\n  \"symmetric\".\n\n### 0.3.3\n- The underlying TTTR Toolbox and Trattoria Core were refactored to support\n  multiple custom ranges or records at once. `start_range` and `stop_range`\n  have disappeared in favor of `record_ranges`. It takes a list of tuples of\n  integers or `None`.\n\n\n## Citing\n\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "The fastest streaming algorithms for your TTTR data",
    "version": "0.3.7",
    "project_urls": {
        "Homepage": "https://github.com/GCBallesteros/trattoria",
        "Repository": "https://github.com/GCBallesteros/trattoria"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "304ddeeba367edc3ae148758eb3e5e6f8a1b22d563136eafdc0138a491d3449f",
                "md5": "5a17ced80ce21ab7d2fd2f3b9c46e15a",
                "sha256": "29a6451ca1042aed629edf0d246c1a8f9751d2d2e31830047975655cf9367662"
            },
            "downloads": -1,
            "filename": "trattoria-0.3.7-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "5a17ced80ce21ab7d2fd2f3b9c46e15a",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8,<3.12",
            "size": 7995,
            "upload_time": "2023-07-17T13:15:20",
            "upload_time_iso_8601": "2023-07-17T13:15:20.616835Z",
            "url": "https://files.pythonhosted.org/packages/30/4d/deeba367edc3ae148758eb3e5e6f8a1b22d563136eafdc0138a491d3449f/trattoria-0.3.7-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "8da32b37a7833e7a2e3a61b694be35b11c5ad9e9d7970f902cf4bec43161cb11",
                "md5": "3af9ef1a372401a6d2d2f15b94ead8ab",
                "sha256": "7a960c6b3a1979ef86f8ef5d0cda18bc4ed3cecd4ba57e23447d1f39caa95150"
            },
            "downloads": -1,
            "filename": "trattoria-0.3.7.tar.gz",
            "has_sig": false,
            "md5_digest": "3af9ef1a372401a6d2d2f15b94ead8ab",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8,<3.12",
            "size": 7072,
            "upload_time": "2023-07-17T13:15:23",
            "upload_time_iso_8601": "2023-07-17T13:15:23.946702Z",
            "url": "https://files.pythonhosted.org/packages/8d/a3/2b37a7833e7a2e3a61b694be35b11c5ad9e9d7970f902cf4bec43161cb11/trattoria-0.3.7.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-07-17 13:15:23",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "GCBallesteros",
    "github_project": "trattoria",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "trattoria"
}
        
Elapsed time: 0.09204s