napari-psf-simulator


Namenapari-psf-simulator JSON
Version 0.3.1 PyPI version JSON
download
home_pagehttps://github.com/andreabassi78/napari-psf-simulator
SummaryA plugin for simulations of the Point Spread Function, with aberrations
upload_time2023-10-31 23:47:43
maintainer
docs_urlNone
authorAndrea Bassi
requires_python>=3.8
licenseBSD-3-Clause
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # napari-psf-simulator

[![License](https://img.shields.io/pypi/l/napari-psf-simulator.svg?color=green)](https://github.com/andreabassi78/napari-psf-simulator/raw/main/LICENSE)
[![PyPI](https://img.shields.io/pypi/v/napari-psf-simulator.svg?color=green)](https://pypi.org/project/napari-psf-simulator)
[![Python Version](https://img.shields.io/pypi/pyversions/napari-psf-simulator.svg?color=green)](https://python.org)
[![tests](https://github.com/andreabassi78/napari-psf-simulator/workflows/tests/badge.svg)](https://github.com/andreabassi78/napari-psf-simulator/actions)
[![codecov](https://codecov.io/gh/andreabassi78/napari-psf-simulator/branch/main/graph/badge.svg)](https://codecov.io/gh/andreabassi78/napari-psf-simulator)
[![napari hub](https://img.shields.io/endpoint?url=https://api.napari-hub.org/shields/napari-psf-simulator)](https://napari-hub.org/plugins/napari-psf-simulator)

A plugin for the simulation of the 3D Point Spread Function of an optical systen, particularly a microscope objective.
 
Calculates the PSF using scalar and vectorial models.  
The following aberrations are included:
- phase aberration described by a Zernike polynomials with n-m coefficients.
- aberration induced by a slab, with a refractive index different from the one at the object.  

----------------------------------

This [napari] plugin was generated with [Cookiecutter] using [@napari]'s [cookiecutter-napari-plugin] template.

<!--
Don't miss the full getting started guide to set up your new package:
https://github.com/napari/cookiecutter-napari-plugin#getting-started

and review the napari docs for plugin developers:
https://napari.org/plugins/stable/index.html
-->

## Installation

You can install `napari-psf-simulator` via [pip]:

    pip install napari-psf-simulator


To install latest development version :

    pip install git+https://github.com/andreabassi78/napari-psf-simulator.git


## Usage

1) Lauch the plugin and select the parameters of the microscope: `NA` (numerical aperture), `wavelenght`, `n` (refractive index at the object),
   `FOV xy` (field of view in the transverse direction), `FOV z` (field of view in the axial direction), `dxy` (pixel size, transverse sampling), `dz` (voxel depth, axial sampling), `lens radius` (physical aperture of the lens, used in vectorial model)

2) Select a propagation model between `scalar` and `vectorial`.  

3) Select an aberration type (if needed).

4) Press `Calculate PSF` to run the simulator. This will create a new image layer with the 3D PSF.
 
   The option `Show Airy disk` creates a circle with radius given by the diffraction limit (Rayleigh criterion).

![raw](https://github.com/andreabassi78/napari-psf-simulator/raw/main/images/figure.png)
**Napari viewer with the psf-simulator widget showing the in-focus plane of an aberrated PSF**

![raw](https://github.com/andreabassi78/napari-psf-simulator/raw/main/images/animation.gif)
**Slicing through a PSF aberrated with Zernike polynomials of order N=3, M=1 (coma)**

3) Click on the `Plot PSF Profile in Console` checkbox to see the x and z profiles of the PSF.
   They will show up in  the viewer console when `Calculate PSF` is executed.

![raw](https://github.com/andreabassi78/napari-psf-simulator/raw/main/images/Plot.png)
**Plot profile of the PSF, shown in the Console**

## Detailed documentation

An exhaustive documentation of the use of the plugin on scalar and vectoral propagation models can be found in [this] presentation.

A detailed explanation of the uses and advantages that simulating a PSF brings can be found [here].

The vectorial propagation model implements a secondary library: [pyfocus](https://github.com/fcaprile/PyFocus). The full documentation of this library can be found at [read the docs](https://pyfocus.readthedocs.io/en/latest/) and in the paper: "PyFocus: A Python package for vectorial calculations of focused optical fields under realistic conditions. Application to toroidal foci." https://doi.org/10.1016/j.cpc.2022.108315

## Contributing

Contributions are very welcome. Tests can be run with [tox], please ensure
the coverage at least stays the same before you submit a pull request. 
The plugin has been concived to be modular allowing the insertion of new aberations and pupils. Please contact the developers on github for adding new propagations and aberrations types. 
Any suggestions or contributions are welcome.

## License

Distributed under the terms of the [BSD-3] license,
"napari-psf-simulator" is free and open source software

## Issues

If you encounter any problems, please [file an issue] along with a detailed description.

[napari]: https://github.com/napari/napari
[Cookiecutter]: https://github.com/audreyr/cookiecutter
[@napari]: https://github.com/napari
[MIT]: http://opensource.org/licenses/MIT
[BSD-3]: http://opensource.org/licenses/BSD-3-Clause
[GNU GPL v3.0]: http://www.gnu.org/licenses/gpl-3.0.txt
[GNU LGPL v3.0]: http://www.gnu.org/licenses/lgpl-3.0.txt
[Apache Software License 2.0]: http://www.apache.org/licenses/LICENSE-2.0
[Mozilla Public License 2.0]: https://www.mozilla.org/media/MPL/2.0/index.txt
[cookiecutter-napari-plugin]: https://github.com/napari/cookiecutter-napari-plugin

[file an issue]: https://github.com/andreabassi78/napari-psf-simulator/issues

[napari]: https://github.com/napari/napari
[tox]: https://tox.readthedocs.io/en/latest/
[pip]: https://pypi.org/project/pip/
[PyPI]: https://pypi.org/

[this]: https://github.com/andreabassi78/napari-psf-simulator/raw/main/docs/napari_psf_simullator_presentation.pdf

[here]: https://github.com/andreabassi78/napari-psf-simulator/raw/main/docs/pyfocus_seminar.pptx

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/andreabassi78/napari-psf-simulator",
    "name": "napari-psf-simulator",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": "",
    "keywords": "",
    "author": "Andrea Bassi",
    "author_email": "andrea1.bassi@polimi.it",
    "download_url": "https://files.pythonhosted.org/packages/85/14/a3b6e21c4a05543d8c7000e7d7768d0dfcf7f693e95e3231bbd1c84f56a4/napari-psf-simulator-0.3.1.tar.gz",
    "platform": null,
    "description": "# napari-psf-simulator\n\n[![License](https://img.shields.io/pypi/l/napari-psf-simulator.svg?color=green)](https://github.com/andreabassi78/napari-psf-simulator/raw/main/LICENSE)\n[![PyPI](https://img.shields.io/pypi/v/napari-psf-simulator.svg?color=green)](https://pypi.org/project/napari-psf-simulator)\n[![Python Version](https://img.shields.io/pypi/pyversions/napari-psf-simulator.svg?color=green)](https://python.org)\n[![tests](https://github.com/andreabassi78/napari-psf-simulator/workflows/tests/badge.svg)](https://github.com/andreabassi78/napari-psf-simulator/actions)\n[![codecov](https://codecov.io/gh/andreabassi78/napari-psf-simulator/branch/main/graph/badge.svg)](https://codecov.io/gh/andreabassi78/napari-psf-simulator)\n[![napari hub](https://img.shields.io/endpoint?url=https://api.napari-hub.org/shields/napari-psf-simulator)](https://napari-hub.org/plugins/napari-psf-simulator)\n\nA plugin for the simulation of the 3D Point Spread Function of an optical systen, particularly a microscope objective.\n \nCalculates the PSF using scalar and vectorial models.  \nThe following aberrations are included:\n- phase aberration described by a Zernike polynomials with n-m coefficients.\n- aberration induced by a slab, with a refractive index different from the one at the object.  \n\n----------------------------------\n\nThis [napari] plugin was generated with [Cookiecutter] using [@napari]'s [cookiecutter-napari-plugin] template.\n\n<!--\nDon't miss the full getting started guide to set up your new package:\nhttps://github.com/napari/cookiecutter-napari-plugin#getting-started\n\nand review the napari docs for plugin developers:\nhttps://napari.org/plugins/stable/index.html\n-->\n\n## Installation\n\nYou can install `napari-psf-simulator` via [pip]:\n\n    pip install napari-psf-simulator\n\n\nTo install latest development version :\n\n    pip install git+https://github.com/andreabassi78/napari-psf-simulator.git\n\n\n## Usage\n\n1) Lauch the plugin and select the parameters of the microscope: `NA` (numerical aperture), `wavelenght`, `n` (refractive index at the object),\n   `FOV xy` (field of view in the transverse direction), `FOV z` (field of view in the axial direction), `dxy` (pixel size, transverse sampling), `dz` (voxel depth, axial sampling), `lens radius` (physical aperture of the lens, used in vectorial model)\n\n2) Select a propagation model between `scalar` and `vectorial`.  \n\n3) Select an aberration type (if needed).\n\n4) Press `Calculate PSF` to run the simulator. This will create a new image layer with the 3D PSF.\n \n   The option `Show Airy disk` creates a circle with radius given by the diffraction limit (Rayleigh criterion).\n\n![raw](https://github.com/andreabassi78/napari-psf-simulator/raw/main/images/figure.png)\n**Napari viewer with the psf-simulator widget showing the in-focus plane of an aberrated PSF**\n\n![raw](https://github.com/andreabassi78/napari-psf-simulator/raw/main/images/animation.gif)\n**Slicing through a PSF aberrated with Zernike polynomials of order N=3, M=1 (coma)**\n\n3) Click on the `Plot PSF Profile in Console` checkbox to see the x and z profiles of the PSF.\n   They will show up in  the viewer console when `Calculate PSF` is executed.\n\n![raw](https://github.com/andreabassi78/napari-psf-simulator/raw/main/images/Plot.png)\n**Plot profile of the PSF, shown in the Console**\n\n## Detailed documentation\n\nAn exhaustive documentation of the use of the plugin on scalar and vectoral propagation models can be found in [this] presentation.\n\nA detailed explanation of the uses and advantages that simulating a PSF brings can be found [here].\n\nThe vectorial propagation model implements a secondary library: [pyfocus](https://github.com/fcaprile/PyFocus). The full documentation of this library can be found at [read the docs](https://pyfocus.readthedocs.io/en/latest/) and in the paper: \"PyFocus: A Python package for vectorial calculations of focused optical fields under realistic conditions. Application to toroidal foci.\" https://doi.org/10.1016/j.cpc.2022.108315\n\n## Contributing\n\nContributions are very welcome. Tests can be run with [tox], please ensure\nthe coverage at least stays the same before you submit a pull request. \nThe plugin has been concived to be modular allowing the insertion of new aberations and pupils. Please contact the developers on github for adding new propagations and aberrations types. \nAny suggestions or contributions are welcome.\n\n## License\n\nDistributed under the terms of the [BSD-3] license,\n\"napari-psf-simulator\" is free and open source software\n\n## Issues\n\nIf you encounter any problems, please [file an issue] along with a detailed description.\n\n[napari]: https://github.com/napari/napari\n[Cookiecutter]: https://github.com/audreyr/cookiecutter\n[@napari]: https://github.com/napari\n[MIT]: http://opensource.org/licenses/MIT\n[BSD-3]: http://opensource.org/licenses/BSD-3-Clause\n[GNU GPL v3.0]: http://www.gnu.org/licenses/gpl-3.0.txt\n[GNU LGPL v3.0]: http://www.gnu.org/licenses/lgpl-3.0.txt\n[Apache Software License 2.0]: http://www.apache.org/licenses/LICENSE-2.0\n[Mozilla Public License 2.0]: https://www.mozilla.org/media/MPL/2.0/index.txt\n[cookiecutter-napari-plugin]: https://github.com/napari/cookiecutter-napari-plugin\n\n[file an issue]: https://github.com/andreabassi78/napari-psf-simulator/issues\n\n[napari]: https://github.com/napari/napari\n[tox]: https://tox.readthedocs.io/en/latest/\n[pip]: https://pypi.org/project/pip/\n[PyPI]: https://pypi.org/\n\n[this]: https://github.com/andreabassi78/napari-psf-simulator/raw/main/docs/napari_psf_simullator_presentation.pdf\n\n[here]: https://github.com/andreabassi78/napari-psf-simulator/raw/main/docs/pyfocus_seminar.pptx\n",
    "bugtrack_url": null,
    "license": "BSD-3-Clause",
    "summary": "A plugin for simulations of the Point Spread Function, with aberrations",
    "version": "0.3.1",
    "project_urls": {
        "Bug Tracker": "https://github.com/andreabassi78/napari-psf-simulator/issues",
        "Documentation": "https://github.com/andreabassi78/napari-psf-simulator#README.md",
        "Homepage": "https://github.com/andreabassi78/napari-psf-simulator",
        "Source Code": "https://github.com/andreabassi78/napari-psf-simulator",
        "User Support": "https://github.com/andreabassi78/napari-psf-simulator/issues"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "48df9ba4649d126c6467535dc034bd599b395cd8f99b8c226f8f8580acd03642",
                "md5": "0dba6d2113a70e71390c5323798de84b",
                "sha256": "d9f97945aeecb280c3a432ad9a083f8aae804fd17e8a52f9532d0c0ee603ccb8"
            },
            "downloads": -1,
            "filename": "napari_psf_simulator-0.3.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "0dba6d2113a70e71390c5323798de84b",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 35358,
            "upload_time": "2023-10-31T23:47:41",
            "upload_time_iso_8601": "2023-10-31T23:47:41.488929Z",
            "url": "https://files.pythonhosted.org/packages/48/df/9ba4649d126c6467535dc034bd599b395cd8f99b8c226f8f8580acd03642/napari_psf_simulator-0.3.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "8514a3b6e21c4a05543d8c7000e7d7768d0dfcf7f693e95e3231bbd1c84f56a4",
                "md5": "e27394a29c2e61c4d7a144b734766a69",
                "sha256": "3d57b56a4731771dc45144850f55c76dfc9a7434aaf69520433245fd5dfc6da1"
            },
            "downloads": -1,
            "filename": "napari-psf-simulator-0.3.1.tar.gz",
            "has_sig": false,
            "md5_digest": "e27394a29c2e61c4d7a144b734766a69",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 10745738,
            "upload_time": "2023-10-31T23:47:43",
            "upload_time_iso_8601": "2023-10-31T23:47:43.741873Z",
            "url": "https://files.pythonhosted.org/packages/85/14/a3b6e21c4a05543d8c7000e7d7768d0dfcf7f693e95e3231bbd1c84f56a4/napari-psf-simulator-0.3.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-10-31 23:47:43",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "andreabassi78",
    "github_project": "napari-psf-simulator",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "requirements": [],
    "tox": true,
    "lcname": "napari-psf-simulator"
}
        
Elapsed time: 0.14064s