GithubHelp home page GithubHelp logo

jungmannlab / picasso Goto Github PK

View Code? Open in Web Editor NEW
108.0 15.0 49.0 27.79 MB

A collection of tools for painting super-resolution images

Home Page: https://picassosr.readthedocs.io/en/latest/?badge=latest

License: MIT License

Batchfile 0.17% Python 98.90% Inno Setup 0.46% PowerShell 0.12% MATLAB 0.26% Shell 0.08%
microscopy super-resolution smlm dna-paint

picasso's Introduction

Picasso

Documentation Status CI CI https://static.pepy.tech/personalized-badge/picassosr?period=total&units=international_system&left_color=black&right_color=brightgreen&left_text=Downloads

UML Render view

A collection of tools for painting super-resolution images. The Picasso software is complemented by our Nature Protocols publication. A comprehensive documentation can be found here: Read the Docs.

Picasso 0.7.0

Adaptive Intersection Maximization (AIM, doi: 10.1126/sciadv.adm7765) implemented in Picasso.

Previous versions

To see all changes introduced in previous versions, click here.

Installation

Check out the Picasso release page to download and run the latest compiled one-click installer for Windows. Here you will also find the Nature Protocols legacy version.

For the platform-independent usage of Picasso (e.g., with Linux and Mac Os X), please follow the advanced installation instructions below.

Other installation modes (Python 3.10)

As an alternative to the stand-alone program for end-users, Picasso can be installed as a Python package. This is the preferred option to use Picasso’s internal routines in custom Python programs. Those can be imported by running, for example, from picasso import io (see the "Example usage" tab below) to use input/output functions from Picasso. For windows, it is still possible to use Picasso as an end-user by creating the respective shortcuts. This allows Picasso to be used on the same system by both programmers and end-users.

Via PyPI

  1. Open the console/terminal and create a new conda environment: conda create --name picasso python=3.10
  2. Activate the environment: conda activate picasso.
  3. Install Picasso package using: pip install picassosr.
  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.

For Developers

If you wish to use your local version of Picasso with your own modifications:

  1. Open the console/terminal and create a new conda environment: conda create --name picasso python=3.10
  2. Activate the environment: conda activate picasso.
  3. Change to the directory of choice using cd.
  4. Clone this GitHub repository by running git clone https://github.com/jungmannlab/picasso. Alternatively, download the zip file and unzip it.
  5. Open the Picasso directory: cd picasso.
  6. You can modify Picasso code in this directory.
  7. To create a local Picasso package to use it in other Python scripts, run pip install -e .. When you change the code in the picasso directory, the changes will be reflected in the package.
  8. 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.

Optional packages

Regardless of whether Picasso was installed via PyPI or by cloning the GitHub repository, some packages may be additionally installed to allow extra functionality:

  • pip install pyinstaller if you plan to additionally compile your own installer with Pyinstaller.
  • (Windows only) pip install PyImarisWriter==0.7.0 to enable .ims files in Localize and Render. Note that PyImarisWriter has been tested only on Windows.
  • To enable GPU fitting, follow instructions on Gpufit to install the Gpufit python library in your conda environment. In practice, this means downloading the zipfile and installing the Python wheel. Picasso Localize will automatically import the library if present and enables a checkbox for GPU fitting when selecting the LQ-Method.

Updating

If Picasso was installed from PyPI, run the following command:

pip install --upgrade picassosr

Creating shortcuts on Windows (optional)

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 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.

Example Usage

Besides using the GUI, you can use picasso like any other Python module. Consider the following example::

from picasso import io, postprocess

path = 'testdata_locs.hdf5'
locs, info = io.load_locs(path)
# Link localizations and calcualte dark times
linked_locs = postprocess.link(picked_locs, info, r_max=0.05, max_dark_time=1)
linked_locs_dark = postprocess.compute_dark_times(linked_locs)

print('Average bright time {:.2f} frames'.format(np.mean(linked_locs_dark.n)))
print('Average dark time {:.2f} frames'.format(np.mean(linked_locs_dark.dark)))

This codeblock loads data from testdata_locs and uses the postprocess functions programmatically.

Jupyter Notebooks

Check picasso/samples/ for Jupyter Notebooks that show how to interact with the Picasso codebase.

Contributing

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 PR for it. You can find more guidelines for contributing here. We will gladly guide you through the codebase and credit you accordingly. Additionally, you can check out the Projects-page on GitHub. You can also contact us via [email protected].

Contributions & Copyright

Contributors: Joerg Schnitzbauer, Maximilian Strauss, Rafal Kowalewski, Adrian Przybylski, Andrey Aristov, Hiroshi Sasaki, Alexander Auer, Johanna Rahm
Copyright (c) 2015-2019 Jungmann Lab, Max Planck Institute of Biochemistry
Copyright (c) 2020-2021 Maximilian Strauss
Copyright (c) 2022-2024 Rafal Kowalewski

Citing Picasso

If you use picasso in your research, please cite our Nature Protocols publication describing the software.

J. Schnitzbauer*, M.T. Strauss*, T. Schlichthaerle, F. Schueder, R. Jungmann
Super-Resolution Microscopy with DNA-PAINT
Nature Protocols (2017). 12: 1198-1228 DOI: https://doi.org/10.1038/nprot.2017.024

If you use some of the functionalities provided by Picasso, please also cite the respective publications:

