Skip to content

Commit

Permalink
Merge pull request #58 from zoccoler/ncp_0_8_0_compatible
Browse files Browse the repository at this point in the history
Make plugin compatible with ncp 0_8_0
  • Loading branch information
zoccoler authored Jun 19, 2024
2 parents c4fdb12 + c80bfc7 commit d3f8e0c
Show file tree
Hide file tree
Showing 12 changed files with 181 additions and 641 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/test_and_deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
strategy:
matrix:
platform: [ubuntu-latest, windows-latest, macos-latest]
python-version: ['3.8', '3.9', '3.10']
python-version: ['3.9', '3.10']

steps:
- uses: actions/checkout@v3
Expand Down
1 change: 0 additions & 1 deletion MANIFEST.in
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,3 @@ include README.md
recursive-exclude * __pycache__
recursive-exclude * *.py[co]
include src/napari_flim_phasor_plotter/data/*
include src/napari_flim_phasor_plotter/data/hazelnut_FLIM_z_stack/*
6 changes: 3 additions & 3 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ classifiers =
Programming Language :: Python
Programming Language :: Python :: 3
Programming Language :: Python :: 3 :: Only
Programming Language :: Python :: 3.8
Programming Language :: Python :: 3.9
Programming Language :: Python :: 3.10
Topic :: Scientific/Engineering :: Image Processing
Expand All @@ -34,7 +33,8 @@ install_requires =
numpy
magicgui
qtpy
napari-clusters-plotter
napari-clusters-plotter>=0.8.0
ptufile
sdtfile
natsort
rocket-fft
Expand All @@ -43,7 +43,7 @@ install_requires =
napari-segment-blobs-and-things-with-membranes
napari-skimage-regionprops

python_requires = >=3.8
python_requires = >=3.9
include_package_data = True
package_dir =
=src
Expand Down
4 changes: 2 additions & 2 deletions src/napari_flim_phasor_plotter/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@

from ._reader import napari_get_reader
from ._sample_data import load_seminal_receptacle_image, load_hazelnut_image, load_hazelnut_z_stack, load_lifetime_cat_synthtetic_single_image
from ._io.readPTU_FLIM import PTUreader
from ._io import convert_to_zarr
from . import phasor, filters, _plotting, _widget


__all__ = (
"napari_get_reader",
"_sample_data",
"PTUreader",
"convert_to_zarr",
"phasor",
"filters",
"_plotting",
Expand Down
5 changes: 4 additions & 1 deletion src/napari_flim_phasor_plotter/_io/convert_to_zarr.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ def convert_folder_to_zarr(folder_path: pathlib.Path, cancel_button: bool = Fals
Path to the folder containing the FLIM images.
"""
import zarr
from numcodecs import Blosc
import dask.array as da
import numpy as np
from pathlib import Path
Expand Down Expand Up @@ -76,9 +77,11 @@ def convert_folder_to_zarr(folder_path: pathlib.Path, cancel_button: bool = Fals
# zarr file will be saved in the same folder as the input folder
output_path = folder_path / (folder_path.stem + '.zarr')
# Using zarr to automatically guess chunk sizes
# Use Blosc compressor for better compression and speed
compressor = Blosc(cname='zstd', clevel=3, shuffle=Blosc.BITSHUFFLE)
# Create an empty zarr array of a specified shape and dtype filled with zeros
zarr_array = zarr.open(output_path, mode='w',
shape=stack_shape, dtype=image_dtype)
shape=stack_shape, dtype=image_dtype, compressor=compressor)
# Using dask to rechunk micro-time axis in single chunk (for fft calculation afterwards)
dask_array = da.from_zarr(output_path)
# Rechunk axis 1 (micro-time axis) to a single chunk
Expand Down
Loading

0 comments on commit d3f8e0c

Please sign in to comment.