mlgidGUI 1.0.0__tar.gz → 1.2.0__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 (289) hide show
  1. {mlgidgui-1.0.0 → mlgidgui-1.2.0}/CHANGELOG.md +114 -2
  2. {mlgidgui-1.0.0/mlgidgui.egg-info → mlgidgui-1.2.0}/PKG-INFO +13 -4
  3. {mlgidgui-1.0.0 → mlgidgui-1.2.0}/README.md +12 -3
  4. {mlgidgui-1.0.0 → mlgidgui-1.2.0}/mlgidgui/__init__.py +18 -14
  5. mlgidgui-1.2.0/mlgidgui/arc_roi.py +244 -0
  6. {mlgidgui-1.0.0 → mlgidgui-1.2.0}/mlgidgui/controls_help.py +2 -1
  7. {mlgidgui-1.0.0 → mlgidgui-1.2.0}/mlgidgui/conversion.py +283 -1
  8. {mlgidgui-1.0.0 → mlgidgui-1.2.0}/mlgidgui/conversion_config.py +78 -0
  9. {mlgidgui-1.0.0 → mlgidgui-1.2.0}/mlgidgui/conversion_panel.py +237 -12
  10. {mlgidgui-1.0.0 → mlgidgui-1.2.0}/mlgidgui/file_model.py +1 -1
  11. {mlgidgui-1.0.0 → mlgidgui-1.2.0}/mlgidgui/image_viewer.py +19 -0
  12. {mlgidgui-1.0.0 → mlgidgui-1.2.0}/mlgidgui/image_viewer_interact.py +204 -21
  13. {mlgidgui-1.0.0 → mlgidgui-1.2.0}/mlgidgui/image_viewer_overlays.py +66 -14
  14. {mlgidgui-1.0.0 → mlgidgui-1.2.0}/mlgidgui/main_window_build.py +77 -8
  15. {mlgidgui-1.0.0 → mlgidgui-1.2.0}/mlgidgui/main_window_frames.py +15 -10
  16. {mlgidgui-1.0.0 → mlgidgui-1.2.0}/mlgidgui/main_window_peaks.py +36 -3
  17. {mlgidgui-1.0.0 → mlgidgui-1.2.0}/mlgidgui/main_window_structure.py +34 -0
  18. {mlgidgui-1.0.0 → mlgidgui-1.2.0}/mlgidgui/main_window_tracking.py +7 -0
  19. {mlgidgui-1.0.0 → mlgidgui-1.2.0}/mlgidgui/peaks_table_panel.py +52 -1
  20. {mlgidgui-1.0.0 → mlgidgui-1.2.0}/mlgidgui/phase_views_window.py +83 -0
  21. mlgidgui-1.2.0/mlgidgui/profile_binning.py +162 -0
  22. {mlgidgui-1.0.0 → mlgidgui-1.2.0}/mlgidgui/profile_masking.py +31 -28
  23. {mlgidgui-1.0.0 → mlgidgui-1.2.0}/mlgidgui/profile_viewer.py +122 -113
  24. {mlgidgui-1.0.0 → mlgidgui-1.2.0}/mlgidgui/structure_panel.py +20 -0
  25. {mlgidgui-1.0.0 → mlgidgui-1.2.0}/mlgidgui/structure_tree.py +31 -0
  26. {mlgidgui-1.0.0 → mlgidgui-1.2.0}/mlgidgui/viewer_items.py +46 -1
  27. {mlgidgui-1.0.0 → mlgidgui-1.2.0}/mlgidgui/viewer_styles.py +56 -0
  28. {mlgidgui-1.0.0 → mlgidgui-1.2.0}/mlgidgui/widgets.py +36 -0
  29. {mlgidgui-1.0.0 → mlgidgui-1.2.0/mlgidgui.egg-info}/PKG-INFO +13 -4
  30. {mlgidgui-1.0.0 → mlgidgui-1.2.0}/mlgidgui.egg-info/SOURCES.txt +11 -0
  31. {mlgidgui-1.0.0 → mlgidgui-1.2.0}/pyproject.toml +1 -1
  32. mlgidgui-1.2.0/tests/test_add_to_detected.py +232 -0
  33. mlgidgui-1.2.0/tests/test_axis_units.py +79 -0
  34. mlgidgui-1.2.0/tests/test_cartesian_draw.py +279 -0
  35. mlgidgui-1.2.0/tests/test_conversion_exp_fixed.py +238 -0
  36. mlgidgui-1.2.0/tests/test_conversion_nexus_info.py +276 -0
  37. {mlgidgui-1.0.0 → mlgidgui-1.2.0}/tests/test_conversion_overrides.py +15 -0
  38. mlgidgui-1.2.0/tests/test_delete_selects_next.py +313 -0
  39. mlgidgui-1.2.0/tests/test_dock_resize.py +61 -0
  40. mlgidgui-1.2.0/tests/test_profile_binning.py +128 -0
  41. {mlgidgui-1.0.0 → mlgidgui-1.2.0}/tests/test_profile_overlay_stored.py +29 -21
  42. {mlgidgui-1.0.0 → mlgidgui-1.2.0}/tests/test_scan_tracking_gui.py +77 -0
  43. mlgidgui-1.2.0/tests/test_sim_pens.py +235 -0
  44. mlgidgui-1.2.0/tests/test_structure_refresh.py +228 -0
  45. mlgidgui-1.0.0/tests/test_add_to_detected.py +0 -113
  46. {mlgidgui-1.0.0 → mlgidgui-1.2.0}/LICENSE +0 -0
  47. {mlgidgui-1.0.0 → mlgidgui-1.2.0}/MANIFEST.in +0 -0
  48. {mlgidgui-1.0.0 → mlgidgui-1.2.0}/mlgidgui/__main__.py +0 -0
  49. {mlgidgui-1.0.0 → mlgidgui-1.2.0}/mlgidgui/ai_values.py +0 -0
  50. {mlgidgui-1.0.0 → mlgidgui-1.2.0}/mlgidgui/array_edit_dialog.py +0 -0
  51. {mlgidgui-1.0.0 → mlgidgui-1.2.0}/mlgidgui/assets/app/mlgid_logo_mlgidgui.png +0 -0
  52. {mlgidgui-1.0.0 → mlgidgui-1.2.0}/mlgidgui/assets/app/mlgid_logo_mlgidgui_dark.png +0 -0
  53. {mlgidgui-1.0.0 → mlgidgui-1.2.0}/mlgidgui/assets/app/mlgidgui.ico +0 -0
  54. {mlgidgui-1.0.0 → mlgidgui-1.2.0}/mlgidgui/assets/app/mlgidgui_128.png +0 -0
  55. {mlgidgui-1.0.0 → mlgidgui-1.2.0}/mlgidgui/assets/app/mlgidgui_16.png +0 -0
  56. {mlgidgui-1.0.0 → mlgidgui-1.2.0}/mlgidgui/assets/app/mlgidgui_24.png +0 -0
  57. {mlgidgui-1.0.0 → mlgidgui-1.2.0}/mlgidgui/assets/app/mlgidgui_256.png +0 -0
  58. {mlgidgui-1.0.0 → mlgidgui-1.2.0}/mlgidgui/assets/app/mlgidgui_32.png +0 -0
  59. {mlgidgui-1.0.0 → mlgidgui-1.2.0}/mlgidgui/assets/app/mlgidgui_48.png +0 -0
  60. {mlgidgui-1.0.0 → mlgidgui-1.2.0}/mlgidgui/assets/app/mlgidgui_64.png +0 -0
  61. {mlgidgui-1.0.0 → mlgidgui-1.2.0}/mlgidgui/assets/icons/about.svg +0 -0
  62. {mlgidgui-1.0.0 → mlgidgui-1.2.0}/mlgidgui/assets/icons/chevron-down.svg +0 -0
  63. {mlgidgui-1.0.0 → mlgidgui-1.2.0}/mlgidgui/assets/icons/chevron-right.svg +0 -0
  64. {mlgidgui-1.0.0 → mlgidgui-1.2.0}/mlgidgui/assets/icons/clear-peaks.svg +0 -0
  65. {mlgidgui-1.0.0 → mlgidgui-1.2.0}/mlgidgui/assets/icons/clear-recent.svg +0 -0
  66. {mlgidgui-1.0.0 → mlgidgui-1.2.0}/mlgidgui/assets/icons/close.svg +0 -0
  67. {mlgidgui-1.0.0 → mlgidgui-1.2.0}/mlgidgui/assets/icons/colormap.svg +0 -0
  68. {mlgidgui-1.0.0 → mlgidgui-1.2.0}/mlgidgui/assets/icons/copy-diagnostics.svg +0 -0
  69. {mlgidgui-1.0.0 → mlgidgui-1.2.0}/mlgidgui/assets/icons/cursor-readout.svg +0 -0
  70. {mlgidgui-1.0.0 → mlgidgui-1.2.0}/mlgidgui/assets/icons/dock-conversion.svg +0 -0
  71. {mlgidgui-1.0.0 → mlgidgui-1.2.0}/mlgidgui/assets/icons/dock-display.svg +0 -0
  72. {mlgidgui-1.0.0 → mlgidgui-1.2.0}/mlgidgui/assets/icons/dock-expected.svg +0 -0
  73. {mlgidgui-1.0.0 → mlgidgui-1.2.0}/mlgidgui/assets/icons/dock-logs.svg +0 -0
  74. {mlgidgui-1.0.0 → mlgidgui-1.2.0}/mlgidgui/assets/icons/dock-peaks.svg +0 -0
  75. {mlgidgui-1.0.0 → mlgidgui-1.2.0}/mlgidgui/assets/icons/dock-pipeline.svg +0 -0
  76. {mlgidgui-1.0.0 → mlgidgui-1.2.0}/mlgidgui/assets/icons/dock-profiles.svg +0 -0
  77. {mlgidgui-1.0.0 → mlgidgui-1.2.0}/mlgidgui/assets/icons/dock-tracking.svg +0 -0
  78. {mlgidgui-1.0.0 → mlgidgui-1.2.0}/mlgidgui/assets/icons/dock-tree.svg +0 -0
  79. {mlgidgui-1.0.0 → mlgidgui-1.2.0}/mlgidgui/assets/icons/exit.svg +0 -0
  80. {mlgidgui-1.0.0 → mlgidgui-1.2.0}/mlgidgui/assets/icons/export-csv.svg +0 -0
  81. {mlgidgui-1.0.0 → mlgidgui-1.2.0}/mlgidgui/assets/icons/export-figure.svg +0 -0
  82. {mlgidgui-1.0.0 → mlgidgui-1.2.0}/mlgidgui/assets/icons/file-close.svg +0 -0
  83. {mlgidgui-1.0.0 → mlgidgui-1.2.0}/mlgidgui/assets/icons/file-open.svg +0 -0
  84. {mlgidgui-1.0.0 → mlgidgui-1.2.0}/mlgidgui/assets/icons/file-recent.svg +0 -0
  85. {mlgidgui-1.0.0 → mlgidgui-1.2.0}/mlgidgui/assets/icons/find-peak.svg +0 -0
  86. {mlgidgui-1.0.0 → mlgidgui-1.2.0}/mlgidgui/assets/icons/fullscreen.svg +0 -0
  87. {mlgidgui-1.0.0 → mlgidgui-1.2.0}/mlgidgui/assets/icons/help-controls.svg +0 -0
  88. {mlgidgui-1.0.0 → mlgidgui-1.2.0}/mlgidgui/assets/icons/log-scale.svg +0 -0
  89. {mlgidgui-1.0.0 → mlgidgui-1.2.0}/mlgidgui/assets/icons/next.svg +0 -0
  90. {mlgidgui-1.0.0 → mlgidgui-1.2.0}/mlgidgui/assets/icons/node-dataset.svg +0 -0
  91. {mlgidgui-1.0.0 → mlgidgui-1.2.0}/mlgidgui/assets/icons/node-group.svg +0 -0
  92. {mlgidgui-1.0.0 → mlgidgui-1.2.0}/mlgidgui/assets/icons/node-link.svg +0 -0
  93. {mlgidgui-1.0.0 → mlgidgui-1.2.0}/mlgidgui/assets/icons/pause.svg +0 -0
  94. {mlgidgui-1.0.0 → mlgidgui-1.2.0}/mlgidgui/assets/icons/play.svg +0 -0
  95. {mlgidgui-1.0.0 → mlgidgui-1.2.0}/mlgidgui/assets/icons/playback-settings.svg +0 -0
  96. {mlgidgui-1.0.0 → mlgidgui-1.2.0}/mlgidgui/assets/icons/prev.svg +0 -0
  97. {mlgidgui-1.0.0 → mlgidgui-1.2.0}/mlgidgui/assets/icons/redo.svg +0 -0
  98. {mlgidgui-1.0.0 → mlgidgui-1.2.0}/mlgidgui/assets/icons/refresh.svg +0 -0
  99. {mlgidgui-1.0.0 → mlgidgui-1.2.0}/mlgidgui/assets/icons/reset-layout.svg +0 -0
  100. {mlgidgui-1.0.0 → mlgidgui-1.2.0}/mlgidgui/assets/icons/reset-peaks.svg +0 -0
  101. {mlgidgui-1.0.0 → mlgidgui-1.2.0}/mlgidgui/assets/icons/reset-zoom.svg +0 -0
  102. {mlgidgui-1.0.0 → mlgidgui-1.2.0}/mlgidgui/assets/icons/save-as.svg +0 -0
  103. {mlgidgui-1.0.0 → mlgidgui-1.2.0}/mlgidgui/assets/icons/save.svg +0 -0
  104. {mlgidgui-1.0.0 → mlgidgui-1.2.0}/mlgidgui/assets/icons/theme-dark.svg +0 -0
  105. {mlgidgui-1.0.0 → mlgidgui-1.2.0}/mlgidgui/assets/icons/theme-light.svg +0 -0
  106. {mlgidgui-1.0.0 → mlgidgui-1.2.0}/mlgidgui/assets/icons/undo.svg +0 -0
  107. {mlgidgui-1.0.0 → mlgidgui-1.2.0}/mlgidgui/assets/icons/view-cartesian.svg +0 -0
  108. {mlgidgui-1.0.0 → mlgidgui-1.2.0}/mlgidgui/assets/icons/view-polar.svg +0 -0
  109. {mlgidgui-1.0.0 → mlgidgui-1.2.0}/mlgidgui/browser_widgets.py +0 -0
  110. {mlgidgui-1.0.0 → mlgidgui-1.2.0}/mlgidgui/calibration_dialog.py +0 -0
  111. {mlgidgui-1.0.0 → mlgidgui-1.2.0}/mlgidgui/desktop_entry.py +0 -0
  112. {mlgidgui-1.0.0 → mlgidgui-1.2.0}/mlgidgui/detection_config.py +0 -0
  113. {mlgidgui-1.0.0 → mlgidgui-1.2.0}/mlgidgui/detection_model.py +0 -0
  114. {mlgidgui-1.0.0 → mlgidgui-1.2.0}/mlgidgui/diagnostics.py +0 -0
  115. {mlgidgui-1.0.0 → mlgidgui-1.2.0}/mlgidgui/figure_export_window.py +0 -0
  116. {mlgidgui-1.0.0 → mlgidgui-1.2.0}/mlgidgui/file_dialogs.py +0 -0
  117. {mlgidgui-1.0.0 → mlgidgui-1.2.0}/mlgidgui/fit.py +0 -0
  118. {mlgidgui-1.0.0 → mlgidgui-1.2.0}/mlgidgui/flow_layout.py +0 -0
  119. {mlgidgui-1.0.0 → mlgidgui-1.2.0}/mlgidgui/frame_range.py +0 -0
  120. {mlgidgui-1.0.0 → mlgidgui-1.2.0}/mlgidgui/h5_edit.py +0 -0
  121. {mlgidgui-1.0.0 → mlgidgui-1.2.0}/mlgidgui/h5_edit_ops.py +0 -0
  122. {mlgidgui-1.0.0 → mlgidgui-1.2.0}/mlgidgui/h5_repack.py +0 -0
  123. {mlgidgui-1.0.0 → mlgidgui-1.2.0}/mlgidgui/icons.py +0 -0
  124. {mlgidgui-1.0.0 → mlgidgui-1.2.0}/mlgidgui/image_viewer_render.py +0 -0
  125. {mlgidgui-1.0.0 → mlgidgui-1.2.0}/mlgidgui/import_dialog.py +0 -0
  126. {mlgidgui-1.0.0 → mlgidgui-1.2.0}/mlgidgui/main_window.py +0 -0
  127. {mlgidgui-1.0.0 → mlgidgui-1.2.0}/mlgidgui/main_window_constants.py +0 -0
  128. {mlgidgui-1.0.0 → mlgidgui-1.2.0}/mlgidgui/main_window_dialogs.py +0 -0
  129. {mlgidgui-1.0.0 → mlgidgui-1.2.0}/mlgidgui/main_window_files.py +0 -0
  130. {mlgidgui-1.0.0 → mlgidgui-1.2.0}/mlgidgui/main_window_matched.py +0 -0
  131. {mlgidgui-1.0.0 → mlgidgui-1.2.0}/mlgidgui/main_window_menus.py +0 -0
  132. {mlgidgui-1.0.0 → mlgidgui-1.2.0}/mlgidgui/main_window_pipeline.py +0 -0
  133. {mlgidgui-1.0.0 → mlgidgui-1.2.0}/mlgidgui/main_window_preview.py +0 -0
  134. {mlgidgui-1.0.0 → mlgidgui-1.2.0}/mlgidgui/main_window_sim.py +0 -0
  135. {mlgidgui-1.0.0 → mlgidgui-1.2.0}/mlgidgui/main_window_update.py +0 -0
  136. {mlgidgui-1.0.0 → mlgidgui-1.2.0}/mlgidgui/manual_fit.py +0 -0
  137. {mlgidgui-1.0.0 → mlgidgui-1.2.0}/mlgidgui/nexus_schema.py +0 -0
  138. {mlgidgui-1.0.0 → mlgidgui-1.2.0}/mlgidgui/parameter_panel.py +0 -0
  139. {mlgidgui-1.0.0 → mlgidgui-1.2.0}/mlgidgui/peak_clipboard.py +0 -0
  140. {mlgidgui-1.0.0 → mlgidgui-1.2.0}/mlgidgui/peak_link.py +0 -0
  141. {mlgidgui-1.0.0 → mlgidgui-1.2.0}/mlgidgui/peak_lists.py +0 -0
  142. {mlgidgui-1.0.0 → mlgidgui-1.2.0}/mlgidgui/peak_picking.py +0 -0
  143. {mlgidgui-1.0.0 → mlgidgui-1.2.0}/mlgidgui/peak_zoom.py +0 -0
  144. {mlgidgui-1.0.0 → mlgidgui-1.2.0}/mlgidgui/pen_picker.py +0 -0
  145. {mlgidgui-1.0.0 → mlgidgui-1.2.0}/mlgidgui/phase_tracking.py +0 -0
  146. {mlgidgui-1.0.0 → mlgidgui-1.2.0}/mlgidgui/phase_views_dialogs.py +0 -0
  147. {mlgidgui-1.0.0 → mlgidgui-1.2.0}/mlgidgui/pipeline.py +0 -0
  148. {mlgidgui-1.0.0 → mlgidgui-1.2.0}/mlgidgui/pipeline_panel.py +0 -0
  149. {mlgidgui-1.0.0 → mlgidgui-1.2.0}/mlgidgui/polar.py +0 -0
  150. {mlgidgui-1.0.0 → mlgidgui-1.2.0}/mlgidgui/preview_fit.py +0 -0
  151. {mlgidgui-1.0.0 → mlgidgui-1.2.0}/mlgidgui/roi_intensity.py +0 -0
  152. {mlgidgui-1.0.0 → mlgidgui-1.2.0}/mlgidgui/scan_tracking_panel.py +0 -0
  153. {mlgidgui-1.0.0 → mlgidgui-1.2.0}/mlgidgui/selftest.py +0 -0
  154. {mlgidgui-1.0.0 → mlgidgui-1.2.0}/mlgidgui/session.py +0 -0
  155. {mlgidgui-1.0.0 → mlgidgui-1.2.0}/mlgidgui/settings_migration.py +0 -0
  156. {mlgidgui-1.0.0 → mlgidgui-1.2.0}/mlgidgui/simulation_pattern.py +0 -0
  157. {mlgidgui-1.0.0 → mlgidgui-1.2.0}/mlgidgui/skin.py +0 -0
  158. {mlgidgui-1.0.0 → mlgidgui-1.2.0}/mlgidgui/structure_clipboard.py +0 -0
  159. {mlgidgui-1.0.0 → mlgidgui-1.2.0}/mlgidgui/structure_dialogs.py +0 -0
  160. {mlgidgui-1.0.0 → mlgidgui-1.2.0}/mlgidgui/theme.py +0 -0
  161. {mlgidgui-1.0.0 → mlgidgui-1.2.0}/mlgidgui/theme_tokens.py +0 -0
  162. {mlgidgui-1.0.0 → mlgidgui-1.2.0}/mlgidgui/update_check.py +0 -0
  163. {mlgidgui-1.0.0 → mlgidgui-1.2.0}/mlgidgui/update_ui.py +0 -0
  164. {mlgidgui-1.0.0 → mlgidgui-1.2.0}/mlgidgui/welcome_view.py +0 -0
  165. {mlgidgui-1.0.0 → mlgidgui-1.2.0}/mlgidgui/workers.py +0 -0
  166. {mlgidgui-1.0.0 → mlgidgui-1.2.0}/mlgidgui/workflow_rail.py +0 -0
  167. {mlgidgui-1.0.0 → mlgidgui-1.2.0}/mlgidgui.egg-info/dependency_links.txt +0 -0
  168. {mlgidgui-1.0.0 → mlgidgui-1.2.0}/mlgidgui.egg-info/entry_points.txt +0 -0
  169. {mlgidgui-1.0.0 → mlgidgui-1.2.0}/mlgidgui.egg-info/requires.txt +0 -0
  170. {mlgidgui-1.0.0 → mlgidgui-1.2.0}/mlgidgui.egg-info/top_level.txt +0 -0
  171. {mlgidgui-1.0.0 → mlgidgui-1.2.0}/setup.cfg +0 -0
  172. {mlgidgui-1.0.0 → mlgidgui-1.2.0}/setup.py +0 -0
  173. {mlgidgui-1.0.0 → mlgidgui-1.2.0}/tests/test_add_predicted_gui.py +0 -0
  174. {mlgidgui-1.0.0 → mlgidgui-1.2.0}/tests/test_ai_values.py +0 -0
  175. {mlgidgui-1.0.0 → mlgidgui-1.2.0}/tests/test_array_edit.py +0 -0
  176. {mlgidgui-1.0.0 → mlgidgui-1.2.0}/tests/test_aspect_ratio.py +0 -0
  177. {mlgidgui-1.0.0 → mlgidgui-1.2.0}/tests/test_async_entry_switch.py +0 -0
  178. {mlgidgui-1.0.0 → mlgidgui-1.2.0}/tests/test_async_open.py +0 -0
  179. {mlgidgui-1.0.0 → mlgidgui-1.2.0}/tests/test_batch_fit_2d.py +0 -0
  180. {mlgidgui-1.0.0 → mlgidgui-1.2.0}/tests/test_blocked_tracking.py +0 -0
  181. {mlgidgui-1.0.0 → mlgidgui-1.2.0}/tests/test_branding.py +0 -0
  182. {mlgidgui-1.0.0 → mlgidgui-1.2.0}/tests/test_browser_entry_select.py +0 -0
  183. {mlgidgui-1.0.0 → mlgidgui-1.2.0}/tests/test_bulk_delete.py +0 -0
  184. {mlgidgui-1.0.0 → mlgidgui-1.2.0}/tests/test_button_variants.py +0 -0
  185. {mlgidgui-1.0.0 → mlgidgui-1.2.0}/tests/test_card_language.py +0 -0
  186. {mlgidgui-1.0.0 → mlgidgui-1.2.0}/tests/test_cif_empty_pattern.py +0 -0
  187. {mlgidgui-1.0.0 → mlgidgui-1.2.0}/tests/test_contrast_persists.py +0 -0
  188. {mlgidgui-1.0.0 → mlgidgui-1.2.0}/tests/test_controls_help.py +0 -0
  189. {mlgidgui-1.0.0 → mlgidgui-1.2.0}/tests/test_delete_peak_row.py +0 -0
  190. {mlgidgui-1.0.0 → mlgidgui-1.2.0}/tests/test_desktop_entry.py +0 -0
  191. {mlgidgui-1.0.0 → mlgidgui-1.2.0}/tests/test_detection_model.py +0 -0
  192. {mlgidgui-1.0.0 → mlgidgui-1.2.0}/tests/test_detection_params.py +0 -0
  193. {mlgidgui-1.0.0 → mlgidgui-1.2.0}/tests/test_diagnostics.py +0 -0
  194. {mlgidgui-1.0.0 → mlgidgui-1.2.0}/tests/test_dock_layout.py +0 -0
  195. {mlgidgui-1.0.0 → mlgidgui-1.2.0}/tests/test_energy_guard.py +0 -0
  196. {mlgidgui-1.0.0 → mlgidgui-1.2.0}/tests/test_fabio_gui.py +0 -0
  197. {mlgidgui-1.0.0 → mlgidgui-1.2.0}/tests/test_fabio_stack.py +0 -0
  198. {mlgidgui-1.0.0 → mlgidgui-1.2.0}/tests/test_figure_export_svg.py +0 -0
  199. {mlgidgui-1.0.0 → mlgidgui-1.2.0}/tests/test_file_browser_delete.py +0 -0
  200. {mlgidgui-1.0.0 → mlgidgui-1.2.0}/tests/test_file_dialogs.py +0 -0
  201. {mlgidgui-1.0.0 → mlgidgui-1.2.0}/tests/test_file_tree_refresh.py +0 -0
  202. {mlgidgui-1.0.0 → mlgidgui-1.2.0}/tests/test_fill_matched_sweep_gui.py +0 -0
  203. {mlgidgui-1.0.0 → mlgidgui-1.2.0}/tests/test_fit_area.py +0 -0
  204. {mlgidgui-1.0.0 → mlgidgui-1.2.0}/tests/test_fit_gaussian.py +0 -0
  205. {mlgidgui-1.0.0 → mlgidgui-1.2.0}/tests/test_fit_mode_selector.py +0 -0
  206. {mlgidgui-1.0.0 → mlgidgui-1.2.0}/tests/test_flow_layout.py +0 -0
  207. {mlgidgui-1.0.0 → mlgidgui-1.2.0}/tests/test_flow_layout_collapse.py +0 -0
  208. {mlgidgui-1.0.0 → mlgidgui-1.2.0}/tests/test_frame_range_parser.py +0 -0
  209. {mlgidgui-1.0.0 → mlgidgui-1.2.0}/tests/test_frame_spinbox.py +0 -0
  210. {mlgidgui-1.0.0 → mlgidgui-1.2.0}/tests/test_frozen_app.py +0 -0
  211. {mlgidgui-1.0.0 → mlgidgui-1.2.0}/tests/test_h5_edit.py +0 -0
  212. {mlgidgui-1.0.0 → mlgidgui-1.2.0}/tests/test_h5_edit_undo.py +0 -0
  213. {mlgidgui-1.0.0 → mlgidgui-1.2.0}/tests/test_h5_repack.py +0 -0
  214. {mlgidgui-1.0.0 → mlgidgui-1.2.0}/tests/test_hermetic_guard.py +0 -0
  215. {mlgidgui-1.0.0 → mlgidgui-1.2.0}/tests/test_icons.py +0 -0
  216. {mlgidgui-1.0.0 → mlgidgui-1.2.0}/tests/test_import_converted.py +0 -0
  217. {mlgidgui-1.0.0 → mlgidgui-1.2.0}/tests/test_inject_fitted_peaks_op.py +0 -0
  218. {mlgidgui-1.0.0 → mlgidgui-1.2.0}/tests/test_lazy_normalize.py +0 -0
  219. {mlgidgui-1.0.0 → mlgidgui-1.2.0}/tests/test_lazy_peaks.py +0 -0
  220. {mlgidgui-1.0.0 → mlgidgui-1.2.0}/tests/test_lazy_raw_loading.py +0 -0
  221. {mlgidgui-1.0.0 → mlgidgui-1.2.0}/tests/test_manual_fit.py +0 -0
  222. {mlgidgui-1.0.0 → mlgidgui-1.2.0}/tests/test_manual_peak_box_ops.py +0 -0
  223. {mlgidgui-1.0.0 → mlgidgui-1.2.0}/tests/test_matched_consolidation.py +0 -0
  224. {mlgidgui-1.0.0 → mlgidgui-1.2.0}/tests/test_matched_identity.py +0 -0
  225. {mlgidgui-1.0.0 → mlgidgui-1.2.0}/tests/test_matched_invalidation_on_refit.py +0 -0
  226. {mlgidgui-1.0.0 → mlgidgui-1.2.0}/tests/test_matched_remap_on_fitted_delete.py +0 -0
  227. {mlgidgui-1.0.0 → mlgidgui-1.2.0}/tests/test_mixin_slots.py +0 -0
  228. {mlgidgui-1.0.0 → mlgidgui-1.2.0}/tests/test_multi_select.py +0 -0
  229. {mlgidgui-1.0.0 → mlgidgui-1.2.0}/tests/test_neighbour_masking.py +0 -0
  230. {mlgidgui-1.0.0 → mlgidgui-1.2.0}/tests/test_nexus_schema.py +0 -0
  231. {mlgidgui-1.0.0 → mlgidgui-1.2.0}/tests/test_no_hardcoded_colours.py +0 -0
  232. {mlgidgui-1.0.0 → mlgidgui-1.2.0}/tests/test_paste_to_range.py +0 -0
  233. {mlgidgui-1.0.0 → mlgidgui-1.2.0}/tests/test_peak_clipboard.py +0 -0
  234. {mlgidgui-1.0.0 → mlgidgui-1.2.0}/tests/test_peak_dataset_bootstrap.py +0 -0
  235. {mlgidgui-1.0.0 → mlgidgui-1.2.0}/tests/test_peak_linking.py +0 -0
  236. {mlgidgui-1.0.0 → mlgidgui-1.2.0}/tests/test_peak_lists.py +0 -0
  237. {mlgidgui-1.0.0 → mlgidgui-1.2.0}/tests/test_peak_picking.py +0 -0
  238. {mlgidgui-1.0.0 → mlgidgui-1.2.0}/tests/test_peak_roundtrip.py +0 -0
  239. {mlgidgui-1.0.0 → mlgidgui-1.2.0}/tests/test_peak_score_edit.py +0 -0
  240. {mlgidgui-1.0.0 → mlgidgui-1.2.0}/tests/test_peak_zoom.py +0 -0
  241. {mlgidgui-1.0.0 → mlgidgui-1.2.0}/tests/test_peaks_table_interaction.py +0 -0
  242. {mlgidgui-1.0.0 → mlgidgui-1.2.0}/tests/test_pen_picker.py +0 -0
  243. {mlgidgui-1.0.0 → mlgidgui-1.2.0}/tests/test_phase_tracking.py +0 -0
  244. {mlgidgui-1.0.0 → mlgidgui-1.2.0}/tests/test_pipeline_entry_preflight.py +0 -0
  245. {mlgidgui-1.0.0 → mlgidgui-1.2.0}/tests/test_pipeline_frame_scope.py +0 -0
  246. {mlgidgui-1.0.0 → mlgidgui-1.2.0}/tests/test_pipeline_primary_table.py +0 -0
  247. {mlgidgui-1.0.0 → mlgidgui-1.2.0}/tests/test_pipeline_progress.py +0 -0
  248. {mlgidgui-1.0.0 → mlgidgui-1.2.0}/tests/test_pipeline_queue_snapshot.py +0 -0
  249. {mlgidgui-1.0.0 → mlgidgui-1.2.0}/tests/test_polar_to_qxyz.py +0 -0
  250. {mlgidgui-1.0.0 → mlgidgui-1.2.0}/tests/test_progress_accent.py +0 -0
  251. {mlgidgui-1.0.0 → mlgidgui-1.2.0}/tests/test_pygid_incompat_guard.py +0 -0
  252. {mlgidgui-1.0.0 → mlgidgui-1.2.0}/tests/test_quick_select.py +0 -0
  253. {mlgidgui-1.0.0 → mlgidgui-1.2.0}/tests/test_raw_async_gui.py +0 -0
  254. {mlgidgui-1.0.0 → mlgidgui-1.2.0}/tests/test_raw_preview_flip.py +0 -0
  255. {mlgidgui-1.0.0 → mlgidgui-1.2.0}/tests/test_raw_session.py +0 -0
  256. {mlgidgui-1.0.0 → mlgidgui-1.2.0}/tests/test_reset_analysis.py +0 -0
  257. {mlgidgui-1.0.0 → mlgidgui-1.2.0}/tests/test_roi_intensity.py +0 -0
  258. {mlgidgui-1.0.0 → mlgidgui-1.2.0}/tests/test_score_cutoff.py +0 -0
  259. {mlgidgui-1.0.0 → mlgidgui-1.2.0}/tests/test_selection_sync.py +0 -0
  260. {mlgidgui-1.0.0 → mlgidgui-1.2.0}/tests/test_session_reactivation.py +0 -0
  261. {mlgidgui-1.0.0 → mlgidgui-1.2.0}/tests/test_settings_migration.py +0 -0
  262. {mlgidgui-1.0.0 → mlgidgui-1.2.0}/tests/test_shallow_entry_listing.py +0 -0
  263. {mlgidgui-1.0.0 → mlgidgui-1.2.0}/tests/test_sim_overlay_gui.py +0 -0
  264. {mlgidgui-1.0.0 → mlgidgui-1.2.0}/tests/test_simulation_pattern.py +0 -0
  265. {mlgidgui-1.0.0 → mlgidgui-1.2.0}/tests/test_skin_qss.py +0 -0
  266. {mlgidgui-1.0.0 → mlgidgui-1.2.0}/tests/test_smoke_construction.py +0 -0
  267. {mlgidgui-1.0.0 → mlgidgui-1.2.0}/tests/test_smoke_session.py +0 -0
  268. {mlgidgui-1.0.0 → mlgidgui-1.2.0}/tests/test_smoke_silx_detach.py +0 -0
  269. {mlgidgui-1.0.0 → mlgidgui-1.2.0}/tests/test_status_bar_activity.py +0 -0
  270. {mlgidgui-1.0.0 → mlgidgui-1.2.0}/tests/test_stored_fit_readout.py +0 -0
  271. {mlgidgui-1.0.0 → mlgidgui-1.2.0}/tests/test_structure_clipboard.py +0 -0
  272. {mlgidgui-1.0.0 → mlgidgui-1.2.0}/tests/test_structure_edits.py +0 -0
  273. {mlgidgui-1.0.0 → mlgidgui-1.2.0}/tests/test_structure_layout.py +0 -0
  274. {mlgidgui-1.0.0 → mlgidgui-1.2.0}/tests/test_structure_links.py +0 -0
  275. {mlgidgui-1.0.0 → mlgidgui-1.2.0}/tests/test_structure_panel.py +0 -0
  276. {mlgidgui-1.0.0 → mlgidgui-1.2.0}/tests/test_structure_search.py +0 -0
  277. {mlgidgui-1.0.0 → mlgidgui-1.2.0}/tests/test_structure_tree.py +0 -0
  278. {mlgidgui-1.0.0 → mlgidgui-1.2.0}/tests/test_structure_tree_edits.py +0 -0
  279. {mlgidgui-1.0.0 → mlgidgui-1.2.0}/tests/test_theme_apply.py +0 -0
  280. {mlgidgui-1.0.0 → mlgidgui-1.2.0}/tests/test_theme_persistence.py +0 -0
  281. {mlgidgui-1.0.0 → mlgidgui-1.2.0}/tests/test_theme_tokens.py +0 -0
  282. {mlgidgui-1.0.0 → mlgidgui-1.2.0}/tests/test_undo_redo_shortcut.py +0 -0
  283. {mlgidgui-1.0.0 → mlgidgui-1.2.0}/tests/test_update_check.py +0 -0
  284. {mlgidgui-1.0.0 → mlgidgui-1.2.0}/tests/test_view_preservation.py +0 -0
  285. {mlgidgui-1.0.0 → mlgidgui-1.2.0}/tests/test_viewer_controls.py +0 -0
  286. {mlgidgui-1.0.0 → mlgidgui-1.2.0}/tests/test_viewer_released_frame_source.py +0 -0
  287. {mlgidgui-1.0.0 → mlgidgui-1.2.0}/tests/test_welcome_view.py +0 -0
  288. {mlgidgui-1.0.0 → mlgidgui-1.2.0}/tests/test_wheel_guard.py +0 -0
  289. {mlgidgui-1.0.0 → mlgidgui-1.2.0}/tests/test_workflow_rail.py +0 -0
