microeye 2.4.4__tar.gz → 2.4.5__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.
- {microeye-2.4.4/src/microeye.egg-info → microeye-2.4.5}/PKG-INFO +16 -14
- {microeye-2.4.4 → microeye-2.4.5}/README.md +14 -12
- {microeye-2.4.4 → microeye-2.4.5}/src/microEye/_version.py +1 -1
- {microeye-2.4.4 → microeye-2.4.5}/src/microEye/analysis/clustering/dbscan.py +177 -7
- microeye-2.4.5/src/microEye/analysis/clustering/density.py +730 -0
- {microeye-2.4.4 → microeye-2.4.5}/src/microEye/analysis/clustering/plot.py +263 -7
- {microeye-2.4.4 → microeye-2.4.5}/src/microEye/analysis/clustering/rulers.py +72 -8
- {microeye-2.4.4 → microeye-2.4.5}/src/microEye/analysis/fitting/psf/extract.py +2 -2
- {microeye-2.4.4 → microeye-2.4.5}/src/microEye/analysis/fitting/psf/spline.py +38 -21
- {microeye-2.4.4 → microeye-2.4.5}/src/microEye/analysis/fitting/results.py +79 -44
- microeye-2.4.5/src/microEye/analysis/processing/frc.py +203 -0
- {microeye-2.4.4 → microeye-2.4.5}/src/microEye/analysis/rendering/base.py +1 -1
- {microeye-2.4.4 → microeye-2.4.5}/src/microEye/analysis/rendering/cloud.py +5 -5
- {microeye-2.4.4 → microeye-2.4.5}/src/microEye/analysis/rendering/volumetric.py +5 -5
- {microeye-2.4.4 → microeye-2.4.5}/src/microEye/analysis/tools/batch.py +146 -10
- {microeye-2.4.4 → microeye-2.4.5}/src/microEye/analysis/viewer/localizations.py +232 -93
- {microeye-2.4.4 → microeye-2.4.5}/src/microEye/hardware/pycromanager/core.py +2 -2
- {microeye-2.4.4 → microeye-2.4.5}/src/microEye/hardware/stages/elliptec/devicePort.py +2 -1
- {microeye-2.4.4 → microeye-2.4.5}/src/microEye/images/zarr.py +3 -3
- {microeye-2.4.4 → microeye-2.4.5/src/microeye.egg-info}/PKG-INFO +16 -14
- {microeye-2.4.4 → microeye-2.4.5}/src/microeye.egg-info/SOURCES.txt +1 -0
- {microeye-2.4.4 → microeye-2.4.5}/src/microeye.egg-info/requires.txt +1 -1
- microeye-2.4.4/src/microEye/analysis/processing/frc.py +0 -120
- {microeye-2.4.4 → microeye-2.4.5}/LICENSE +0 -0
- {microeye-2.4.4 → microeye-2.4.5}/MANIFEST.in +0 -0
- {microeye-2.4.4 → microeye-2.4.5}/pyproject.toml +0 -0
- {microeye-2.4.4 → microeye-2.4.5}/setup.cfg +0 -0
- {microeye-2.4.4 → microeye-2.4.5}/setup.py +0 -0
- {microeye-2.4.4 → microeye-2.4.5}/src/microEye/__init__.py +0 -0
- {microeye-2.4.4 → microeye-2.4.5}/src/microEye/analysis/__init__.py +0 -0
- {microeye-2.4.4 → microeye-2.4.5}/src/microEye/analysis/checklist_dialog.py +0 -0
- {microeye-2.4.4 → microeye-2.4.5}/src/microEye/analysis/clustering/__init__.py +0 -0
- {microeye-2.4.4 → microeye-2.4.5}/src/microEye/analysis/cmosMaps.py +0 -0
- {microeye-2.4.4 → microeye-2.4.5}/src/microEye/analysis/file_system.py +0 -0
- {microeye-2.4.4 → microeye-2.4.5}/src/microEye/analysis/filters/__init__.py +0 -0
- {microeye-2.4.4 → microeye-2.4.5}/src/microEye/analysis/filters/base.py +0 -0
- {microeye-2.4.4 → microeye-2.4.5}/src/microEye/analysis/filters/spatial.py +0 -0
- {microeye-2.4.4 → microeye-2.4.5}/src/microEye/analysis/filters/temporal.py +0 -0
- {microeye-2.4.4 → microeye-2.4.5}/src/microEye/analysis/fitting/__init__.py +0 -0
- {microeye-2.4.4 → microeye-2.4.5}/src/microEye/analysis/fitting/aim.py +0 -0
- {microeye-2.4.4 → microeye-2.4.5}/src/microEye/analysis/fitting/fit.py +0 -0
- {microeye-2.4.4 → microeye-2.4.5}/src/microEye/analysis/fitting/nena.py +0 -0
- {microeye-2.4.4 → microeye-2.4.5}/src/microEye/analysis/fitting/phasor_fit.py +0 -0
- {microeye-2.4.4 → microeye-2.4.5}/src/microEye/analysis/fitting/processing.py +0 -0
- {microeye-2.4.4 → microeye-2.4.5}/src/microEye/analysis/fitting/psf/__init__.py +0 -0
- {microeye-2.4.4 → microeye-2.4.5}/src/microEye/analysis/fitting/psf/rubost_mean.py +0 -0
- {microeye-2.4.4 → microeye-2.4.5}/src/microEye/analysis/fitting/psf/stats/__init__.py +0 -0
- {microeye-2.4.4 → microeye-2.4.5}/src/microEye/analysis/fitting/psf/stats/core.py +0 -0
- {microeye-2.4.4 → microeye-2.4.5}/src/microEye/analysis/fitting/psf/stats/curve_fit.py +0 -0
- {microeye-2.4.4 → microeye-2.4.5}/src/microEye/analysis/fitting/psf/stats/io.py +0 -0
- {microeye-2.4.4 → microeye-2.4.5}/src/microEye/analysis/fitting/psf/stats/slope_fit.py +0 -0
- {microeye-2.4.4 → microeye-2.4.5}/src/microEye/analysis/fitting/psf/temp.py +0 -0
- {microeye-2.4.4 → microeye-2.4.5}/src/microEye/analysis/fitting/psf/test.py +0 -0
- {microeye-2.4.4 → microeye-2.4.5}/src/microEye/analysis/fitting/pyfit3Dcspline/CPU/CPUfunctions.py +0 -0
- {microeye-2.4.4 → microeye-2.4.5}/src/microEye/analysis/fitting/pyfit3Dcspline/CPU/CPUmleFit_LM.py +0 -0
- {microeye-2.4.4 → microeye-2.4.5}/src/microEye/analysis/fitting/pyfit3Dcspline/CPU/CPUsplineLib.py +0 -0
- {microeye-2.4.4 → microeye-2.4.5}/src/microEye/analysis/fitting/pyfit3Dcspline/CPU/__init__.py +0 -0
- {microeye-2.4.4 → microeye-2.4.5}/src/microEye/analysis/fitting/pyfit3Dcspline/GPU/GPUfunctions.py +0 -0
- {microeye-2.4.4 → microeye-2.4.5}/src/microEye/analysis/fitting/pyfit3Dcspline/GPU/GPUmleFit_LM_EMCCD.py +0 -0
- {microeye-2.4.4 → microeye-2.4.5}/src/microEye/analysis/fitting/pyfit3Dcspline/GPU/GPUmleFit_LM_sCMOS.py +0 -0
- {microeye-2.4.4 → microeye-2.4.5}/src/microEye/analysis/fitting/pyfit3Dcspline/GPU/GPUsplineLib.py +0 -0
- {microeye-2.4.4 → microeye-2.4.5}/src/microEye/analysis/fitting/pyfit3Dcspline/GPU/__init__.py +0 -0
- {microeye-2.4.4 → microeye-2.4.5}/src/microEye/analysis/fitting/pyfit3Dcspline/__init__.py +0 -0
- {microeye-2.4.4 → microeye-2.4.5}/src/microEye/analysis/fitting/pyfit3Dcspline/constants.py +0 -0
- {microeye-2.4.4 → microeye-2.4.5}/src/microEye/analysis/fitting/pyfit3Dcspline/mainfunctions.py +0 -0
- {microeye-2.4.4 → microeye-2.4.5}/src/microEye/analysis/fitting/rcc.py +0 -0
- {microeye-2.4.4 → microeye-2.4.5}/src/microEye/analysis/fitting/results_stats.py +0 -0
- {microeye-2.4.4 → microeye-2.4.5}/src/microEye/analysis/fitting/tardis.py +0 -0
- {microeye-2.4.4 → microeye-2.4.5}/src/microEye/analysis/multi_viewer.py +0 -0
- {microeye-2.4.4 → microeye-2.4.5}/src/microEye/analysis/processing/__init__.py +0 -0
- {microeye-2.4.4 → microeye-2.4.5}/src/microEye/analysis/rendering/__init__.py +0 -0
- {microeye-2.4.4 → microeye-2.4.5}/src/microEye/analysis/rendering/core.py +0 -0
- {microeye-2.4.4 → microeye-2.4.5}/src/microEye/analysis/tools/__init__.py +0 -0
- {microeye-2.4.4 → microeye-2.4.5}/src/microEye/analysis/tools/common.py +0 -0
- {microeye-2.4.4 → microeye-2.4.5}/src/microEye/analysis/tools/dark_cal/__init__.py +0 -0
- {microeye-2.4.4 → microeye-2.4.5}/src/microEye/analysis/tools/dark_cal/analysis.py +0 -0
- {microeye-2.4.4 → microeye-2.4.5}/src/microEye/analysis/tools/dark_cal/compare.py +0 -0
- {microeye-2.4.4 → microeye-2.4.5}/src/microEye/analysis/tools/dark_cal/constants.py +0 -0
- {microeye-2.4.4 → microeye-2.4.5}/src/microEye/analysis/tools/dark_cal/core.py +0 -0
- {microeye-2.4.4 → microeye-2.4.5}/src/microEye/analysis/tools/dark_cal/io.py +0 -0
- {microeye-2.4.4 → microeye-2.4.5}/src/microEye/analysis/tools/dark_cal/plotting.py +0 -0
- {microeye-2.4.4 → microeye-2.4.5}/src/microEye/analysis/tools/kymograms.py +0 -0
- {microeye-2.4.4 → microeye-2.4.5}/src/microEye/analysis/tools/photon_cal/__init__.py +0 -0
- {microeye-2.4.4 → microeye-2.4.5}/src/microEye/analysis/tools/photon_cal/analysis.py +0 -0
- {microeye-2.4.4 → microeye-2.4.5}/src/microEye/analysis/tools/photon_cal/compare.py +0 -0
- {microeye-2.4.4 → microeye-2.4.5}/src/microEye/analysis/tools/photon_cal/constants.py +0 -0
- {microeye-2.4.4 → microeye-2.4.5}/src/microEye/analysis/tools/photon_cal/core.py +0 -0
- {microeye-2.4.4 → microeye-2.4.5}/src/microEye/analysis/tools/photon_cal/io.py +0 -0
- {microeye-2.4.4 → microeye-2.4.5}/src/microEye/analysis/tools/photon_cal/models.py +0 -0
- {microeye-2.4.4 → microeye-2.4.5}/src/microEye/analysis/tools/photon_cal/plotting.py +0 -0
- {microeye-2.4.4 → microeye-2.4.5}/src/microEye/analysis/tools/photon_cal/table.py +0 -0
- {microeye-2.4.4 → microeye-2.4.5}/src/microEye/analysis/tools/registration.py +0 -0
- {microeye-2.4.4 → microeye-2.4.5}/src/microEye/analysis/tools/roi_selectors.py +0 -0
- {microeye-2.4.4 → microeye-2.4.5}/src/microEye/analysis/tools/sphere_cal.py +0 -0
- {microeye-2.4.4 → microeye-2.4.5}/src/microEye/analysis/utils/__init__.py +0 -0
- {microeye-2.4.4 → microeye-2.4.5}/src/microEye/analysis/utils/coordinates.py +0 -0
- {microeye-2.4.4 → microeye-2.4.5}/src/microEye/analysis/utils/images.py +0 -0
- {microeye-2.4.4 → microeye-2.4.5}/src/microEye/analysis/utils/windows.py +0 -0
- {microeye-2.4.4 → microeye-2.4.5}/src/microEye/analysis/viewer/__init__.py +0 -0
- {microeye-2.4.4 → microeye-2.4.5}/src/microEye/analysis/viewer/image_options_widget.py +0 -0
- {microeye-2.4.4 → microeye-2.4.5}/src/microEye/analysis/viewer/images.py +0 -0
- {microeye-2.4.4 → microeye-2.4.5}/src/microEye/analysis/viewer/layers_widget.py +0 -0
- {microeye-2.4.4 → microeye-2.4.5}/src/microEye/analysis/viewer/psf.py +0 -0
- {microeye-2.4.4 → microeye-2.4.5}/src/microEye/analysis/viewer/volume.py +0 -0
- {microeye-2.4.4 → microeye-2.4.5}/src/microEye/hardware/__init__.py +0 -0
- {microeye-2.4.4 → microeye-2.4.5}/src/microEye/hardware/cams/__init__.py +0 -0
- {microeye-2.4.4 → microeye-2.4.5}/src/microEye/hardware/cams/basler/__init__.py +0 -0
- {microeye-2.4.4 → microeye-2.4.5}/src/microEye/hardware/cams/basler/basler_cam.py +0 -0
- {microeye-2.4.4 → microeye-2.4.5}/src/microEye/hardware/cams/basler/basler_panel.py +0 -0
- {microeye-2.4.4 → microeye-2.4.5}/src/microEye/hardware/cams/camera_calibration.py +0 -0
- {microeye-2.4.4 → microeye-2.4.5}/src/microEye/hardware/cams/camera_list.py +0 -0
- {microeye-2.4.4 → microeye-2.4.5}/src/microEye/hardware/cams/camera_options.py +0 -0
- {microeye-2.4.4 → microeye-2.4.5}/src/microEye/hardware/cams/camera_panel.py +0 -0
- {microeye-2.4.4 → microeye-2.4.5}/src/microEye/hardware/cams/dummy/__init__.py +0 -0
- {microeye-2.4.4 → microeye-2.4.5}/src/microEye/hardware/cams/dummy/dummy_panel.py +0 -0
- {microeye-2.4.4 → microeye-2.4.5}/src/microEye/hardware/cams/jobs.py +0 -0
- {microeye-2.4.4 → microeye-2.4.5}/src/microEye/hardware/cams/line_profiler.py +0 -0
- {microeye-2.4.4 → microeye-2.4.5}/src/microEye/hardware/cams/linescan/IR_Cam.py +0 -0
- {microeye-2.4.4 → microeye-2.4.5}/src/microEye/hardware/cams/linescan/__init__.py +0 -0
- {microeye-2.4.4 → microeye-2.4.5}/src/microEye/hardware/cams/micam.py +0 -0
- {microeye-2.4.4 → microeye-2.4.5}/src/microEye/hardware/cams/pco/__init__.py +0 -0
- {microeye-2.4.4 → microeye-2.4.5}/src/microEye/hardware/cams/pco/enums.py +0 -0
- {microeye-2.4.4 → microeye-2.4.5}/src/microEye/hardware/cams/pco/pco_cam.py +0 -0
- {microeye-2.4.4 → microeye-2.4.5}/src/microEye/hardware/cams/pco/pco_panel.py +0 -0
- {microeye-2.4.4 → microeye-2.4.5}/src/microEye/hardware/cams/peak/__init__.py +0 -0
- {microeye-2.4.4 → microeye-2.4.5}/src/microEye/hardware/cams/peak/peak_camera.py +0 -0
- {microeye-2.4.4 → microeye-2.4.5}/src/microEye/hardware/cams/peak/peak_panel.py +0 -0
- {microeye-2.4.4 → microeye-2.4.5}/src/microEye/hardware/cams/pycromanager/__init__.py +0 -0
- {microeye-2.4.4 → microeye-2.4.5}/src/microEye/hardware/cams/pycromanager/pycro_cam.py +0 -0
- {microeye-2.4.4 → microeye-2.4.5}/src/microEye/hardware/cams/pycromanager/pycro_panel.py +0 -0
- {microeye-2.4.4 → microeye-2.4.5}/src/microEye/hardware/cams/shortcuts.py +0 -0
- {microeye-2.4.4 → microeye-2.4.5}/src/microEye/hardware/cams/thorlabs/__init__.py +0 -0
- {microeye-2.4.4 → microeye-2.4.5}/src/microEye/hardware/cams/thorlabs/thorlabs.py +0 -0
- {microeye-2.4.4 → microeye-2.4.5}/src/microEye/hardware/cams/thorlabs/thorlabs_panel.py +0 -0
- {microeye-2.4.4 → microeye-2.4.5}/src/microEye/hardware/cams/ueye/__init__.py +0 -0
- {microeye-2.4.4 → microeye-2.4.5}/src/microEye/hardware/cams/ueye/ueye_camera.py +0 -0
- {microeye-2.4.4 → microeye-2.4.5}/src/microEye/hardware/cams/ueye/ueye_panel.py +0 -0
- {microeye-2.4.4 → microeye-2.4.5}/src/microEye/hardware/cams/vimba/__init__.py +0 -0
- {microeye-2.4.4 → microeye-2.4.5}/src/microEye/hardware/cams/vimba/vimba_cam.py +0 -0
- {microeye-2.4.4 → microeye-2.4.5}/src/microEye/hardware/cams/vimba/vimba_panel.py +0 -0
- {microeye-2.4.4 → microeye-2.4.5}/src/microEye/hardware/device.py +0 -0
- {microeye-2.4.4 → microeye-2.4.5}/src/microEye/hardware/lasers/__init__.py +0 -0
- {microeye-2.4.4 → microeye-2.4.5}/src/microEye/hardware/lasers/io_matchbox.py +0 -0
- {microeye-2.4.4 → microeye-2.4.5}/src/microEye/hardware/lasers/io_params.py +0 -0
- {microeye-2.4.4 → microeye-2.4.5}/src/microEye/hardware/lasers/io_single_laser.py +0 -0
- {microeye-2.4.4 → microeye-2.4.5}/src/microEye/hardware/lasers/laser_relay.py +0 -0
- {microeye-2.4.4 → microeye-2.4.5}/src/microEye/hardware/mieye/__init__.py +0 -0
- {microeye-2.4.4 → microeye-2.4.5}/src/microEye/hardware/mieye/acquisition_manager.py +0 -0
- {microeye-2.4.4 → microeye-2.4.5}/src/microEye/hardware/mieye/devices_manager.py +0 -0
- {microeye-2.4.4 → microeye-2.4.5}/src/microEye/hardware/mieye/miEye.py +0 -0
- {microeye-2.4.4 → microeye-2.4.5}/src/microEye/hardware/misc/__init__.py +0 -0
- {microeye-2.4.4 → microeye-2.4.5}/src/microEye/hardware/misc/acquisition_view.py +0 -0
- {microeye-2.4.4 → microeye-2.4.5}/src/microEye/hardware/misc/reglo.py +0 -0
- {microeye-2.4.4 → microeye-2.4.5}/src/microEye/hardware/misc/temp.py +0 -0
- {microeye-2.4.4 → microeye-2.4.5}/src/microEye/hardware/port_config.py +0 -0
- {microeye-2.4.4 → microeye-2.4.5}/src/microEye/hardware/protocols/__init__.py +0 -0
- {microeye-2.4.4 → microeye-2.4.5}/src/microEye/hardware/protocols/actions.py +0 -0
- {microeye-2.4.4 → microeye-2.4.5}/src/microEye/hardware/protocols/actions_items.py +0 -0
- {microeye-2.4.4 → microeye-2.4.5}/src/microEye/hardware/protocols/designer.py +0 -0
- {microeye-2.4.4 → microeye-2.4.5}/src/microEye/hardware/protocols/scene_manager.py +0 -0
- {microeye-2.4.4 → microeye-2.4.5}/src/microEye/hardware/protocols/serialization.py +0 -0
- {microeye-2.4.4 → microeye-2.4.5}/src/microEye/hardware/pycromanager/__init__.py +0 -0
- {microeye-2.4.4 → microeye-2.4.5}/src/microEye/hardware/pycromanager/devices.py +0 -0
- {microeye-2.4.4 → microeye-2.4.5}/src/microEye/hardware/pycromanager/enums.py +0 -0
- {microeye-2.4.4 → microeye-2.4.5}/src/microEye/hardware/pycromanager/headless.py +0 -0
- {microeye-2.4.4 → microeye-2.4.5}/src/microEye/hardware/pycromanager/utils.py +0 -0
- {microeye-2.4.4 → microeye-2.4.5}/src/microEye/hardware/pycromanager/widgets/__init__.py +0 -0
- {microeye-2.4.4 → microeye-2.4.5}/src/microEye/hardware/pycromanager/widgets/bridges.py +0 -0
- {microeye-2.4.4 → microeye-2.4.5}/src/microEye/hardware/pycromanager/widgets/headless_manager.py +0 -0
- {microeye-2.4.4 → microeye-2.4.5}/src/microEye/hardware/pycromanager/widgets/headless_options.py +0 -0
- {microeye-2.4.4 → microeye-2.4.5}/src/microEye/hardware/stages/__init__.py +0 -0
- {microeye-2.4.4 → microeye-2.4.5}/src/microEye/hardware/stages/elliptec/__init__.py +0 -0
- {microeye-2.4.4 → microeye-2.4.5}/src/microEye/hardware/stages/elliptec/baseDevice.py +0 -0
- {microeye-2.4.4 → microeye-2.4.5}/src/microEye/hardware/stages/elliptec/device.py +0 -0
- {microeye-2.4.4 → microeye-2.4.5}/src/microEye/hardware/stages/elliptec/deviceID.py +0 -0
- {microeye-2.4.4 → microeye-2.4.5}/src/microEye/hardware/stages/elliptec/deviceStatus.py +0 -0
- {microeye-2.4.4 → microeye-2.4.5}/src/microEye/hardware/stages/elliptec/devicesView.py +0 -0
- {microeye-2.4.4 → microeye-2.4.5}/src/microEye/hardware/stages/elliptec/ellDevices.py +0 -0
- {microeye-2.4.4 → microeye-2.4.5}/src/microEye/hardware/stages/elliptec/messageUpdater.py +0 -0
- {microeye-2.4.4 → microeye-2.4.5}/src/microEye/hardware/stages/elliptec/motorInfo.py +0 -0
- {microeye-2.4.4 → microeye-2.4.5}/src/microEye/hardware/stages/elliptec/stage.py +0 -0
- {microeye-2.4.4 → microeye-2.4.5}/src/microEye/hardware/stages/elliptec/test.py +0 -0
- {microeye-2.4.4 → microeye-2.4.5}/src/microEye/hardware/stages/kinesis/__init__.py +0 -0
- {microeye-2.4.4 → microeye-2.4.5}/src/microEye/hardware/stages/kinesis/kdc101/__init__.py +0 -0
- {microeye-2.4.4 → microeye-2.4.5}/src/microEye/hardware/stages/kinesis/kdc101/enums.py +0 -0
- {microeye-2.4.4 → microeye-2.4.5}/src/microEye/hardware/stages/kinesis/kdc101/factory.py +0 -0
- {microeye-2.4.4 → microeye-2.4.5}/src/microEye/hardware/stages/kinesis/kdc101/kdc101.py +0 -0
- {microeye-2.4.4 → microeye-2.4.5}/src/microEye/hardware/stages/kinesis/kinesis.py +0 -0
- {microeye-2.4.4 → microeye-2.4.5}/src/microEye/hardware/stages/manager.py +0 -0
- {microeye-2.4.4 → microeye-2.4.5}/src/microEye/hardware/stages/piezon_concept/__init__.py +0 -0
- {microeye-2.4.4 → microeye-2.4.5}/src/microEye/hardware/stages/piezon_concept/foc.py +0 -0
- {microeye-2.4.4 → microeye-2.4.5}/src/microEye/hardware/stages/pycromanager/__init__.py +0 -0
- {microeye-2.4.4 → microeye-2.4.5}/src/microEye/hardware/stages/pycromanager/core.py +0 -0
- {microeye-2.4.4 → microeye-2.4.5}/src/microEye/hardware/stages/smaract/__init__.py +0 -0
- {microeye-2.4.4 → microeye-2.4.5}/src/microEye/hardware/stages/smaract/mcs2.py +0 -0
- {microeye-2.4.4 → microeye-2.4.5}/src/microEye/hardware/stages/stabilization/__init__.py +0 -0
- {microeye-2.4.4 → microeye-2.4.5}/src/microEye/hardware/stages/stabilization/controller.py +0 -0
- {microeye-2.4.4 → microeye-2.4.5}/src/microEye/hardware/stages/stabilization/methods.py +0 -0
- {microeye-2.4.4 → microeye-2.4.5}/src/microEye/hardware/stages/stabilizer.py +0 -0
- {microeye-2.4.4 → microeye-2.4.5}/src/microEye/hardware/stages/stage.py +0 -0
- {microeye-2.4.4 → microeye-2.4.5}/src/microEye/hardware/stages/view.py +0 -0
- {microeye-2.4.4 → microeye-2.4.5}/src/microEye/hardware/widgets/__init__.py +0 -0
- {microeye-2.4.4 → microeye-2.4.5}/src/microEye/hardware/widgets/controller.py +0 -0
- {microeye-2.4.4 → microeye-2.4.5}/src/microEye/hardware/widgets/devices.py +0 -0
- {microeye-2.4.4 → microeye-2.4.5}/src/microEye/hardware/widgets/focusWidget.py +0 -0
- {microeye-2.4.4 → microeye-2.4.5}/src/microEye/hardware/widgets/indicator.py +0 -0
- {microeye-2.4.4 → microeye-2.4.5}/src/microEye/hardware/widgets/qlist_slider.py +0 -0
- {microeye-2.4.4 → microeye-2.4.5}/src/microEye/hardware/widgets/scan_acquisition.py +0 -0
- {microeye-2.4.4 → microeye-2.4.5}/src/microEye/hardware/widgets/slides.py +0 -0
- {microeye-2.4.4 → microeye-2.4.5}/src/microEye/icons/1024.png +0 -0
- {microeye-2.4.4 → microeye-2.4.5}/src/microEye/icons/128.png +0 -0
- {microeye-2.4.4 → microeye-2.4.5}/src/microEye/icons/16.png +0 -0
- {microeye-2.4.4 → microeye-2.4.5}/src/microEye/icons/24.png +0 -0
- {microeye-2.4.4 → microeye-2.4.5}/src/microEye/icons/256.png +0 -0
- {microeye-2.4.4 → microeye-2.4.5}/src/microEye/icons/32.png +0 -0
- {microeye-2.4.4 → microeye-2.4.5}/src/microEye/icons/48.png +0 -0
- {microeye-2.4.4 → microeye-2.4.5}/src/microEye/icons/512.png +0 -0
- {microeye-2.4.4 → microeye-2.4.5}/src/microEye/icons/64.png +0 -0
- {microeye-2.4.4 → microeye-2.4.5}/src/microEye/icons/__init__.py +0 -0
- {microeye-2.4.4 → microeye-2.4.5}/src/microEye/icons/close.svg +0 -0
- {microeye-2.4.4 → microeye-2.4.5}/src/microEye/icons/mieye.png +0 -0
- {microeye-2.4.4 → microeye-2.4.5}/src/microEye/icons/min.svg +0 -0
- {microeye-2.4.4 → microeye-2.4.5}/src/microEye/icons/viewer.png +0 -0
- {microeye-2.4.4 → microeye-2.4.5}/src/microEye/images/__init__.py +0 -0
- {microeye-2.4.4 → microeye-2.4.5}/src/microEye/images/handlers.py +0 -0
- {microeye-2.4.4 → microeye-2.4.5}/src/microEye/images/uImage.py +0 -0
- {microeye-2.4.4 → microeye-2.4.5}/src/microEye/launcher.py +0 -0
- {microeye-2.4.4 → microeye-2.4.5}/src/microEye/qt.py +0 -0
- {microeye-2.4.4 → microeye-2.4.5}/src/microEye/tools/__init__.py +0 -0
- {microeye-2.4.4 → microeye-2.4.5}/src/microEye/tools/color.py +0 -0
- {microeye-2.4.4 → microeye-2.4.5}/src/microEye/tools/microscopy.py +0 -0
- {microeye-2.4.4 → microeye-2.4.5}/src/microEye/utils/__init__.py +0 -0
- {microeye-2.4.4 → microeye-2.4.5}/src/microEye/utils/display.py +0 -0
- {microeye-2.4.4 → microeye-2.4.5}/src/microEye/utils/enum_encoder.py +0 -0
- {microeye-2.4.4 → microeye-2.4.5}/src/microEye/utils/expandable_groupbox.py +0 -0
- {microeye-2.4.4 → microeye-2.4.5}/src/microEye/utils/gui_helper.py +0 -0
- {microeye-2.4.4 → microeye-2.4.5}/src/microEye/utils/hid_utils/__init__.py +0 -0
- {microeye-2.4.4 → microeye-2.4.5}/src/microEye/utils/hid_utils/controller.py +0 -0
- {microeye-2.4.4 → microeye-2.4.5}/src/microEye/utils/hid_utils/device.py +0 -0
- {microeye-2.4.4 → microeye-2.4.5}/src/microEye/utils/hid_utils/enums.py +0 -0
- {microeye-2.4.4 → microeye-2.4.5}/src/microEye/utils/hid_utils/utils.py +0 -0
- {microeye-2.4.4 → microeye-2.4.5}/src/microEye/utils/labelled_slider.py +0 -0
- {microeye-2.4.4 → microeye-2.4.5}/src/microEye/utils/metadata.py +0 -0
- {microeye-2.4.4 → microeye-2.4.5}/src/microEye/utils/metadata_tree.py +0 -0
- {microeye-2.4.4 → microeye-2.4.5}/src/microEye/utils/micro_launcher.py +0 -0
- {microeye-2.4.4 → microeye-2.4.5}/src/microEye/utils/parameter_tree.py +0 -0
- {microeye-2.4.4 → microeye-2.4.5}/src/microEye/utils/pyqt2mplt.py +0 -0
- {microeye-2.4.4 → microeye-2.4.5}/src/microEye/utils/pyscripting.py +0 -0
- {microeye-2.4.4 → microeye-2.4.5}/src/microEye/utils/retry_exec.py +0 -0
- {microeye-2.4.4 → microeye-2.4.5}/src/microEye/utils/start_gui.py +0 -0
- {microeye-2.4.4 → microeye-2.4.5}/src/microEye/utils/thread_worker.py +0 -0
- {microeye-2.4.4 → microeye-2.4.5}/src/microeye.egg-info/dependency_links.txt +0 -0
- {microeye-2.4.4 → microeye-2.4.5}/src/microeye.egg-info/entry_points.txt +0 -0
- {microeye-2.4.4 → microeye-2.4.5}/src/microeye.egg-info/top_level.txt +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: microeye
|
|
3
|
-
Version: 2.4.
|
|
3
|
+
Version: 2.4.5
|
|
4
4
|
Summary: A python toolkit for fluorescence microscopy that features hardware control, data analysis and vizualization for super-resolution single-molecule localization microscopy and single-partical tracking.
|
|
5
5
|
Home-page: https://github.com/samhitech/microEye
|
|
6
6
|
Author: Mohammad Nour Alsamsam
|
|
@@ -43,7 +43,7 @@ Requires-Dist: pyueye==4.96.952
|
|
|
43
43
|
Requires-Dist: QDarkStyle==3.2.3
|
|
44
44
|
Requires-Dist: QScintilla==2.14.1
|
|
45
45
|
Requires-Dist: scikit-image==0.25.2
|
|
46
|
-
Requires-Dist: scikit_learn==1.
|
|
46
|
+
Requires-Dist: scikit_learn==1.9.0
|
|
47
47
|
Requires-Dist: scipy>=1.16.2
|
|
48
48
|
Requires-Dist: setuptools>=80.9.0
|
|
49
49
|
Requires-Dist: tables==3.10.2
|
|
@@ -72,11 +72,11 @@ The **`microEye`** is a Python toolkit for fluorescence microscopy that supports
|
|
|
72
72
|
This toolkit is compatible with the [hardware](#hardware) used in our microscope. For further details, refer to the [miEye microscope paper](https://doi.org/10.1016/j.ohx.2022.e00368) and [OSF project](http://doi.org/10.17605/osf.io/j2fqy).
|
|
73
73
|
|
|
74
74
|
```bash
|
|
75
|
-
__ ____ ____ ___ ____
|
|
76
|
-
/ |/ (_)__________ / __/_ _____ _ __|_ |/ /
|
|
77
|
-
/ /|_/ / / __/ __/ _ \/ _// // / -_) | |/ / __//_ _/
|
|
78
|
-
/_/ /_/_/\__/_/ \___/___/\_, /\__/ |___/____(_)_/(_)
|
|
79
|
-
/___/
|
|
75
|
+
__ ____ ____ ___ ____ ____
|
|
76
|
+
/ |/ (_)__________ / __/_ _____ _ __|_ |/ / / / __/
|
|
77
|
+
/ /|_/ / / __/ __/ _ \/ _// // / -_) | |/ / __//_ _/ /__ \
|
|
78
|
+
/_/ /_/_/\__/_/ \___/___/\_, /\__/ |___/____(_)_/(_)____/
|
|
79
|
+
/___/
|
|
80
80
|
```
|
|
81
81
|
|
|
82
82
|
<!--  -->
|
|
@@ -478,13 +478,14 @@ Schematic overview of the miEye instrument:
|
|
|
478
478
|
|
|
479
479
|
### Supported Cameras
|
|
480
480
|
|
|
481
|
-
| Camera | Description |
|
|
482
|
-
| :-----------------------: | ------------------------------------------------------------------------ |
|
|
483
|
-
| IDS uEye UI-3060CP Rev. 2 | IDS industrial-grade CMOS cameras | `IDS uEye SDK 4.96.1` `pyueye` | [Product Link](https://en.ids-imaging.com/store/products/cameras/ui-3060cp-rev-2.html) |
|
|
484
|
-
| Thorlabs DCC1545M | DCx camera using UC480 driver |
|
|
485
|
-
| Allied Vision Alvium 1800 | Allied Vision industrial-grade CMOS cameras (U-158m, U-511m) |
|
|
486
|
-
|
|
|
487
|
-
|
|
|
481
|
+
| Camera | Description | Driver | Link |
|
|
482
|
+
| :-----------------------: | ------------------------------------------------------------------------ | :---------------------------------------: | :-----------------------------------------------------------------------------------------------------------: |
|
|
483
|
+
| IDS uEye UI-3060CP Rev. 2 | IDS industrial-grade CMOS cameras | `IDS uEye SDK 4.96.1` `IDS Peak` `pyueye` | [Product Link](https://en.ids-imaging.com/store/products/cameras/ui-3060cp-rev-2.html) |
|
|
484
|
+
| Thorlabs DCC1545M | DCx camera using UC480 driver | `ThorCam 3.7.0` | [Product Link](https://www.thorlabs.com/thorProduct.cfm?partNumber=DCC1545M) |
|
|
485
|
+
| Allied Vision Alvium 1800 | Allied Vision industrial-grade CMOS cameras (U-158m, U-511m) | `Vimba X SDK` `vmbpy` | [Product Link](https://www.alliedvision.com/en/products/alvium-configurator/alvium-1800-u/158/#_configurator) |
|
|
486
|
+
| Basler ace 2 R PRO | Basler `pylon` supported cameras | `pylon` `pypylon` | - |
|
|
487
|
+
| Excelitas PCO sCMOS | Excelitas pco.edge 4.2 LT USB sCMOS Camera | `pco.sdk` `pco.python` | [Product Link](https://www.excelitas.com/product/pcoedge-42-lt-usb-scmos-camera) |
|
|
488
|
+
| Pycro-camera | Access to cameras via Micro-Manager drivers/adapters using Pycro-Manager | `uManager` `Pycro-Manager` | - |
|
|
488
489
|
|
|
489
490
|
### Additional Hardware
|
|
490
491
|
|
|
@@ -492,6 +493,7 @@ Schematic overview of the miEye instrument:
|
|
|
492
493
|
| --------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :------: | :----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: |
|
|
493
494
|
| Integrated Optics MatchBox | Multi-wavelength Laser Combiner, Single Laser MatchBox | `Native` | [Products Link](https://integratedoptics.com/products/wavelength-combiners) |
|
|
494
495
|
| Piezo Concept FOC | Nanopositioner for microscope objectives | `Native` | [Piezo Concept FOC](https://piezoconcept-store.squarespace.com/1-axis/p/foc) |
|
|
496
|
+
| SmarAct MCS2 | Support for SmarAct MCS2 multi-channel controllers | `Native` | - |
|
|
495
497
|
| Thorlabs Elliptec ELL6/ELL9/ELL12 | Dual/Four/Six-Position Slider | `Native` | [ELL6](https://www.thorlabs.com/thorproduct.cfm?partnumber=ELL6), [ELL9](https://www.thorlabs.com/thorproduct.cfm?partnumber=ELL9), [ELL12](https://www.thorlabs.com/thorproduct.cfm?partnumber=ELL12) |
|
|
496
498
|
| Thorlabs Elliptec ELL14 | Rotation Mount: SM1 Threaded | `Native` | [ELL14](https://www.thorlabs.com/thorproduct.cfm?partnumber=ELL14) |
|
|
497
499
|
| Thorlabs Elliptec ELL20 | Linear Stage: 60 mm Travel | `Native` | [ELL20](https://www.thorlabs.com/thorproduct.cfm?partnumber=ELL20) |
|
|
@@ -7,11 +7,11 @@ The **`microEye`** is a Python toolkit for fluorescence microscopy that supports
|
|
|
7
7
|
This toolkit is compatible with the [hardware](#hardware) used in our microscope. For further details, refer to the [miEye microscope paper](https://doi.org/10.1016/j.ohx.2022.e00368) and [OSF project](http://doi.org/10.17605/osf.io/j2fqy).
|
|
8
8
|
|
|
9
9
|
```bash
|
|
10
|
-
__ ____ ____ ___ ____
|
|
11
|
-
/ |/ (_)__________ / __/_ _____ _ __|_ |/ /
|
|
12
|
-
/ /|_/ / / __/ __/ _ \/ _// // / -_) | |/ / __//_ _/
|
|
13
|
-
/_/ /_/_/\__/_/ \___/___/\_, /\__/ |___/____(_)_/(_)
|
|
14
|
-
/___/
|
|
10
|
+
__ ____ ____ ___ ____ ____
|
|
11
|
+
/ |/ (_)__________ / __/_ _____ _ __|_ |/ / / / __/
|
|
12
|
+
/ /|_/ / / __/ __/ _ \/ _// // / -_) | |/ / __//_ _/ /__ \
|
|
13
|
+
/_/ /_/_/\__/_/ \___/___/\_, /\__/ |___/____(_)_/(_)____/
|
|
14
|
+
/___/
|
|
15
15
|
```
|
|
16
16
|
|
|
17
17
|
<!--  -->
|
|
@@ -413,13 +413,14 @@ Schematic overview of the miEye instrument:
|
|
|
413
413
|
|
|
414
414
|
### Supported Cameras
|
|
415
415
|
|
|
416
|
-
| Camera | Description |
|
|
417
|
-
| :-----------------------: | ------------------------------------------------------------------------ |
|
|
418
|
-
| IDS uEye UI-3060CP Rev. 2 | IDS industrial-grade CMOS cameras | `IDS uEye SDK 4.96.1` `pyueye` | [Product Link](https://en.ids-imaging.com/store/products/cameras/ui-3060cp-rev-2.html) |
|
|
419
|
-
| Thorlabs DCC1545M | DCx camera using UC480 driver |
|
|
420
|
-
| Allied Vision Alvium 1800 | Allied Vision industrial-grade CMOS cameras (U-158m, U-511m) |
|
|
421
|
-
|
|
|
422
|
-
|
|
|
416
|
+
| Camera | Description | Driver | Link |
|
|
417
|
+
| :-----------------------: | ------------------------------------------------------------------------ | :---------------------------------------: | :-----------------------------------------------------------------------------------------------------------: |
|
|
418
|
+
| IDS uEye UI-3060CP Rev. 2 | IDS industrial-grade CMOS cameras | `IDS uEye SDK 4.96.1` `IDS Peak` `pyueye` | [Product Link](https://en.ids-imaging.com/store/products/cameras/ui-3060cp-rev-2.html) |
|
|
419
|
+
| Thorlabs DCC1545M | DCx camera using UC480 driver | `ThorCam 3.7.0` | [Product Link](https://www.thorlabs.com/thorProduct.cfm?partNumber=DCC1545M) |
|
|
420
|
+
| Allied Vision Alvium 1800 | Allied Vision industrial-grade CMOS cameras (U-158m, U-511m) | `Vimba X SDK` `vmbpy` | [Product Link](https://www.alliedvision.com/en/products/alvium-configurator/alvium-1800-u/158/#_configurator) |
|
|
421
|
+
| Basler ace 2 R PRO | Basler `pylon` supported cameras | `pylon` `pypylon` | - |
|
|
422
|
+
| Excelitas PCO sCMOS | Excelitas pco.edge 4.2 LT USB sCMOS Camera | `pco.sdk` `pco.python` | [Product Link](https://www.excelitas.com/product/pcoedge-42-lt-usb-scmos-camera) |
|
|
423
|
+
| Pycro-camera | Access to cameras via Micro-Manager drivers/adapters using Pycro-Manager | `uManager` `Pycro-Manager` | - |
|
|
423
424
|
|
|
424
425
|
### Additional Hardware
|
|
425
426
|
|
|
@@ -427,6 +428,7 @@ Schematic overview of the miEye instrument:
|
|
|
427
428
|
| --------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :------: | :----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: |
|
|
428
429
|
| Integrated Optics MatchBox | Multi-wavelength Laser Combiner, Single Laser MatchBox | `Native` | [Products Link](https://integratedoptics.com/products/wavelength-combiners) |
|
|
429
430
|
| Piezo Concept FOC | Nanopositioner for microscope objectives | `Native` | [Piezo Concept FOC](https://piezoconcept-store.squarespace.com/1-axis/p/foc) |
|
|
431
|
+
| SmarAct MCS2 | Support for SmarAct MCS2 multi-channel controllers | `Native` | - |
|
|
430
432
|
| Thorlabs Elliptec ELL6/ELL9/ELL12 | Dual/Four/Six-Position Slider | `Native` | [ELL6](https://www.thorlabs.com/thorproduct.cfm?partnumber=ELL6), [ELL9](https://www.thorlabs.com/thorproduct.cfm?partnumber=ELL9), [ELL12](https://www.thorlabs.com/thorproduct.cfm?partnumber=ELL12) |
|
|
431
433
|
| Thorlabs Elliptec ELL14 | Rotation Mount: SM1 Threaded | `Native` | [ELL14](https://www.thorlabs.com/thorproduct.cfm?partnumber=ELL14) |
|
|
432
434
|
| Thorlabs Elliptec ELL20 | Linear Stage: 60 mm Travel | `Native` | [ELL20](https://www.thorlabs.com/thorproduct.cfm?partnumber=ELL20) |
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
version_info = (2, 4,
|
|
1
|
+
version_info = (2, 4, 5)
|
|
2
2
|
__version__ = '.'.join(map(str, version_info))
|
|
@@ -4,7 +4,9 @@ from enum import Enum
|
|
|
4
4
|
|
|
5
5
|
import numba as nb
|
|
6
6
|
import numpy as np
|
|
7
|
-
from
|
|
7
|
+
from hdbscan import HDBSCAN
|
|
8
|
+
from scipy.spatial import ConvexHull, Delaunay, Voronoi
|
|
9
|
+
from sklearn.cluster import DBSCAN, OPTICS, cluster_optics_dbscan
|
|
8
10
|
from sklearn.preprocessing import StandardScaler
|
|
9
11
|
|
|
10
12
|
logger = logging.getLogger(__name__)
|
|
@@ -417,11 +419,19 @@ def get_centers(
|
|
|
417
419
|
return None
|
|
418
420
|
|
|
419
421
|
|
|
422
|
+
def scale_data(x, y, z, sigma_xy=10.0, sigma_z=10.0):
|
|
423
|
+
if z is None:
|
|
424
|
+
return np.column_stack((x, y)), 1.0
|
|
425
|
+
else:
|
|
426
|
+
scale = sigma_xy / sigma_z
|
|
427
|
+
return np.column_stack((x, y, z * scale)), scale
|
|
428
|
+
|
|
429
|
+
|
|
420
430
|
def perform_dbscan_clustering(X, Y, Z, eps=50, min_samples=2, **kwargs):
|
|
421
431
|
'''
|
|
422
432
|
Performs DBSCAN clustering on 3D localization data.
|
|
423
433
|
|
|
424
|
-
Parameters
|
|
434
|
+
Parameters
|
|
425
435
|
------------
|
|
426
436
|
X, Y, Z: array-like
|
|
427
437
|
Arrays of x, y, z coordinates of localizations.
|
|
@@ -433,7 +443,10 @@ def perform_dbscan_clustering(X, Y, Z, eps=50, min_samples=2, **kwargs):
|
|
|
433
443
|
a core point. Default is 2.
|
|
434
444
|
**kwargs: additional keyword arguments for DBSCAN.
|
|
435
445
|
'''
|
|
436
|
-
|
|
446
|
+
sigma_xy = kwargs.pop('sigma_xy', 10.0)
|
|
447
|
+
sigma_z = kwargs.pop('sigma_z', 10.0)
|
|
448
|
+
|
|
449
|
+
VECTORS, scale = scale_data(X, Y, Z, sigma_xy, sigma_z)
|
|
437
450
|
|
|
438
451
|
if kwargs.pop('scale_data', False):
|
|
439
452
|
std = np.std(VECTORS)
|
|
@@ -443,13 +456,9 @@ def perform_dbscan_clustering(X, Y, Z, eps=50, min_samples=2, **kwargs):
|
|
|
443
456
|
else:
|
|
444
457
|
logger.warning('Standard deviation of data is zero. Skipping scaling.')
|
|
445
458
|
|
|
446
|
-
# 2. Initialize and fit DBSCAN
|
|
447
|
-
# eps: maximum distance between two samples
|
|
448
|
-
# min_samples: number of samples in a neighborhood for a point to be a core point
|
|
449
459
|
dbscan_model = DBSCAN(eps=eps, min_samples=min_samples, **kwargs)
|
|
450
460
|
dbscan_model.fit(VECTORS)
|
|
451
461
|
|
|
452
|
-
# 3. Retrieve labels (-1 indicates noise/outliers)
|
|
453
462
|
labels = dbscan_model.labels_
|
|
454
463
|
unique = np.unique(labels).shape[0] - 1
|
|
455
464
|
logger.info(
|
|
@@ -457,3 +466,164 @@ def perform_dbscan_clustering(X, Y, Z, eps=50, min_samples=2, **kwargs):
|
|
|
457
466
|
) # Log only non-noise labels
|
|
458
467
|
|
|
459
468
|
return labels
|
|
469
|
+
|
|
470
|
+
|
|
471
|
+
def perform_hdbscan_clustering(X, Y, Z, **kwargs):
|
|
472
|
+
'''
|
|
473
|
+
Performs HDBSCAN clustering on 3D localization data.
|
|
474
|
+
|
|
475
|
+
Parameters
|
|
476
|
+
------------
|
|
477
|
+
X, Y, Z: array-like
|
|
478
|
+
Arrays of x, y, z coordinates of localizations.
|
|
479
|
+
min_cluster_size: int, optional
|
|
480
|
+
The minimum size of clusters; single linkage splits that contain fewer
|
|
481
|
+
than this many samples are considered noise. Default is 5.
|
|
482
|
+
**kwargs: additional keyword arguments for HDBSCAN.
|
|
483
|
+
'''
|
|
484
|
+
sigma_xy = kwargs.pop('sigma_xy', 10.0)
|
|
485
|
+
sigma_z = kwargs.pop('sigma_z', 10.0)
|
|
486
|
+
|
|
487
|
+
VECTORS, scale = scale_data(X, Y, Z, sigma_xy, sigma_z)
|
|
488
|
+
|
|
489
|
+
if kwargs.pop('scale_data', False):
|
|
490
|
+
std = np.std(VECTORS)
|
|
491
|
+
if std > 0:
|
|
492
|
+
VECTORS /= std
|
|
493
|
+
|
|
494
|
+
kwargs['cluster_selection_epsilon'] = float(
|
|
495
|
+
kwargs.get('cluster_selection_epsilon', 0.0) / std
|
|
496
|
+
)
|
|
497
|
+
kwargs['cluster_selection_epsilon_max'] = float(
|
|
498
|
+
kwargs.get('cluster_selection_epsilon_max', 0.0) / std
|
|
499
|
+
)
|
|
500
|
+
else:
|
|
501
|
+
logger.warning('Standard deviation of data is zero. Skipping scaling.')
|
|
502
|
+
|
|
503
|
+
hdbscan_model = HDBSCAN(**kwargs)
|
|
504
|
+
hdbscan_model.fit(VECTORS)
|
|
505
|
+
|
|
506
|
+
labels = hdbscan_model.labels_
|
|
507
|
+
unique = np.unique(labels).shape[0] - 1
|
|
508
|
+
logger.info(
|
|
509
|
+
'Cluster labels: %d (%d Points)', unique, labels[labels != -1].shape[0]
|
|
510
|
+
) # Log only non-noise labels
|
|
511
|
+
|
|
512
|
+
return labels
|
|
513
|
+
|
|
514
|
+
|
|
515
|
+
def perform_optics_clustering(X, Y, Z, min_samples=10, xi=0.05, **kwargs):
|
|
516
|
+
'''
|
|
517
|
+
Performs OPTICS clustering on 3D localization data.
|
|
518
|
+
|
|
519
|
+
Parameters
|
|
520
|
+
-----------
|
|
521
|
+
X, Y, Z: array-like
|
|
522
|
+
Arrays of x, y, z coordinates of localizations.
|
|
523
|
+
min_samples: int, optional
|
|
524
|
+
The number of samples in a neighborhood for a point to be considered
|
|
525
|
+
a core point. Default is 10.
|
|
526
|
+
xi: float, optional
|
|
527
|
+
Steepness threshold (ξ) — smaller xi = more, finer-grained clusters.
|
|
528
|
+
Default is 0.05.
|
|
529
|
+
kwargs:
|
|
530
|
+
additional keyword arguments for OPTICS.
|
|
531
|
+
|
|
532
|
+
- scale_data: bool, optional
|
|
533
|
+
If True, scales the data to unit variance before clustering.
|
|
534
|
+
- sigma_xy: float, optional
|
|
535
|
+
Standard deviation for x and y coordinates (in nm). Default is 10.0.
|
|
536
|
+
- sigma_z: float, optional
|
|
537
|
+
Standard deviation for z coordinate (in nm). Default is 10.0.
|
|
538
|
+
- OPTICS parameters: any other parameters accepted by sklearn.cluster.OPTICS.
|
|
539
|
+
|
|
540
|
+
Returns
|
|
541
|
+
--------
|
|
542
|
+
labels: array of int
|
|
543
|
+
Per-point labels; -1 is noise, same convention as DBSCAN.
|
|
544
|
+
'''
|
|
545
|
+
sigma_xy = kwargs.pop('sigma_xy', 10.0)
|
|
546
|
+
sigma_z = kwargs.pop('sigma_z', 10.0)
|
|
547
|
+
|
|
548
|
+
VECTORS, scale = scale_data(X, Y, Z, sigma_xy, sigma_z)
|
|
549
|
+
|
|
550
|
+
if kwargs.pop('scale_data', False):
|
|
551
|
+
std = np.std(VECTORS)
|
|
552
|
+
if std > 0:
|
|
553
|
+
VECTORS /= std
|
|
554
|
+
|
|
555
|
+
kwargs['max_eps'] = kwargs.get('max_eps', np.inf) / std
|
|
556
|
+
kwargs['eps'] = (
|
|
557
|
+
kwargs.get('eps') / std if kwargs.get('eps') is not None else None
|
|
558
|
+
)
|
|
559
|
+
else:
|
|
560
|
+
logger.warning('Standard deviation of data is zero. Skipping scaling.')
|
|
561
|
+
|
|
562
|
+
optics = OPTICS(min_samples=min_samples, xi=xi, **kwargs)
|
|
563
|
+
optics.fit(VECTORS)
|
|
564
|
+
|
|
565
|
+
labels = optics.labels_
|
|
566
|
+
unique = np.unique(labels).shape[0] - 1
|
|
567
|
+
logger.info(
|
|
568
|
+
'Cluster labels: %d (%d Points)', unique, labels[labels != -1].shape[0]
|
|
569
|
+
) # Log only non-noise labels
|
|
570
|
+
|
|
571
|
+
return labels
|
|
572
|
+
|
|
573
|
+
|
|
574
|
+
def optics_then_dbscan_sweep(
|
|
575
|
+
X, Y, Z, min_samples=10, eps_values=(5, 10, 15, 20, 30, 50), **kwargs
|
|
576
|
+
):
|
|
577
|
+
'''
|
|
578
|
+
Performs OPTICS clustering on 3D localization data, then sweeps through a range of
|
|
579
|
+
eps values for DBSCAN clustering on the reachability plot.
|
|
580
|
+
|
|
581
|
+
Parameters
|
|
582
|
+
-----------
|
|
583
|
+
X, Y, Z: array-like
|
|
584
|
+
Arrays of x, y, z coordinates of localizations.
|
|
585
|
+
min_samples: int, optional
|
|
586
|
+
The number of samples in a neighborhood for a point to be considered
|
|
587
|
+
a core point. Default is 10.
|
|
588
|
+
eps_values: iterable of float, optional
|
|
589
|
+
A list of eps values to sweep through for DBSCAN clustering.
|
|
590
|
+
Default is (5, 10, 15, 20, 30, 50).
|
|
591
|
+
|
|
592
|
+
Returns
|
|
593
|
+
--------
|
|
594
|
+
results: dict
|
|
595
|
+
A dictionary where keys are eps values and values are the corresponding
|
|
596
|
+
cluster labels from DBSCAN.
|
|
597
|
+
'''
|
|
598
|
+
sigma_xy = kwargs.pop('sigma_xy', 10.0)
|
|
599
|
+
sigma_z = kwargs.pop('sigma_z', 10.0)
|
|
600
|
+
|
|
601
|
+
VECTORS, scale = scale_data(X, Y, Z, sigma_xy, sigma_z)
|
|
602
|
+
|
|
603
|
+
std = 0.0
|
|
604
|
+
|
|
605
|
+
if kwargs.pop('scale_data', False):
|
|
606
|
+
std = np.std(VECTORS)
|
|
607
|
+
if std > 0:
|
|
608
|
+
VECTORS /= std
|
|
609
|
+
else:
|
|
610
|
+
logger.warning('Standard deviation of data is zero. Skipping scaling.')
|
|
611
|
+
|
|
612
|
+
optics = OPTICS(
|
|
613
|
+
min_samples=min_samples,
|
|
614
|
+
cluster_method=kwargs.pop('cluster_method', 'dbscan'),
|
|
615
|
+
**kwargs,
|
|
616
|
+
)
|
|
617
|
+
optics.fit(VECTORS)
|
|
618
|
+
|
|
619
|
+
results = {}
|
|
620
|
+
for eps in eps_values:
|
|
621
|
+
labels = cluster_optics_dbscan(
|
|
622
|
+
reachability=optics.reachability_,
|
|
623
|
+
core_distances=optics.core_distances_,
|
|
624
|
+
ordering=optics.ordering_,
|
|
625
|
+
eps=eps / std if std > 0 else eps, # Scale eps if data was scaled
|
|
626
|
+
)
|
|
627
|
+
results[eps] = labels
|
|
628
|
+
|
|
629
|
+
return results
|