Skip to main content

napari-psf-simulator

License PyPI Python Version tests codecov napari hub

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.

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 Napari viewer with the psf-simulator widget showing the in-focus plane of an aberrated PSF

raw Slicing through a PSF aberrated with Zernike polynomials of order N=3, M=1 (coma)

  1. 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 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. The full documentation of this library can be found at read the docs 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.

Metadata

Release files for napari-psf-simulator 0.3.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for napari-psf-simulator 0.3.1
File Size Uploaded Provenance Actions
napari-psf-simulator-0.3.1.tar.gz 10.7 MB Without provenance Details for napari-psf-simulator-0.3.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for napari-psf-simulator 0.3.1
File Interpreter ABI Platform Actions
napari_psf_simulator-0.3.1-py3-none-any.whl Python 3 none any Details for napari_psf_simulator-0.3.1-py3-none-any.whl

Total release size: 10.8 MB

Release files / napari-psf-simulator-0.3.1.tar.gz

Download URL napari-psf-simulator-0.3.1.tar.gz
Size 10.7 MB
Tags Source
SHA-256 checksum
How to use checksums
3d57b56a4731771dc45144850f55c76dfc9a7434aaf69520433245fd5dfc6da1
BLAKE2b-256 checksum
How to use checksums
8514a3b6e21c4a05543d8c7000e7d7768d0dfcf7f693e95e3231bbd1c84f56a4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.12.0

Release files / napari_psf_simulator-0.3.1-py3-none-any.whl

Download URL napari_psf_simulator-0.3.1-py3-none-any.whl
Size 35.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d9f97945aeecb280c3a432ad9a083f8aae804fd17e8a52f9532d0c0ee603ccb8
BLAKE2b-256 checksum
How to use checksums
48df9ba4649d126c6467535dc034bd599b395cd8f99b8c226f8f8580acd03642
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.12.0

Security for napari-psf-simulator 0.3.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page