flimkit 0.13.3__tar.gz → 0.13.4__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 (110) hide show
  1. {flimkit-0.13.3 → flimkit-0.13.4}/PKG-INFO +1 -1
  2. {flimkit-0.13.3 → flimkit-0.13.4}/flimkit/UI/gui.py +18 -3
  3. {flimkit-0.13.3 → flimkit-0.13.4}/flimkit/_version.py +2 -1
  4. {flimkit-0.13.3 → flimkit-0.13.4}/flimkit.egg-info/PKG-INFO +1 -1
  5. {flimkit-0.13.3 → flimkit-0.13.4}/LICENSE.md +0 -0
  6. {flimkit-0.13.3 → flimkit-0.13.4}/README.md +0 -0
  7. {flimkit-0.13.3 → flimkit-0.13.4}/flimkit/FLIM/__init__.py +0 -0
  8. {flimkit-0.13.3 → flimkit-0.13.4}/flimkit/FLIM/assemble.py +0 -0
  9. {flimkit-0.13.3 → flimkit-0.13.4}/flimkit/FLIM/batch.py +0 -0
  10. {flimkit-0.13.3 → flimkit-0.13.4}/flimkit/FLIM/bg_tools.py +0 -0
  11. {flimkit-0.13.3 → flimkit-0.13.4}/flimkit/FLIM/fit_tools.py +0 -0
  12. {flimkit-0.13.3 → flimkit-0.13.4}/flimkit/FLIM/fitters.py +0 -0
  13. {flimkit-0.13.3 → flimkit-0.13.4}/flimkit/FLIM/irf_tools.py +0 -0
  14. {flimkit-0.13.3 → flimkit-0.13.4}/flimkit/FLIM/models.py +0 -0
  15. {flimkit-0.13.3 → flimkit-0.13.4}/flimkit/GPU/__init__.py +0 -0
  16. {flimkit-0.13.3 → flimkit-0.13.4}/flimkit/GPU/_base.py +0 -0
  17. {flimkit-0.13.3 → flimkit-0.13.4}/flimkit/GPU/cuda.py +0 -0
  18. {flimkit-0.13.3 → flimkit-0.13.4}/flimkit/GPU/mlx_backend.py +0 -0
  19. {flimkit-0.13.3 → flimkit-0.13.4}/flimkit/GPU/mps.py +0 -0
  20. {flimkit-0.13.3 → flimkit-0.13.4}/flimkit/GPU/rocm.py +0 -0
  21. {flimkit-0.13.3 → flimkit-0.13.4}/flimkit/GPU/torch_backend.py +0 -0
  22. {flimkit-0.13.3 → flimkit-0.13.4}/flimkit/UI/app_state.py +0 -0
  23. {flimkit-0.13.3 → flimkit-0.13.4}/flimkit/UI/controller.py +0 -0
  24. {flimkit-0.13.3 → flimkit-0.13.4}/flimkit/UI/expert_settings.py +0 -0
  25. {flimkit-0.13.3 → flimkit-0.13.4}/flimkit/UI/fit_help.py +0 -0
  26. {flimkit-0.13.3 → flimkit-0.13.4}/flimkit/UI/fov_preview.py +0 -0
  27. {flimkit-0.13.3 → flimkit-0.13.4}/flimkit/UI/icon.icns +0 -0
  28. {flimkit-0.13.3 → flimkit-0.13.4}/flimkit/UI/icon.ico +0 -0
  29. {flimkit-0.13.3 → flimkit-0.13.4}/flimkit/UI/icon.png +0 -0
  30. {flimkit-0.13.3 → flimkit-0.13.4}/flimkit/UI/irf_widget.py +0 -0
  31. {flimkit-0.13.3 → flimkit-0.13.4}/flimkit/UI/mode_controller.py +0 -0
  32. {flimkit-0.13.3 → flimkit-0.13.4}/flimkit/UI/modes/__init__.py +0 -0
  33. {flimkit-0.13.3 → flimkit-0.13.4}/flimkit/UI/modes/base.py +0 -0
  34. {flimkit-0.13.3 → flimkit-0.13.4}/flimkit/UI/modes/batch_mode.py +0 -0
  35. {flimkit-0.13.3 → flimkit-0.13.4}/flimkit/UI/modes/fov_mode.py +0 -0
  36. {flimkit-0.13.3 → flimkit-0.13.4}/flimkit/UI/modes/irf_mode.py +0 -0
  37. {flimkit-0.13.3 → flimkit-0.13.4}/flimkit/UI/modes/phasor_mode.py +0 -0
  38. {flimkit-0.13.3 → flimkit-0.13.4}/flimkit/UI/modes/stitch_mode.py +0 -0
  39. {flimkit-0.13.3 → flimkit-0.13.4}/flimkit/UI/phasor_panel.py +0 -0
  40. {flimkit-0.13.3 → flimkit-0.13.4}/flimkit/UI/progress_window.py +0 -0
  41. {flimkit-0.13.3 → flimkit-0.13.4}/flimkit/UI/project_panel.py +0 -0
  42. {flimkit-0.13.3 → flimkit-0.13.4}/flimkit/UI/results_panel.py +0 -0
  43. {flimkit-0.13.3 → flimkit-0.13.4}/flimkit/UI/roi_tools.py +0 -0
  44. {flimkit-0.13.3 → flimkit-0.13.4}/flimkit/UI/utils.py +0 -0
  45. {flimkit-0.13.3 → flimkit-0.13.4}/flimkit/__init__.py +0 -0
  46. {flimkit-0.13.3 → flimkit-0.13.4}/flimkit/cli.py +0 -0
  47. {flimkit-0.13.3 → flimkit-0.13.4}/flimkit/configs.py +0 -0
  48. {flimkit-0.13.3 → flimkit-0.13.4}/flimkit/dialogs.py +0 -0
  49. {flimkit-0.13.3 → flimkit-0.13.4}/flimkit/formats/BH/__init__.py +0 -0
  50. {flimkit-0.13.3 → flimkit-0.13.4}/flimkit/formats/BH/reader.py +0 -0
  51. {flimkit-0.13.3 → flimkit-0.13.4}/flimkit/formats/BH/writer.py +0 -0
  52. {flimkit-0.13.3 → flimkit-0.13.4}/flimkit/formats/ISS/__init__.py +0 -0
  53. {flimkit-0.13.3 → flimkit-0.13.4}/flimkit/formats/ISS/fdflim.py +0 -0
  54. {flimkit-0.13.3 → flimkit-0.13.4}/flimkit/formats/ISS/image.py +0 -0
  55. {flimkit-0.13.3 → flimkit-0.13.4}/flimkit/formats/ISS/reader.py +0 -0
  56. {flimkit-0.13.3 → flimkit-0.13.4}/flimkit/formats/PS/__init__.py +0 -0
  57. {flimkit-0.13.3 → flimkit-0.13.4}/flimkit/formats/PS/reader.py +0 -0
  58. {flimkit-0.13.3 → flimkit-0.13.4}/flimkit/formats/PTU/__init__.py +0 -0
  59. {flimkit-0.13.3 → flimkit-0.13.4}/flimkit/formats/PTU/decode.py +0 -0
  60. {flimkit-0.13.3 → flimkit-0.13.4}/flimkit/formats/PTU/phu.py +0 -0
  61. {flimkit-0.13.3 → flimkit-0.13.4}/flimkit/formats/PTU/reader.py +0 -0
  62. {flimkit-0.13.3 → flimkit-0.13.4}/flimkit/formats/PTU/series.py +0 -0
  63. {flimkit-0.13.3 → flimkit-0.13.4}/flimkit/formats/PTU/stitch.py +0 -0
  64. {flimkit-0.13.3 → flimkit-0.13.4}/flimkit/formats/PTU/tools.py +0 -0
  65. {flimkit-0.13.3 → flimkit-0.13.4}/flimkit/formats/__init__.py +0 -0
  66. {flimkit-0.13.3 → flimkit-0.13.4}/flimkit/formats/flim_file.py +0 -0
  67. {flimkit-0.13.3 → flimkit-0.13.4}/flimkit/formats/phasor.py +0 -0
  68. {flimkit-0.13.3 → flimkit-0.13.4}/flimkit/formats/signal.py +0 -0
  69. {flimkit-0.13.3 → flimkit-0.13.4}/flimkit/image/tools.py +0 -0
  70. {flimkit-0.13.3 → flimkit-0.13.4}/flimkit/interactive.py +0 -0
  71. {flimkit-0.13.3 → flimkit-0.13.4}/flimkit/mpl_backend.py +0 -0
  72. {flimkit-0.13.3 → flimkit-0.13.4}/flimkit/phasor/__init__.py +0 -0
  73. {flimkit-0.13.3 → flimkit-0.13.4}/flimkit/phasor/filters.py +0 -0
  74. {flimkit-0.13.3 → flimkit-0.13.4}/flimkit/phasor/fret.py +0 -0
  75. {flimkit-0.13.3 → flimkit-0.13.4}/flimkit/phasor/interactive.py +0 -0
  76. {flimkit-0.13.3 → flimkit-0.13.4}/flimkit/phasor/peaks.py +0 -0
  77. {flimkit-0.13.3 → flimkit-0.13.4}/flimkit/phasor/signal.py +0 -0
  78. {flimkit-0.13.3 → flimkit-0.13.4}/flimkit/phasor_launcher.py +0 -0
  79. {flimkit-0.13.3 → flimkit-0.13.4}/flimkit/plugins/__init__.py +0 -0
  80. {flimkit-0.13.3 → flimkit-0.13.4}/flimkit/plugins/bindings.py +0 -0
  81. {flimkit-0.13.3 → flimkit-0.13.4}/flimkit/plugins/builtin/__init__.py +0 -0
  82. {flimkit-0.13.3 → flimkit-0.13.4}/flimkit/plugins/builtin/core_tools.py +0 -0
  83. {flimkit-0.13.3 → flimkit-0.13.4}/flimkit/plugins/loader.py +0 -0
  84. {flimkit-0.13.3 → flimkit-0.13.4}/flimkit/plugins/registry.py +0 -0
  85. {flimkit-0.13.3 → flimkit-0.13.4}/flimkit/project.py +0 -0
  86. {flimkit-0.13.3 → flimkit-0.13.4}/flimkit/synth.py +0 -0
  87. {flimkit-0.13.3 → flimkit-0.13.4}/flimkit/utils/__init__.py +0 -0
  88. {flimkit-0.13.3 → flimkit-0.13.4}/flimkit/utils/batch_fit.py +0 -0
  89. {flimkit-0.13.3 → flimkit-0.13.4}/flimkit/utils/config_manager.py +0 -0
  90. {flimkit-0.13.3 → flimkit-0.13.4}/flimkit/utils/config_snapshot.py +0 -0
  91. {flimkit-0.13.3 → flimkit-0.13.4}/flimkit/utils/crash_handler.py +0 -0
  92. {flimkit-0.13.3 → flimkit-0.13.4}/flimkit/utils/display.py +0 -0
  93. {flimkit-0.13.3 → flimkit-0.13.4}/flimkit/utils/enhanced_outputs.py +0 -0
  94. {flimkit-0.13.3 → flimkit-0.13.4}/flimkit/utils/fancy.py +0 -0
  95. {flimkit-0.13.3 → flimkit-0.13.4}/flimkit/utils/lifetime_image.py +0 -0
  96. {flimkit-0.13.3 → flimkit-0.13.4}/flimkit/utils/misc.py +0 -0
  97. {flimkit-0.13.3 → flimkit-0.13.4}/flimkit/utils/ome_zarr.py +0 -0
  98. {flimkit-0.13.3 → flimkit-0.13.4}/flimkit/utils/plotting.py +0 -0
  99. {flimkit-0.13.3 → flimkit-0.13.4}/flimkit/utils/roi.py +0 -0
  100. {flimkit-0.13.3 → flimkit-0.13.4}/flimkit/utils/session.py +0 -0
  101. {flimkit-0.13.3 → flimkit-0.13.4}/flimkit/utils/update_check.py +0 -0
  102. {flimkit-0.13.3 → flimkit-0.13.4}/flimkit/utils/xlsx_tools.py +0 -0
  103. {flimkit-0.13.3 → flimkit-0.13.4}/flimkit/utils/xml_utils.py +0 -0
  104. {flimkit-0.13.3 → flimkit-0.13.4}/flimkit.egg-info/SOURCES.txt +0 -0
  105. {flimkit-0.13.3 → flimkit-0.13.4}/flimkit.egg-info/dependency_links.txt +0 -0
  106. {flimkit-0.13.3 → flimkit-0.13.4}/flimkit.egg-info/entry_points.txt +0 -0
  107. {flimkit-0.13.3 → flimkit-0.13.4}/flimkit.egg-info/requires.txt +0 -0
  108. {flimkit-0.13.3 → flimkit-0.13.4}/flimkit.egg-info/top_level.txt +0 -0
  109. {flimkit-0.13.3 → flimkit-0.13.4}/pyproject.toml +0 -0
  110. {flimkit-0.13.3 → flimkit-0.13.4}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: flimkit
