Skip to content

Commit

Permalink
PSF measurement, simulation, and deconvolution (#130)
Browse files Browse the repository at this point in the history
* Create measure_psf.py

* partial psf analysis report

* update psf analysis report

* refactor psf analysis

* refactor psf analysis report

* add report on deskewed data

* initial psf simulations

* GPU peak detection with torch (#129)

* GPU peak detection with torch

* update bead detector

* update psf measurement script

* style

---------

Co-authored-by: Ivan Ivanov <[email protected]>

* ignore psf analysis warnings

* update script with acquisition settings

* better paths formatting

* better paths formatting

* update measurement script

* add html report title

* update psf analysis scripts

* typo

* update dependencies

* larger PSF area

* main fitting script

* simple_psf iteration

* deconvolution prototype

* settings

* cutsom patch size

* deconvolve CLI

* psf-from-beads CLI

* cli boilerplate

* update psf measurement scripts

* first-pass characterize

* fix css issue

* napari-psf-analysis is breaking fresh installations

* auto-open webbrowser

* handle negative with ints and clips

* pass in axis labels

* average beads over multiple FOVs

* adding WIP changes, used for most recent deconvolutions

* style

* add napari-psf-analysis dependency

* refactor characterize cli

* more characterize refactor

* use characterize_peaks in measure_psf

* clean up measure_psf analysis portion

* bugfix

* delete unused scripts

* remove unused _deskew_matrix

* test for incorrectlyt shifted deskew

* correct typo in test

* fix deskew regression

* style

* extend O3 scan range

* Update measure_psf.py

* fix overflow bug

* Update measure_psf.py

* style

* cleanup

* rename psf functions

* Update mantis/cli/characterize_psf.py

Co-authored-by: Talon Chandler <[email protected]>

* Update mantis/cli/estimate_psf.py

Co-authored-by: Talon Chandler <[email protected]>

---------

Co-authored-by: Ivan Ivanov <[email protected]>
Co-authored-by: Ziwen Liu <[email protected]>
  • Loading branch information
3 people authored Aug 13, 2024
1 parent cad662b commit 00c9924
Show file tree
Hide file tree
Showing 16 changed files with 2,527 additions and 21 deletions.
1 change: 1 addition & 0 deletions .flake8
Original file line number Diff line number Diff line change
Expand Up @@ -37,3 +37,4 @@ exclude =
ignore,
legacy,
examples,
scripts
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
exclude: ^(docs|notebooks|ignore|/tests/artifacts|examples)/
exclude: ^(docs|notebooks|ignore|/tests/artifacts|examples|scripts)/
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.1.0
Expand Down
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@ uninstall:

.PHONY: check-format
check-format:
black --check -S -t py39 .
black --check -S -t py310 .
isort --check .

.PHONY: format
format:
black -S -t py39 .
black -S -t py310 .
isort .

.PHONY: lint
Expand Down
4 changes: 2 additions & 2 deletions mantis/acquisition/acq_engine.py
Original file line number Diff line number Diff line change
Expand Up @@ -807,8 +807,8 @@ def refocus_ls_path(self):
# Define relative travel limits, in steps
o3_z_stage = self.ls_acq.o3_stage
target_z_position = o3_z_stage.true_position + o3_z_range
max_z_position = 500 # O3 is allowed to travel ~10 um towards O2
min_z_position = -1000 # O3 is allowed to travel ~20 um away from O2
max_z_position = 750 # O3 is allowed to travel ~15 um towards O2
min_z_position = -1500 # O3 is allowed to travel ~30 um away from O2
if np.any(target_z_position > max_z_position) or np.any(
target_z_position < min_z_position
):
Expand Down
Loading

0 comments on commit 00c9924

Please sign in to comment.