picassosr 0.11.1__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (121) hide show
  1. picassosr-0.11.1/LICENSE.txt +21 -0
  2. picassosr-0.11.1/LICENSES/Gpufit-LICENSE.txt +42 -0
  3. picassosr-0.11.1/LICENSES/Gpuspline-LICENSE.txt +35 -0
  4. picassosr-0.11.1/PKG-INFO +277 -0
  5. picassosr-0.11.1/picasso/__init__.py +100 -0
  6. picassosr-0.11.1/picasso/__main__.py +5066 -0
  7. picassosr-0.11.1/picasso/_numba_cuda_compat.py +121 -0
  8. picassosr-0.11.1/picasso/aim.py +823 -0
  9. picassosr-0.11.1/picasso/average.py +663 -0
  10. picassosr-0.11.1/picasso/avgroi.py +248 -0
  11. picassosr-0.11.1/picasso/clusterer.py +1261 -0
  12. picassosr-0.11.1/picasso/config_template.yaml +153 -0
  13. picassosr-0.11.1/picasso/design.py +241 -0
  14. picassosr-0.11.1/picasso/design_sequences.py +229 -0
  15. picassosr-0.11.1/picasso/diagnostics.py +293 -0
  16. picassosr-0.11.1/picasso/ext/__init__.py +0 -0
  17. picassosr-0.11.1/picasso/ext/bitplane.py +454 -0
  18. picassosr-0.11.1/picasso/fitting/__init__.py +51 -0
  19. picassosr-0.11.1/picasso/fitting/gaussfit.py +1804 -0
  20. picassosr-0.11.1/picasso/fitting/gaussfit_cuda.py +1194 -0
  21. picassosr-0.11.1/picasso/fitting/lmfit_cuda.py +738 -0
  22. picassosr-0.11.1/picasso/fitting/precision.py +3170 -0
  23. picassosr-0.11.1/picasso/fitting/seeds.py +298 -0
  24. picassosr-0.11.1/picasso/fitting/splinefit.py +1746 -0
  25. picassosr-0.11.1/picasso/fitting/splinefit_cuda.py +924 -0
  26. picassosr-0.11.1/picasso/g5m.py +3556 -0
  27. picassosr-0.11.1/picasso/gausslq.py +986 -0
  28. picassosr-0.11.1/picasso/gaussmle.py +1165 -0
  29. picassosr-0.11.1/picasso/gui/__init__.py +0 -0
  30. picassosr-0.11.1/picasso/gui/app.py +104 -0
  31. picassosr-0.11.1/picasso/gui/average.py +620 -0
  32. picassosr-0.11.1/picasso/gui/average3.py +2104 -0
  33. picassosr-0.11.1/picasso/gui/design.py +1802 -0
  34. picassosr-0.11.1/picasso/gui/filter.py +1079 -0
  35. picassosr-0.11.1/picasso/gui/icons/average.ico +0 -0
  36. picassosr-0.11.1/picasso/gui/icons/design.ico +0 -0
  37. picassosr-0.11.1/picasso/gui/icons/filter.ico +0 -0
  38. picassosr-0.11.1/picasso/gui/icons/localize.ico +0 -0
  39. picassosr-0.11.1/picasso/gui/icons/nanotron.ico +0 -0
  40. picassosr-0.11.1/picasso/gui/icons/picasso_server.png +0 -0
  41. picassosr-0.11.1/picasso/gui/icons/render.ico +0 -0
  42. picassosr-0.11.1/picasso/gui/icons/server.ico +0 -0
  43. picassosr-0.11.1/picasso/gui/icons/simulate.ico +0 -0
  44. picassosr-0.11.1/picasso/gui/icons/spinna.ico +0 -0
  45. picassosr-0.11.1/picasso/gui/localize.py +13631 -0
  46. picassosr-0.11.1/picasso/gui/nanotron.py +1572 -0
  47. picassosr-0.11.1/picasso/gui/plugins_loader.py +659 -0
  48. picassosr-0.11.1/picasso/gui/render.py +14711 -0
  49. picassosr-0.11.1/picasso/gui/rotation.py +2415 -0
  50. picassosr-0.11.1/picasso/gui/simulate.py +2625 -0
  51. picassosr-0.11.1/picasso/gui/spinna.py +5283 -0
  52. picassosr-0.11.1/picasso/imageprocess.py +378 -0
  53. picassosr-0.11.1/picasso/io.py +5217 -0
  54. picassosr-0.11.1/picasso/lib.py +3648 -0
  55. picassosr-0.11.1/picasso/lib_qt.py +1461 -0
  56. picassosr-0.11.1/picasso/localize.py +9100 -0
  57. picassosr-0.11.1/picasso/masking.py +680 -0
  58. picassosr-0.11.1/picasso/nanotron.py +271 -0
  59. picassosr-0.11.1/picasso/plugins.py +892 -0
  60. picassosr-0.11.1/picasso/postprocess.py +5395 -0
  61. picassosr-0.11.1/picasso/registration.py +1397 -0
  62. picassosr-0.11.1/picasso/render.py +4188 -0
  63. picassosr-0.11.1/picasso/scmos.py +801 -0
  64. picassosr-0.11.1/picasso/server/__init__.py +0 -0
  65. picassosr-0.11.1/picasso/server/app.py +50 -0
  66. picassosr-0.11.1/picasso/server/compare.py +243 -0
  67. picassosr-0.11.1/picasso/server/helper.py +59 -0
  68. picassosr-0.11.1/picasso/server/history.py +329 -0
  69. picassosr-0.11.1/picasso/server/preview.py +158 -0
  70. picassosr-0.11.1/picasso/server/status.py +199 -0
  71. picassosr-0.11.1/picasso/server/watcher.py +557 -0
  72. picassosr-0.11.1/picasso/simulate.py +759 -0
  73. picassosr-0.11.1/picasso/spatial_index.py +351 -0
  74. picassosr-0.11.1/picasso/spinna.py +4810 -0
  75. picassosr-0.11.1/picasso/spline.py +4230 -0
  76. picassosr-0.11.1/picasso/transforms.py +1519 -0
  77. picassosr-0.11.1/picasso/updater.py +337 -0
  78. picassosr-0.11.1/picasso/version.py +1 -0
  79. picassosr-0.11.1/picasso/zfit.py +1213 -0
  80. picassosr-0.11.1/picassosr.egg-info/PKG-INFO +277 -0
  81. picassosr-0.11.1/picassosr.egg-info/SOURCES.txt +119 -0
  82. picassosr-0.11.1/picassosr.egg-info/dependency_links.txt +1 -0
  83. picassosr-0.11.1/picassosr.egg-info/entry_points.txt +2 -0
  84. picassosr-0.11.1/picassosr.egg-info/requires.txt +93 -0
  85. picassosr-0.11.1/picassosr.egg-info/top_level.txt +1 -0
  86. picassosr-0.11.1/pyproject.toml +175 -0
  87. picassosr-0.11.1/readme.rst +174 -0
  88. picassosr-0.11.1/setup.cfg +4 -0
  89. picassosr-0.11.1/tests/test_average.py +361 -0
  90. picassosr-0.11.1/tests/test_clusterer.py +584 -0
  91. picassosr-0.11.1/tests/test_diagnostics.py +205 -0
  92. picassosr-0.11.1/tests/test_g5m.py +1212 -0
  93. picassosr-0.11.1/tests/test_gaussfit.py +1092 -0
  94. picassosr-0.11.1/tests/test_gaussfit_cuda.py +550 -0
  95. picassosr-0.11.1/tests/test_gausslq.py +945 -0
  96. picassosr-0.11.1/tests/test_gaussmle.py +556 -0
  97. picassosr-0.11.1/tests/test_gui_app.py +169 -0
  98. picassosr-0.11.1/tests/test_gui_localize_lateral.py +549 -0
  99. picassosr-0.11.1/tests/test_gui_localize_roi_id.py +136 -0
  100. picassosr-0.11.1/tests/test_gui_render_index.py +244 -0
  101. picassosr-0.11.1/tests/test_gui_render_picks.py +596 -0
  102. picassosr-0.11.1/tests/test_imageprocess.py +301 -0
  103. picassosr-0.11.1/tests/test_io.py +2112 -0
  104. picassosr-0.11.1/tests/test_lib.py +1335 -0
  105. picassosr-0.11.1/tests/test_lmfit_cuda.py +372 -0
  106. picassosr-0.11.1/tests/test_localize.py +13949 -0
  107. picassosr-0.11.1/tests/test_plugins.py +574 -0
  108. picassosr-0.11.1/tests/test_plugins_loader.py +462 -0
  109. picassosr-0.11.1/tests/test_postprocess.py +1943 -0
  110. picassosr-0.11.1/tests/test_registration.py +673 -0
  111. picassosr-0.11.1/tests/test_render.py +1947 -0
  112. picassosr-0.11.1/tests/test_scmos.py +455 -0
  113. picassosr-0.11.1/tests/test_simulate.py +492 -0
  114. picassosr-0.11.1/tests/test_spatial_index.py +281 -0
  115. picassosr-0.11.1/tests/test_spinna.py +1899 -0
  116. picassosr-0.11.1/tests/test_spline.py +2265 -0
  117. picassosr-0.11.1/tests/test_splinefit.py +1429 -0
  118. picassosr-0.11.1/tests/test_splinefit_cuda.py +607 -0
  119. picassosr-0.11.1/tests/test_transforms.py +766 -0
  120. picassosr-0.11.1/tests/test_undrift.py +926 -0
  121. picassosr-0.11.1/tests/test_zfit.py +1481 -0
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2016-2026 Jungmann Lab, MPI of Biochemistry (jungmannlab.org)
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,42 @@
1
+ Picasso's GPU and CPU curve fitters are derived from Gpufit
2
+ (https://github.com/gpufit/Gpufit). Its Levenberg-Marquardt driver, its
3
+ Gauss-Jordan solve, its least-squares and Poisson maximum-likelihood estimators
4
+ and its Gaussian and cubic-spline PSF models were ported to Python/numba in
5
+
6
+ picasso/fitting/splinefit.py CPU cubic-spline fitting
7
+ picasso/fitting/splinefit_cuda.py CUDA cubic-spline fitting
8
+ picasso/fitting/gaussfit_cuda.py CUDA Gaussian fitting
9
+ picasso/fitting/lmfit_cuda.py shared CUDA Levenberg-Marquardt
10
+ machinery
11
+
12
+ Picasso no longer links against or redistributes the Gpufit binary, but those
13
+ modules remain derivative works of its source, so its licence is reproduced
14
+ below in full.
15
+
16
+ Cite: Przybylski, A., Thiel, B., Keller-Findeisen, J., Stock, B. & Bates, M.
17
+ "Gpufit: An open-source toolkit for GPU-accelerated curve fitting."
18
+ Scientific Reports 7, 15722 (2017). https://doi.org/10.1038/s41598-017-15313-9
19
+
20
+ ---
21
+
22
+ MIT License
23
+
24
+ Copyright (c) 2017 Mark Bates, Adrian Przybylski, Björn Thiel, and Jan Keller-Findeisen
25
+
26
+ Permission is hereby granted, free of charge, to any person obtaining a copy
27
+ of this software and associated documentation files (the "Software"), to deal
28
+ in the Software without restriction, including without limitation the rights
29
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
30
+ copies of the Software, and to permit persons to whom the Software is
31
+ furnished to do so, subject to the following conditions:
32
+
33
+ The above copyright notice and this permission notice shall be included in all
34
+ copies or substantial portions of the Software.
35
+
36
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
37
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
38
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
39
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
40
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
41
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
42
+ SOFTWARE.
@@ -0,0 +1,35 @@
1
+ Picasso's spline PSF calibration computes its cubic-spline coefficients with
2
+ an implementation derived from Gpuspline (https://github.com/gpufit/Gpuspline).
3
+ Its coefficient scheme - a tensor product of 1D natural cubic interpolating
4
+ splines - and the flat coefficient-buffer layout Picasso's fitters read were
5
+ reimplemented in Python/NumPy/SciPy in
6
+
7
+ picasso/spline.py spline_coefficients()
8
+
9
+ Picasso no longer links against or redistributes the Gpuspline binary, but that
10
+ implementation follows its scheme and layout, so its licence is reproduced
11
+ below in full.
12
+
13
+ ---
14
+
15
+ MIT License
16
+
17
+ Copyright (c) the Gpuspline authors (https://github.com/gpufit/Gpuspline)
18
+
19
+ Permission is hereby granted, free of charge, to any person obtaining a copy
20
+ of this software and associated documentation files (the "Software"), to deal
21
+ in the Software without restriction, including without limitation the rights
22
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
23
+ copies of the Software, and to permit persons to whom the Software is
24
+ furnished to do so, subject to the following conditions:
25
+
26
+ The above copyright notice and this permission notice shall be included in all
27
+ copies or substantial portions of the Software.
28
+
29
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
30
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
31
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
32
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
33
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
34
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
35
+ SOFTWARE.
@@ -0,0 +1,277 @@
1
+ Metadata-Version: 2.4
2
+ Name: picassosr
3
+ Version: 0.11.1
4
+ Summary: Collection of tools for painting super-resolution images
5
+ Author-email: Joerg Schnitzbauer <joschnitzbauer@gmail.com>, "Maximilian T. Strauss" <straussmaximilian@gmail.com>, Rafal Kowalewski <rafalkowalewski998@gmail.com>
6
+ Maintainer-email: Rafal Kowalewski <rafalkowalewski998@gmail.com>
7
+ License-Expression: MIT
8
+ Project-URL: Homepage, https://github.com/jungmannlab/picasso
9
+ Project-URL: Documentation, https://picassosr.readthedocs.io/en/latest/index.html
10
+ Project-URL: Changelog, https://github.com/jungmannlab/picasso/blob/master/changelog.md
11
+ Project-URL: Publications, https://doi.org/10.1038/nprot.2017.024
12
+ Keywords: super-resolution,DNA-PAINT,microscopy
13
+ Classifier: Development Status :: 4 - Beta
14
+ Classifier: Intended Audience :: Science/Research
15
+ Classifier: Programming Language :: Python
16
+ Classifier: Programming Language :: Python :: 3.10
17
+ Classifier: Programming Language :: Python :: 3.11
18
+ Classifier: Programming Language :: Python :: 3.12
19
+ Classifier: Programming Language :: Python :: 3.13
20
+ Classifier: Programming Language :: Python :: 3.14
21
+ Classifier: Operating System :: OS Independent
22
+ Requires-Python: <3.15,>=3.10
23
+ Description-Content-Type: text/x-rst
24
+ License-File: LICENSE.txt
25
+ License-File: LICENSES/Gpufit-LICENSE.txt
26
+ License-File: LICENSES/Gpuspline-LICENSE.txt
27
+ Requires-Dist: PyQt6<7,>=6.10.2
28
+ Requires-Dist: numpy<3,>=2.2.6
29
+ Requires-Dist: matplotlib<4,>=3.10.7
30
+ Requires-Dist: h5py<4,>=3.15.1
31
+ Requires-Dist: numba<1,>=0.62.1
32
+ Requires-Dist: scipy<2,>=1.15.3
33
+ Requires-Dist: pandas<3,>=2.3.3
34
+ Requires-Dist: tables<4,>=3.10.1
35
+ Requires-Dist: pyyaml<7,>=6.0.3
36
+ Requires-Dist: scikit-learn<1.8,>=1.5.0
37
+ Requires-Dist: tqdm<5,>=4.67.1
38
+ Requires-Dist: streamlit<2,>=1.50.0
39
+ Requires-Dist: nd2<1,>=0.10.4
40
+ Requires-Dist: sqlalchemy<3,>=2.0.44
41
+ Requires-Dist: plotly-express<1,>=0.4.1
42
+ Requires-Dist: watchdog<7,>=6.0.0
43
+ Requires-Dist: psutil<8,>=7.1.1
44
+ Requires-Dist: playsound3<4,>=3.2.8
45
+ Requires-Dist: imageio<3,>=2.37.0
46
+ Requires-Dist: imageio-ffmpeg<1,>=0.6.0
47
+ Requires-Dist: tifffile<2027,>=2024.7.24
48
+ Requires-Dist: PyImarisWriter==0.7.0; sys_platform == "win32"
49
+ Requires-Dist: hdf5plugin; sys_platform == "win32"
50
+ Provides-Extra: cuda11
51
+ Requires-Dist: numba-cuda[cu11]; extra == "cuda11"
52
+ Provides-Extra: cuda12
53
+ Requires-Dist: numba-cuda[cu12]; extra == "cuda12"
54
+ Provides-Extra: cuda13
55
+ Requires-Dist: numba-cuda[cu13]; extra == "cuda13"
56
+ Provides-Extra: gpu
57
+ Requires-Dist: picassosr[cuda12]; extra == "gpu"
58
+ Provides-Extra: dev
59
+ Requires-Dist: build; extra == "dev"
60
+ Requires-Dist: black; extra == "dev"
61
+ Requires-Dist: pre-commit; extra == "dev"
62
+ Requires-Dist: twine; extra == "dev"
63
+ Provides-Extra: czi
64
+ Requires-Dist: czifile>=2026.6.12; python_version >= "3.12" and extra == "czi"
65
+ Requires-Dist: imagecodecs>=2026.6.6; python_version >= "3.12" and extra == "czi"
66
+ Provides-Extra: lif
67
+ Requires-Dist: liffile>=2026.4.11; python_version >= "3.12" and extra == "lif"
68
+ Requires-Dist: imagecodecs>=2026.6.6; python_version >= "3.12" and extra == "lif"
69
+ Provides-Extra: formats
70
+ Requires-Dist: picassosr[czi,lif]; extra == "formats"
71
+ Provides-Extra: installer
72
+ Requires-Dist: PyQt6==6.11.0; extra == "installer"
73
+ Requires-Dist: numpy==2.4.4; extra == "installer"
74
+ Requires-Dist: matplotlib==3.10.8; extra == "installer"
75
+ Requires-Dist: h5py==3.16.0; extra == "installer"
76
+ Requires-Dist: numba==0.65.0; extra == "installer"
77
+ Requires-Dist: scipy==1.17.1; extra == "installer"
78
+ Requires-Dist: pandas==2.3.3; extra == "installer"
79
+ Requires-Dist: tables==3.11.1; extra == "installer"
80
+ Requires-Dist: pyyaml==6.0.3; extra == "installer"
81
+ Requires-Dist: scikit-learn==1.7.2; extra == "installer"
82
+ Requires-Dist: tqdm==4.67.3; extra == "installer"
83
+ Requires-Dist: streamlit==1.56.0; extra == "installer"
84
+ Requires-Dist: nd2==0.11.3; extra == "installer"
85
+ Requires-Dist: sqlalchemy==2.0.49; extra == "installer"
86
+ Requires-Dist: plotly-express==0.4.1; extra == "installer"
87
+ Requires-Dist: watchdog==6.0.0; extra == "installer"
88
+ Requires-Dist: psutil==7.2.2; extra == "installer"
89
+ Requires-Dist: playsound3==3.3.1; extra == "installer"
90
+ Requires-Dist: imageio==2.37.3; extra == "installer"
91
+ Requires-Dist: imageio-ffmpeg==0.6.0; extra == "installer"
92
+ Requires-Dist: tifffile==2026.4.11; extra == "installer"
93
+ Requires-Dist: czifile==2026.6.12; extra == "installer"
94
+ Requires-Dist: liffile==2026.4.11; extra == "installer"
95
+ Requires-Dist: imagecodecs==2026.6.6; extra == "installer"
96
+ Requires-Dist: pyinstaller==6.19.0; extra == "installer"
97
+ Requires-Dist: PyImarisWriter==0.7.0; sys_platform == "win32" and extra == "installer"
98
+ Requires-Dist: hdf5plugin==6.0.0; sys_platform == "win32" and extra == "installer"
99
+ Provides-Extra: installer-gpu
100
+ Requires-Dist: picassosr[installer]; extra == "installer-gpu"
101
+ Requires-Dist: numba-cuda[cu12]==0.30.2; extra == "installer-gpu"
102
+ Dynamic: license-file
103
+
104
+ Picasso
105
+ =======
106
+ .. image:: https://readthedocs.org/projects/picassosr/badge/?version=latest
107
+ :target: https://picassosr.readthedocs.io/en/latest/?badge=latest
108
+ :alt: Documentation Status
109
+
110
+ .. image:: https://github.com/jungmannlab/picasso/workflows/CI/badge.svg
111
+ :target: https://github.com/jungmannlab/picasso/workflows/CI/badge.svg
112
+ :alt: CI
113
+
114
+ .. image:: http://img.shields.io/badge/DOI-10.1038/nprot.2017.024-52c92e.svg
115
+ :target: https://doi.org/10.1038/nprot.2017.024
116
+ :alt: DOI
117
+
118
+ .. image:: https://static.pepy.tech/personalized-badge/picassosr?period=total&units=international_system&left_color=black&right_color=brightgreen&left_text=Downloads
119
+ :target: https://pepy.tech/project/picassosr
120
+ :alt: Downloads
121
+
122
+ .. image:: https://img.shields.io/pypi/pyversions/picassosr
123
+ :target: https://pypi.org/project/picassosr/
124
+ :alt: Python versions
125
+
126
+ .. image:: https://img.shields.io/pypi/v/picassosr
127
+ :target: https://pypi.org/project/picassosr/
128
+ :alt: PyPI version
129
+
130
+ .. image:: https://img.shields.io/badge/Changelog-View-blue
131
+ :target: https://github.com/jungmannlab/picasso/blob/master/changelog.md
132
+ :alt: Changelog
133
+
134
+ .. image:: https://raw.githubusercontent.com/jungmannlab/picasso/master/main_render.png
135
+ :width: 750
136
+ :height: 564
137
+ :alt: UML Render view
138
+
139
+ Collection of tools for painting super-resolution images. The Picasso software is complemented by our `Nature Protocols publication <https://www.nature.com/nprot/journal/v12/n6/abs/nprot.2017.024.html>`__.
140
+
141
+ A comprehensive documentation can be found here: `Read the Docs <https://picassosr.readthedocs.io/en/latest/?badge=latest>`__.
142
+
143
+ To see all changes introduced across releases, see `the changelog <https://github.com/jungmannlab/picasso/blob/master/changelog.md>`_.
144
+
145
+ Picasso 0.11
146
+ ------------
147
+ This release substantially expands Picasso: Localize. Localization can now be performed with an experimentally measured PSF (cubic-spline model), jointly across several channels (e.g. biplane 3D), and with a pixel-dependent sCMOS noise model; rotated and spherical 2D Gaussian models were added as well. All GPU fitting was reimplemented in Numba CUDA, removing the dependency on Gpufit. Localize also reads a much wider range of data directly - ``.tif`` and OME-TIFF stacks (including movies split across several folders), MicroManager single-image acquisitions, Zeiss ``.czi`` and Leica ``.lif`` - so Picasso: ToRaw is no longer required and has been removed. Further additions include a temporal median filter for spot identification, affine calibrations for astigmatism and chromatic aberration correction, localization metadata embedded in the ``.hdf5`` files, a revised plugin system with an online plugin browser, and various performance and usability improvements throughout Localize, Render and SPINNA. We encourage all users to acquaint themselves with the new features in the `Localize documentation <https://picassosr.readthedocs.io/en/latest/localize.html>`_. See the `changelog <https://github.com/jungmannlab/picasso/blob/master/changelog.md>`_ for the complete list.
148
+
149
+ Installation
150
+ ------------
151
+
152
+ Check out the `Picasso release page <https://github.com/jungmannlab/picasso/releases/>`__ to download and run the latest compiled one-click installer for Windows or MacOS (the latter is experimental and feedback is welcome). Here you will also find the Nature Protocols legacy version (v0.1.0).
153
+
154
+ For Windows, two one-click installers are provided: a default (CPU) build and a **GPU** build. The GPU build additionally bundles the CUDA runtime so that GPU-accelerated (numba.cuda) code can run. It is larger and requires an NVIDIA (CUDA-capable) GPU; on machines without one, GPU-only options are simply hidden. Choose the GPU installer only if you have a compatible NVIDIA GPU and want to use the accelerated tools, for example localization fitting. Picasso uses Cuda12 in the one-click-installer.
155
+
156
+ Python is also distributed as a PyPI package that is platform-independent (``pip install picassosr``) which grants not only GUI but also access to Picasso’s internal routines in custom Python programs. For more details, see the `Via PyPI <https://github.com/jungmannlab/picasso#via-pypi>`__ section below. For examples of how to use Picasso in Python scripts, see the section `Example Usage <https://github.com/jungmannlab/picasso#example-usage>`__ below.
157
+
158
+ Note: Since v0.10.0 Picasso is more flexible in terms of dependencies and Python versions. Previously only Python 3.10 was supported, now newer versions are encouraged.
159
+
160
+ Via PyPI
161
+ ^^^^^^^^
162
+
163
+ 1. Open the console/terminal and create a new conda environment: ``conda create --name picasso python=3.14``. Note you can use other Python versions as well.
164
+ 2. Activate the environment: ``conda activate picasso``.
165
+ 3. Install Picasso package using: ``pip install picassosr``.
166
+ 4. You can now run any Picasso function directly from the console/terminal by running: ``picasso render``, ``picasso localize``, etc, or import Picasso functions in your own Python scripts.
167
+ 5. To update Picasso (you should get a notification about available updates since v0.10.0) run ``pip install --upgrade picassosr``.
168
+ 6. You can optionally install dependencies for .czi and .lif formats by passing ``pip install picassosr[czi]`` or ``pip install picassosr[lif]``.
169
+ 7. To enable GPU-accelerated (numba.cuda) code, install the CUDA dependencies with ``pip install picassosr[gpu]``. This requires an NVIDIA (CUDA-capable) GPU. The ``gpu`` extra targets CUDA toolkit 12.x; for other toolkits use ``pip install picassosr[cuda11]`` or ``pip install picassosr[cuda13]`` instead. Without these extras, Picasso runs fine on the CPU and GPU-only options are hidden.
170
+
171
+ For Developers (local, editable installation)
172
+ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
173
+
174
+ If you wish to use your local version of Picasso with your own modifications:
175
+
176
+ 1. Open the console/terminal and create a new conda environment: ``conda create --name picasso python=3.14``. Note you can use other Python versions as well.
177
+ 2. Activate the environment: ``conda activate picasso``.
178
+ 3. Change to the directory of choice using ``cd``.
179
+ 4. Clone this GitHub repository by running ``git clone https://github.com/jungmannlab/picasso``. Alternatively, `download <https://github.com/jungmannlab/picasso/archive/master.zip>`__ the zip file and unzip it.
180
+ 5. Open the Picasso directory: ``cd picasso``.
181
+ 6. You can modify Picasso code in this directory.
182
+ 7. To create a *local* Picasso package to use it in other Python scripts, run ``pip install -e ".[dev]"``. When you change the code in the ``picasso`` directory, the changes will be reflected in the package.
183
+ 8. You can install other extensions, such as ``".[gpu]"``, etc. The whole list of optional dependencies can be found in ``pyproject.toml``.
184
+ 9. You can now run any Picasso module directly from the console/terminal by running: ``picasso render``, ``picasso localize``, etc, or import Picasso functions in your own Python scripts.
185
+
186
+ Creating shortcuts on Windows (*optional*)
187
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
188
+
189
+ This applies only to the users who installed Picasso via PyPI or through the editable, developer version and want to use desktop shortcuts. If you installed Picasso from the one-click installer on the `Release page <https://github.com/jungmannlab/picasso/releases/>`__, you can ignore this section. Run the PowerShell script “createShortcuts.ps1” in the ``gui`` directory. This should be doable by right-clicking on the script and choosing “Run with PowerShell”. Alternatively, run the command
190
+ ``powershell ./createShortcuts.ps1`` in the command line. Use the generated shortcuts in the top level directory to start GUI components. Users can drag these shortcuts to their Desktop, Start Menu or Task Bar.
191
+
192
+ Example Usage
193
+ -------------
194
+
195
+ Besides using the GUI, you can use picasso like any other Python module. Consider the following example:::
196
+
197
+ from picasso import io, postprocess
198
+
199
+ path = 'testdata_locs.hdf5'
200
+ locs, info = io.load_locs(path)
201
+
202
+ # Link localizations and calculate dark times
203
+ linked_locs = postprocess.link(picked_locs, info, r_max=0.05, max_dark_time=1)
204
+ linked_locs_dark = postprocess.compute_dark_times(linked_locs)
205
+
206
+ print(f"Average bright time {linked_locs_dark['n'].mean():.2f} frames")
207
+ print(f"Average dark time {linked_locs_dark['dark'].mean():.2f} frames")
208
+
209
+ For more examples, visit the `sample notebooks <https://github.com/jungmannlab/picasso/tree/master/samples>`__.
210
+
211
+ Contributing
212
+ ------------
213
+
214
+ If you have a feature request or a bug report, please post it as an issue on the GitHub issue tracker. If you want to contribute, put a pull request (PR) for it. You can find more guidelines for contributing `here <https://github.com/jungmannlab/picasso/blob/master/CONTRIBUTING.rst>`__. We will gladly guide you through the codebase and credit you accordingly. You can also contact us via picasso@jungmannlab.org.
215
+
216
+ .. SYNC-START: contributions
217
+
218
+ Contributions & Copyright
219
+ -------------------------
220
+
221
+ | Contributors: Joerg Schnitzbauer, Maximilian Strauss, Rafal Kowalewski, Adrian Przybylski, Andrey Aristov, Hiroshi Sasaki, Alexander Auer, Johanna Rahm
222
+ | Copyright (c) 2015-2025 Jungmann Lab, Max Planck Institute of Biochemistry
223
+
224
+ .. SYNC-END: contributions
225
+
226
+ .. SYNC-START: citing
227
+
228
+ Citing Picasso
229
+ --------------
230
+
231
+ If you use Picasso in your research, please cite our Nature Protocols publication describing the software.
232
+
233
+ | J. Schnitzbauer*, M.T. Strauss*, T. Schlichthaerle, F. Schueder, R. Jungmann
234
+ | Super-Resolution Microscopy with DNA-PAINT
235
+ | Nature Protocols (2017). 12: 1198-1228 DOI: `10.1038/nprot.2017.024 <https://doi.org/10.1038/nprot.2017.024>`__
236
+ |
237
+ | If you use some of the functionalities provided by Picasso, please also cite the respective publications:
238
+
239
+ - All fitting methods are ports of Gpufit. DOI: `10.1038/s41598-017-15313-9 <https://doi.org/10.1038/s41598-017-15313-9>`__. License can be found `here <https://github.com/jungmannlab/picasso/blob/master/LICENSES/Gpufit-LICENSE.txt>`__.
240
+ - Experimental PSF (cubic-spline) fitting. DOIs: `10.1038/nmeth.4661 <https://doi.org/10.1038/nmeth.4661>`__ (Li et al., experimental-PSF localization and bead alignment) and `10.1038/s41598-017-00622-w <https://doi.org/10.1038/s41598-017-00622-w>`__ (Babcock & Zhuang, cubic-spline PSF model). The spline calibration follows the coefficient scheme of Gpuspline; license can be found `here <https://github.com/jungmannlab/picasso/blob/master/LICENSES/Gpuspline-LICENSE.txt>`__.
241
+ - Multichannel (global) experimental-PSF fitting. DOI: `10.1038/s41467-022-30719-4 <https://doi.org/10.1038/s41467-022-30719-4>`__ (Li et al., globLoc).
242
+ - 3D fitting via astigmatism. DOI: `10.1126/science.1153529 <https://www.science.org/doi/10.1126/science.1153529>`__.
243
+ - sCMOS pixel-dependent noise modeling. DOI: `10.1038/nmeth.2488 <https://doi.org/10.1038/nmeth.2488>`__.
244
+ - NeNA. DOI: `10.1007/s00418-014-1192-3 <https://doi.org/10.1007/s00418-014-1192-3>`__
245
+ - FRC. DOI: `10.1038/nmeth.2448 <https://doi.org/10.1038/nmeth.2448>`__
246
+ - Theoretical lateral localization precision (``lpx`` / ``lpy``, Gaussian least-squares). DOI: `10.1038/nmeth.1447 <https://doi.org/10.1038/nmeth.1447>`__
247
+ - Theoretical axial localization precision (``lpz`` values, Gaussian). DOI: `10.1038/s41467-026-70198-5 <https://doi.org/10.1038/s41467-026-70198-5>`__
248
+ - RCC undrifting: DOI: `10.1364/OE.22.015982 <https://doi.org/10.1364/OE.22.015982>`__
249
+ - AIM undrifting. DOI: `10.1126/sciadv.adm776 <https://www.science.org/doi/10.1126/sciadv.adm7765>`__
250
+ - SMLM clusterer. DOIs: `10.1038/s41467-021-22606-1 <https://doi.org/10.1038/s41467-021-22606-1>`__ and `10.1038/s41586-023-05925-9 <https://doi.org/10.1038/s41586-023-05925-9>`__
251
+ - DBSCAN: Ester, et al. Inkdd, 1996. (Vol. 96, No. 34, pp. 226-231).
252
+ - Anisotropic DBSCAN inspired by: `10.1021/acs.jpcb.4c02030 <https://doi.org/10.1021/acs.jpcb.4c02030>`__
253
+ - HDBSCAN. DOI: `10.1007/978-3-642-37456-2_14 <https://doi.org/10.1007/978-3-642-37456-2_14>`__
254
+ - RESI. DOI: `10.1038/s41586-023-05925-9 <https://doi.org/10.1038/s41586-023-05925-9>`__
255
+ - Nanotron. DOI: `10.1093/bioinformatics/btaa154 <https://doi.org/10.1093/bioinformatics/btaa154>`__
256
+ - Picasso: Server. DOI: `10.1038/s42003-022-03909-5 <https://doi.org/10.1038/s42003-022-03909-5>`__
257
+ - SPINNA. DOI: `10.1038/s41467-025-59500-z <https://doi.org/10.1038/s41467-025-59500-z>`__
258
+ - SPINNA for LE fitting. DOI: `10.1038/s41592-024-02242-5 <https://doi.org/10.1038/s41592-024-02242-5>`__
259
+ - G5M. DOI: `10.1038/s41467-026-70198-5 <https://doi.org/10.1038/s41467-026-70198-5>`__
260
+
261
+ .. SYNC-END: citing
262
+
263
+ .. SYNC-START: credits
264
+
265
+ Credits
266
+ -------
267
+
268
+ - Design icon based on “Hexagon by Creative Stalls" from the Noun Project
269
+ - Simulate icon based on “Microchip by Futishia" from the Noun Project
270
+ - Localize icon based on “Mountains" by MONTANA RUCOBO from the Noun Project
271
+ - Filter icon based on “Funnel" by José Campos from the Noun Project
272
+ - Render icon based on “Paint Palette" by Vectors Market from the Noun Project
273
+ - Average icon based on “Layers" by Creative Stall from the Noun Project
274
+ - Server icon based on “Database" by Nimal Raj from the Noun Project
275
+ - SPINNA icon based on "Spinner" by Viktor Ostrovsky from the Noun Project
276
+
277
+ .. SYNC-END: credits
@@ -0,0 +1,100 @@
1
+ """
2
+ picasso.__init__.py
3
+ ~~~~~~~~~~~~~~~~~~~
4
+
5
+ :authors: Joerg Schnitzbauer, Maximilian Thomas Strauss,
6
+ Rafal Kowalewski
7
+ :copyright: Copyright (c) 2016-2026 Jungmann Lab, MPI of Biochemistry
8
+ """
9
+
10
+ import os.path
11
+ import yaml
12
+ from .version import __version__ # noqa: F401
13
+
14
+ # In frozen (PyInstaller) builds the numba-cuda redirect (a site-packages .pth)
15
+ # never runs, so "from numba import cuda" would fall back to Numba's built-in
16
+ # CUDA stub and GPU-accelerated (numba.cuda) code silently vanishes. Install the
17
+ # redirect here, before anything imports numba.cuda. No-op outside frozen builds.
18
+ from . import _numba_cuda_compat as _numba_cuda_compat
19
+
20
+ _numba_cuda_compat.install()
21
+
22
+ _this_file = os.path.abspath(__file__)
23
+ _this_dir = os.path.dirname(_this_file)
24
+
25
+
26
+ def user_config_dir() -> str:
27
+ """Return the user Picasso directory (``~/.picasso``).
28
+
29
+ Shared with ``~/.picasso/settings.yaml`` and the other per-user files
30
+ (see ``picasso.io``) so every install type (one-click installer, PyPI,
31
+ source) keeps a single, user-writable, uninstall-surviving location.
32
+ """
33
+ return os.path.join(os.path.expanduser("~"), ".picasso")
34
+
35
+
36
+ def config_filename() -> str:
37
+ """Return the path to the user camera config file
38
+ (``~/.picasso/config.yaml``).
39
+
40
+ This is where Picasso Localize reads and writes its camera
41
+ configuration (see https://picassosr.readthedocs.io/en/latest/
42
+ localize.html#camera-config). Keeping it next to the other
43
+ ``~/.picasso`` files means it no longer hides inside the installed
44
+ package directory, where it was hard to find.
45
+
46
+ Returns
47
+ -------
48
+ path : str
49
+ ``~/.picasso/config.yaml``.
50
+ """
51
+ return os.path.join(user_config_dir(), "config.yaml")
52
+
53
+
54
+ def _legacy_config_filename() -> str:
55
+ """Path to the pre-0.11 in-package config (``picasso/config.yaml``)."""
56
+ return os.path.join(_this_dir, "config.yaml")
57
+
58
+
59
+ def resolve_config_path() -> str | None:
60
+ """Return the path of the config file to read, or None if none exists.
61
+
62
+ Resolution:
63
+ 1. ``~/.picasso/config.yaml`` (preferred, user-writable);
64
+ 2. the legacy in-package ``config.yaml`` (older installs), read in
65
+ place and never moved, so a user who keeps editing it there still
66
+ sees their changes take effect.
67
+ Returns None when neither exists.
68
+ """
69
+ user_config = config_filename()
70
+ if os.path.isfile(user_config):
71
+ return user_config
72
+ if os.path.isfile(_legacy_config_filename()):
73
+ return _legacy_config_filename()
74
+ return None
75
+
76
+
77
+ def load_config() -> dict:
78
+ """Load the camera configuration used by Picasso Localize.
79
+
80
+ Reads ``~/.picasso/config.yaml`` if present, otherwise the legacy
81
+ in-package ``config.yaml`` (see ``resolve_config_path``).
82
+
83
+ Returns
84
+ -------
85
+ config : dict
86
+ The parsed configuration; an empty dict if neither file exists, it
87
+ cannot be read, or it parses to nothing.
88
+ """
89
+ path = resolve_config_path()
90
+ if path is None:
91
+ return {}
92
+ try:
93
+ with open(path, "r") as config_file:
94
+ config = yaml.full_load(config_file)
95
+ except (FileNotFoundError, OSError):
96
+ return {}
97
+ return config if config is not None else {}
98
+
99
+
100
+ CONFIG = load_config()