3
- Version: 0.13.3
3
+ Version: 0.13.4
4
4
  Summary: Fluorescence lifetime imaging analysis: reading, fitting, phasors and stitching
5
5
  Author-email: Alex Hunt <alexander.hunt@ed.ac.uk>
6
6
  License-Expression: MIT
@@ -3955,6 +3955,17 @@ def discard_default_root():
3955
3955
  pass
3956
3956
  tk._default_root = None
3957
3957
 
3958
+ def salvage_root():
3959
+ root = getattr(tk, '_default_root', None)
3960
+ if root is None:
3961
+ return None
3962
+ try:
3963
+ for child in root.winfo_children():
3964
+ child.destroy()
3965
+ except tk.TclError:
3966
+ return None
3967
+ return root
3968
+
3958
3969
  def plain_root():
3959
3970
  if HAS_DND:
3960
3971
  try:
@@ -3962,7 +3973,9 @@ def plain_root():
3962
3973
  return Tk()
3963
3974
  except Exception as exc:
3964
3975
  print(f'Drag and drop is off, the tkdnd library would not load: {exc}')
3965
- discard_default_root()
3976
+ salvaged = salvage_root()
3977
+ if salvaged is not None:
3978
+ return salvaged
3966
3979
  return tk.Tk()
3967
3980
 
