Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
44 commits
Select commit Hold shift + click to select a range
17296b7
update gitignore (zip in installers) and project metadata
rafalkowalewski1 Feb 24, 2026
f180a0f
update read me of windows installer
rafalkowalewski1 Feb 24, 2026
1777a85
macos installer automatically deletes old pyinstaller folders
rafalkowalewski1 Feb 24, 2026
a7f90d1
clean up lib.is_hexadecimal
rafalkowalewski1 Feb 24, 2026
dec8c5d
add a new function lib.get_save_filename_ext_dialog
rafalkowalewski1 Feb 24, 2026
5e7883d
implement new getsavefilename dialog in the gui
rafalkowalewski1 Feb 24, 2026
db99300
PyImarisWriter is included in the one-click-installer again
rafalkowalewski1 Feb 24, 2026
03aa3f0
Localize Parameters dialog displays a message if the z calibration pa…
rafalkowalewski1 Feb 24, 2026
c464246
Fixed Picasso Server launching in one-click-installers
rafalkowalewski1 Feb 25, 2026
5661f45
annotate mlefit_sigma (just like in smith et al 2010) + fix sigma fit…
rafalkowalewski1 Feb 27, 2026
4320d04
add g5m DOI
rafalkowalewski1 Feb 27, 2026
22efc56
fixed aniostropic sigma MLE fitting + use default sigma method in all…
rafalkowalewski1 Feb 28, 2026
fc62941
add MLE fitting docs (extension of smith et al)
rafalkowalewski1 Mar 1, 2026
8d2ff82
fix math equations in mle fitting docs
rafalkowalewski1 Mar 1, 2026
75cb8c6
fix docs on mle fitting (equations rendering)
rafalkowalewski1 Mar 1, 2026
09cf5d0
clean up comments
rafalkowalewski1 Mar 1, 2026
8baefb6
fix average docs
rafalkowalewski1 Mar 1, 2026
c4fd7cc
clean up code
rafalkowalewski1 Mar 1, 2026
58ce229
MLE fitting saves CRLB uncertainties of fitted parameters: photons, b…
rafalkowalewski1 Mar 2, 2026
6236198
fix gaussmle finally, use the formula from the paper
rafalkowalewski1 Mar 3, 2026
43de578
correct citation in readme's + remove suggestion of lq as the 3d algo…
rafalkowalewski1 Mar 3, 2026
6364957
Merge branch 'feature-fix-mlefitting-3d' into development
rafalkowalewski1 Mar 3, 2026
26861a4
try to fix g5m 3d test
rafalkowalewski1 Mar 6, 2026
7b30607
remove mean frame filter in g5m postprocess + add tool tips to the di…
rafalkowalewski1 Mar 6, 2026
eb3c36f
SPINNA GUI allows for user-defined max y-axis value in the NND plot
rafalkowalewski1 Mar 6, 2026
0f06cf5
add GUI widgets for undrifting after localization
rafalkowalewski1 Mar 6, 2026
9f42062
add driftworker to localize, still needs to be finished - progress an…
rafalkowalewski1 Mar 9, 2026
aa31525
Changed default parameters in Simulate to reflect a typical DNA origa…
rafalkowalewski1 Mar 9, 2026
c7c0940
finish undrifting in localize
rafalkowalewski1 Mar 9, 2026
c2adf21
fix fiducial-only undrifting after localize
rafalkowalewski1 Mar 9, 2026
ab4f81e
Merge branch 'feat-undrift-after-localize' into development
rafalkowalewski1 Mar 9, 2026
2e87c4a
Render export localizations supports exporting all channels sequentially
rafalkowalewski1 Mar 9, 2026
fb9a768
Render 3D window always brings the selected region's mean z position …
rafalkowalewski1 Mar 10, 2026
bfa0dfa
Render 3D: added buttons for xy, xz and yz projections
rafalkowalewski1 Mar 10, 2026
872c311
G5M automatically saves the check on relative sigma
rafalkowalewski1 Mar 10, 2026
4c3b5ff
Fixed how Picasso: Simulates splits photons across binding events
rafalkowalewski1 Mar 10, 2026
d1544fb
Changed default max. frames in linking (dark times calculation) to 3 …
rafalkowalewski1 Mar 10, 2026
64989e2
Added number of binding events to Render's "Show info" dialog
rafalkowalewski1 Mar 10, 2026
026400e
changelog release clean up
rafalkowalewski1 Mar 10, 2026
bcb08d1
remove non-existent files from bumpversion config
rafalkowalewski1 Mar 10, 2026
9b575e2
Bump version: 0.9.7 → 0.9.8
rafalkowalewski1 Mar 10, 2026
bab63f2
Merge pull request #626 from rafalkowalewski1/development
rafalkowalewski1 Mar 10, 2026
fa46650
fix scale bar in rotation window
rafalkowalewski1 Mar 10, 2026
4ddc195
Merge pull request #628 from rafalkowalewski1/development
rafalkowalewski1 Mar 10, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 1 addition & 5 deletions .bumpversion.cfg
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[bumpversion]
current_version = 0.9.7
current_version = 0.9.8
commit = True
tag = False
parse = (?P<major>\d+)\.(?P<minor>\d+)\.(?P<patch>\d+)(\-(?P<release>[a-z]+)(?P<build>\d+))?
Expand All @@ -15,10 +15,6 @@ serialize =

