Skip to main content

A plugin to analyse point spread functions (PSFs).

Project description

napari-psf-analysis

License PyPI Python Version tests codecov napari hub

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


application_screenshot

A plugin to analyse point spread functions (PSFs) of optical systems.

Usage

Starting Point

To run a PSF analysis open an image of acquired beads. Add a point-layer and indicate the beads you want to measure by adding a point.

Run Analysis

Open the plugin (Plugins > napari-psf-analysis > PSF Analysis) and ensure that your bead image and point layers are select in the Basic tab under Image and Points respectively. In the Advanced tab further information can be provided. Only the filled in fields of the Advanced tab are saved in the output.

After verifying all input fields click Extract PSFs.

Discard and Save Measurement

Once the PSF extraction has finished a new layer (Analyzed Beads) appears, holding a summary image for every selected bead. Individual summaries can be discarded by clicking the Delete Displayed Measurement button.

Results are saved to the selected Save Dir by clicking the Save Measurements button.

Note: Beads for which the bounding box does not fit within the image are automatically excluded from the analysis and no output is generated.

Saved Data

Every image of the Analyzed Beads layer is saved as {source_image_name}_X {bead-centroid-x}_Y{bead-centroid-y}_Z{bead-centroid-z}.png file. Additionally a PSFMeasurement_{source_image_acquisition_date}_ {source_image_name}_{microscope_name}_{magnification}_{NA}.csv file is stored containing the measured values and all filled in fields.


Installation

We recommend installation into a fresh conda environment.

1. Install napari

conda create -y -n psf-analysis -c conda-forge python=3.9

conda activate psf-analysis

conda install -c conda-forge napari pyqt

2. Install napari-aicsimageio and bioformats

Required if you want to open other files than .tif e.g. .stk. .

Note: See napari-aicsimageio for more information about opening images.

conda install -c conda-forge openjdk bioformats_jar "aicsimageio[all]" napari-aicsimageio

conda deactivate
conda activate psf-analysis

3. Install napari-psf-analysis

You can install napari-psf-analysis via pip:

python -m pip install xmlschema
python -m pip install napari-psf-analysis

4. Optional Set Config

You can provide a config yaml file with the available microscope names and a default save directory. This will change the Microscope text field to a drop down menu and change the default save directory.

example_config.yaml

microscopes:
  - TIRF
  - Zeiss Z1
output_path: "D:\\psf_analysis\\measurements"

To use this config navigate to Plugins > napari-psf-analysis > Set Config and select the config file.

Note: The save path is OS specific.

5. Desktop Icon for Windows

Follow these instructions by Robert Haase.

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.

License

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

Issues

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

napari_psf_analysis-1.1.4.tar.gz (6.9 MB view details)

Uploaded Source

Built Distribution

napari_psf_analysis-1.1.4-py3-none-any.whl (72.8 kB view details)

Uploaded Python 3

File details

Details for the file napari_psf_analysis-1.1.4.tar.gz.

File metadata

  • Download URL: napari_psf_analysis-1.1.4.tar.gz
  • Upload date:
  • Size: 6.9 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.6

File hashes

Hashes for napari_psf_analysis-1.1.4.tar.gz
Algorithm Hash digest
SHA256 bcdcb6eb7e6ad48be0ba4362745b13a388f8c28a4e6bde3e2a628f5673a350fd
MD5 995d77da9c66b402d3409ca478d28b13
BLAKE2b-256 4c2424bdd019fe21dd82c054bf7654552f0ff50775dd4f75b7806ad7ff18dc81

See more details on using hashes here.

File details

Details for the file napari_psf_analysis-1.1.4-py3-none-any.whl.

File metadata

File hashes

Hashes for napari_psf_analysis-1.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 cf772e5dc4f566ec55c3a04db033c86f8965c2e03f644001f46bba9177162af5
MD5 4b21f435ea23ad9a270f91e970d2af93
BLAKE2b-256 a855d4e7a25e7cff15e1c8f7d5c194a292a2e523253cd594e00af14b645bd8ef

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page