@@ -4,6 +4,117 @@ All notable changes to mlgidGUI (called mlgidLAB until 1.0.0) are recorded
4
4
  here. Versions follow [PEP 440](https://peps.python.org/pep-0440/); `aN`
5
5
  suffixes are alpha pre-releases.
6
6
 
7
+ ## 1.2.0 (2026-11-22)
8
+
9
+ ### Added
10
+
11
+ - **Fixed fields in the conversion's Experimental metadata.** The
12
+ dropdown now starts with `start_time`, `end_time`, `source_type`,
13
+ `source_name`, `instrument_name` and `temperature`; the custom
14
+ key/value table below it works as before. A field left empty is not
15
+ touched, so pygid's own handling stays (`nan` for the first four,
16
+ nothing for `source_name` and `temperature`). The values are written
17
+ after the conversion, so they also survive scans converted in several
18
+ batches. A custom row named like a fixed field fills it.
19
+
20
+ - **Deleting a peak selects the next one.** After a detected or fitted
21
+ peak is deleted (Delete key, the Peaks table, or the Delete button), the
22
+ peak with the next id after it is selected, so working through a frame
23
+ no longer needs a click between deletes. If it was the last one, the
24
+ last remaining peak is selected. Undo selects the restored peak, redo
25
+ goes back to the neighbour.
26
+
27
+ - **Refresh button in the Structure tab.** A detection, fitting or
28
+ matching run, or a conversion, changes the file without telling the
29
+ Structure tab, so a new group (such as the `mlgidDETECT` metadata)
30
+ stayed missing from the tree. The new *Refresh* button, first in the
31
+ row above the tree, re-reads the open files into the tree and the
32
+ selected node. Open groups and the selection stay where they were. It
33
+ waits while a run is writing to the file.
34
+
35
+ - **Colour, line style and width of the Expected-pattern boxes.** Under
36
+ "Show expected pattern" there are now three swatches, *missed*,
37
+ *explained* and *selected*. A click opens the same pen editor as the
38
+ Detected and Fitted swatches, and the boxes on the image follow as you
39
+ change it. The choice is remembered, and *Automatic* puts the original
40
+ look back. The swatches also show what each colour means.
41
+
42
+ ### Fixed
43
+
44
+ - **Axis units no longer get an SI prefix.** The radius axes could read
45
+ "mÅ⁻¹" (with the numbers multiplied by 1000) when the range was below
46
+ 1 Å⁻¹, "kÅ⁻¹" above 1000, and the angle axis "mdeg". The image and
47
+ profile axes now always show Å⁻¹, degrees and pixels with the real
48
+ numbers.
49
+
50
+ ## 1.1.0 (2026-11-16)
51
+
52
+ ### Added
53
+
54
+ - **User, technique and beamtime information on conversion.** The
55
+ Conversion panel's Metadata card has three new dropdowns, *User
56
+ information*, *Technique information* and *Beamtime information*, with
57
+ pygid's own field names. Nothing is mandatory. You can add several
58
+ users (each saved under `users/<field_name>`), add techniques (they are
59
+ listed after the x-ray diffraction / GIWAXS entries pygid records
60
+ itself), and fill the beamtime's description, proposal_id, beamtime_id,
61
+ principal_investigator, title and DOI. pygid cannot take these during
62
+ conversion, so mlgidGUI writes them into every converted entry right
63
+ after it. As in pygid, once any beamtime field is filled the empty
64
+ ones are saved as `nan`; only beamtime_id is left out when empty. The
65
+ existing sample and experimental metadata blocks are now dropdowns too,
66
+ so the card opens compact.
67
+ - **Draw and edit boxes in the Cartesian view.** Ctrl+Alt-drag now also
68
+ works in the Cartesian view: the two drag points are opposite corners
69
+ of an arc box. A selected manual or detected box gets handles there
70
+ too (inner and outer radius, both angular edges, drag inside to move),
71
+ with undo, just like the rectangle handles in the polar view. Adding
72
+ the box to detected or fitted, the profiles and the fits work exactly
73
+ as before.
74
+ - **Peak ids in the tracking views.** The Show views window has a *Show
75
+ peak ids* checkbox that labels every tracked point in the Trajectories
76
+ and q-map tabs with its fitted peak id (the id in the Peaks dock). Off
77
+ by default; at most 2000 labels per plot, narrow the frame range for
78
+ more.
79
+
80
+ ### Changed
81
+
82
+ - **Smooth profiles, built from every pixel.** The radial and angular
83
+ profiles are now made the way silx makes them: every pixel inside the
84
+ box's angle range (radial profile) or |q| range (angular profile) is
85
+ placed at its own exact |q| or angle, and each point is the mean of
86
+ the pixels in a one-pixel-wide bin. Before, the profiles averaged a
87
+ coarser polar copy of the image whose sampling skipped many pixels,
88
+ which made them rough. Expect smoother curves with finer detail; live
89
+ 1D fits and the curves drawn for saved peaks use the new profiles.
90
+ - **Conversion saves into one entry by default.** "Save as" now starts on
91
+ *Single entry in single file*: all selected scans become the frames of
92
+ one entry in `converted.h5`. The other modes are still in the list.
93
+ Appending to an existing entry needs one of them, since a single entry
94
+ is always new.
95
+
96
+ ### Fixed
97
+
98
+ - **The score of a peak added with "Add to detected" can be changed
99
+ later.** The manual box stays on top of the new detected peak, and a
100
+ click used to pick the box, whose High/Medium/Low only applies to the
101
+ next add. A click there now selects the detected peak, whose score
102
+ editor writes to the file; click again to reach the box.
103
+ - **The Profiles / Peaks panel can be dragged taller.** The border
104
+ between the image and the bottom panels hardly moved, because the
105
+ hidden Structure editor and welcome page kept the image area at their
106
+ own minimum height. Only the page you are looking at counts now, so
107
+ the profiles and the peak list can take most of the window.
108
+ - **The Peaks dock shows edited values at once.** Changing a peak's score
109
+ in the Display dock, or dragging a box, now updates its row in the
110
+ Peaks dock straight away (before, the old value stayed until you
111
+ changed frame). The row stays selected.
112
+ - **Windows taskbar icon.** The running window now shows the mlgidGUI icon
113
+ in the taskbar instead of Windows' default symbol. The application ID is
114
+ set before the window system starts, and the installer's start menu and
115
+ desktop shortcuts carry the same ID, so a pinned button and the running
116
+ window are one button.
117
+
7
118
  ## 1.0.0 (2026-10-30): mlgidLAB is now mlgidGUI