[bumpversion:file:./picasso/version.py]

[bumpversion:file:./release/pyinstaller/picasso.spec]

[bumpversion:file:./release/pyinstaller/picassow.spec]

[bumpversion:file:./release/one_click_windows_gui/picasso_innoinstaller.iss]

[bumpversion:file:./release/one_click_windows_gui/create_installer_windows.bat]
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,9 @@ picasso/config.yaml

# One-click-installer output
release/one_click_windows_gui/Output/
release/one_click_windows_gui/*.zip
release/one_click_macos_gui/*.dmg
release/one_click_macos_gui/*.zip

# PyInstaller
# Usually these files are written by a python script from a template
Expand Down
37 changes: 34 additions & 3 deletions changelog.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,38 @@
Changelog
=========

Last change: 23-FEB-2026 CEST
Last change: 10-MAR-2026 CEST

0.9.8
-----
Small improvements:
+++++++++++++++++++
- Added a function ``picasso.lib.get_save_filename_ext_dialog`` that can also check for the existence of the files with other extenstions (for example, if the user tries to save a .yaml file with the same name as an existing .hdf5 file, it will ask if the user wants to overwrite the .hdf5 file). This is implemented in all GUI modules when saving files.
- ``PyImarisWriter`` is included in the one-click-installer again (Windows only)
- Localize GUI allows the user to automatically undrift localizations
- Localize Parameters dialog displays a message if the z calibration path in the config file could not be found
- MLE fitting saves CRLB uncertainties of fitted parameters: photons, background, sx and sy
- ``picasso.localize.fit`` default method changed to ``sigmaxy`` (anisotropic sigma fitting)
- Render export localizations supports exporting all channels sequentially
- Changed default max. frames in linking (dark times calculation) to 3 (previously 1) (both GUI and ``picasso.postprocess.link``)
- Added number of binding events to Render's "Show info" dialog
- Render 3D window always brings the selected region's mean z position to 0 for easier visualization
- Render 3D: added buttons for xy, xz and yz projections
- Added DOIs related to G5M and axial loc. precision
- Removed mean frame filtering for G5M filtering/postprocessing
- Added tool tips to G5M dialog
- G5M automatically saves the check on relative sigma
- Updated Picasso Average documentation
- Changed default parameters in Simulate to reflect a typical DNA origami measurement
- SPINNA GUI allows for user-defined max y-axis value in the NND plot

Bug fixes:
++++++++++
- Fixed Picasso Server launching in one-click-installers
- Fixed 3D MLE fitting and cleaned the docstrings for better readability (``picasso.gaussmle``)
- Fixed how Picasso: Simulates splits photons across binding events
- Fixed G5M 3D CI test
- Fixed Render 3D scale bar

0.9.7
-----
Expand Down Expand Up @@ -82,8 +113,8 @@ Bug fixes:
-------
Important updates:
^^^^^^^^^^^^^^^^^^
- **Algorithm for molecular mapping introduced (G5M)**, see documentation `here <https://picassosr.readthedocs.io/en/latest/render.html#g5m>`__ *DOI will be added once available*.
- **Localize outputs axial localization precision for astigmatic imaging in 3D**, *DOI will be added once available*.
- **Algorithm for molecular mapping introduced (G5M)**, see documentation `here <https://picassosr.readthedocs.io/en/latest/render.html#g5m>`__. DOI: `10.1038/s41467-026-70198-5 <https://doi.org/10.1038/s41467-026-70198-5>`_
- **Localize outputs axial localization precision for astigmatic imaging in 3D**. DOI: `10.1038/s41467-026-70198-5 <https://doi.org/10.1038/s41467-026-70198-5>`_
- Localize GUI allows the user to select which localization columns to save when saving localizations. See the new dialog in the *File* -> *Select columns to save*
- Localize accepts frame bounds to analyze only a subset of frames
- Config file accepts z calibration .yaml paths so that they can be automatically loaded when changing between cameras
Expand Down
4 changes: 2 additions & 2 deletions distribution/picasso.iss
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
AppName=Picasso
AppPublisher=Jungmann Lab, Max Planck Institute of Biochemistry

AppVersion=0.9.7
AppVersion=0.9.8
DefaultDirName={commonpf}\Picasso
DefaultGroupName=Picasso
OutputBaseFilename="Picasso-Windows-64bit-0.9.7"
OutputBaseFilename="Picasso-Windows-64bit-0.9.8"
ArchitecturesAllowed=x64
ArchitecturesInstallIn64BitMode=x64

Expand Down
6 changes: 3 additions & 3 deletions docs/average.rst
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ The averaging module uses 2D cross-correlation to determine the rotational and t
2. Save the picked localizations by selecting ``File`` > ``Save picked localizations``.
3. Load the resulting file with picked localizations into ``Picasso: Average`` by selecting ``File`` > ``Open`` or dragging and dropping it into the window. It will start a parallel pool to increase computational speed.
4. ``Picasso: Average`` will immediately perform a center-of-mass alignment of the picked structures and display an average image. Rotational and translational alignment will follow in the next steps.
5. Select ``Process`` > ``Parameters`` and adjust the ``Oversampling`` parameter. We recommend choosing the highest number at which the average image still appears smooth. High oversampling values result in substantial computational time and can cause artifacts. Hence, it might be useful to first use low oversampling to generate a less-refined average image and then perform subsequent averaging steps with higher oversampling for optimized resolution.
6. Adjust the number of average iterations in the ``Iterations`` field. In most cases, a value of 10 is more than sufficient. If you are unsure about the computational time of the process, choose one iteration as a starting point. More iterations can be added later by repeating the processing steps. After a certain number of iterations, the average image will converge, meaning that it will not change with more iterations. If you experience that one localization spot is overemphasized, try again with less oversampling and few iterations. The 2D cross-correlation is prone to lock in bright spots.
7. Select ``Process`` > ``Average`` to perform particle averaging with the current oversampling for the set number of iterations. This step can be repeated with different settings. The program will use the current average image as a starting point.
5. Select ``Process`` > ``Parameters`` and adjust the ``Display pixel size (nm)`` parameter. We recommend choosing the highest number at which the average image still appears smooth. Low display pixel size results in substantial computational time and can cause artifacts. Hence, it might be useful to first use high values to generate a less-refined average image and then perform subsequent averaging steps with lower values for optimized resolution.
6. Adjust the number of average iterations in the ``Iterations`` field. In most cases, a value of 10 is more than sufficient. If you are unsure about the computational time of the process, choose one iteration as a starting point. More iterations can be added later by repeating the processing steps. After a certain number of iterations, the average image will converge, meaning that it will not change with more iterations. If you experience that one localization spot is overemphasized, try again with higher display pixel size and few iterations. The 2D cross-correlation is prone to lock in bright spots.
7. Select ``Process`` > ``Average`` to perform particle averaging with the current display pixel size for the set number of iterations. This step can be repeated with different settings. The program will use the current average image as a starting point.
8. Once the average image has converged, save the transformed localizations by selecting ``File`` > ``Save``. The resulting HDF5 localization file contains the aligned localizations in the center of the movie dimensions. It can be loaded like any other HDF5 localization file into ``Picasso: Render``.

6 changes: 4 additions & 2 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
# The short X.Y version
version = ""
# The full version, including alpha/beta/rc tags
release = "0.9.7"
release = "0.9.8"

# -- General configuration ---------------------------------------------------

Expand All @@ -37,7 +37,9 @@
# Add any Sphinx extension module names here, as strings. They can be
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
# ones.
extensions = []
extensions = [
"sphinx.ext.mathjax", # for rendering math equations
]

# Add any paths that contain templates here, relative to this directory.
templates_path = ["_templates"]
Expand Down
8 changes: 4 additions & 4 deletions docs/render.rst
Original file line number Diff line number Diff line change
Expand Up @@ -87,25 +87,25 @@ Upon clicking ``Perform RESI analysis``, each of the loaded channels is clustere
G5M
---

In Picasso 0.9.5, a new algorithm for molecular mapping (i.e., finding the positions of individual molecules from localizations) was introduced: G5M (Gaussian Mixture Modeling with Modifications for Molecular Mapping; Kowalewski, Reinhardt et al., *DOI will be added once available*). G5M is based on Gaussian Mixture Modeling (GMM) but includes several modifications to make it suitable for molecular mapping. All the technicalities as well as the user guide of the method are explained in the publication mentioned and its Supplementary Information. Please refer to ``picasso.g5m`` for the details of the implementation. Below is a brief summary of the user guide.
In Picasso 0.9.5, a new algorithm for molecular mapping (i.e., finding the positions of individual molecules from localizations) was introduced: G5M (Gaussian Mixture Modeling with Modifications for Molecular Mapping; Kowalewski, Reinhardt et al. *Nature Comms*, 2026. DOI: 10.1038/s41467-026-70198-5). G5M is based on Gaussian Mixture Modeling (GMM) but includes several modifications to make it suitable for molecular mapping. All the technicalities as well as the user guide of the method are explained in the publication mentioned and its Supplementary Information. Please refer to ``picasso.g5m`` for the details of the implementation. Below is a brief summary of the user guide.

G5M requires some preprocessing of localizations to filter out the badly fitted ones, especially the ones arising from crosstalk (overlapping blinking). These can be excluded from 2D data where the ellipticity and size of the image of an emitter in x and y can be filtered (in Picasso these are found under names “ellipticity”, “sx” and “sy”, respectively). Moreover, the photon count can be cut-off as crosstalk is likely to result in a higher-intensity signal. In 3D data these filters are less reliable due to astigmatism, however, “d_zcalib” could be used. We strongly encourage avoiding dense blinking, where emission signals from neighboring molecules overlap, especially during 3D image acquisition.

Prior to molecular mapping, clustering of localizations is required to split the data into smaller chunks. For many datasets, DBSCAN works well. While in some cases some adjustments may be needed, we recommend the following DBSCAN parameters: In 2D, DBSCAN radius (epsilon) of 2*LP, in 3D - 3*LP (LP - average localization precision of the dataset, for example, NeNA or median localization precision). Default min. samples is set to 4. Clustering in Picasso adds the ``group`` column to the localization file, which is required for G5M. **Note: G5M relies on the information in the ``group`` column, therefore, if it is overwritten (for example, by picking localizations after DBSCAN clustering), G5M will not work.**

To account for fluorophore non-specific sticking, frame analysis is normally recommended (especially the filtering of st. dev. of frame per molecule). However, if localizations from neighboring localization clouds overlap, this is not sufficient due to ambigous assignment of localizations to molecules. Therefore, we recommend filtering of molecules that express too few binding events (saved in the column ``n_events``). In the publication, we recommend a threshold of at least 3 binding events per molecule.

The final postprocessing step is log-likelihood filtering (using the column ``p_val``). The recommended threshold is ``> 0.0015``.
The final postprocessing step is log-likelihood filtering (using the column ``p_val``). The recommended threshold is ``> 0.0015``, however, it might need to be adjusted for your data, especially in 3D this can be too conservative.

As a final check for overfitting (i.e., too many assigned molecules), G5M automatically saves a bar plot of the number of binding events per molecule (``n_events`` column) for sparse (with neighbors within 25 nm) and clustered (without neighbors within 80 nm) molecules. While this is only a qualitative verification, it is a simple method to spot potential overfitting issues. If the clustered molecules show fewer binding events that the sparse molecules, overfitting likely occurred. See Fig. S15 of the publication for an example of well-behaved data.
As a final check for overfitting (i.e., too many assigned molecules), G5M automatically saves a bar plot of the number of binding events per molecule (``n_events`` column) for sparse (with neighbors within 25 nm) and clustered (without neighbors within 80 nm) molecules. While this is only a qualitative verification, it is a simple method to spot potential overfitting issues. If the clustered molecules show fewer binding events that the sparse molecules, overfitting likely occurred. See Fig. S15 of the publication for an example of well-behaved data. As of v0.9.8, Picasso saves the plot showing relative σ values (i.e., the fitted Gaussian σ divided by the average loc. precision around the molecule). This can be used to estimate if the loc. precision values are accurate (if not, many molecules will have relative σ values close to the user-selected min./max. σ).

If the outcome of G5M seems unsatisfactory, please check the following:

- Make sure that ``group`` column is present in the localization file and contains the correct information (i.e., from DBSCAN clustering, not from picking localizations);
- Make sure that the loc. precision values (columns ``lpx``, ``lpy``, ``lpz``) are correct, comparing NeNA and median loc. precision is a reasonable proxy (without fiducial markers); the most common issue is a miscalibrated camera, leading to incorrect photon counts and thus incorrect loc. precisions;
- Another reason why the loc. precision values can be off is due to the small box size in the localization step; especially in 3D astigmatic imaging, single-emitter images can be quite large, potentially exceeding the user-defined box size; in such cases, we recommend increasing the box size in the localization step and rerunning the analysis;
- Inspect if the localizations were preprocessed as described above;
- Rerun the analysis without postprocessing (filtering) and redo it manually, since the step may be too stringent, especially for short acquisition times;
- Rerun the analysis without postprocessing (filtering) and redo it manually, since some steps may be too stringent, such as ``p_val`` or ``n_events`` (latter especially for short acquisition times);
- Adjust min./max. σ, especially too low max. σ may lead to high false positive error rates (i.e., overfitting); We suggest inspecting ``rel_sigma`` values of the assigned molecules, which are calculated as the fitted σ divided by the mean localization precision of the surrounding localizations. If the values are close to the user-selected min./max. σ, min./max. σ might need to be adjusted. Alternatively, this might be a sign of inaccurate/inprecise loc. precision values, see above;
- Adjust min. locs;
- Adjust DBSCAN (or other clustering algorithm) parameters. For example, if G5M takes too long to run, the DBSCAN clusters most likely contain too many molecules. In such a case, we recommend splitting such clusters further;
Expand Down
10 changes: 7 additions & 3 deletions docs/table01.csv
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ photons ,"The total number of detected photons from this event, not including ba
sx ,The Point Spread Function width in camera pixels.,float
sy ,The Point Spread Function height in camera pixels.,float
bg ,"The number of background photons per pixel, not including the camera offset.",float
lpx ,"The localization precision in x direction, in camera pixels, as estimated by the Cramer-Rao Lower Bound of the Maximum Likelihood fit (Mortensen et al., Nat Meth, 2010). ",float
lpy ,"The localization precision in y direction, in camera pixels, as estimated by the Cramer-Rao Lower Bound of the Maximum Likelihood fit (Mortensen et al., Nat Meth, 2010). ",float
lpx ,"The localization precision in x direction, in camera pixels, as estimated by the Cramer-Rao Lower Bound (Mortensen et al., Nat Meth, 2010 and Smith et al., Nat Meth, 2010). ",float
lpy ,"The localization precision in y direction, in camera pixels, as estimated by the Cramer-Rao Lower Bound (Mortensen et al., Nat Meth, 2010 and Smith et al., Nat Meth, 2010). ",float
net_gradient ,"The net gradient of this spot which is defined by the sum of gradient vector magnitudes within the fitting box, projected to the spot center. ",float
z,(Optional) The z coordinate fitted in 3D in nm. Please note the units are different for x and y coordinates.,float
lpz,(Optional) The localization precision in z direction in nm.,float
Expand All @@ -20,4 +20,8 @@ len ,"(Optional) The length of the event in frames, if localizations from consec
n ,"(Optional) The number of localizations in this event, if localizations from consecutive frames have been linked, potentially diverging from the “len” column due to a transient dark time tolerance.",long
photon_rate ,"(Optional) The mean number of photons per frame, if localizations from consecutive frames have been linked. The total number of photons is set in the “photons” column. ",float
x_pick_rot ,"(Optional) Projection of localizations onto the axis of the rectangular pick. Only available after saving rectangular pick(s). ",float
y_pick_rot ,"(Optional) Projection of localizations against the axis of the rectangular pick. Only available after saving rectangular pick(s). ",float
y_pick_rot ,"(Optional) Projection of localizations against the axis of the rectangular pick. Only available after saving rectangular pick(s). ",float
photons_unc ,"(Optional) The uncertainty of the photons estimation as estimated by the Cramer-Rao Lower Bound of the Maximum Likelihood fit. ",float
bg_unc ,"(Optional) The uncertainty of the background estimation as estimated by the Cramer-Rao Lower Bound of the Maximum Likelihood fit. ",float
sx_unc ,"(Optional) The uncertainty of the sx estimation (camera pixels) as estimated by the Cramer-Rao Lower Bound of the Maximum Likelihood fit. ",float
sy_unc ,"(Optional) The uncertainty of the sy estimation (camera pixels) as estimated by the Cramer-Rao Lower Bound of the Maximum Likelihood fit. ",float
2 changes: 1 addition & 1 deletion picasso/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2402,7 +2402,7 @@ def main():
"g5m",
help=(
"Gaussian Mixture Modeling with Modifications for Molecular Mapping"
"\nFor more details see: *DOI will be added once available*"
"\nFor more details see https://doi.org/10.1038/s41467-026-70198-5"
),
)
g5m_parser.add_argument(
Expand Down
3 changes: 2 additions & 1 deletion picasso/clusterer.py
Original file line number Diff line number Diff line change
Expand Up @@ -965,7 +965,8 @@ def test_subclustering(
do not (sparse). If subclustering occurs, the clustered molecules
should have a lower number of events on average.

DOI: *DOI will be added once available*
Introduced in Kowalewski, Reinhardt, et al. Nature Comms, 2026.
DOI: https://doi.org/10.1038/s41467-026-70198-5

Parameters
----------
Expand Down
Loading