Credits

  • Design icon based on “Hexagon by Creative Stalls from the Noun Project”
  • Simulate icon based on “Microchip by Futishia from the Noun Project”
  • Localize icon based on “Mountains by MONTANA RUCOBO from the Noun Project”
  • Filter icon based on “Funnel by José Campos from the Noun Project”
  • Render icon based on “Paint Palette by Vectors Market from the Noun Project”
  • Average icon based on “Layers by Creative Stall from the Noun Project”
  • Server icon based on “Database by Nimal Raj from NounProject.com”

picasso's People

Contributors

aaristov avatar adrianjp88 avatar ajasja avatar alexander-zangl avatar alexauer avatar dependabot-preview[bot] avatar dependabot[bot] avatar dwoschee avatar heerpa avatar johannarahm avatar joschnitzbauer avatar philippsteen avatar pyup-bot avatar rafalkowalewski1 avatar steinjohannes avatar straussmaximilian avatar susannereinhardt avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

picasso's Issues

3D dialogs

  • Picasso version: 0.3.0
  • Python version: 3.7
  • Operating System: MAC OS Catalina

There's no undrift from picked (3D) and slice (3D) dialogs.

Plot Problems in v.0.3.0 PyQt5

  • Picasso version: 0.3.0
  • Python version: 3.7
  • Operating System: Windows

Description

There is currently a problem when using the latest Picasso Anaconda Installation with PyQt5. Apparently, there can be problems when displaying figures (e.g., show NeNA or plotting drift.) The problem only occurs on Windows and should not occur on Mac OS X.

Intermediate Solution

An intermediate solution is to checkout an earlier commit and use the PyQt4 version.
For this, type:

git checkout 7813b75

And follow the installation instructions from the old readme.

3D reconstruction parameters log

I found lots of parameters in the yaml file after localizing astigmatism, but one important is missing: Which calibration has been used. I would like to have it in the yaml file along with the camera gain-baseline settings.
Thanks.
image

How to use GPUfit with the one-click installer?

Hi, I just installed 0.2.5 via the one-click installer on Windows 10, works like a charm. I was wondering how I can add GPUfit capability to the install, as I could not find this in the docs. Thanks!

Exception when loading a Z calibration in localize

After loading a movie (.raw file) in the localize module, setting the parameters, and clicking on the "Load calibration" button I get this error:

Error in sys.excepthook:
Traceback (most recent call last):
File "C:\Processing\python\picasso\picasso\gui\localize.py", line 1372, in excepthook
errorbox.exec_()
AttributeError: 'StandardButton' object has no attribute 'exec_'

Original exception was:
Traceback (most recent call last):
File "C:\Processing\python\picasso\picasso\gui\localize.py", line 503, in load_z_calib
if self.movie_path != []:
AttributeError: 'ParametersDialog' object has no attribute 'movie_path'

files made with raw_yaml exporter plugin are not loadable into Localize

I want to load images made through Andor Solis (*.dat and sifx) into Picasso. I already changed them into avi through Matlab (to analyze with ThunderSTORM in ImageJ). In order to do FRET analysis I want to use Picasso.

The (really long) route, making a raw file through Matlab and loading it into Picasso works, at least for 512x1024pixels, 100 frames

However, I would love to use the much faster raw_yaml exporter in ImageJ. All raw files generated through raw_yaml exporter (even the ones with only one frame of 512x1024 pixels) give me the following OSerror about not enough storage.
error loading raw_yaml exports into localize

Since my Matlab generated raw files are much larger, the file size cannot be the cause of the issue. So can it somehow be I am not using the exporter plugin correctly?
Checking previous issues, #26 File loading error in Localize module #26, was solved by updating Picasso to the latest version. I downloaded Picasso and the raw_yaml plugin like two weeks ago, so also that should not be the issue.
Any help is appreciated.

documentation FRET in Render

In the Tools menu from Render, there are more items than the zoom/pick/measure documented in render.rst. The same for the postprocessing.

I would like to do FRET on a data set with two channels displayed next to each other.
I was hoping to be able to

  1. split the image into 2 (channels) and align them
  2. automatically select spots (I guess with pick & pick similar)
  3. extract fret traces from every spot (in 2 channels) (I guess with show fret traces, can I export the traces afterwards?)

Can you please give more documentation/ help me into the right direction on how to get FRET traces from already localized data?

Problem with Render module render scale

  • Picasso version: most recent pull, looks like v 0.3.1
  • Python version: 3.8, and also 3.7, it's an issue in both
  • Operating System: Windows 10

In the Render module, when I chose to render by some parameter, say, Photons, the actual rendering will work fine, but then if I try to open the scale bar for the color code, Render will freeze and crash.

  1. Open Render
  2. Drag in hdf5 file
  3. Zoom to some region
  4. Choose view>display settings, then in render properties, choose photons, click render. Rendering proceeds correctly.
  5. Click show legend
  6. The legend window pops up, but is empty. I can still interact with the render module, but if I try to interact with that window, Render hangs and crashes as below, with the messages in the picture in the anaconda prompt

This function has worked in the past for me (maybe a year ago) but I think it cropped up around the same time there were issues with the figures popping up for drift correction et al as well with the PyQt5 switch.

Screen Shot 2020-08-04 at 3 56 28 PM

Screen Shot 2020-08-04 at 3 56 39 PM

Thanks

Coefficients from 3D calibration

What model is used for astigmatism fitting in Picasso? Are the coefficient corresponding to the defocusing curve from Huang et al. Science 2008, and if so in which order? This would be useful to compare 3D calibration from Picasso to the one from N-STORM (which is based on the Huang model).

huang_defocus

Error closing dataset in render

I've loaded two datasets in Render and wanted to close one. I opened Files, clicked X and got this error
image

Also, this is my terminal output:

2019-02-12 17:59:02.659 python[78978:39778850] modalSession has been exited prematurely - check for a reentrant call to endModalSession:
Error in sys.excepthook:
Traceback (most recent call last):
File "/Users/andrey/anaconda3/envs/picasso/lib/python3.5/site-packages/picasso/gui/render.py", line 6448, in excepthook
errorbox.exec_()
AttributeError: 'StandardButton' object has no attribute 'exec_'

Original exception was:
Traceback (most recent call last):
File "/Users/andrey/anaconda3/envs/picasso/lib/python3.5/site-packages/picasso/gui/render.py", line 342, in close_file
print(self.sender.objectName())
AttributeError: 'builtin_function_or_method' object has no attribute 'objectName'

I'm using picasso-0.2.5 from master branch on Mac.

Thanks

Can't get shortcuts to work

I've generated the module shortcuts using the Powershell script. However nothing happens when I double click them. I added Anaconda and Anaconda/Scripts to my PATH environment variable.

This may be related: I can use picasso from the Anaconda Prompt, but not from the Windows 10 default command line terminal. After adding Anaconda to my PATH variable, when I launch the command line, I can do "conda list" but if I do "conda activate picasso" (the environment where I installed picasso) I get the following error:

CommandNotFoundError: Your shell has not been properly configured to use 'conda activate'.
If your shell is Bash or a Bourne variant, enable conda for the current user with

    $ echo ". C:\Users\NeuroCyto\Anaconda3/etc/profile.d/conda.sh" >> ~/.bashrc

or, for all users, enable conda with

    $ sudo ln -s C:\Users\NeuroCyto\Anaconda3/etc/profile.d/conda.sh /etc/profile.d/conda.sh

The options above will permanently enable the 'conda' command, but they do NOT
put conda's base (root) environment on PATH.  To do so, run

    $ conda activate

in your terminal, or to put the base environment on PATH permanently, run

    $ echo "conda activate" >> ~/.bashrc

Previous to conda 4.4, the recommended way to activate conda was to modify PATH in
your ~/.bashrc file.  You should manually remove the line that looks like

    export PATH="C:\Users\NeuroCyto\Anaconda3/bin:$PATH"

^^^ The above line should NO LONGER be in your ~/.bashrc file! ^^^

Export as PDF for Picasso Design

It would be great if you could add a possibility to save as eg. .pdf from Picasso: Design. This way the artwork can be modified in programs such as adobe illustrator.

Mac Os compability

I noted that some of the functions don't work properly when using Picasso on Mac OS X or Linux. I'll use this thread to track all the issues.

Mac Os X:

  • Select picks shows an Attribute Error: AttributeError: 'FigureCanvasMac' object has no attribute ‘size'
  • Show trace shows AttributeError: 'NavigationToolbar2Mac' object has no attribute 'addWidget'

Linux:

  • Simulate does not add the *.raw ending on simulated files automatically.
  • Localize does not find any *.raw and *.tif files in the directory although they are there.

Bug in Saving Picked Regions to YAML file

Hi, I recently ran into this problem that was not there before: I can successfully save picked regions in Picasso:Render to a YAML file and use it in Picasso. But when I open it as a text format, it fails to show the pixel coordinates of picks. Instead, it shows below. Is there any fast solution to this? I need these coordinates for some downstream analyses in MatLab and now I cannot import them.

**Centers:

    • !!python/object/apply:numpy.core.multiarray.scalar
      • &id001 !!python/object/apply:numpy.dtype
        args: [f8, 0, 1]
        state: !!python/tuple [3, <, null, null, null, -1, -1, 0]
      • !!binary |
        zczMzMxsQEA=
    • !!python/object/apply:numpy.core.multiarray.scalar
      • *id001
      • !!binary |
        PQrXo3CNYEA=
    • !!python/object/apply:numpy.core.multiarray.scalar
      • *id001
      • !!binary |
        16NwPQo3QkA=
    • !!python/object/apply:numpy.core.multiarray.scalar
      • *id001
      • !!binary |
        j8L1KFyHd0A=
    • !!python/object/apply:numpy.core.multiarray.scalar
      • *id001
      • !!binary |
        ZmZmZmaGQ0A=
    • !!python/object/apply:numpy.core.multiarray.scalar
      • *id001
      • !!binary |
        pHA9Ctcjd0A=
    • !!python/object/apply:numpy.core.multiarray.scalar
      • *id001
      • !!binary |
        XI/C9Si8Q0A=
    • !!python/object/apply:numpy.core.multiarray.scalar
      • *id001
      • !!binary |
        7FG4HoVXd0A=
    • !!python/object/apply:numpy.core.multiarray.scalar
      • *id001
      • !!binary |
        cT0K16MwRUA=
    • !!python/object/apply:numpy.core.multiarray.scalar
      • *id001
      • !!binary |
        rkfhehQ2d0A=
    • !!python/object/apply:numpy.core.multiarray.scalar
      • *id001
      • !!binary |
        rkfhehTORkA=
    • !!python/object/apply:numpy.core.multiarray.scalar
      • *id001
      • !!binary |
        4XoUrkfVdkA=
    • !!python/object/apply:numpy.core.multiarray.scalar
      • *id001
      • !!binary |
        CtejcD2qS0A=
    • !!python/object/apply:numpy.core.multiarray.scalar
      • *id001
      • !!binary |
        MzMzMzMzd0A=**

