Skip to main content

A simple plugin to use phasor analysis

Project description

napari-phasors

License BSD-3 PyPI Python Version tests codecov napari hub

A comprehensive plugin for phasor analysis in napari. Based on the phasorpy library.

Jump to Intallation


Usage

napari-phasors is a comprehensive plugin that provides a complete workflow for phasor analysis in napari. It includes widgets for reading various FLIM and hyperspectral file formats, performing phasor analysis, calibration, component analysis, FRET analysis, filtering, manual selections, and exporting results.

Sample Data

Two sample datasets for FLIM are provided, along with their corresponding calibration images. Additionally, a paramecium image is included as sample data for hyperspectral analysis.

sample_data

Phasor Analysis

Plot FLIM Data

FLIM phasor data can be plotted as a 2D histogram or scatter plot in the "Phasor Plot" widget. The colormap, the number of bins and the scale of the colors can be customized.

phasors_flim

Plot Hyperspectral Data

Hyperspectral phasor data can also be plotted as a 2D histogram or scatter plot and visualized in the full universal circle. The 'Universal Semi-Circle/Full Polar Plot' in the "Plot Settings" tab must be unchecked.

phasors_hyperspectral

Phasor Calibration

FLIM images can be calibrated using a reference image acquired under the same experimental parameters in the "Calibration" tab of the "Phasor Plot" widget. This reference image should consist of a homogeneous solution of a fluorophore with a known fluorescence lifetime and the laser frequency used in the experiment. This ensures accuracy and consistency in lifetime measurements.

calibration

Filtering and Thresholding

Apply various filters and thresholds to your phasor data to enhance analysis quality in the "Filter/Threshold" tab on the "Phasor Plot" widget. You can filter phasor coordinates using the median or wavelet filter.

filter_threshold

Manual Phasor Selections

Create manual selections on the phasor plot to identify specific regions of interest. These selections can be used to highlight corresponding pixels in the intensity image and perform targeted analysis. Shape of selection can be chosen at the top of the phasor plot and the selection ID can be selected in the "Selection" tab of the "Phasor Plot" widget.

selections

Component Analysis

Perform multi-component analysis to identify and separate different fluorescent species in your sample. This feature allows you to decompose complex phasor distributions into individual components with distinct lifetimes. Two component analysis can be done in the "Components" tab of the "Phasor Plot" widget.

components

Apparent or Normal Lifetime Analysis

A FLIM image can be colormapped according to the phase or modulation apparent lifetime, as well as the normal lifetime in the "Lifetime" tab of the "Phasor Plot" widget. A histogram is also created for visualization of the distribution of apparent lifetimes of the FLIM image.

lifetimes

FRET Analysis

Analyze Förster Resonance Energy Transfer (FRET) trajectories and efficiencies in the "FRET" tab of the "Phasor Plot" widget.

fret

Phasor Custom Import

Supported file formats (.tif, .ptu, .sdt, .fbd, .lsm, .ome.tif) can be read and transformed to the phasor space in the "Phasor Custom Import" widget. Additional options, such as the harmonics, channels and frames, can be specified depending on the file format to be read.

custom_import

Data Export

The average intensity image and the phasor coordinates can be exported as OME-TIF files that can be read by napari-phasors and PhasorPy. Alternatively, the phasor coordinates, as well as the selections can be exported as a CSV file. This can be done in the "Export Phasor" widget

export_phasors

Installation

You can install napari-phasors via pip. Follow these steps from a terminal.

We recommend using miniforge whenever possible. Click here to choose the right download option for your OS. If you do not use miniforge, but rather Anaconda or Miniconda, replace the mamba term whenever you see it below with conda.

Create a conda environment with napari by typing :

mamba create -y -n napari-phasors-env napari pyqt python=3.12

Activate the environment :

mamba activate napari-phasors-env

Install napari-phasors via pip :

pip install napari-phasors

Alternatively, install latest development version with :

pip install git+https://github.com/napari-phasors/napari-phasors.git

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-phasors" 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_phasors-0.2.0.tar.gz (112.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

napari_phasors-0.2.0-py3-none-any.whl (122.2 kB view details)

Uploaded Python 3

File details

Details for the file napari_phasors-0.2.0.tar.gz.

File metadata

  • Download URL: napari_phasors-0.2.0.tar.gz
  • Upload date:
  • Size: 112.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for napari_phasors-0.2.0.tar.gz
Algorithm Hash digest
SHA256 9264196b2277928b61345941d15b0e84a4e8db4d91b42a43430c934d2747b05c
MD5 6320b9a958e7830ac1a4f19dbc8c6f6a
BLAKE2b-256 3a85cc76da6e2792e99dc120105d6e9ba161f346a86f39dd65628993bce0c04c

See more details on using hashes here.

Provenance

The following attestation bundles were made for napari_phasors-0.2.0.tar.gz:

Publisher: run-tests.yml on napari-phasors/napari-phasors

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file napari_phasors-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: napari_phasors-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 122.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for napari_phasors-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 8add2c2309c12fc255b2e0b9b8538d215436e9e72b7f722c5020b07f4ad4345b
MD5 355f584af2cfdc277d5ab6861c06c3be
BLAKE2b-256 1eb0cddda48e347d1564f64ff75ee17ae357c397e95911c52089b1208de79d4e

See more details on using hashes here.

Provenance

The following attestation bundles were made for napari_phasors-0.2.0-py3-none-any.whl:

Publisher: run-tests.yml on napari-phasors/napari-phasors

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

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