8
119
 
9
120
  The application you know as mlgidLAB is called **mlgidGUI** from this
@@ -39,8 +150,9 @@ where it lives.
39
150
  - **Already have the older mlgidGUI (the annotation tool, up to 0.6.2)?**
40
151
  It is a different program with the same name. `pip install --upgrade
41
152
  mlgidgui` into the same environment replaces it with this application;
42
- use a separate environment if you want to keep both. The old tool is
43
- kept as `mlgid-project/mlgidGUI-legacy`.
153
+ use a separate environment if you want to keep both. The old tool's full
154
+ history and releases (0.3.8.6 to 0.6.2) are part of this repository; the
155
+ former standalone repository `mlgid-project/mlgidGUI-legacy` is archived.
44
156
 
45
157
  **What carries over**
46
158
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: mlgidgui
3
- Version: 1.0.0
3
+ Version: 1.2.0
4
4
  Summary: mlgidGUI: graphical interface for the mlgidBASE GIWAXS analysis pipeline
5
5
  Author-email: Nico Lerch <nico.lerch@uni-tuebingen.de>
6
6
  License-Expression: MIT
@@ -179,11 +179,20 @@ For contributor-facing architecture and module reference docs please contact me.
179
179
  The citation for mlgidGUI will be listed here once the paper about it is