Loading more than once in Render throws error

Render generally works well if I only process one file:

open Render
import data
export image
close Render

If I try and open more than one data file (ie open one, then open another) I get the following error:

image

Localize Freezes while fitting the spots

I have a raw data containing 1,00,000 frames but after opening it in localize, selecting the net gradient and allowing it to "Identify and fit", it identifies spots in all the frames and starts fitting but while fitting after a certain time interval the fitting freezes at one point and throws the memory error. Then, I tried to reduce the frames to 50,000 and again started fitting, this time it is not showing memory error but it still freezes after fitting some points. Also, I tried increasing the net gradient and again started the fitting, but still no luck!

Problem with 3D calibration

I try to calibrate astigmatism from the stack https://www.dropbox.com/s/q565b0bcjyz1f12/cal-ast-5nm_1-crop.tif?dl=0

And polynomial fit looks weird:
https://www.dropbox.com/s/emo8my51tund3ud/3d_cal.png?dl=0

I set the following parameters:
Box size 16
min Net Grad 810
EM gain 1 (data in photon counting mode)
Baseline 0
pixel size 110
Method: LQ
Step size: 5 nm

I also copy the terminal output:

C:\Users\Andrey\Anaconda3\envs\picasso\lib\site-packages\numpy\core_methods.py:
59: RuntimeWarning: Mean of empty slice.
warnings.warn("Mean of empty slice.", RuntimeWarning)
C:\Users\Andrey\Anaconda3\envs\picasso\lib\site-packages\numpy\core_methods.py:
70: RuntimeWarning: invalid value encountered in true_divide
ret = ret.dtype.type(ret / rcount)

Intel MKL ERROR: Parameter 6 was incorrect on entry to DGELSD.
C:\Users\Andrey\Anaconda3\envs\picasso\lib\site-packages\numpy\lib\polynomial.py
:595: RankWarning: Polyfit may be poorly conditioned
warnings.warn(msg, RankWarning)

Intel MKL ERROR: Parameter 6 was incorrect on entry to DGELSD.
C:\Users\Andrey\Anaconda3\envs\picasso\lib\site-packages\numpy\lib\polynomial.py
:595: RankWarning: Polyfit may be poorly conditioned
warnings.warn(msg, RankWarning)
C:\Users\Andrey\Anaconda3\envs\picasso\lib\site-packages\numpy\core_methods.py:
59: RuntimeWarning: Mean of empty slice.
warnings.warn("Mean of empty slice.", RuntimeWarning)
C:\Users\Andrey\Anaconda3\envs\picasso\lib\site-packages\numpy\core_methods.py:
70: RuntimeWarning: invalid value encountered in double_scalars
ret = ret.dtype.type(ret / rcount)
QCoreApplication::exec: The event loop is already running

RCC drift correction failed

Our picasso is installed via python (Anaconda) on Mac. I did not have this RCC failure problem for previous rendering. But one particular set of data reports RCC failure no matter how I change the segmentation. The number of locs is comparable to the data I rendered before.
screen shot 2018-10-25 at 10 28 39

Export as ThunderSTORM format

It would be great to have an option in the render module to export as ThunderSTORM csv format. I detailed the format of the columns here: http://www.neurocytolab.org/tscolumns/

Most important columns to be able to use ThunderSTORM as a filtering/rendering engine downstream of Picasso are:
x [nm],y [nm], z [nm], intensity [photon], uncertainty_xy [nm], uncertainty_z [nm], detections

I'm not sure if Picasso does calculate z uncertainties, if not that column can be omitted.

Right now there is no text format exported by Picasso that has the xy uncertainty (they are not in the NIS or the FRC exported files), so it's not possible to render the resulting localizations with a Gaussian reconstruction.

Alternatively (or in addition), some documentation about the localization file format used by Picasso (how is the data organized within the hdf5 file) would be useful.

Code adaptations to avoid error messages from pycharm

  • Picasso version: Picasso-Windows-64bit_0_2_8
  • Python version: 3.7, Anaconda distribution
  • Operating System: Windows 10 64bit

Description

I created a project in PyCharm and imported simulate, localize and render
PyCharm reported missing imports but I could run the three programs, but Python crashed within the debugger when calling render.
Here is my calling code (I omitted sys.exit() at the end of each module, to be able to call them consecutevely)

from picasso.gui import simulate
from picasso.gui import localize
from picasso.gui import render
simulate.main()
localize.main()
render.main()

What I Did

Since PyCharm reported a missing imports and erros, I imported in "picasso/gui/simulate":

import traceback
from PyQt5.QtWidgets import QDialogButtonBox, QDialog
from PyQt5 import Qt

and in "picasso/simulate"
I casted in function "generatePositions(...)" variable "spacing" to int to avoid an exception

and in "picasso/gui/render" I imported
from matplotlib.backends.backend_qt5agg import FigureCanvasQTAgg as FigureCanvas
(instead of
from matplotlib.backends.backend_qt5agg import FigureCanvas as FigureCanvas)

Thus I could avoid the crash of Python within debugger when calling render

I do not know whether I have done eveything correctly, since I am very new to Python, but I hope this contribution is helpful

Render crashes with exception

Just tried the latest version on OSX (installed from source). Localize and Filter work OK so far. Render crashes with:

