Skip to content

Commit

Permalink
Merge pull request #512 from jungmannlab/development
Browse files Browse the repository at this point in the history
v0.7.5
  • Loading branch information
rafalkowalewski1 authored Feb 6, 2025
2 parents 7fd2f5f + 3e2623c commit 30e0709
Show file tree
Hide file tree
Showing 19 changed files with 247 additions and 137 deletions.
2 changes: 1 addition & 1 deletion .bumpversion.cfg
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[bumpversion]
current_version = 0.7.4
current_version = 0.7.5
commit = True
tag = False
parse = (?P<major>\d+)\.(?P<minor>\d+)\.(?P<patch>\d+)(\-(?P<release>[a-z]+)(?P<build>\d+))?
Expand Down
13 changes: 12 additions & 1 deletion changelog.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,18 @@
Changelog
=========

Last change: 14-DEC-2024 MTS
Last change: 06-FEB-2025 MTS

0.7.5
-----
- Automatic picking of fiducials added in Render: ``Tools/Pick fiducials``
- Undrifting from picked moved from ``picasso/gui/render`` to ``picasso/postprocess``
- Plugin docs update
- Filter histogram display fixed for datasets with low variance (bug fix)
- AIM undrifting works now if the first frames of localizations are filtered out (bug fix)
- 2D drift plot in Render inverts y axis to match the rendered localizations
- 3D animation fixed
- Other minor bug fixes

0.7.1 - 0.7.4
-------------
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.7.4
AppVersion=0.7.5
DefaultDirName={commonpf}\Picasso
DefaultGroupName=Picasso
OutputBaseFilename="Picasso-Windows-64bit-0.7.4"
OutputBaseFilename="Picasso-Windows-64bit-0.7.5"
ArchitecturesAllowed=x64
ArchitecturesInstallIn64BitMode=x64

Expand Down
2 changes: 1 addition & 1 deletion 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.7.4"
release = "0.7.5"

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

Expand Down
19 changes: 9 additions & 10 deletions docs/plugins.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,34 +4,33 @@ Plugins

Usage
-----
Starting in version 0.5.0, Picasso allows for creating plugins. They can be added by the user for each of the available distributions of picasso (GitHub, picassosr from PyPI and the one click installer). However, using plugins in the latter may cause issues, see below.
Starting in version 0.5.0, Picasso supports plugins. Please find the instructions on how to add them to your Picasso below.

Please keep in mind that the ``__init__.py`` file in the ``plugins`` folder must not be modified or deleted.
Please keep in mind that the ``__init__.py`` file in the ``picasso/picasso/gui/plugins`` folder must not be modified or deleted.

GitHub
~~~~~~
If you cloned the GitHub repository, you can add plugins by following these steps:
- Find the directory where you cloned the GitHub repository with Picasso.
- Go to ``picasso/picasso/gui/plugins``.
- Copy the plugin(s) to this folder.
- The plugin(s) should automatically work after running picasso in the new command window.

PyPI
~~~~
- Find the location of the environment where picassosr is installed (type ``conda env list`` to see the directory).
- Find this directory and go to ``YOUR_ENVIRONMENT/Lib/site-packages/picasso/gui/plugins``.
If you installed Picasso using ``pip install picassosr``, you can add plugins by following these steps:
- To find the location of the environment where ``picassosr`` is installed, type ``conda env list``.
- If your environment can be found under ``YOUR_ENVIRONMENT``, go to ``YOUR_ENVIRONMENT/Lib/site-packages/picasso/gui/plugins``.
- Copy the plugin(s) to this folder.
- The plugin(s) should automatically work after running picasso in the new command window.

One click installer
~~~~~~~~~~~~~~~~~~~
**NOTE**: This may lead to issues if Picasso is installed, as the plugin scripts will remain in the ``plugins`` folder upon deinstallation. After deinstalltion, the ``Picasso`` folder needs to be deleted manually.
**NOTE**: After deinstalling Picasso, ``Program Files/Picasso`` folder needs to be deleted manually, as the uninstaller currently does not remove the plugins automatically.

- Find the location where you installed Picasso. By default, it is ``C:/Program Files/Picasso``.
- Go to the following subfolder in the `Picasso` directory: ``picasso/gui/plugins``.
- Copy the plugin(s) to this folder.
- The plugin(s) should automatically be loaded after double-clicking the respective desktop shortcuts.

**NOTE**: Plugins added in this distribution will not be able to use packages that are not installed automatically (from the file ``requirements.txt``).
.. **NOTE**: Plugins added in this distribution will not be able to use packages that are not installed automatically (from the file ``requirements.txt``).
For developers
--------------
Expand All @@ -41,4 +40,4 @@ To create a plugin, you can use the template provided in ``picasso/plugin_templa
:scale: 70 %
:alt: Plugins

As an example, please see any of the plugins on the GitHub `repo <https://github.com/rafalkowalewski1/picasso_plugins>`_.
As an example, please see any of the plugins in the `GitHub repo <https://github.com/rafalkowalewski1/picasso_plugins>`_.
2 changes: 2 additions & 0 deletions docs/render.rst
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,8 @@ The 3D rotation window allows the user to render 3D localization data. To use it

The user may perform multiple actions in the rotation window, including: saving rotated localizations, building animations (.mp4 format), rotating by a specified angle, etc.

Note that to build animations, the user must have ``ffmpeg`` installed on their system.

Rotation around z-axis is available by pressing Ctrl/Command. Rotation axis can be frozen by pressing x/y/z to freeze around the corresponding axes (to freeze around the z-axis, Ctrl/Command must be pressed as well).

There are several things to keep in mind when using the rotation window. Firstly, using individual localization precision is very slow and is not recommended as a default blur method. Also, the size of the rotation window can be altered, however, if it becomes too large, rendering may start to lag.
Expand Down
2 changes: 1 addition & 1 deletion picasso/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
import os.path as _ospath
import yaml as _yaml

__version__ = "0.7.4"
__version__ = "0.7.5"

_this_file = _ospath.abspath(__file__)
_this_dir = _ospath.dirname(_this_file)
Expand Down
2 changes: 1 addition & 1 deletion picasso/__version__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
VERSION_NO = "0.7.4"
VERSION_NO = "0.7.5"
13 changes: 9 additions & 4 deletions picasso/aim.py
Original file line number Diff line number Diff line change
Expand Up @@ -628,7 +628,8 @@ def aim(
Radius of the local search region in camera pixels. Should be
larger than the maximum expected drift within segmentation.
progress : picasso.lib.ProgressDialog (default=None)
Progress dialog. If None, progress is displayed with tqdm.
Progress dialog. If None, progress is displayed with into the
console.
Returns
-------
Expand All @@ -651,14 +652,18 @@ def aim(
if val := inf.get("Height"):
height = val
if val := inf.get('Frames'):
n_frames = val
n_frames = val - locs["frame"].min()
if val := inf.get("Pixelsize"):
pixelsize = val
if _np.isnan(width * height * pixelsize * n_frames):
raise KeyError("Insufficient metadata available.")
raise KeyError(
"Insufficient metadata available. Please specify 'Width', 'Height',"
" 'Frames' and 'Pixelsize' in the metadata .yaml."
)

# frames should start at 1
frame = locs["frame"] + 1
frame = locs["frame"] + 1 - locs["frame"].min()

# find the segmentation bounds (temporal intervals)
seg_bounds = _np.concatenate((
_np.arange(0, n_frames, segmentation), [n_frames]
Expand Down
Loading

0 comments on commit 30e0709

Please sign in to comment.