3968
3981
  def apply_fallback_theme(root):
@@ -3988,17 +4001,19 @@ def launch_gui():
3988
4001
  from flimkit import plugins
3989
4002
  plugins.ensure_loaded()
3990
4003
  themed = None
4004
+ root = None
3991
4005
  if HAS_TKMT:
3992
4006
  try:
3993
4007
  themed = FLIMKitGUIThemed(theme='sun-valley', mode='dark')
3994
4008
  except tk.TclError as exc:
3995
- discard_default_root()
4009
+ root = salvage_root()
3996
4010
  print(f'The themed window would not start on this Tk: {exc}')
3997
4011
  print('Falling back. Tk 9 needs tkinterdnd2 0.6.2 or newer and sv-ttk.')
3998
4012
  if themed is not None:
3999
4013
  themed.run(cleanresize=False)
4000
4014
  return
4001
- root = plain_root()
4015
+ if root is None:
4016
+ root = plain_root()
4002
4017
  print(f'Theme: {apply_fallback_theme(root)}')
4003
4018
  FLIMKitGUIFallback(root)
4004
4019
  root.mainloop()
@@ -1,4 +1,4 @@
1
- __version__ = '0.13.3'
1
+ __version__ = '0.13.4'
2
2
  fitter_version = '20'
3
3
 