(picasso) MacBook-Pro-5:~ christo$ python -m picasso render
/Users/christo/anaconda3/envs/picasso/lib/python3.5/site-packages/sklearn/utils/fixes.py:313: FutureWarning: numpy not_equal will not check object identity in the future. The comparison did not return the same result as suggested by the identity (is)) and will change.
_nan_object_mask = _nan_object_array != _nan_object_array
2018-12-09 15:43:54.033 python[17445:1342641] -[QNSApplication _setup:]: unrecognized selector sent to instance 0x7fe4b9c26c70
2018-12-09 15:43:54.035 python[17445:1342641] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[QNSApplication _setup:]: unrecognized selector sent to instance 0x7fe4b9c26c70'
*** First throw call stack:
(
0 CoreFoundation 0x00007fff3a634e65 __exceptionPreprocess + 256
1 libobjc.A.dylib 0x00007fff6668f720 objc_exception_throw + 48
2 CoreFoundation 0x00007fff3a6b222d -[NSObject(NSObject) __retain_OA] + 0
3 CoreFoundation 0x00007fff3a5d6820 forwarding + 1486
4 CoreFoundation 0x00007fff3a5d61c8 _CF_forwarding_prep_0 + 120
5 libtk8.6.dylib 0x000000010f92a475 TkpInit + 310
6 libtk8.6.dylib 0x000000010f89a754 Initialize + 2457
7 _tkinter.cpython-35m-darwin.so 0x000000010f6fcd64 Tcl_AppInit + 84
8 _tkinter.cpython-35m-darwin.so 0x000000010f6fca3b _tkinter_create + 1115
9 libpython3.5m.dylib 0x000000010448776c PyCFunction_Call + 220
10 libpython3.5m.dylib 0x000000010450458b PyEval_EvalFrameEx + 25515
11 libpython3.5m.dylib 0x0000000104508ef9 _PyEval_EvalCodeWithName + 3945
12 libpython3.5m.dylib 0x00000001044fe1be PyEval_EvalCodeEx + 78
13 libpython3.5m.dylib 0x0000000104467ffd function_call + 381
14 libpython3.5m.dylib 0x000000010443e491 PyObject_Call + 97
15 libpython3.5m.dylib 0x000000010445450d method_call + 141
16 libpython3.5m.dylib 0x000000010443e491 PyObject_Call + 97
17 libpython3.5m.dylib 0x000000010449e3bd slot_tp_init + 125
18 libpython3.5m.dylib 0x000000010449a9d9 type_call + 297
19 libpython3.5m.dylib 0x000000010443e491 PyObject_Call + 97
20 libpython3.5m.dylib 0x00000001045042d0 PyEval_EvalFrameEx + 24816
21 libpython3.5m.dylib 0x00000001045096b0 fast_function + 304
22 libpython3.5m.dylib 0x000000010450400b PyEval_EvalFrameEx + 24107
23 libpython3.5m.dylib 0x0000000104508ef9 _PyEval_EvalCodeWithName + 3945
24 libpython3.5m.dylib 0x00000001044fe1be PyEval_EvalCodeEx + 78
25 libpython3.5m.dylib 0x0000000104467ffd function_call + 381
26 libpython3.5m.dylib 0x000000010443e491 PyObject_Call + 97
27 libpython3.5m.dylib 0x0000000104504dde PyEval_EvalFrameEx + 27646
28 libpython3.5m.dylib 0x0000000104508ef9 _PyEval_EvalCodeWithName + 3945
29 libpython3.5m.dylib 0x0000000104509731 fast_function + 433
30 libpython3.5m.dylib 0x000000010450400b PyEval_EvalFrameEx + 24107
31 libpython3.5m.dylib 0x0000000104508ef9 _PyEval_EvalCodeWithName + 3945
32 libpython3.5m.dylib 0x00000001044fe1be PyEval_EvalCodeEx + 78
33 libpython3.5m.dylib 0x0000000104467ffd function_call + 381
34 libpython3.5m.dylib 0x000000010443e491 PyObject_Call + 97
35 libpython3.5m.dylib 0x000000010445450d method_call + 141
36 libpython3.5m.dylib 0x000000010443e491 PyObject_Call + 97
37 libpython3.5m.dylib 0x000000010449e3bd slot_tp_init + 125
38 libpython3.5m.dylib 0x000000010449a9d9 type_call + 297
39 libpython3.5m.dylib 0x000000010443e491 PyObject_Call + 97
40 libpython3.5m.dylib 0x00000001045042d0 PyEval_EvalFrameEx + 24816
41 libpython3.5m.dylib 0x0000000104508ef9 _PyEval_EvalCodeWithName + 3945
42 libpython3.5m.dylib 0x00000001044fe1be PyEval_EvalCodeEx + 78
43 libpython3.5m.dylib 0x0000000104467ffd function_call + 381
44 libpython3.5m.dylib 0x000000010443e491 PyObject_Call + 97
45 libpython3.5m.dylib 0x000000010445450d method_call + 141
46 libpython3.5m.dylib 0x000000010443e491 PyObject_Call + 97
47 libpython3.5m.dylib 0x000000010449e3bd slot_tp_init + 125
48 libpython3.5m.dylib 0x000000010449a9d9 type_call + 297
49 libpython3.5m.dylib 0x000000010443e491 PyObject_Call + 97
50 libpython3.5m.dylib 0x00000001045042d0 PyEval_EvalFrameEx + 24816
51 libpython3.5m.dylib 0x0000000104508ef9 _PyEval_EvalCodeWithName + 3945
52 libpython3.5m.dylib 0x0000000104509731 fast_function + 433
53 libpython3.5m.dylib 0x000000010450400b PyEval_EvalFrameEx + 24107
54 libpython3.5m.dylib 0x00000001045096b0 fast_function + 304
55 libpython3.5m.dylib 0x000000010450400b PyEval_EvalFrameEx + 24107
56 libpython3.5m.dylib 0x0000000104508ef9 _PyEval_EvalCodeWithName + 3945
57 libpython3.5m.dylib 0x00000001044fe161 PyEval_EvalCode + 81
58 libpython3.5m.dylib 0x00000001044fb7a7 builtin_exec + 551
59 libpython3.5m.dylib 0x000000010448776c PyCFunction_Call + 220
60 libpython3.5m.dylib 0x000000010450458b PyEval_EvalFrameEx + 25515
61 libpython3.5m.dylib 0x0000000104508ef9 _PyEval_EvalCodeWithName + 3945
62 libpython3.5m.dylib 0x0000000104509731 fast_function + 433
63 libpython3.5m.dylib 0x000000010450400b PyEval_EvalFrameEx + 24107
64 libpython3.5m.dylib 0x0000000104508ef9 _PyEval_EvalCodeWithName + 3945
65 libpython3.5m.dylib 0x00000001044fe1be PyEval_EvalCodeEx + 78
66 libpython3.5m.dylib 0x0000000104467ffd function_call + 381
67 libpython3.5m.dylib 0x000000010443e491 PyObject_Call + 97
68 libpython3.5m.dylib 0x0000000104547533 RunModule + 147
69 libpython3.5m.dylib 0x0000000104546f6e Py_Main + 2686
70 python 0x0000000104427e18 main + 216
71 libdyld.dylib 0x00007fff6775e08d start + 1
72 ??? 0x0000000000000004 0x0 + 4
)
libc++abi.dylib: terminating with uncaught exception of type NSException
Abort trap: 6

