microeye 2.4.1__tar.gz → 2.4.2__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (244) hide show
  1. {microeye-2.4.1/src/microeye.egg-info → microeye-2.4.2}/PKG-INFO +5 -5
  2. {microeye-2.4.1 → microeye-2.4.2}/README.md +4 -4
  3. {microeye-2.4.1 → microeye-2.4.2}/src/microEye/_version.py +1 -1
  4. {microeye-2.4.1 → microeye-2.4.2}/src/microEye/hardware/cams/micam.py +32 -16
  5. {microeye-2.4.1 → microeye-2.4.2}/src/microEye/hardware/mieye/acquisition_manager.py +7 -5
  6. {microeye-2.4.1 → microeye-2.4.2}/src/microEye/hardware/stages/kinesis/kinesis.py +20 -12
  7. {microeye-2.4.1 → microeye-2.4.2}/src/microEye/hardware/stages/manager.py +6 -2
  8. {microeye-2.4.1 → microeye-2.4.2}/src/microEye/hardware/stages/pycromanager/core.py +35 -16
  9. {microeye-2.4.1 → microeye-2.4.2}/src/microEye/hardware/stages/smaract/mcs2.py +9 -6
  10. {microeye-2.4.1 → microeye-2.4.2}/src/microEye/hardware/stages/stabilization/methods.py +24 -10
  11. {microeye-2.4.1 → microeye-2.4.2}/src/microEye/hardware/stages/stabilizer.py +94 -35
  12. {microeye-2.4.1 → microeye-2.4.2}/src/microEye/hardware/stages/stage.py +31 -22
  13. {microeye-2.4.1 → microeye-2.4.2}/src/microEye/hardware/stages/view.py +25 -0
  14. {microeye-2.4.1 → microeye-2.4.2}/src/microEye/hardware/widgets/focusWidget.py +41 -1
  15. {microeye-2.4.1 → microeye-2.4.2}/src/microEye/utils/display.py +6 -1
  16. {microeye-2.4.1 → microeye-2.4.2/src/microeye.egg-info}/PKG-INFO +5 -5
  17. {microeye-2.4.1 → microeye-2.4.2}/LICENSE +0 -0
  18. {microeye-2.4.1 → microeye-2.4.2}/MANIFEST.in +0 -0
  19. {microeye-2.4.1 → microeye-2.4.2}/pyproject.toml +0 -0
  20. {microeye-2.4.1 → microeye-2.4.2}/setup.cfg +0 -0
  21. {microeye-2.4.1 → microeye-2.4.2}/setup.py +0 -0
  22. {microeye-2.4.1 → microeye-2.4.2}/src/microEye/__init__.py +0 -0
  23. {microeye-2.4.1 → microeye-2.4.2}/src/microEye/analysis/__init__.py +0 -0
  24. {microeye-2.4.1 → microeye-2.4.2}/src/microEye/analysis/checklist_dialog.py +0 -0
  25. {microeye-2.4.1 → microeye-2.4.2}/src/microEye/analysis/cmosMaps.py +0 -0
  26. {microeye-2.4.1 → microeye-2.4.2}/src/microEye/analysis/filters/__init__.py +0 -0
  27. {microeye-2.4.1 → microeye-2.4.2}/src/microEye/analysis/filters/base.py +0 -0
  28. {microeye-2.4.1 → microeye-2.4.2}/src/microEye/analysis/filters/spatial.py +0 -0
  29. {microeye-2.4.1 → microeye-2.4.2}/src/microEye/analysis/filters/temporal.py +0 -0
  30. {microeye-2.4.1 → microeye-2.4.2}/src/microEye/analysis/fitting/__init__.py +0 -0
  31. {microeye-2.4.1 → microeye-2.4.2}/src/microEye/analysis/fitting/fit.py +0 -0
  32. {microeye-2.4.1 → microeye-2.4.2}/src/microEye/analysis/fitting/nena.py +0 -0
  33. {microeye-2.4.1 → microeye-2.4.2}/src/microEye/analysis/fitting/phasor_fit.py +0 -0
  34. {microeye-2.4.1 → microeye-2.4.2}/src/microEye/analysis/fitting/processing.py +0 -0
  35. {microeye-2.4.1 → microeye-2.4.2}/src/microEye/analysis/fitting/psf/__init__.py +0 -0
  36. {microeye-2.4.1 → microeye-2.4.2}/src/microEye/analysis/fitting/psf/extract.py +0 -0
  37. {microeye-2.4.1 → microeye-2.4.2}/src/microEye/analysis/fitting/psf/rubost_mean.py +0 -0
  38. {microeye-2.4.1 → microeye-2.4.2}/src/microEye/analysis/fitting/psf/spline.py +0 -0
  39. {microeye-2.4.1 → microeye-2.4.2}/src/microEye/analysis/fitting/psf/stats/__init__.py +0 -0
  40. {microeye-2.4.1 → microeye-2.4.2}/src/microEye/analysis/fitting/psf/stats/core.py +0 -0
  41. {microeye-2.4.1 → microeye-2.4.2}/src/microEye/analysis/fitting/psf/stats/curve_fit.py +0 -0
  42. {microeye-2.4.1 → microeye-2.4.2}/src/microEye/analysis/fitting/psf/stats/io.py +0 -0
  43. {microeye-2.4.1 → microeye-2.4.2}/src/microEye/analysis/fitting/psf/stats/slope_fit.py +0 -0
  44. {microeye-2.4.1 → microeye-2.4.2}/src/microEye/analysis/fitting/psf/temp.py +0 -0
  45. {microeye-2.4.1 → microeye-2.4.2}/src/microEye/analysis/fitting/psf/test.py +0 -0
  46. {microeye-2.4.1 → microeye-2.4.2}/src/microEye/analysis/fitting/pyfit3Dcspline/CPU/CPUfunctions.py +0 -0
  47. {microeye-2.4.1 → microeye-2.4.2}/src/microEye/analysis/fitting/pyfit3Dcspline/CPU/CPUmleFit_LM.py +0 -0
  48. {microeye-2.4.1 → microeye-2.4.2}/src/microEye/analysis/fitting/pyfit3Dcspline/CPU/CPUsplineLib.py +0 -0
  49. {microeye-2.4.1 → microeye-2.4.2}/src/microEye/analysis/fitting/pyfit3Dcspline/CPU/__init__.py +0 -0
  50. {microeye-2.4.1 → microeye-2.4.2}/src/microEye/analysis/fitting/pyfit3Dcspline/GPU/GPUfunctions.py +0 -0
  51. {microeye-2.4.1 → microeye-2.4.2}/src/microEye/analysis/fitting/pyfit3Dcspline/GPU/GPUmleFit_LM_EMCCD.py +0 -0
  52. {microeye-2.4.1 → microeye-2.4.2}/src/microEye/analysis/fitting/pyfit3Dcspline/GPU/GPUmleFit_LM_sCMOS.py +0 -0
  53. {microeye-2.4.1 → microeye-2.4.2}/src/microEye/analysis/fitting/pyfit3Dcspline/GPU/GPUsplineLib.py +0 -0
  54. {microeye-2.4.1 → microeye-2.4.2}/src/microEye/analysis/fitting/pyfit3Dcspline/GPU/__init__.py +0 -0
  55. {microeye-2.4.1 → microeye-2.4.2}/src/microEye/analysis/fitting/pyfit3Dcspline/__init__.py +0 -0
  56. {microeye-2.4.1 → microeye-2.4.2}/src/microEye/analysis/fitting/pyfit3Dcspline/constants.py +0 -0
  57. {microeye-2.4.1 → microeye-2.4.2}/src/microEye/analysis/fitting/pyfit3Dcspline/mainfunctions.py +0 -0
  58. {microeye-2.4.1 → microeye-2.4.2}/src/microEye/analysis/fitting/rcc.py +0 -0
  59. {microeye-2.4.1 → microeye-2.4.2}/src/microEye/analysis/fitting/results.py +0 -0
  60. {microeye-2.4.1 → microeye-2.4.2}/src/microEye/analysis/fitting/results_stats.py +0 -0
  61. {microeye-2.4.1 → microeye-2.4.2}/src/microEye/analysis/fitting/tardis.py +0 -0
  62. {microeye-2.4.1 → microeye-2.4.2}/src/microEye/analysis/multi_viewer.py +0 -0
  63. {microeye-2.4.1 → microeye-2.4.2}/src/microEye/analysis/processing/__init__.py +0 -0
  64. {microeye-2.4.1 → microeye-2.4.2}/src/microEye/analysis/processing/frc.py +0 -0
  65. {microeye-2.4.1 → microeye-2.4.2}/src/microEye/analysis/rendering/__init__.py +0 -0
  66. {microeye-2.4.1 → microeye-2.4.2}/src/microEye/analysis/rendering/base.py +0 -0
  67. {microeye-2.4.1 → microeye-2.4.2}/src/microEye/analysis/rendering/cloud.py +0 -0
  68. {microeye-2.4.1 → microeye-2.4.2}/src/microEye/analysis/rendering/core.py +0 -0
  69. {microeye-2.4.1 → microeye-2.4.2}/src/microEye/analysis/rendering/volumetric.py +0 -0
  70. {microeye-2.4.1 → microeye-2.4.2}/src/microEye/analysis/tools/__init__.py +0 -0
  71. {microeye-2.4.1 → microeye-2.4.2}/src/microEye/analysis/tools/common.py +0 -0
  72. {microeye-2.4.1 → microeye-2.4.2}/src/microEye/analysis/tools/dark_cal/__init__.py +0 -0
  73. {microeye-2.4.1 → microeye-2.4.2}/src/microEye/analysis/tools/dark_cal/analysis.py +0 -0
  74. {microeye-2.4.1 → microeye-2.4.2}/src/microEye/analysis/tools/dark_cal/compare.py +0 -0
  75. {microeye-2.4.1 → microeye-2.4.2}/src/microEye/analysis/tools/dark_cal/constants.py +0 -0
  76. {microeye-2.4.1 → microeye-2.4.2}/src/microEye/analysis/tools/dark_cal/core.py +0 -0
  77. {microeye-2.4.1 → microeye-2.4.2}/src/microEye/analysis/tools/dark_cal/io.py +0 -0
  78. {microeye-2.4.1 → microeye-2.4.2}/src/microEye/analysis/tools/dark_cal/plotting.py +0 -0
  79. {microeye-2.4.1 → microeye-2.4.2}/src/microEye/analysis/tools/kymograms.py +0 -0
  80. {microeye-2.4.1 → microeye-2.4.2}/src/microEye/analysis/tools/photon_cal/__init__.py +0 -0
  81. {microeye-2.4.1 → microeye-2.4.2}/src/microEye/analysis/tools/photon_cal/analysis.py +0 -0
  82. {microeye-2.4.1 → microeye-2.4.2}/src/microEye/analysis/tools/photon_cal/compare.py +0 -0
  83. {microeye-2.4.1 → microeye-2.4.2}/src/microEye/analysis/tools/photon_cal/constants.py +0 -0
  84. {microeye-2.4.1 → microeye-2.4.2}/src/microEye/analysis/tools/photon_cal/core.py +0 -0
  85. {microeye-2.4.1 → microeye-2.4.2}/src/microEye/analysis/tools/photon_cal/io.py +0 -0
  86. {microeye-2.4.1 → microeye-2.4.2}/src/microEye/analysis/tools/photon_cal/models.py +0 -0
  87. {microeye-2.4.1 → microeye-2.4.2}/src/microEye/analysis/tools/photon_cal/plotting.py +0 -0
  88. {microeye-2.4.1 → microeye-2.4.2}/src/microEye/analysis/tools/photon_cal/table.py +0 -0
  89. {microeye-2.4.1 → microeye-2.4.2}/src/microEye/analysis/tools/registration.py +0 -0
  90. {microeye-2.4.1 → microeye-2.4.2}/src/microEye/analysis/tools/roi_selectors.py +0 -0
  91. {microeye-2.4.1 → microeye-2.4.2}/src/microEye/analysis/tools/sphere_cal.py +0 -0
  92. {microeye-2.4.1 → microeye-2.4.2}/src/microEye/analysis/utils/__init__.py +0 -0
  93. {microeye-2.4.1 → microeye-2.4.2}/src/microEye/analysis/utils/coordinates.py +0 -0
  94. {microeye-2.4.1 → microeye-2.4.2}/src/microEye/analysis/utils/images.py +0 -0
  95. {microeye-2.4.1 → microeye-2.4.2}/src/microEye/analysis/utils/windows.py +0 -0
  96. {microeye-2.4.1 → microeye-2.4.2}/src/microEye/analysis/viewer/__init__.py +0 -0
  97. {microeye-2.4.1 → microeye-2.4.2}/src/microEye/analysis/viewer/image_options_widget.py +0 -0
  98. {microeye-2.4.1 → microeye-2.4.2}/src/microEye/analysis/viewer/images.py +0 -0
  99. {microeye-2.4.1 → microeye-2.4.2}/src/microEye/analysis/viewer/layers_widget.py +0 -0
  100. {microeye-2.4.1 → microeye-2.4.2}/src/microEye/analysis/viewer/localizations.py +0 -0
  101. {microeye-2.4.1 → microeye-2.4.2}/src/microEye/analysis/viewer/psf.py +0 -0
  102. {microeye-2.4.1 → microeye-2.4.2}/src/microEye/analysis/viewer/volume.py +0 -0
  103. {microeye-2.4.1 → microeye-2.4.2}/src/microEye/hardware/__init__.py +0 -0
  104. {microeye-2.4.1 → microeye-2.4.2}/src/microEye/hardware/cams/__init__.py +0 -0
  105. {microeye-2.4.1 → microeye-2.4.2}/src/microEye/hardware/cams/basler/__init__.py +0 -0
  106. {microeye-2.4.1 → microeye-2.4.2}/src/microEye/hardware/cams/basler/basler_cam.py +0 -0
  107. {microeye-2.4.1 → microeye-2.4.2}/src/microEye/hardware/cams/basler/basler_panel.py +0 -0
  108. {microeye-2.4.1 → microeye-2.4.2}/src/microEye/hardware/cams/camera_calibration.py +0 -0
  109. {microeye-2.4.1 → microeye-2.4.2}/src/microEye/hardware/cams/camera_list.py +0 -0
  110. {microeye-2.4.1 → microeye-2.4.2}/src/microEye/hardware/cams/camera_options.py +0 -0
  111. {microeye-2.4.1 → microeye-2.4.2}/src/microEye/hardware/cams/camera_panel.py +0 -0
  112. {microeye-2.4.1 → microeye-2.4.2}/src/microEye/hardware/cams/dummy/__init__.py +0 -0
  113. {microeye-2.4.1 → microeye-2.4.2}/src/microEye/hardware/cams/dummy/dummy_panel.py +0 -0
  114. {microeye-2.4.1 → microeye-2.4.2}/src/microEye/hardware/cams/jobs.py +0 -0
  115. {microeye-2.4.1 → microeye-2.4.2}/src/microEye/hardware/cams/line_profiler.py +0 -0
  116. {microeye-2.4.1 → microeye-2.4.2}/src/microEye/hardware/cams/linescan/IR_Cam.py +0 -0
  117. {microeye-2.4.1 → microeye-2.4.2}/src/microEye/hardware/cams/linescan/__init__.py +0 -0
  118. {microeye-2.4.1 → microeye-2.4.2}/src/microEye/hardware/cams/pco/__init__.py +0 -0
  119. {microeye-2.4.1 → microeye-2.4.2}/src/microEye/hardware/cams/pco/enums.py +0 -0
  120. {microeye-2.4.1 → microeye-2.4.2}/src/microEye/hardware/cams/pco/pco_cam.py +0 -0
  121. {microeye-2.4.1 → microeye-2.4.2}/src/microEye/hardware/cams/pco/pco_panel.py +0 -0
  122. {microeye-2.4.1 → microeye-2.4.2}/src/microEye/hardware/cams/peak/__init__.py +0 -0
  123. {microeye-2.4.1 → microeye-2.4.2}/src/microEye/hardware/cams/peak/peak_camera.py +0 -0
  124. {microeye-2.4.1 → microeye-2.4.2}/src/microEye/hardware/cams/peak/peak_panel.py +0 -0
  125. {microeye-2.4.1 → microeye-2.4.2}/src/microEye/hardware/cams/pycromanager/__init__.py +0 -0
  126. {microeye-2.4.1 → microeye-2.4.2}/src/microEye/hardware/cams/pycromanager/pycro_cam.py +0 -0
  127. {microeye-2.4.1 → microeye-2.4.2}/src/microEye/hardware/cams/pycromanager/pycro_panel.py +0 -0
  128. {microeye-2.4.1 → microeye-2.4.2}/src/microEye/hardware/cams/shortcuts.py +0 -0
  129. {microeye-2.4.1 → microeye-2.4.2}/src/microEye/hardware/cams/thorlabs/__init__.py +0 -0
  130. {microeye-2.4.1 → microeye-2.4.2}/src/microEye/hardware/cams/thorlabs/thorlabs.py +0 -0
  131. {microeye-2.4.1 → microeye-2.4.2}/src/microEye/hardware/cams/thorlabs/thorlabs_panel.py +0 -0
  132. {microeye-2.4.1 → microeye-2.4.2}/src/microEye/hardware/cams/ueye/__init__.py +0 -0
  133. {microeye-2.4.1 → microeye-2.4.2}/src/microEye/hardware/cams/ueye/ueye_camera.py +0 -0
  134. {microeye-2.4.1 → microeye-2.4.2}/src/microEye/hardware/cams/ueye/ueye_panel.py +0 -0
  135. {microeye-2.4.1 → microeye-2.4.2}/src/microEye/hardware/cams/vimba/__init__.py +0 -0
  136. {microeye-2.4.1 → microeye-2.4.2}/src/microEye/hardware/cams/vimba/vimba_cam.py +0 -0
  137. {microeye-2.4.1 → microeye-2.4.2}/src/microEye/hardware/cams/vimba/vimba_panel.py +0 -0
  138. {microeye-2.4.1 → microeye-2.4.2}/src/microEye/hardware/device.py +0 -0
  139. {microeye-2.4.1 → microeye-2.4.2}/src/microEye/hardware/lasers/__init__.py +0 -0
  140. {microeye-2.4.1 → microeye-2.4.2}/src/microEye/hardware/lasers/io_matchbox.py +0 -0
  141. {microeye-2.4.1 → microeye-2.4.2}/src/microEye/hardware/lasers/io_params.py +0 -0
  142. {microeye-2.4.1 → microeye-2.4.2}/src/microEye/hardware/lasers/io_single_laser.py +0 -0
  143. {microeye-2.4.1 → microeye-2.4.2}/src/microEye/hardware/lasers/laser_relay.py +0 -0
  144. {microeye-2.4.1 → microeye-2.4.2}/src/microEye/hardware/mieye/__init__.py +0 -0
  145. {microeye-2.4.1 → microeye-2.4.2}/src/microEye/hardware/mieye/devices_manager.py +0 -0
  146. {microeye-2.4.1 → microeye-2.4.2}/src/microEye/hardware/mieye/miEye.py +0 -0
  147. {microeye-2.4.1 → microeye-2.4.2}/src/microEye/hardware/misc/__init__.py +0 -0
  148. {microeye-2.4.1 → microeye-2.4.2}/src/microEye/hardware/misc/acquisition_view.py +0 -0
  149. {microeye-2.4.1 → microeye-2.4.2}/src/microEye/hardware/misc/reglo.py +0 -0
  150. {microeye-2.4.1 → microeye-2.4.2}/src/microEye/hardware/misc/temp.py +0 -0
  151. {microeye-2.4.1 → microeye-2.4.2}/src/microEye/hardware/port_config.py +0 -0
  152. {microeye-2.4.1 → microeye-2.4.2}/src/microEye/hardware/protocols/__init__.py +0 -0
  153. {microeye-2.4.1 → microeye-2.4.2}/src/microEye/hardware/protocols/actions.py +0 -0
  154. {microeye-2.4.1 → microeye-2.4.2}/src/microEye/hardware/protocols/actions_items.py +0 -0
  155. {microeye-2.4.1 → microeye-2.4.2}/src/microEye/hardware/protocols/designer.py +0 -0
  156. {microeye-2.4.1 → microeye-2.4.2}/src/microEye/hardware/protocols/scene_manager.py +0 -0
  157. {microeye-2.4.1 → microeye-2.4.2}/src/microEye/hardware/protocols/serialization.py +0 -0
  158. {microeye-2.4.1 → microeye-2.4.2}/src/microEye/hardware/pycromanager/__init__.py +0 -0
  159. {microeye-2.4.1 → microeye-2.4.2}/src/microEye/hardware/pycromanager/core.py +0 -0
  160. {microeye-2.4.1 → microeye-2.4.2}/src/microEye/hardware/pycromanager/devices.py +0 -0
  161. {microeye-2.4.1 → microeye-2.4.2}/src/microEye/hardware/pycromanager/enums.py +0 -0
  162. {microeye-2.4.1 → microeye-2.4.2}/src/microEye/hardware/pycromanager/headless.py +0 -0
  163. {microeye-2.4.1 → microeye-2.4.2}/src/microEye/hardware/pycromanager/utils.py +0 -0
  164. {microeye-2.4.1 → microeye-2.4.2}/src/microEye/hardware/pycromanager/widgets/__init__.py +0 -0
  165. {microeye-2.4.1 → microeye-2.4.2}/src/microEye/hardware/pycromanager/widgets/bridges.py +0 -0
  166. {microeye-2.4.1 → microeye-2.4.2}/src/microEye/hardware/pycromanager/widgets/headless_manager.py +0 -0
  167. {microeye-2.4.1 → microeye-2.4.2}/src/microEye/hardware/pycromanager/widgets/headless_options.py +0 -0
  168. {microeye-2.4.1 → microeye-2.4.2}/src/microEye/hardware/stages/__init__.py +0 -0
  169. {microeye-2.4.1 → microeye-2.4.2}/src/microEye/hardware/stages/elliptec/__init__.py +0 -0
  170. {microeye-2.4.1 → microeye-2.4.2}/src/microEye/hardware/stages/elliptec/baseDevice.py +0 -0
  171. {microeye-2.4.1 → microeye-2.4.2}/src/microEye/hardware/stages/elliptec/device.py +0 -0
  172. {microeye-2.4.1 → microeye-2.4.2}/src/microEye/hardware/stages/elliptec/deviceID.py +0 -0
  173. {microeye-2.4.1 → microeye-2.4.2}/src/microEye/hardware/stages/elliptec/devicePort.py +0 -0
  174. {microeye-2.4.1 → microeye-2.4.2}/src/microEye/hardware/stages/elliptec/deviceStatus.py +0 -0
  175. {microeye-2.4.1 → microeye-2.4.2}/src/microEye/hardware/stages/elliptec/devicesView.py +0 -0
  176. {microeye-2.4.1 → microeye-2.4.2}/src/microEye/hardware/stages/elliptec/ellDevices.py +0 -0
  177. {microeye-2.4.1 → microeye-2.4.2}/src/microEye/hardware/stages/elliptec/messageUpdater.py +0 -0
  178. {microeye-2.4.1 → microeye-2.4.2}/src/microEye/hardware/stages/elliptec/motorInfo.py +0 -0
  179. {microeye-2.4.1 → microeye-2.4.2}/src/microEye/hardware/stages/elliptec/stage.py +0 -0
  180. {microeye-2.4.1 → microeye-2.4.2}/src/microEye/hardware/stages/elliptec/test.py +0 -0
  181. {microeye-2.4.1 → microeye-2.4.2}/src/microEye/hardware/stages/kinesis/__init__.py +0 -0
  182. {microeye-2.4.1 → microeye-2.4.2}/src/microEye/hardware/stages/kinesis/kdc101/__init__.py +0 -0
  183. {microeye-2.4.1 → microeye-2.4.2}/src/microEye/hardware/stages/kinesis/kdc101/enums.py +0 -0
  184. {microeye-2.4.1 → microeye-2.4.2}/src/microEye/hardware/stages/kinesis/kdc101/factory.py +0 -0
  185. {microeye-2.4.1 → microeye-2.4.2}/src/microEye/hardware/stages/kinesis/kdc101/kdc101.py +0 -0
  186. {microeye-2.4.1 → microeye-2.4.2}/src/microEye/hardware/stages/piezon_concept/__init__.py +0 -0
  187. {microeye-2.4.1 → microeye-2.4.2}/src/microEye/hardware/stages/piezon_concept/foc.py +0 -0
  188. {microeye-2.4.1 → microeye-2.4.2}/src/microEye/hardware/stages/pycromanager/__init__.py +0 -0
  189. {microeye-2.4.1 → microeye-2.4.2}/src/microEye/hardware/stages/smaract/__init__.py +0 -0
  190. {microeye-2.4.1 → microeye-2.4.2}/src/microEye/hardware/stages/stabilization/__init__.py +0 -0
  191. {microeye-2.4.1 → microeye-2.4.2}/src/microEye/hardware/stages/stabilization/controller.py +0 -0
  192. {microeye-2.4.1 → microeye-2.4.2}/src/microEye/hardware/widgets/__init__.py +0 -0
  193. {microeye-2.4.1 → microeye-2.4.2}/src/microEye/hardware/widgets/controller.py +0 -0
  194. {microeye-2.4.1 → microeye-2.4.2}/src/microEye/hardware/widgets/devices.py +0 -0
  195. {microeye-2.4.1 → microeye-2.4.2}/src/microEye/hardware/widgets/indicator.py +0 -0
  196. {microeye-2.4.1 → microeye-2.4.2}/src/microEye/hardware/widgets/qlist_slider.py +0 -0
  197. {microeye-2.4.1 → microeye-2.4.2}/src/microEye/hardware/widgets/scan_acquisition.py +0 -0
  198. {microeye-2.4.1 → microeye-2.4.2}/src/microEye/hardware/widgets/slides.py +0 -0
  199. {microeye-2.4.1 → microeye-2.4.2}/src/microEye/icons/1024.png +0 -0
  200. {microeye-2.4.1 → microeye-2.4.2}/src/microEye/icons/128.png +0 -0
  201. {microeye-2.4.1 → microeye-2.4.2}/src/microEye/icons/16.png +0 -0
  202. {microeye-2.4.1 → microeye-2.4.2}/src/microEye/icons/24.png +0 -0
  203. {microeye-2.4.1 → microeye-2.4.2}/src/microEye/icons/256.png +0 -0
  204. {microeye-2.4.1 → microeye-2.4.2}/src/microEye/icons/32.png +0 -0
  205. {microeye-2.4.1 → microeye-2.4.2}/src/microEye/icons/48.png +0 -0
  206. {microeye-2.4.1 → microeye-2.4.2}/src/microEye/icons/512.png +0 -0
  207. {microeye-2.4.1 → microeye-2.4.2}/src/microEye/icons/64.png +0 -0
  208. {microeye-2.4.1 → microeye-2.4.2}/src/microEye/icons/__init__.py +0 -0
  209. {microeye-2.4.1 → microeye-2.4.2}/src/microEye/icons/close.svg +0 -0
  210. {microeye-2.4.1 → microeye-2.4.2}/src/microEye/icons/mieye.png +0 -0
  211. {microeye-2.4.1 → microeye-2.4.2}/src/microEye/icons/min.svg +0 -0
  212. {microeye-2.4.1 → microeye-2.4.2}/src/microEye/icons/viewer.png +0 -0
  213. {microeye-2.4.1 → microeye-2.4.2}/src/microEye/images/__init__.py +0 -0
  214. {microeye-2.4.1 → microeye-2.4.2}/src/microEye/images/handlers.py +0 -0
  215. {microeye-2.4.1 → microeye-2.4.2}/src/microEye/images/uImage.py +0 -0
  216. {microeye-2.4.1 → microeye-2.4.2}/src/microEye/images/zarr.py +0 -0
  217. {microeye-2.4.1 → microeye-2.4.2}/src/microEye/launcher.py +0 -0
  218. {microeye-2.4.1 → microeye-2.4.2}/src/microEye/qt.py +0 -0
  219. {microeye-2.4.1 → microeye-2.4.2}/src/microEye/tools/__init__.py +0 -0
  220. {microeye-2.4.1 → microeye-2.4.2}/src/microEye/tools/color.py +0 -0
  221. {microeye-2.4.1 → microeye-2.4.2}/src/microEye/tools/microscopy.py +0 -0
  222. {microeye-2.4.1 → microeye-2.4.2}/src/microEye/utils/__init__.py +0 -0
  223. {microeye-2.4.1 → microeye-2.4.2}/src/microEye/utils/enum_encoder.py +0 -0
  224. {microeye-2.4.1 → microeye-2.4.2}/src/microEye/utils/expandable_groupbox.py +0 -0
  225. {microeye-2.4.1 → microeye-2.4.2}/src/microEye/utils/gui_helper.py +0 -0
  226. {microeye-2.4.1 → microeye-2.4.2}/src/microEye/utils/hid_utils/__init__.py +0 -0
  227. {microeye-2.4.1 → microeye-2.4.2}/src/microEye/utils/hid_utils/controller.py +0 -0
  228. {microeye-2.4.1 → microeye-2.4.2}/src/microEye/utils/hid_utils/device.py +0 -0
  229. {microeye-2.4.1 → microeye-2.4.2}/src/microEye/utils/hid_utils/enums.py +0 -0
  230. {microeye-2.4.1 → microeye-2.4.2}/src/microEye/utils/hid_utils/utils.py +0 -0
  231. {microeye-2.4.1 → microeye-2.4.2}/src/microEye/utils/labelled_slider.py +0 -0
  232. {microeye-2.4.1 → microeye-2.4.2}/src/microEye/utils/metadata.py +0 -0
  233. {microeye-2.4.1 → microeye-2.4.2}/src/microEye/utils/metadata_tree.py +0 -0
  234. {microeye-2.4.1 → microeye-2.4.2}/src/microEye/utils/micro_launcher.py +0 -0
  235. {microeye-2.4.1 → microeye-2.4.2}/src/microEye/utils/parameter_tree.py +0 -0
  236. {microeye-2.4.1 → microeye-2.4.2}/src/microEye/utils/pyscripting.py +0 -0
  237. {microeye-2.4.1 → microeye-2.4.2}/src/microEye/utils/retry_exec.py +0 -0
  238. {microeye-2.4.1 → microeye-2.4.2}/src/microEye/utils/start_gui.py +0 -0
  239. {microeye-2.4.1 → microeye-2.4.2}/src/microEye/utils/thread_worker.py +0 -0
  240. {microeye-2.4.1 → microeye-2.4.2}/src/microeye.egg-info/SOURCES.txt +0 -0
  241. {microeye-2.4.1 → microeye-2.4.2}/src/microeye.egg-info/dependency_links.txt +0 -0
  242. {microeye-2.4.1 → microeye-2.4.2}/src/microeye.egg-info/entry_points.txt +0 -0
  243. {microeye-2.4.1 → microeye-2.4.2}/src/microeye.egg-info/requires.txt +0 -0
  244. {microeye-2.4.1 → microeye-2.4.2}/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.1
3
+ Version: 2.4.2
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
@@ -72,10 +72,10 @@ 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
- /_/ /_/_/\__/_/ \___/___/\_, /\__/ |___/____(_)_/(_)_/
75
+ __ ____ ____ ___ ____ ___
76
+ / |/ (_)__________ / __/_ _____ _ __|_ |/ / / |_ |
77
+ / /|_/ / / __/ __/ _ \/ _// // / -_) | |/ / __//_ _/ / __/
78
+ /_/ /_/_/\__/_/ \___/___/\_, /\__/ |___/____(_)_/(_)____/
79
79
  /___/
80
80
  ```
81
81
 
@@ -7,10 +7,10 @@ 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
- /_/ /_/_/\__/_/ \___/___/\_, /\__/ |___/____(_)_/(_)_/
10
+ __ ____ ____ ___ ____ ___
11
+ / |/ (_)__________ / __/_ _____ _ __|_ |/ / / |_ |
12
+ / /|_/ / / __/ __/ _ \/ _// // / -_) | |/ / __//_ _/ / __/
13
+ /_/ /_/_/\__/_/ \___/___/\_, /\__/ |___/____(_)_/(_)____/
14
14
  /___/
15
15
  ```
16
16
 
@@ -1,2 +1,2 @@
1
- version_info = (2, 4, 1)
1
+ version_info = (2, 4, 2)
2
2
  __version__ = '.'.join(map(str, version_info))
@@ -781,32 +781,48 @@ class miDummy(miCamera):
781
781
  '''
782
782
  noise = kwargs.get('noise', 0) # noise to add to fiducial positions
783
783
  drift = kwargs.get('drift', [0, 0, 0]) # drift in x, y, z
784
+ psf_model = kwargs.get('psf_model', 'airy').lower()
785
+ airy_scale = kwargs.get('airy_scale', 1.22)
784
786
  kernel_size = int(6 * max(sigma_x, sigma_y)) | 1 # odd size, covers >99% of PSF
785
787
 
786
- x = np.arange(self.width)
787
- y = np.arange(self.height)
788
- X, Y = np.meshgrid(x, y)
789
-
790
- pattern = np.zeros((self.width, self.height), dtype=np.float64)
788
+ pattern = np.zeros((self.height, self.width), dtype=np.float64)
791
789
 
792
- ax, ay = 1 / (2 * sigma_x**2), 1 / (2 * sigma_y**2)
790
+ eps = np.finfo(np.float64).eps
791
+ ax, ay = 1 / (2 * sigma_x**2 + eps), 1 / (2 * sigma_y**2 + eps)
793
792
  for fid in fiducials:
794
793
  x = fid[0]
795
794
  y = fid[1]
796
795
 
797
796
  x += drift[0] + (np.random.random_sample() - 0.5) * noise
798
797
  y += drift[1] + (np.random.random_sample() - 0.5) * noise
799
- x_slice = slice(
800
- int(max(x - kernel_size, 0)), int(min(x + kernel_size, self.width))
801
- )
802
- y_slice = slice(
803
- int(max(y - kernel_size, 0)), int(min(y + kernel_size, self.height))
804
- )
798
+ x0 = int(max(x - kernel_size, 0))
799
+ x1 = int(min(x + kernel_size, self.width))
800
+ y0 = int(max(y - kernel_size, 0))
801
+ y1 = int(min(y + kernel_size, self.height))
802
+
803
+ if x1 <= x0 or y1 <= y0:
804
+ continue
805
+
806
+ x_local = np.arange(x0, x1, dtype=np.float64) - x
807
+ y_local = np.arange(y0, y1, dtype=np.float64) - y
808
+
809
+ if psf_model == 'airy':
810
+ # Airy-like approximation using sinc^2 radial profile.
811
+ r = np.sqrt(
812
+ np.add.outer(
813
+ (y_local / (sigma_y + np.random.random_sample() * 0.1 + eps))
814
+ ** 2,
815
+ (x_local / (sigma_x + np.random.random_sample() * 0.1 + eps))
816
+ ** 2,
817
+ )
818
+ )
819
+ patch = np.sinc(r / (airy_scale + eps)) ** 2
820
+ else:
821
+ gx = np.exp(-(x_local**2) * ax)
822
+ gy = np.exp(-(y_local**2) * ay)
823
+ patch = np.multiply.outer(gy, gx)
805
824
 
806
- pattern[y_slice, x_slice] += self.drift_amplitude * np.exp(
807
- -((X[y_slice, x_slice] - x) ** 2) * ax
808
- - ((Y[y_slice, x_slice] - y) ** 2) * ay
809
- )
825
+ pattern[y0:y1, x0:x1] += self.drift_amplitude * patch
810
826
 
811
827
  if pattern.min() < 0:
812
828
  pattern += abs(pattern.min())
@@ -366,9 +366,13 @@ def z_stack_acquisition(
366
366
 
367
367
  if (
368
368
  FocusStabilizer.instance().isFocusStabilized(Axis.Z)
369
- and FocusStabilizer.instance().useCal()
369
+ and FocusStabilizer.instance().isAdjustSetPoint()
370
370
  ):
371
- value = FocusStabilizer.instance().calCoeff(Axis.Z) * step_size
371
+ value = step_size
372
+ if not FocusStabilizer.instance().useCal():
373
+ value /= FocusStabilizer.instance().calCoeff(
374
+ Axis.Z
375
+ )
372
376
  if reverse:
373
377
  value *= -1
374
378
  FocusStabilizer.instance().setParameter(value, True)
@@ -463,9 +467,7 @@ def z_calibration(
463
467
  QtCore.QThread.msleep(delay * nFrames)
464
468
  positions[x, 0] = x * step_size
465
469
  _, snapshot = FocusStabilizer.instance().tracker_snapshot
466
- positions[x, 1] = np.mean(
467
- snapshot[-nFrames:, 2]
468
- )
470
+ positions[x, 1] = np.mean(snapshot[-nFrames:, 2])
469
471
  else:
470
472
  logger.warning('Z-calibration failed!')
471
473
  info = [{'Z-Stage Open': stage_manager.z_stage().is_open()}]
@@ -1,3 +1,4 @@
1
+ import logging
1
2
  import traceback
2
3
  from typing import Optional
3
4
 
@@ -16,6 +17,8 @@ from microEye.qt import QtCore, QtSerialPort, QtWidgets, Signal
16
17
  from microEye.utils.parameter_tree import Tree
17
18
  from microEye.utils.thread_worker import QThreadWorker
18
19
 
20
+ logger = logging.getLogger(__name__)
21
+
19
22
 
20
23
  class KinesisXY(AbstractStage):
21
24
  '''Class for controlling Two Kinesis Devices as an XY Stage'''
@@ -125,18 +128,23 @@ class KinesisXY(AbstractStage):
125
128
  if not isinstance(config, dict):
126
129
  raise ValueError('Config must be a dictionary.')
127
130
 
128
- super().load_config(config)
129
-
130
- x_config = config.get('X', {})
131
- y_config = config.get('Y', {})
132
-
133
- if isinstance(x_config, dict):
134
- self.X.setBaudRate(x_config.get('baudrate', 115200))
135
- self.X.setPortName(x_config.get('port', 'COM12'))
136
-
137
- if isinstance(y_config, dict):
138
- self.Y.setBaudRate(y_config.get('baudrate', 115200))
139
- self.Y.setPortName(y_config.get('port', 'COM13'))
131
+ try:
132
+ x_config = config.get('X', {})
133
+ y_config = config.get('Y', {})
134
+
135
+ if isinstance(x_config, dict):
136
+ self.X.setBaudRate(x_config.get('baudrate', 115200))
137
+ self.X.setPortName(x_config.get('port', 'COM12'))
138
+
139
+ if isinstance(y_config, dict):
140
+ self.Y.setBaudRate(y_config.get('baudrate', 115200))
141
+ self.Y.setPortName(y_config.get('port', 'COM13'))
142
+ except Exception as e:
143
+ logger.error(
144
+ f'Error loading KinesisXY config: {e}\n{traceback.format_exc()}'
145
+ )
146
+ finally:
147
+ super().load_config(config)
140
148
 
141
149
 
142
150
  if __name__ == '__main__':
@@ -137,7 +137,7 @@ class StageManager(QtCore.QObject):
137
137
  Move the stage in a specified direction by a specified
138
138
  number of steps in nanometers. Optional boolean argument
139
139
  to specify jump or step move. If FocusStabilizer is stabilizing
140
- and use calibration is set to True, moves the center pixel value
140
+ and adjust set point is set to True, moves the center pixel value
141
141
  instead of the Z position when `interface` is True.
142
142
 
143
143
  Parameters
@@ -171,13 +171,17 @@ class StageManager(QtCore.QObject):
171
171
  if (
172
172
  focusStabilizer is not None
173
173
  and focusStabilizer.isFocusStabilized(Axis.Z)
174
- and focusStabilizer.useCal()
174
+ and focusStabilizer.isAdjustSetPoint()
175
175
  and interface
176
176
  ):
177
177
  sign = 1 if dir else -1
178
178
  step_nm = Units.convert(
179
179
  step_arg, self.z_stage().get_unit(Axis.Z), Units.NANOMETERS
180
180
  )
181
+ if not FocusStabilizer.instance().useCal():
182
+ step_nm /= FocusStabilizer.instance().calCoeff(
183
+ Axis.Z
184
+ )
181
185
  focusStabilizer.setParameter(
182
186
  step_nm * sign, True
183
187
  )
@@ -1,3 +1,4 @@
1
+ import logging
1
2
  import time
2
3
  import traceback
3
4
 
@@ -8,6 +9,8 @@ from microEye.hardware.stages.stage import AbstractStage, Axis, Units, emit_afte
8
9
  from microEye.qt import QtCore, QtWidgets
9
10
  from microEye.utils.thread_worker import QThreadWorker
10
11
 
12
+ logger = logging.getLogger(__name__)
13
+
11
14
 
12
15
  class PycroStageZ(PycroDevice, AbstractStage):
13
16
  NAME = 'PycroStage Z'
@@ -105,13 +108,18 @@ class PycroStageZ(PycroDevice, AbstractStage):
105
108
  if not isinstance(config, dict):
106
109
  raise ValueError('Config must be a dictionary.')
107
110
 
108
- super().load_config(config)
109
-
110
- pycromanager_config = config.get('pycromanager', {})
111
+ try:
112
+ pycromanager_config = config.get('pycromanager', {})
111
113
 
112
- if isinstance(pycromanager_config, dict):
113
- self._label = pycromanager_config.get('label', self.label)
114
- self._port = pycromanager_config.get('port', self._port)
114
+ if isinstance(pycromanager_config, dict):
115
+ self._label = pycromanager_config.get('label', self.label)
116
+ self._port = pycromanager_config.get('port', self._port)
117
+ except Exception as e:
118
+ logger.error(
119
+ f'Error loading PycroManager config: {e}\n{traceback.format_exc()}'
120
+ )
121
+ finally:
122
+ super().load_config(config)
115
123
 
116
124
 
117
125
  class PycroStageXY(PycroDevice, AbstractStage):
@@ -170,16 +178,24 @@ class PycroStageXY(PycroDevice, AbstractStage):
170
178
  def move_relative(self, x: float, y: float, z: float = 0, **kwargs):
171
179
  is_async = kwargs.get('is_async', True)
172
180
  self.run_async(
173
- self._core.set_relative_xy_position, x, y, self.label, is_async=is_async,
174
- wait_func=self.wait
181
+ self._core.set_relative_xy_position,
182
+ x,
183
+ y,
184
+ self.label,
185
+ is_async=is_async,
186
+ wait_func=self.wait,
175
187
  )
176
188
 
177
189
  @emit_after_signal('moveFinished')
178
190
  def move_absolute(self, x: float, y: float, z: float = 0, **kwargs):
179
191
  is_async = kwargs.get('is_async', True)
180
192
  self.run_async(
181
- self._core.set_xy_position, x, y, self.label, is_async=is_async,
182
- wait_func=self.wait
193
+ self._core.set_xy_position,
194
+ x,
195
+ y,
196
+ self.label,
197
+ is_async=is_async,
198
+ wait_func=self.wait,
183
199
  )
184
200
 
185
201
  def wait(self, timeout: float = 5.0):
@@ -243,10 +259,13 @@ class PycroStageXY(PycroDevice, AbstractStage):
243
259
  if not isinstance(config, dict):
244
260
  raise ValueError('Config must be a dictionary.')
245
261
 
246
- super().load_config(config)
247
-
248
- pycromanager_config = config.get('pycromanager', {})
262
+ try:
263
+ pycromanager_config = config.get('pycromanager', {})
249
264
 
250
- if isinstance(pycromanager_config, dict):
251
- self._label = pycromanager_config.get('label', self.label)
252
- self._port = pycromanager_config.get('port', self._port)
265
+ if isinstance(pycromanager_config, dict):
266
+ self._label = pycromanager_config.get('label', self.label)
267
+ self._port = pycromanager_config.get('port', self._port)
268
+ except Exception as e:
269
+ logger.error(f'Error loading PycroManager config: {e}')
270
+ finally:
271
+ super().load_config(config)
@@ -506,12 +506,15 @@ class MCS2Stage(AbstractStage):
506
506
  if not isinstance(config, dict):
507
507
  raise ValueError('Config must be a dictionary.')
508
508
 
509
- super().load_config(config)
510
-
511
- locator = config.get('locator')
512
- if locator is not None:
513
- self.close()
514
- self.locator = locator
509
+ try:
510
+ locator = config.get('locator')
511
+ if locator is not None:
512
+ self.close()
513
+ self.locator = locator
514
+ except Exception as e:
515
+ logger.error(f'Error loading MCS2 config: {e}')
516
+ finally:
517
+ super().load_config(config)
515
518
 
516
519
  def _initialize_channels(self):
517
520
  if not self.is_open():
@@ -149,6 +149,16 @@ class CalibrationManager:
149
149
  def __init__(self):
150
150
  self.__cal_coeffs = np.ones((3,)) # nm/pixel
151
151
 
152
+ self.__use_calibration = False
153
+
154
+ def enable_calibration(self, enable: bool = True):
155
+ '''Enable or disable calibration'''
156
+ self.__use_calibration = enable
157
+
158
+ def is_calibration_enabled(self) -> bool:
159
+ '''Check if calibration is enabled'''
160
+ return self.__use_calibration
161
+
152
162
  def get_coefficient(self, axis: Axis = None) -> Union[float, np.ndarray]:
153
163
  '''Get calibration coefficient for axis'''
154
164
  if axis is None:
@@ -162,7 +172,9 @@ class CalibrationManager:
162
172
 
163
173
  def convert_to_physical(self, pixels: float, axis: Axis) -> float:
164
174
  '''Convert pixel measurement to physical units'''
165
- return pixels * self.get_coefficient(axis)
175
+ if self.is_calibration_enabled():
176
+ return pixels * self.get_coefficient(axis)
177
+ return pixels
166
178
 
167
179
 
168
180
  class PositionTracker:
@@ -256,7 +268,7 @@ class StabilizationMethods(Enum):
256
268
  class StabilizationStrategy(ABC):
257
269
  '''Base class for stabilization method strategies'''
258
270
 
259
- PARAMS : dict[str, dict] = {}
271
+ PARAMS: dict[str, dict] = {}
260
272
 
261
273
  def __init__(self):
262
274
  # Isolate mutable nested defaults between strategy instances.
@@ -388,7 +400,7 @@ class ReflectionStrategy(StabilizationStrategy):
388
400
  params = {'xy': None, 'z': None}
389
401
  if fit_params is not None:
390
402
  z_center = fit_params[1] # x0 from GaussianOffSet
391
- z_physical = z_center * calibration_manager.get_coefficient(Axis.Z)
403
+ z_physical = calibration_manager.convert_to_physical(z_center, Axis.Z)
392
404
  params['z'] = z_physical
393
405
 
394
406
  return {
@@ -697,7 +709,9 @@ class FiducialStrategy(StabilizationStrategy):
697
709
  fit_params[:, 4] ** 2 - fit_params[:, 5] ** 2
698
710
  if self.fit_method
699
711
  else fit_params[:, 4]
700
- ) * calibration_manager.get_coefficient(Axis.Z)
712
+ )
713
+
714
+ z_param = calibration_manager.convert_to_physical(z_param, Axis.Z)
701
715
 
702
716
  z_param = np.nanmean(controller.outlier_rejection(z_param))
703
717
 
@@ -734,12 +748,11 @@ class FiducialStrategy(StabilizationStrategy):
734
748
  if xy_shift is not None:
735
749
  x_shifts, y_shifts = xy_shift
736
750
 
737
- x_shift = np.nanmean(
738
- controller.outlier_rejection(x_shifts)
739
- ) * calibration_manager.get_coefficient(Axis.X)
740
- y_shift = np.nanmean(
741
- controller.outlier_rejection(y_shifts)
742
- ) * calibration_manager.get_coefficient(Axis.Y)
751
+ x_shift = np.nanmean(controller.outlier_rejection(x_shifts))
752
+ y_shift = np.nanmean(controller.outlier_rejection(y_shifts))
753
+
754
+ x_shift = calibration_manager.convert_to_physical(x_shift, Axis.X)
755
+ y_shift = calibration_manager.convert_to_physical(y_shift, Axis.Y)
743
756
 
744
757
  shifts[Axis.X] = x_shift
745
758
  shifts[Axis.Y] = y_shift
@@ -835,6 +848,7 @@ class HybridStrategy(StabilizationStrategy):
835
848
  - Z from ReflectionStrategy
836
849
  - XY from FiducialStrategy
837
850
  '''
851
+
838
852
  PARAMS = {
839
853
  **ReflectionStrategy.PARAMS,
840
854
  **FiducialStrategy.PARAMS,
@@ -48,6 +48,7 @@ class FocusStabilizerParams(Enum):
48
48
  N_FRAMES = 'Number of Frames'
49
49
  FRAMES_STATS = 'Frames Statistics'
50
50
  LINE_WIDTH = 'Line ROI Width'
51
+ EXTERNAL_PREVIEW = 'External Preview'
51
52
  SAVE = 'Save'
52
53
  LOAD = 'Load'
53
54
 
@@ -59,10 +60,13 @@ class FocusStabilizerParams(Enum):
59
60
  STABILIZATION_METHOD = 'Method'
60
61
  METHOD_PARAMS = 'Method Parameters'
61
62
 
62
- USE_CAL = 'Use Calibration'
63
- X_CALIBRATION = 'Calibration (X) [nm/pixel]'
64
- Y_CALIBRATION = 'Calibration (Y) [nm/pixel]'
65
- Z_CALIBRATION = 'Calibration (Z) [nm/pixel]'
63
+ CALIBRATION = 'Calibration'
64
+
65
+ USE_CAL = 'Calibration.Active'
66
+ X_CALIBRATION = 'Calibration.(X) [nm/pixel]'
67
+ Y_CALIBRATION = 'Calibration.(Y) [nm/pixel]'
68
+ Z_CALIBRATION = 'Calibration.(Z) [nm/pixel]'
69
+ ADJUST_SET_POINT = 'Calibration.Adjust Set Point'
66
70
 
67
71
  XY_OUTLIER_REJECTION = 'XY Outlier Rejection'
68
72
  XY_OUTLIER_REJECTION_METHOD = 'XY Outlier Rejection.Method'
@@ -167,7 +171,9 @@ class FocusStabilizer(QtCore.QObject):
167
171
  # Calibration manager
168
172
  self.__cal_manager = CalibrationManager()
169
173
 
170
- self.__use_cal = False
174
+ # Adjust set point flag
175
+ self.__adjust_set_point = False
176
+
171
177
  self.__inverted = np.zeros((3,), dtype=bool)
172
178
 
173
179
  self.__n_frames = 1
@@ -330,7 +336,7 @@ class FocusStabilizer(QtCore.QObject):
330
336
  bool
331
337
  True if pixel calibration coefficient is used, False otherwise.
332
338
  '''
333
- return self.__use_cal
339
+ return self.__cal_manager.is_calibration_enabled()
334
340
 
335
341
  def setUseCal(self, use_cal: bool):
336
342
  '''
@@ -341,7 +347,29 @@ class FocusStabilizer(QtCore.QObject):
341
347
  use_cal : bool
342
348
  The flag value.
343
349
  '''
344
- self.__use_cal = use_cal
350
+ self.__cal_manager.enable_calibration(use_cal)
351
+
352
+ def isAdjustSetPoint(self):
353
+ '''
354
+ Check if adjust set point option is enabled.
355
+
356
+ Returns
357
+ -------
358
+ bool
359
+ True if adjust set point option is enabled, False otherwise.
360
+ '''
361
+ return self.__adjust_set_point
362
+
363
+ def setAdjustSetPoint(self, adjust: bool):
364
+ '''
365
+ Set the flag indicating whether to adjust the set point.
366
+
367
+ Parameters
368
+ ----------
369
+ adjust : bool
370
+ The flag value.
371
+ '''
372
+ self.__adjust_set_point = adjust
345
373
 
346
374
  def isInverted(self, axis: Optional[Axis]):
347
375
  '''
@@ -626,7 +654,8 @@ class FocusStabilizer(QtCore.QObject):
626
654
  'tau': self.__tau,
627
655
  'error_th': self.__err_th,
628
656
  'cal_coeff': self.__cal_manager.get_coefficient().tolist(),
629
- 'use_cal': self.__use_cal,
657
+ 'use_cal': self.useCal(),
658
+ 'adjust_set_point': self.isAdjustSetPoint(),
630
659
  'inverted': self.__inverted.tolist(),
631
660
  'method': str(self.__method),
632
661
  'strategy_params': self.get_current_strategy_param_values(),
@@ -848,6 +877,7 @@ class FocusStabilizer(QtCore.QObject):
848
877
  class FocusStabilizerView(Tree):
849
878
  PARAMS = FocusStabilizerParams
850
879
  setRoiActivated = Signal()
880
+ actionActivated = Signal(str)
851
881
  saveActivated = Signal()
852
882
  loadActivated = Signal()
853
883
  methodChanged = Signal(StabilizationMethods)
@@ -926,6 +956,7 @@ class FocusStabilizerView(Tree):
926
956
  'limits': [1, 100],
927
957
  'step': 1,
928
958
  },
959
+ {'name': str(FocusStabilizerParams.EXTERNAL_PREVIEW), 'type': 'action'},
929
960
  {'name': str(FocusStabilizerParams.SAVE), 'type': 'action'},
930
961
  {'name': str(FocusStabilizerParams.LOAD), 'type': 'action'},
931
962
  {
@@ -960,40 +991,54 @@ class FocusStabilizerView(Tree):
960
991
  {
961
992
  'name': str(FocusStabilizerParams.METHOD_PARAMS),
962
993
  'type': 'group',
994
+ 'expanded': False,
963
995
  'children': [],
964
996
  },
965
997
  {
966
- 'name': str(FocusStabilizerParams.USE_CAL),
967
- 'type': 'bool',
968
- 'value': False,
969
- },
970
- {
971
- 'name': str(FocusStabilizerParams.X_CALIBRATION),
972
- 'type': 'float',
973
- 'value': 1.0,
974
- 'step': 0.01,
975
- 'dec': False,
976
- 'decimals': 6,
977
- },
978
- {
979
- 'name': str(FocusStabilizerParams.Y_CALIBRATION),
980
- 'type': 'float',
981
- 'value': 1.0,
982
- 'step': 0.01,
983
- 'dec': False,
984
- 'decimals': 6,
985
- },
986
- {
987
- 'name': str(FocusStabilizerParams.Z_CALIBRATION),
988
- 'type': 'float',
989
- 'value': 1.0,
990
- 'step': 0.01,
991
- 'dec': False,
992
- 'decimals': 6,
998
+ 'name': str(FocusStabilizerParams.CALIBRATION),
999
+ 'type': 'group',
1000
+ 'expanded': False,
1001
+ 'children': [
1002
+ {
1003
+ 'name': str(FocusStabilizerParams.USE_CAL),
1004
+ 'type': 'bool',
1005
+ 'value': False,
1006
+ },
1007
+ {
1008
+ 'name': str(FocusStabilizerParams.X_CALIBRATION),
1009
+ 'type': 'float',
1010
+ 'value': 1.0,
1011
+ 'step': 0.01,
1012
+ 'dec': False,
1013
+ 'decimals': 6,
1014
+ },
1015
+ {
1016
+ 'name': str(FocusStabilizerParams.Y_CALIBRATION),
1017
+ 'type': 'float',
1018
+ 'value': 1.0,
1019
+ 'step': 0.01,
1020
+ 'dec': False,
1021
+ 'decimals': 6,
1022
+ },
1023
+ {
1024
+ 'name': str(FocusStabilizerParams.Z_CALIBRATION),
1025
+ 'type': 'float',
1026
+ 'value': 1.0,
1027
+ 'step': 0.01,
1028
+ 'dec': False,
1029
+ 'decimals': 6,
1030
+ },
1031
+ {
1032
+ 'name': str(FocusStabilizerParams.ADJUST_SET_POINT),
1033
+ 'type': 'bool',
1034
+ 'value': False,
1035
+ },
1036
+ ],
993
1037
  },
994
1038
  {
995
1039
  'name': str(FocusStabilizerParams.XY_OUTLIER_REJECTION),
996
1040
  'type': 'group',
1041
+ 'expanded': False,
997
1042
  'children': [
998
1043
  {
999
1044
  'name': str(FocusStabilizerParams.XY_OUTLIER_REJECTION_METHOD),
@@ -1022,6 +1067,7 @@ class FocusStabilizerView(Tree):
1022
1067
  {
1023
1068
  'name': str(FocusStabilizerParams.X),
1024
1069
  'type': 'group',
1070
+ 'expanded': False,
1025
1071
  'children': [
1026
1072
  {
1027
1073
  'name': str(FocusStabilizerParams.X_INVERTED),
@@ -1057,6 +1103,7 @@ class FocusStabilizerView(Tree):
1057
1103
  {
1058
1104
  'name': str(FocusStabilizerParams.Y),
1059
1105
  'type': 'group',
1106
+ 'expanded': False,
1060
1107
  'children': [
1061
1108
  {
1062
1109
  'name': str(FocusStabilizerParams.Y_INVERTED),
@@ -1092,6 +1139,7 @@ class FocusStabilizerView(Tree):
1092
1139
  {
1093
1140
  'name': str(FocusStabilizerParams.Z),
1094
1141
  'type': 'group',
1142
+ 'expanded': False,
1095
1143
  'children': [
1096
1144
  {
1097
1145
  'name': str(FocusStabilizerParams.Z_INVERTED),
@@ -1150,6 +1198,11 @@ class FocusStabilizerView(Tree):
1150
1198
  QtWidgets.QHeaderView.ResizeMode.ResizeToContents
1151
1199
  )
1152
1200
 
1201
+ self.get_param(FocusStabilizerParams.EXTERNAL_PREVIEW).sigActivated.connect(
1202
+ lambda: self.actionActivated.emit(
1203
+ FocusStabilizerParams.EXTERNAL_PREVIEW.value
1204
+ )
1205
+ )
1153
1206
  self.get_param(FocusStabilizerParams.SAVE).sigActivated.connect(
1154
1207
  self.export_config
1155
1208
  )
@@ -1286,6 +1339,8 @@ class FocusStabilizerView(Tree):
1286
1339
  FocusStabilizer.instance().setInverted(data, Axis.Z)
1287
1340
  if fsParam == FocusStabilizerParams.USE_CAL:
1288
1341
  FocusStabilizer.instance().setUseCal(data)
1342
+ if fsParam == FocusStabilizerParams.ADJUST_SET_POINT:
1343
+ FocusStabilizer.instance().setAdjustSetPoint(data)
1289
1344
  if fsParam == FocusStabilizerParams.FOCUS_PARAMETER:
1290
1345
  FocusStabilizer.instance().setParameter(data)
1291
1346
 
@@ -1452,6 +1507,10 @@ class FocusStabilizerView(Tree):
1452
1507
  self.set_param_value(
1453
1508
  FocusStabilizerParams.USE_CAL, bool(stabilizer.get('use_cal'))
1454
1509
  )
1510
+ self.set_param_value(
1511
+ FocusStabilizerParams.ADJUST_SET_POINT,
1512
+ bool(stabilizer.get('adjust_set_point')),
1513
+ )
1455
1514
  self.set_param_value(FocusStabilizerParams.FT_TAU, float(tau))
1456
1515
  self.set_param_value(FocusStabilizerParams.FT_ERROR_TH, float(error_th))
1457
1516
  self.set_param_value(FocusStabilizerParams.STABILIZATION_METHOD, method)