180
180
  published.
181
181
 
182
+ **Looking for the version described in the JOSS paper?** The paper
183
+ ([doi:10.21105/joss.08499](https://doi.org/10.21105/joss.08499)) describes the
184
+ original mlgidGUI annotation tool. Its code is in this repository at tag
185
+ [0.5.1](https://github.com/mlgid-project/mlgidGUI/tree/0.5.1), archived at
186
+ [doi:10.5281/zenodo.17426687](https://doi.org/10.5281/zenodo.17426687). If you
187
+ use that tool, cite that paper.
188
+
182
189
  ## Name
183
190
 
184
- mlgidGUI was called mlgidLAB until version 1.0. An earlier, unrelated
185
- annotation tool also carried the name mlgidGUI (versions up to 0.6.2); it is
186
- kept as [mlgidGUI-legacy](https://github.com/mlgid-project/mlgidGUI-legacy).
191
+ mlgidGUI was called mlgidLAB until version 1.0. A previous annotation tool
192
+ from the same group also carried the name mlgidGUI (versions 0.3.8.6 to
193
+ 0.6.2). Its full history is part of this repository: see tag
194
+ [0.6.2](https://github.com/mlgid-project/mlgidGUI/tree/0.6.2) for its last
195
+ release. The former standalone repository `mlgidGUI-legacy` is archived.
187
196
 
188
197
  ## License
189
198
 
@@ -130,11 +130,20 @@ For contributor-facing architecture and module reference docs please contact me.
130
130
  The citation for mlgidGUI will be listed here once the paper about it is
131
131
  published.
132
132
 
133
+ **Looking for the version described in the JOSS paper?** The paper
134
+ ([doi:10.21105/joss.08499](https://doi.org/10.21105/joss.08499)) describes the
135
+ original mlgidGUI annotation tool. Its code is in this repository at tag
136
+ [0.5.1](https://github.com/mlgid-project/mlgidGUI/tree/0.5.1), archived at
137
+ [doi:10.5281/zenodo.17426687](https://doi.org/10.5281/zenodo.17426687). If you
138
+ use that tool, cite that paper.
139
+
133
140
  ## Name
134
141
 
135
- mlgidGUI was called mlgidLAB until version 1.0. An earlier, unrelated
136
- annotation tool also carried the name mlgidGUI (versions up to 0.6.2); it is
137
- kept as [mlgidGUI-legacy](https://github.com/mlgid-project/mlgidGUI-legacy).
142
+ mlgidGUI was called mlgidLAB until version 1.0. A previous annotation tool
143
+ from the same group also carried the name mlgidGUI (versions 0.3.8.6 to
144
+ 0.6.2). Its full history is part of this repository: see tag
145
+ [0.6.2](https://github.com/mlgid-project/mlgidGUI/tree/0.6.2) for its last
146
+ release. The former standalone repository `mlgidGUI-legacy` is archived.
138
147
 
139
148
  ## License
140
149
 
@@ -16,7 +16,7 @@ os.environ.setdefault("HDF5_USE_FILE_LOCKING", "FALSE")
16
16
 
17
17
  from PySide6.QtWidgets import QApplication
18
18
 
19
- __version__ = "1.0.0"
19
+ __version__ = "1.2.0"
20
20
 
21
21
 
22
22
  def _enable_crash_log() -> None:
@@ -83,6 +83,22 @@ def main() -> int:
83
83
  from mlgidgui.main_window import MainWindow
84
84
  from mlgidgui.theme import apply_dark_theme, apply_light_theme
85
85
 
86
+ if sys.platform == "win32":
87
+ # Without an explicit AppUserModelID, Windows groups the app
88
+ # under python.exe's icon in the taskbar no matter what
89
+ # setWindowIcon says. Set before the QApplication exists: the
90
+ # taskbar button is keyed on the ID the process has when its first
91
+ # window appears, and the installer's shortcuts carry the same ID
92
+ # (``AppUserModelID`` in packaging/windows/installer.iss) so a pinned
93
+ # button and the running window are one button.
94
+ try:
95
+ import ctypes
96
+
97
+ ctypes.windll.shell32.SetCurrentProcessExplicitAppUserModelID(
98
+ "mlgidGUI.mlgidGUI")
99
+ except Exception:
100
+ logging.getLogger("mlgidgui").debug(
101
+ "could not set the Windows AppUserModelID", exc_info=True)
86
102
  # Before the QApplication, so a crash inside Qt's own start-up is
87
103
  # caught too.
88
104
  _enable_crash_log()
@@ -132,7 +148,7 @@ def main() -> int:
132
148
  logging.getLogger("mlgidgui").debug(
133
149
  "could not set the application icon", exc_info=True)
134
150
  if desktop_entry.is_supported():
135
- # The Linux counterpart of the AppUserModelID below. GNOME takes
151
+ # The Linux counterpart of the AppUserModelID above. GNOME takes
136
152
  # an app's icon from its ``.desktop`` file, and pip installs no
137
153
  # such file, so one is written to the user's XDG data dir on
138
154
  # first run (and refreshed if the environment moved). Guarded
@@ -143,18 +159,6 @@ def main() -> int:
143
159
  except Exception:
144
160
  logging.getLogger("mlgidgui").debug(
145
161
  "could not install the desktop entry", exc_info=True)
146
- if sys.platform == "win32":
147
- # Without an explicit AppUserModelID, Windows groups the app
148
- # under python.exe's icon in the taskbar no matter what
149
- # setWindowIcon says.
150
- try:
151
- import ctypes
152
-
153
- ctypes.windll.shell32.SetCurrentProcessExplicitAppUserModelID(
154
- "mlgidGUI.mlgidGUI")
155
- except Exception:
156
- logging.getLogger("mlgidgui").debug(
157
- "could not set the Windows AppUserModelID", exc_info=True)
158
162
  # Honor the persisted theme choice (View → Theme). Defaults to
159
163
  # dark; the menu sync inside MainWindow reads the same key.
160
164
  theme = str(QSettings().value("theme", "dark")).lower()
@@ -0,0 +1,244 @@
1
+ """Resize / move handles for a peak box in the Cartesian view.
2
+
3
+ In the polar view a box is an axis-aligned rectangle and a ``pg.ROI``
4
+ with four edge handles edits it. In the Cartesian (q_xy, q_z) view the
5
+ same box is an arc box (annular sector), which ``pg.ROI`` cannot draw,
6
+ so ``ArcBoxROI`` does it: the outline of the box plus four handles --
7
+ the outer and inner radius at the middle angle, and the two angular
8
+ edges at the middle radius -- and a drag on the body moves the whole
9
+ box. Geometry stays polar (radius, radius_width, angle, angle_width),
10
+ exactly what the polar ROI edits, so the viewer feeds both into the
11
+ same undo / write path.
12
+
13
+ The three signals carry the same names as ``pg.ROI``'s
14
+ (``sigRegionChangeStarted`` / ``sigRegionChanged`` /
15
+ ``sigRegionChangeFinished``), so the viewer connects and tears both
16
+ down the same way.
17
+
18
+ Rings have radial handles only (their angular extent is the whole
19
+ image by definition), and a body drag moves only their radius -- the
20
+ same rule as the polar ROI.
21
+ """
22
+ from __future__ import annotations
23
+
24
+ import math
25
+
26
+ import pyqtgraph as pg
27
+ from PySide6.QtCore import QPointF, QRectF, Qt, Signal
28
+ from PySide6.QtGui import QBrush, QPainterPath, QPainterPathStroker, QPen
29
+ from PySide6.QtWidgets import QGraphicsItem
30
+
31
+ from mlgidgui.viewer_items import _cart_to_polar, _polar_rect_polygon
32
+
33
+ # Handle square, in screen pixels (handles ignore the zoom).
34
+ HANDLE_PX = 8.0
35
+ # Extra pick margin around the outline, in screen pixels, so the thin
36
+ # edge of a narrow box can still be grabbed for a move.
37
+ OUTLINE_PICK_PX = 6.0
38
+
39
+ OUTER, INNER, ANGLE_HI, ANGLE_LO = "outer", "inner", "angle_hi", "angle_lo"
40
+
41
+
42
+ class _ArcHandle(pg.GraphicsObject):
43
+ """One square handle; a drag moves one edge of the parent box."""
44
+
45
+ def __init__(self, parent: "ArcBoxROI", edge: str, pen: QPen) -> None:
46
+ super().__init__(parent)
47
+ self._roi = parent
48
+ self.edge = edge
49
+ self._pen = pen
50
+ self.setFlag(QGraphicsItem.GraphicsItemFlag.ItemIgnoresTransformations)
51
+ self.setAcceptHoverEvents(True)
52
+ self.setZValue(1)
53
+
54
+ def boundingRect(self) -> QRectF:
55
+ h = HANDLE_PX / 2.0 + 2.0
56
+ return QRectF(-h, -h, 2 * h, 2 * h)
57
+
58
+ def paint(self, painter, *_args) -> None:
59
+ h = HANDLE_PX / 2.0
60
+ painter.setPen(self._pen)
61
+ painter.setBrush(QBrush(self._pen.color()))
62
+ painter.drawRect(QRectF(-h, -h, 2 * h, 2 * h))
63
+
64
+ def hoverEvent(self, ev) -> None:
65
+ if not ev.isExit():
66
+ ev.acceptDrags(Qt.MouseButton.LeftButton)
67
+
68
+ def mouseDragEvent(self, ev) -> None:
69
+ if ev.button() != Qt.MouseButton.LeftButton:
70
+ ev.ignore()
71
+ return
72
+ ev.accept()
73
+ pos = self._roi.mapFromScene(ev.scenePos())
74
+ if ev.isStart():
75
+ self._roi.begin_change()
76
+ self._roi.drag_edge(self.edge, pos.x(), pos.y())
77
+ if ev.isFinish():
78
+ self._roi.end_change()
79
+
80
+
81
+ class ArcBoxROI(pg.GraphicsObject):
82
+ """Editable arc box in data coordinates (x = q_xy, y = q_z)."""
83
+
84
+ sigRegionChangeStarted = Signal(object)
85
+ sigRegionChanged = Signal(object)
86
+ sigRegionChangeFinished = Signal(object)
87
+
88
+ def __init__(
89
+ self,
90
+ radius: float,
91
+ radius_width: float,
92
+ angle: float,
93
+ angle_width: float,
94
+ *,
95
+ is_ring: bool = False,
96
+ angle_extent: tuple[float, float] = (0.0, 90.0),
97
+ pen: QPen | None = None,
98
+ ) -> None:
99
+ super().__init__()
100
+ self._pen = pen if pen is not None else pg.mkPen("w")
101
+ self._pen.setCosmetic(True)
102
+ self.is_ring = bool(is_ring) or not math.isfinite(float(angle_width))
103
+ self._extent = (float(angle_extent[0]), float(angle_extent[1]))
104
+ self._r = float(radius)
105
+ self._dr = abs(float(radius_width))
106
+ self._a = float(angle)
107
+ self._da = abs(float(angle_width)) if not self.is_ring else float(angle_width)
108
+ self._path = QPainterPath()
109
+ self._pick = QPainterPath()
110
+ self._drag_origin: tuple[float, float, float, float, float, float] | None = None
111
+ edges = (OUTER, INNER) if self.is_ring else (OUTER, INNER, ANGLE_HI, ANGLE_LO)
112
+ self.handles = {e: _ArcHandle(self, e, self._pen) for e in edges}
113
+ self.setAcceptHoverEvents(True)
114
+ self._rebuild()
115
+
116
+ # -- geometry --------------------------------------------------------
117
+
118
+ def box(self) -> tuple[float, float, float, float]:
119
+ """``(radius, radius_width, angle, angle_width)``."""
120
+ return self._r, self._dr, self._a, self._da
121
+
122
+ def set_box(
123
+ self, radius: float, radius_width: float,
124
+ angle: float, angle_width: float,
125
+ ) -> None:
126
+ """Set the geometry without emitting (undo, external edits)."""
127
+ self._r = float(radius)
128
+ self._dr = abs(float(radius_width))
129
+ if not self.is_ring:
130
+ self._a = float(angle)
131
+ self._da = abs(float(angle_width))
132
+ self._rebuild()
133
+
134
+ def _angle_range(self) -> tuple[float, float]:
135
+ if self.is_ring:
136
+ return self._extent
137
+ return self._a - self._da / 2.0, self._a + self._da / 2.0
138
+
139
+ def _rebuild(self) -> None:
140
+ a_lo, a_hi = self._angle_range()
141
+ self.prepareGeometryChange()
142
+ self._path = _polar_rect_polygon(self._r, self._dr, a_lo, a_hi)
143
+ self._pick = QPainterPath()
144
+ self._pick.addPath(self._path)
145
+ a_mid = math.radians((a_lo + a_hi) / 2.0)
146
+ r_lo = max(self._r - self._dr / 2.0, 0.0)
147
+ r_hi = self._r + self._dr / 2.0
148
+ spots = {
149
+ OUTER: (r_hi, a_mid),
150
+ INNER: (r_lo, a_mid),
151
+ ANGLE_HI: (self._r, math.radians(a_hi)),
152
+ ANGLE_LO: (self._r, math.radians(a_lo)),
153
+ }
154
+ for edge, handle in self.handles.items():
155
+ rr, aa = spots[edge]
156
+ handle.setPos(QPointF(rr * math.cos(aa), rr * math.sin(aa)))
157
+ self.update()
158
+
159
+ # -- edits -----------------------------------------------------------
160
+
161
+ def begin_change(self) -> None:
162
+ self.sigRegionChangeStarted.emit(self)
163
+
164
+ def end_change(self) -> None:
165
+ self._drag_origin = None
166
+ self.sigRegionChangeFinished.emit(self)
167
+
168
+ def drag_edge(self, edge: str, q_xy: float, q_z: float) -> None:
169
+ """Move one edge to the pointer; the opposite edge stays put.
170
+
171
+ Dragging past the opposite edge swaps them (the width stays
172
+ positive), like the polar ROI.
173
+ """
174
+ r_ptr, a_ptr = _cart_to_polar(q_xy, q_z)
175
+ if edge in (OUTER, INNER):
176
+ fixed = (
177
+ self._r - self._dr / 2.0 if edge == OUTER
178
+ else self._r + self._dr / 2.0
179
+ )
180
+ lo, hi = sorted((max(fixed, 0.0), max(r_ptr, 0.0)))
181
+ self._r, self._dr = (lo + hi) / 2.0, hi - lo
182
+ elif not self.is_ring:
183
+ fixed = (
184
+ self._a - self._da / 2.0 if edge == ANGLE_HI
185
+ else self._a + self._da / 2.0
186
+ )
187
+ lo, hi = sorted((fixed, a_ptr))
188
+ self._a, self._da = (lo + hi) / 2.0, hi - lo
189
+ else:
190
+ return
191
+ self._rebuild()
192
+ self.sigRegionChanged.emit(self)
193
+
194
+ def move_to(self, start: tuple[float, float], now: tuple[float, float]) -> None:
195
+ """Translate the box (as it was at drag start) by the polar
196
+ distance between two Cartesian pointer positions."""
197
+ if self._drag_origin is None:
198
+ r0, a0 = _cart_to_polar(*start)
199
+ self._drag_origin = (self._r, self._dr, self._a, self._da, r0, a0)
200
+ r_box, _dr, a_box, _da, r0, a0 = self._drag_origin
201
+ r1, a1 = _cart_to_polar(*now)
202
+ self._r = max(r_box + (r1 - r0), self._dr / 2.0)
203
+ if not self.is_ring:
204
+ self._a = a_box + (a1 - a0)
205
+ self._rebuild()
206
+ self.sigRegionChanged.emit(self)
207
+
208
+ # -- QGraphicsItem ---------------------------------------------------
209
+
210
+ def boundingRect(self) -> QRectF:
211
+ return self._path.boundingRect()
212
+
213
+ def shape(self) -> QPainterPath:
214
+ # The filled box plus a band around its outline, so a narrow box
215
+ # can still be grabbed. The band width is in data units derived
216
+ # from the current pixel size.
217
+ stroker = QPainterPathStroker()
218
+ px = self.pixelLength(pg.Point(1, 0)) or 0.0
219
+ stroker.setWidth(max(OUTLINE_PICK_PX * float(px), 1e-9))
220
+ out = QPainterPath(self._pick)
221
+ out.addPath(stroker.createStroke(self._path))
222
+ return out
223
+
224
+ def paint(self, painter, *_args) -> None:
225
+ painter.setPen(self._pen)
226
+ painter.drawPath(self._path)
227
+
228
+ def hoverEvent(self, ev) -> None:
229
+ if not ev.isExit():
230
+ ev.acceptDrags(Qt.MouseButton.LeftButton)
231
+
232
+ def mouseDragEvent(self, ev) -> None:
233
+ if ev.button() != Qt.MouseButton.LeftButton:
234
+ ev.ignore()
235
+ return
236
+ ev.accept()
237
+ start = ev.buttonDownPos()
238
+ now = ev.pos()
239
+ if ev.isStart():
240
+ self._drag_origin = None
241
+ self.begin_change()
242
+ self.move_to((start.x(), start.y()), (now.x(), now.y()))
243
+ if ev.isFinish():
244
+ self.end_change()
@@ -120,7 +120,8 @@ CONTROL_SECTIONS: tuple[Section, ...] = (
120
120
  )),
121
121
  ("Manual peak workflow", (
122
122
  (("Ctrl+Alt-drag",), "mouse",
123
- "Draw a manual peak rectangle (polar mode only)."),
123
+ "Draw a manual peak box: a rectangle in the polar view, an "
124
+ "arc box between the two drag corners in the Cartesian view."),
124
125
  (("Ctrl+Return",), "key",
125
126
  "Add to fitted for the selected manual or detected peak (one "
126
127
  "peak only; the status bar says why when it cannot run)."),