Wishlist: Fixed ROIs for 3D calibration

For 3D calibration, Picasso Localize identifies and localizes fluorescent beads in the FoV frame by frame in the same way as localization for SMLM data. I recently calibrated beads data with astigmatism and realized that every fitting ROI was vertically shifted from the actual center of the signal when Picasso Localize analyzed the frames above the focal plane (see the attached screenshot). Due to this shift, Z localization precision above the focal plane is significantly worse than that below the focal plane.

It would be great if Picasso Localize uses fixed ROIs for 3D calibration, e.g. presets the fitting ROIs based on the maximum Z projection and doesn't move them frame by frame. Alternatively, if user can define ROIs, that would also work.

zplus

Setup default EM gain (in Localize) and camera pixel size (in Render)

I set up the config.yaml file for our camera according to the Wiki. However, there are two settings that I can't set by default:

  • The EM gain in the Localize module (to 100 instead of 1)
  • The pixel size in the Render module (to 160 nm instead of 130)
    Is there a way to do this via the config.yaml file?

Also is there a way to set the default processing parameters of the Localize module (box size, gradient etc.) via the config.yaml file?

Cannot make v0.2.8 work on W7

  • Picasso version: v0.2.8 (from Windows installer)
  • Python version: 2.X and 3.7 installed (I guess this doesn't matter)
  • Operating System: Windows7

Description

Hi,
I wanted to try your software. I used Installer 0.2.8 - Windows 64-bit (I guess this would lead to stand-alone application?) to have it on my computer.
Whatever subprogram I try to launch (Design, Simulate...) I get the following message "Failed to execute script picasso-script" in a window named "Fatal error detected".

Any idea what can cause this and how to solve it?

Thank you for your help!
Kind regards,
Pierre

extracting individual traces from averaged traces

Similar to the Nanoletters paper (2017, 17, 6428-6434) figure 2, I want to analyse our donor only origami construct in Picasso. After localise and render, an averaged image was retrieved.
From this averaged image I would like to extract time traces, either a summed intensity over the picked spot in time, or multiple time traces: one per aligned spot.

Currently, the time trace shows the x-y position and ON/OFF over time, and does not take into account if at one time point multiple events occur, distributed over multiple spots.

Is there a way to extract intensity time traces of picked regions in already aligned, but not yet averaged, spots?

Problem with opening large .raw file (6 GB)

  • Picasso version: Not sure (just downloaded 3 month ago)
  • Python version: 3.8.2
  • Operating System: Linux on Artemis

Description

I have a .raw file that is about 6 GB, when I tried to open it, I got this error:

_Traceback (most recent call last):
File "/usr/local/python/3.8.2/lib/python3.8/runpy.py", line 193, in _run_modu$
return _run_code(code, main_globals, None,
File "/usr/local/python/3.8.2/lib/python3.8/runpy.py", line 86, in _run_code
exec(code, run_globals)
File "/usr/local/python/3.8.2/lib/python3.8/site-packages/picasso-0.3.1-py3.8$
main()
File "/usr/local/python/3.8.2/lib/python3.8/site-packages/picasso-0.3.1-py3.8$
_localize(args)
File "/usr/local/python/3.8.2/lib/python3.8/site-packages/picasso-0.3.1-py3.8$
movie, info = load_movie(path)
File "/usr/local/python/3.8.2/lib/python3.8/site-packages/picasso-0.3.1-py3.8$
return load_raw(path, prompt_info=prompt_info)
File "/usr/local/python/3.8.2/lib/python3.8/site-packages/picasso-0.3.1-py3.8$
movie = np.memmap(path, dtype, "r", shape=shape)
File "/usr/local/python/3.8.2/lib/python3.8/site-packages/numpy/core/memmap.p$
mm = mmap.mmap(fid.fileno(), bytes, access=acc, offset=start)
ValueError: mmap length is greater than file size

Then I switched to a different computer with python 2.7.1, window 7. I got this error:

OSError: [WinError 8] Not enough storage is available to process this command

Screen Shot 2020-09-01 at 11 34 16 am

Size or frame limit for movies?

My data is in large tif files, e.g. 50,000 frames, 256x256. That's a 6.4Gb file, which only loads frame 1 when I open it in Localize.

I truncated it to 500 frames and 30,000 frames and these open fine. Do you know of a size limit imposed by the way movies are handled? I can try other movie sizes if that helps.

Package Deprecation

PyQt4 is now deprecated. Trying to install Picasso with the conda instructions will now lead to an error (See Screenshot below) as one cannot obtain PyQt4 from the official channel anymore.

I'll create a new branch to make everything compatible to the updated packages.

01

File loading error in Render 0.2.0

I've just updated Picasso and noticed that Render throws an error when it tries to open the data saved with Render.

  1. Open Render
  2. Load data which is processed with the previous version of Localize (0.1.0)
  3. Save localizations as a new hdf5 file
  4. Close Render
  5. Load data saved at step 3
  6. Get the following error
    screen shot 2018-10-12 at 14 09 17
  7. Close the error message
  8. Load the same data at step 2
  9. Get the different error
    screen shot 2018-10-12 at 14 18 13

found locations are pixelated

When running Localize the spot locations are pixelized, meaning they appear at distinct grid points, and hardly in between. However, if I run the same file through ImageJ/Thunderstorm I do not get this issue. Please have a look at the images below.

Surely I must be doing something wrong in the settings of Picasso, but I cannot figure out what. The raw data is uint8, 101 by 101 pixels, 5000 frames.

the data can be found on wetransfer (>10MB) https://we.tl/t-sTdPUHXCTQ

hel4_crop_locs
imagej crop averaged shifted histograms

Wishlist: Render file management

I'm wondering if Render could have the "Save all at once" option for "Save localizations". This option is currently available only for "Save picked localizations".

It would be also helpful if we could close a localization file opened in Render. I often open multiple files in the same Render window for aligning channels, and I have to start all over when I open a wrong file or the channel alignment doesn't work.

Errors in Undrift by RCC

I recently encountered a couple 'novel error's when doing RCC drift correction. It would be very helpful to know what cause these errors and whether there are solutions to it. Thanks!

  1. operands could not be broadcast together with shapes (25,)(15,)
  2. zero-size array to reduction operation maximum which has no identity

Fix version pinning between Redme and requirements.txt

Hi all,
in the ReadMe there is matplotlib==1.5.1 mentioned as requirements, but in your requirements.txt no version pinning occurs. So this has to be fixed.

Additionally the PyQt4 requirement is missing in requirements.txt.

Cannot undrift using RCC

Hello, I collected 8000 frames at 500 ms and I was trying to drift correct. I get following error:

image

I tried to reduce the number of segments from 1000 to 100 but then I get a different type of error:

image

Sorry for uploading images. GitHub's issue tracker didn't allow me to copy text from dialog box.

Localize freezes when using regions from picks

  • Picasso version: 0.3.0
  • Python version: 3.7
  • Operating System: Windows 10

Description

Localize freezes with a "Cannot set parent, new parent is in a different thread" error (see image) in one specific instance: I am trying to do a 3d calibration using picked regions as described elsewhere in the documentation. I localize an astigmatic bead stack, pick the beads in Render, then use the identified picks again in Localize to do the 3d calibration. I am using LQ+GPU fit. When I then click on "calibrate 3d" I get this error. If I do exactly the same thing but do not try to load the picks, I do not have an error and the calibration proceeds normally. The same error occurs with MLE instead of LQ. I just did a fresh install of Picasso (this is on a new computer) this morning, so this should be all the latest Anaconda/Picasso/Python package versions on a Windows 10 machine. Let me know if there's other information I can provide. Thanks

Screen Shot 2020-03-25 at 2 35 04 PM

What I Did

See the attached image for the error and traceback in anaconda prompt.

Bug: Picasso simulate crashes when opening

  • Picasso version: 0.3.0
  • Python version: 3.7
  • Operating System: Windows 10
    simulate_error_start

Description

Executing python -m picasso simulate resulted in a crash (see screenshot) with the error "TypeError: object of type <class 'float'> cannot be safely interpreted as an integer."

What I Did

python -m picasso simulate

Picasso:Average clusters

  • Picasso version: 0.28
  • Python version: 3.7.4
  • Operating System: Windows 10

Description

Hi,

We recently got our hands on the U2OS Nup96-mEGFP cells and are currently trying severaly things.
Everything seems to run fine, but we got issues using Picasso:Average. No matter which parameters we try, the nuclear pore structure clusters in 1 to 3 spots after very few iterations (>1-2) (see attachment before and after averaging).

grafik
grafik

We also experience the error "failed to execute Picasso script", but that is not always the case.

Wishlist: Chromatic aberration correction

I'd like to add an item to the wishlist: chromatic aberration correction.

When recording multiple channels with spectrally different fluorophores, correction of the chromatic aberrations is necessary to register the channels at the nanoscale. For example, we usually do 2-color PAINT in red and far-red channels simultaneously (561 and 647 lasers, alternated frames) and warp the channels to register them.

Several software do this, using either polynomial warping (N-STORM does this) or B-Splines (like DoM Utrecht https://github.com/ekatrukha/DoM_Utrecht/wiki/Chromatic-correction). A Matlab implementation exists in SharpVisu (https://github.com/andronovl/SharpViSu). There may be a Python implementation in PyMe but I'm not sure of that.

RCC drift correction failed

This is just a bug report related to #24 and #27.

I had exactly the same issue and found that the failure is related to pythonw. When I launch Render via pythonw (pythonw.exe -m picasso render), RCC always crashes regardless of whether it is launched from command line or shortcut. Launching Render via python.exe (python.exe -m picasso render) solves this.

An issue and solution to run the PowerShell script "createShortcuts.ps1"

This is just for the reference when other users hit the same issue.

We run Picasso on Windows Server 2008 R2 Enterprise SP1 and recently found that "createShortcuts.ps1" didn't run at the last step of installation (didn't create any shortcuts). It was due to Powershell version difference. In our machine, Ver. 2 of PowerShell is installed instead of Ver. 3. I added one line as below to the top of the script and it finally created the shortcuts:
if(!$PSScriptRoot){ $PSScriptRoot = Split-Path $MyInvocation.MyCommand.Path -Parent }

Wish-List

Current (pot. incomplete) wish-list and known bugs, strike-through is done.

Nice to have

  • 2D/3D Implementation for Phasor
  • Importer/Exporter for Thunderstorm
  • Implement HDBSCAN for Clustering
  • Create a model from existing data for simulation optimization
  • Open-File resets Window
  • Support for non-ome-tif
  • Remember last working directory for all modules
  • Slider for Localize and better arrow functions (e.g., shift + arrow moves ten frames)
  • Precise Filtering in Localize
  • Chromatic Aberration Correction
  • Drift correction in z
  • Documentation (FRET)
  • Make undrift by file usable with own output drift files
  • one-click Installer with GPU Support
  • Support for custom colormaps
  • Speed Mode for large datasets (i.e., only render every tenth localization)

Room for improvement

  • Update from PyQt4 to PyQt5
  • Speed up 3D display
  • Work on documentation
  • Suppress / Fix warnings for terminal version
  • Speed up some of the functions with GPU (e.g. rendering images)

Known bugs:

  • Freezing MLE Fits
  • Fitting Errors in Mac Os X
  • RCC can fail
  • Resizing a dataset with groups crashes Picasso window
  • Exporting large images when having little RAM can cause problems
  • Indexing for picked localizations is sometimes not consistent, i.e., when picking, selecting pick similar, linking and saving pick localizations could cause an error as the non-linked localizations are saved
  • Exporting of images can cause errors on low-memory PCs as the memory limit can be reached for large oversampling
  • Resizing the main window crashes the application when having a dataset with groups

Feel free to comment and add or open a new issue. I'll try to keep this list up to date.

toraw fails on standard tif

I'm assuming it's not designed to work with .tif files that aren't .ome.tif, but I'm hitting an error if I try to open standard .tif stacks in toraw

In io.py the file structure has .ome.tif hard coded in:
pattern = _re.compile('(.*?)(_(\d*))?.ome.tif')

Which results (I think?) in this error when trying to set up a batch convert to raw:

image

You may not see this as an issue? I should probably be storing data in ome.tif rather than in .czi > .tif or .raw

Batch processing with command line

Hi, I am trying to set up a batch file to process data via command line. Unfortunately our data (*.raw) is not recognized by the module localize. Maybe glob is causing the error, a small test on the same directory with os.listdir() and fnmatch worked well.

Wishlist: Z drift correction

I'd like to add an item to the wish-list: correction of drift in Z.

Even with moderate length acquisitions (20 minutes, relatively to PAINT acquisitions that can last hours), I already see some Z drift in the order of 50-100 nm. This is with optical focus stabilization, a Nikon PFS that is performing very well. This is significantly degrading the resulting reconstruction when viewed in XZ sections. I know because N-STORM (Nikon software) does the Z correction so I can check with and without it.

Regarding open-source Python implementations, Hazen Babcock storm analysis suite (from Xiaowei Zhuang's lab) does Z drift correction. Hazen Python's code is here: https://github.com/ZhuangLab/storm-analysis/blob/master/storm_analysis/sa_utilities/xyz_drift_correction.py

I don't think Z drift can be corrected by RCC, it would be too noisy for that (not enough points). So a simple autocorrelation step in Z after the XY correction by RCC may be the optimal solution.

RCC drift correction fails when installing via Python

Hey

I had a version of your software provided by your group to our PI (Gregory Giannone) which I've been using so far with no issues. Recently I've decided to re-install it via Python to have access to other routines such as the .csv exporter in the Render file. However, after this, RCC drift correction stopped working. Before that I never had any issues. Now, when using the same .hdf5 file with our standard version or the Python-installed one, the latter always gives me an error message when performing RCC: "RCC failed. Consider changing segmentation and make sure there are enough locs per frame"

It's not dependent on segmentation as I have increased it up to 100000 and still get the same error message. Any idea why this might be happening? I updated the tqdm package using anaconda, but no changes. Below you can see a comparison of both cases, with RCC working in the standard version and the error message for the Python version.

tal snap old rcc

error

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.