4
4
  roadmap = '''Flim program roadmap:
@@ -42,5 +42,6 @@ Need to add Phasor once added to the codebase, and update version to 1.0. And ad
42
42
  0.13.1 -> documentation fixes and two things found on a first run against QuPath on a fresh install. Stitching says how big the photon cube is, where it is going and how long the allocation took, and warns when the output drive cannot make sparse files, because exFAT writes the whole 57.2 GB before the first tile is read. flimkit[cellpose] works as well as flimkit[segmentation]. The docs name flimkit-bridge, say which QuPath pipeline writes the photon cube, document FLIMKIT_GPU_BLOCK_BYTES, and drop two claims that were no longer true: that the GPU backends cannot honour a fit window, and that free-tau per-pixel fitting uses batched Adam on the GPU. No fitted number changes, so fitter_version stays at 20.
43
43
  0.13.2 -> the desktop GUI starts on a Tk 9 interpreter. The Windows python.org build of Python 3.14 ships Tk 9.0 where the macOS build still ships 8.6, and two GUI dependencies were built for Tcl 8.6 only, so the window died before it opened with either an unloadable tkdnd library or an invalid command name set_theme, depending on what was installed. tkinterdnd2 moves to 0.6.2 or newer and sv-ttk joins the gui extra, both of which load on Tk 8.6 and Tk 9. FLIMKit also falls back to a plain window rather than dying when a theme or a Tcl package fails at run time, which it could not do before because it chose its path from whether the imports had worked and both libraries import cleanly before failing inside Tcl. No fitted number changes.
44
44
  0.13.3 -> OME-Zarr joins PNG and OME-TIFF in the image export. One store per export, named after the scan, holding a single (c, y, x) float32 array with every exported map as a named channel, so intensity and lifetime are two channels of one image rather than two files. The pixel size and the summed-fit summary go into the store metadata, and the pixel size also fills the NGFF scale transform, so exported maps carry their calibration and their fit numbers. Chunks are compressed with Blosc/zstd, which puts a 512 square float32 intensity and lifetime pair at about a third of the two uncompressed OME-TIFFs. zarr is a base dependency rather than an extra, so the pip install and the compiled application both carry it. No fitted number changes, so fitter_version stays at 20.
45
+ 0.13.4 -> the desktop GUI no longer dies on a Tk 9 interpreter when the Sun Valley theme fails to load. Tk 9 on macOS queues an idle handler when a root window is created and does not cancel it when that root is destroyed, so the fallback path, which threw the themed root away and built a second one, segfaulted inside showRootWindow on the first update_idletasks rather than opening a window. The fallback now reuses the root the themed attempt had already built, clearing its children, because only the theme had failed and the window itself was sound. Tk 8.6 survived the destroy and rebuild, which is why this only showed up on a fresh install. No fitted number changes, so fitter_version stays at 20.
45
46
  1.0.0 -> release version with all core features implemented and tested
46
47
  1.5.0 (or 2.0) -> validation of fitting results with known fluorophores.'''
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: flimkit
3
- Version: 0.13.3
3
+ Version: 0.13.4
4
4
  Summary: Fluorescence lifetime imaging analysis: reading, fitting, phasors and stitching
5
5
  Author-email: Alex Hunt <alexander.hunt@ed.ac.uk>
6
6
  License-Expression: MIT
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes