tomwer 1.2.1__py3-none-any.whl → 1.3.12__py3-none-any.whl

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 (334) hide show
  1. orangecontrib/tomwer/tutorials/icat_publication.ows +58 -0
  2. orangecontrib/tomwer/widgets/__init__.py +11 -11
  3. orangecontrib/tomwer/widgets/control/DataDiscoveryOW.py +2 -2
  4. orangecontrib/tomwer/widgets/control/DataListOW.py +9 -7
  5. orangecontrib/tomwer/widgets/control/DataListenerOW.py +6 -6
  6. orangecontrib/tomwer/widgets/control/DataSelectorOW.py +21 -10
  7. orangecontrib/tomwer/widgets/control/DataValidatorOW.py +6 -6
  8. orangecontrib/tomwer/widgets/control/EDF2NXTomomillOW.py +24 -7
  9. orangecontrib/tomwer/widgets/control/EmailOW.py +4 -4
  10. orangecontrib/tomwer/widgets/control/NXTomomillMixIn.py +3 -3
  11. orangecontrib/tomwer/widgets/control/NXTomomillOW.py +64 -23
  12. orangecontrib/tomwer/widgets/control/NXtomoConcatenate.py +20 -8
  13. orangecontrib/tomwer/widgets/control/NotifierOW.py +1 -0
  14. orangecontrib/tomwer/widgets/control/SingleTomoObjOW.py +6 -6
  15. orangecontrib/tomwer/widgets/control/VolumeSelector.py +7 -4
  16. orangecontrib/tomwer/widgets/control/VolumeSymLinkOW.py +182 -182
  17. orangecontrib/tomwer/widgets/debugtools/DatasetGeneratorOW.py +5 -5
  18. orangecontrib/tomwer/widgets/edit/DarkFlatPatchOW.py +4 -4
  19. orangecontrib/tomwer/widgets/edit/ImageKeyEditorOW.py +3 -3
  20. orangecontrib/tomwer/widgets/edit/ImageKeyUpgraderOW.py +8 -1
  21. orangecontrib/tomwer/widgets/edit/NXtomoEditorOW.py +3 -3
  22. orangecontrib/tomwer/widgets/edit/test/test_nxtomo_editor.py +3 -3
  23. orangecontrib/tomwer/widgets/icat/PublishProcessedDataOW.py +115 -0
  24. orangecontrib/tomwer/widgets/icat/RawDataScreenshotCreatorOW.py +98 -0
  25. orangecontrib/tomwer/widgets/icat/SaveToGalleryAndPublishOW.py +129 -0
  26. orangecontrib/tomwer/widgets/icat/__init__.py +13 -0
  27. orangecontrib/tomwer/widgets/icat/icons/add_gallery.png +0 -0
  28. orangecontrib/tomwer/widgets/icat/icons/add_gallery.svg +82 -0
  29. orangecontrib/tomwer/widgets/icat/icons/publish_processed_data.png +0 -0
  30. orangecontrib/tomwer/widgets/icat/icons/publish_processed_data.svg +95 -0
  31. orangecontrib/tomwer/widgets/icat/icons/raw_screenshots.png +0 -0
  32. orangecontrib/tomwer/widgets/icat/icons/raw_screenshots.svg +143 -0
  33. orangecontrib/tomwer/widgets/icons/tomwer_data_portal.png +0 -0
  34. orangecontrib/tomwer/widgets/icons/tomwer_data_portal.svg +76 -0
  35. orangecontrib/tomwer/widgets/reconstruction/AxisOW.py +22 -20
  36. orangecontrib/tomwer/widgets/reconstruction/CastNabuVolumeOW.py +19 -3
  37. orangecontrib/tomwer/widgets/reconstruction/NabuHelicalPrepareWeightsDoubleOW.py +184 -169
  38. orangecontrib/tomwer/widgets/reconstruction/NabuOW.py +23 -0
  39. orangecontrib/tomwer/widgets/reconstruction/NabuVolumeOW.py +39 -5
  40. orangecontrib/tomwer/widgets/reconstruction/SAAxisOW.py +18 -22
  41. orangecontrib/tomwer/widgets/reconstruction/SADeltaBetaOW.py +18 -26
  42. orangecontrib/tomwer/widgets/reconstruction/SinoNormOW.py +15 -19
  43. orangecontrib/tomwer/widgets/visualization/DataViewerOW.py +9 -9
  44. orangecontrib/tomwer/widgets/visualization/DiffViewerOW.py +1 -1
  45. orangecontrib/tomwer/widgets/visualization/LivesliceOW.py +1 -1
  46. orangecontrib/tomwer/widgets/visualization/NXtomoMetadataViewerOW.py +3 -3
  47. orangecontrib/tomwer/widgets/visualization/SinogramViewerOW.py +0 -1
  48. orangecontrib/tomwer/widgets/visualization/VolumeViewerOW.py +3 -29
  49. tomwer/__main__.py +7 -64
  50. tomwer/app/axis.py +3 -3
  51. tomwer/app/canvas.py +8 -0
  52. tomwer/app/canvas_launcher/config.py +16 -14
  53. tomwer/app/canvas_launcher/environ.py +1 -0
  54. tomwer/app/canvas_launcher/mainwindow.py +4 -1
  55. tomwer/app/darkref.py +1 -1
  56. tomwer/app/darkrefpatch.py +1 -1
  57. tomwer/app/diffframe.py +3 -3
  58. tomwer/app/imagekeyeditor.py +5 -5
  59. tomwer/app/imagekeyupgrader.py +5 -5
  60. tomwer/app/intensitynormalization.py +14 -13
  61. tomwer/app/{saaxis.py → multicor.py} +3 -3
  62. tomwer/app/{sadeltabeta.py → multipag.py} +3 -3
  63. tomwer/app/nabuapp.py +0 -11
  64. tomwer/app/radiostack.py +6 -4
  65. tomwer/app/samplemoved.py +3 -2
  66. tomwer/app/scanviewer.py +4 -2
  67. tomwer/app/sinogramviewer.py +3 -2
  68. tomwer/app/slicestack.py +3 -2
  69. tomwer/app/zstitching.py +88 -6
  70. tomwer/core/cluster/cluster.py +26 -0
  71. tomwer/core/log/logger.py +7 -5
  72. tomwer/core/process/conditions/filters.py +1 -1
  73. tomwer/core/process/control/datalistener/datalistener.py +19 -14
  74. tomwer/core/process/control/datawatcher/edfdwprocess.py +0 -9
  75. tomwer/core/process/control/nxtomoconcatenate.py +13 -13
  76. tomwer/core/process/control/nxtomomill.py +92 -34
  77. tomwer/core/process/control/scantransfer.py +20 -43
  78. tomwer/core/process/control/scanvalidator.py +3 -2
  79. tomwer/core/process/control/test/test_concatenate_nxtomos.py +9 -9
  80. tomwer/core/process/control/test/test_email.py +4 -4
  81. tomwer/core/process/control/test/test_h52nx_process.py +59 -7
  82. tomwer/core/process/control/test/test_volume_link.py +64 -64
  83. tomwer/core/process/control/timer.py +1 -1
  84. tomwer/core/process/control/volumesymlink.py +200 -200
  85. tomwer/core/process/edit/darkflatpatch.py +14 -15
  86. tomwer/core/process/edit/imagekeyeditor.py +41 -39
  87. tomwer/core/process/icat/__init__.py +0 -0
  88. tomwer/core/process/icat/createscreenshots.py +100 -0
  89. tomwer/core/process/icat/gallery.py +377 -0
  90. tomwer/core/process/icat/icatbase.py +36 -0
  91. tomwer/core/process/icat/publish.py +228 -0
  92. tomwer/core/process/icat/screenshots.py +27 -0
  93. tomwer/core/process/output.py +52 -0
  94. tomwer/core/process/reconstruction/axis/axis.py +280 -69
  95. tomwer/core/process/reconstruction/axis/mode.py +163 -48
  96. tomwer/core/process/reconstruction/axis/params.py +29 -21
  97. tomwer/core/process/reconstruction/darkref/darkrefs.py +41 -127
  98. tomwer/core/process/reconstruction/darkref/darkrefscopy.py +4 -3
  99. tomwer/core/process/reconstruction/darkref/params.py +1 -1
  100. tomwer/core/process/reconstruction/nabu/castvolume.py +4 -4
  101. tomwer/core/process/reconstruction/nabu/helical.py +9 -5
  102. tomwer/core/process/reconstruction/nabu/nabucommon.py +71 -78
  103. tomwer/core/process/reconstruction/nabu/nabuscores.py +425 -53
  104. tomwer/core/process/reconstruction/nabu/nabuslices.py +114 -93
  105. tomwer/core/process/reconstruction/nabu/nabuvolume.py +54 -27
  106. tomwer/core/process/reconstruction/nabu/plane.py +9 -0
  107. tomwer/core/process/reconstruction/nabu/settings.py +2 -2
  108. tomwer/core/process/reconstruction/nabu/utils.py +164 -26
  109. tomwer/core/process/reconstruction/output.py +108 -0
  110. tomwer/core/process/reconstruction/saaxis/saaxis.py +238 -264
  111. tomwer/core/process/reconstruction/sadeltabeta/sadeltabeta.py +151 -87
  112. tomwer/core/process/reconstruction/scores/params.py +7 -4
  113. tomwer/core/process/reconstruction/scores/scores.py +13 -0
  114. tomwer/core/process/reconstruction/test/test_axis_params.py +2 -2
  115. tomwer/core/process/reconstruction/test/test_darkref.py +3 -3
  116. tomwer/core/process/reconstruction/test/test_darkref_copy.py +7 -7
  117. tomwer/core/process/reconstruction/test/test_saaxis.py +3 -4
  118. tomwer/core/process/reconstruction/test/test_sadeltabeta.py +2 -2
  119. tomwer/core/process/stitching/nabustitcher.py +13 -12
  120. tomwer/core/process/task.py +34 -26
  121. tomwer/core/process/test/test_axis.py +13 -12
  122. tomwer/core/process/test/test_dark_and_flat.py +10 -7
  123. tomwer/core/process/test/test_data_transfer.py +10 -8
  124. tomwer/core/process/test/test_nabu.py +14 -6
  125. tomwer/core/process/test/test_normalization.py +4 -4
  126. tomwer/core/scan/blissscan.py +3 -3
  127. tomwer/core/scan/edfscan.py +13 -10
  128. tomwer/core/scan/hdf5scan.py +19 -530
  129. tomwer/core/scan/nxtomoscan.py +534 -0
  130. tomwer/core/scan/scanbase.py +72 -44
  131. tomwer/core/scan/scanfactory.py +13 -13
  132. tomwer/core/scan/test/test_edf.py +2 -2
  133. tomwer/core/scan/test/test_future_scan.py +3 -3
  134. tomwer/core/scan/test/test_h5.py +18 -16
  135. tomwer/core/scan/test/test_process_registration.py +4 -40
  136. tomwer/core/scan/test/test_scan.py +5 -78
  137. tomwer/core/settings.py +22 -2
  138. tomwer/core/test/test_scanutils.py +8 -7
  139. tomwer/core/test/test_utils.py +35 -28
  140. tomwer/core/tomwer_object.py +1 -1
  141. tomwer/core/utils/__init__.py +0 -466
  142. tomwer/core/utils/deprecation.py +1 -1
  143. tomwer/core/utils/dictutils.py +14 -0
  144. tomwer/core/utils/lbsram.py +35 -0
  145. tomwer/core/utils/nxtomoutils.py +1 -1
  146. tomwer/core/utils/scanutils.py +6 -6
  147. tomwer/core/utils/spec.py +263 -0
  148. tomwer/core/volume/edfvolume.py +6 -6
  149. tomwer/core/volume/hdf5volume.py +6 -6
  150. tomwer/core/volume/jp2kvolume.py +6 -6
  151. tomwer/core/volume/rawvolume.py +6 -6
  152. tomwer/core/volume/tiffvolume.py +12 -12
  153. tomwer/core/volume/volumefactory.py +2 -2
  154. tomwer/gui/cluster/slurm.py +274 -65
  155. tomwer/gui/cluster/supervisor.py +12 -0
  156. tomwer/gui/cluster/test/test_cluster.py +14 -2
  157. tomwer/gui/cluster/test/test_supervisor.py +3 -3
  158. tomwer/gui/configuration/__init__.py +0 -0
  159. tomwer/gui/{reconstruction/nabu → configuration}/action.py +1 -32
  160. tomwer/gui/configuration/level.py +22 -0
  161. tomwer/gui/control/actions.py +54 -0
  162. tomwer/gui/control/datalist.py +83 -16
  163. tomwer/gui/control/datalistener.py +4 -16
  164. tomwer/gui/control/datawatcher/controlwidget.py +2 -4
  165. tomwer/gui/control/datawatcher/datawatcher.py +1 -24
  166. tomwer/gui/control/{email.py → emailnotifier.py} +9 -18
  167. tomwer/gui/control/history.py +2 -2
  168. tomwer/gui/control/observations.py +2 -2
  169. tomwer/gui/control/reducedarkflatselector.py +9 -9
  170. tomwer/gui/control/selectorwidgetbase.py +36 -9
  171. tomwer/gui/control/serie/seriecreator.py +5 -22
  172. tomwer/gui/control/test/test_email.py +1 -1
  173. tomwer/gui/control/test/test_scanvalidator.py +6 -5
  174. tomwer/gui/control/test/test_single_tomo_obj.py +3 -3
  175. tomwer/gui/control/tomoobjdisplaymode.py +8 -0
  176. tomwer/gui/debugtools/datasetgenerator.py +3 -3
  177. tomwer/gui/edit/dkrfpatch.py +20 -26
  178. tomwer/gui/edit/imagekeyeditor.py +11 -12
  179. tomwer/gui/edit/nxtomoeditor.py +111 -44
  180. tomwer/gui/edit/nxtomowarmer.py +7 -6
  181. tomwer/gui/edit/test/test_dkrf_patch.py +13 -13
  182. tomwer/gui/edit/test/test_image_key_editor.py +3 -3
  183. tomwer/gui/edit/test/test_nx_editor.py +40 -16
  184. tomwer/gui/icat/__init__.py +0 -0
  185. tomwer/gui/icat/createscreenshots.py +80 -0
  186. tomwer/gui/icat/gallery.py +214 -0
  187. tomwer/gui/icat/publish.py +187 -0
  188. tomwer/gui/imagefromfile.py +2 -2
  189. tomwer/gui/qfolderdialog.py +24 -1
  190. tomwer/gui/reconstruction/axis/CompareImages.py +88 -168
  191. tomwer/gui/reconstruction/axis/axis.py +171 -57
  192. tomwer/gui/reconstruction/axis/radioaxis.py +122 -257
  193. tomwer/gui/reconstruction/darkref/darkrefcopywidget.py +3 -2
  194. tomwer/gui/reconstruction/darkref/darkrefwidget.py +2 -1
  195. tomwer/gui/reconstruction/nabu/castvolume.py +14 -3
  196. tomwer/gui/reconstruction/nabu/check.py +9 -9
  197. tomwer/gui/reconstruction/nabu/helical.py +29 -12
  198. tomwer/gui/reconstruction/nabu/nabuconfig/base.py +2 -4
  199. tomwer/gui/reconstruction/nabu/nabuconfig/nabuconfig.py +2 -1
  200. tomwer/gui/reconstruction/nabu/nabuconfig/output.py +126 -35
  201. tomwer/gui/reconstruction/nabu/nabuconfig/phase.py +39 -32
  202. tomwer/gui/reconstruction/nabu/nabuconfig/preprocessing.py +222 -31
  203. tomwer/gui/reconstruction/nabu/nabuconfig/reconstruction.py +57 -27
  204. tomwer/gui/reconstruction/nabu/nabuflow.py +12 -20
  205. tomwer/gui/reconstruction/nabu/slices.py +10 -11
  206. tomwer/gui/reconstruction/nabu/volume.py +22 -10
  207. tomwer/gui/reconstruction/normalization/intensity.py +18 -48
  208. tomwer/gui/reconstruction/saaxis/corrangeselector.py +8 -24
  209. tomwer/gui/reconstruction/saaxis/dimensionwidget.py +1 -1
  210. tomwer/gui/reconstruction/saaxis/saaxis.py +9 -21
  211. tomwer/gui/reconstruction/sadeltabeta/saadeltabeta.py +45 -12
  212. tomwer/gui/reconstruction/scores/control.py +2 -9
  213. tomwer/gui/reconstruction/scores/scoreplot.py +13 -11
  214. tomwer/gui/reconstruction/test/test_axis.py +41 -16
  215. tomwer/gui/reconstruction/test/test_nabu.py +31 -9
  216. tomwer/gui/reconstruction/test/test_saaxis.py +3 -3
  217. tomwer/gui/reconstruction/test/test_sadeltabeta.py +12 -2
  218. tomwer/gui/settings.py +5 -28
  219. tomwer/gui/stackplot.py +2 -5
  220. tomwer/gui/stitching/action.py +49 -0
  221. tomwer/gui/stitching/config/axisparams.py +7 -24
  222. tomwer/gui/stitching/config/output.py +10 -8
  223. tomwer/gui/stitching/config/positionoveraxis.py +22 -23
  224. tomwer/gui/stitching/normalization.py +117 -0
  225. tomwer/gui/stitching/stitchandbackground.py +4 -6
  226. tomwer/gui/stitching/stitching.py +267 -45
  227. tomwer/gui/stitching/stitching_preview.py +62 -55
  228. tomwer/gui/stitching/stitching_raw.py +13 -12
  229. tomwer/gui/stitching/z_stitching/fineestimation.py +0 -60
  230. tomwer/gui/utils/buttons.py +112 -29
  231. tomwer/gui/utils/inputwidget.py +43 -25
  232. tomwer/gui/utils/lineselector/lineselector.py +1 -1
  233. tomwer/gui/utils/scandescription.py +4 -0
  234. tomwer/gui/utils/step.py +144 -0
  235. tomwer/gui/utils/unitsystem.py +2 -5
  236. tomwer/gui/utils/vignettes.py +176 -15
  237. tomwer/gui/visualization/dataviewer.py +48 -35
  238. tomwer/gui/visualization/diffviewer/diffviewer.py +7 -16
  239. tomwer/gui/visualization/diffviewer/shiftwidget.py +2 -5
  240. tomwer/gui/visualization/scanoverview.py +1 -1
  241. tomwer/gui/visualization/sinogramviewer.py +20 -36
  242. tomwer/gui/visualization/test/test_diffviewer.py +3 -3
  243. tomwer/gui/visualization/test/test_nx_tomo_metadata_viewer.py +4 -4
  244. tomwer/gui/visualization/test/test_sinogramviewer.py +2 -2
  245. tomwer/gui/visualization/test/test_stacks.py +3 -3
  246. tomwer/gui/visualization/test/test_volumeviewer.py +65 -67
  247. tomwer/gui/visualization/volumeviewer.py +114 -113
  248. tomwer/io/utils/h5pyutils.py +3 -3
  249. tomwer/io/utils/raw_and_processed_data.py +84 -0
  250. tomwer/io/utils/tomoobj.py +4 -6
  251. tomwer/io/utils/utils.py +7 -7
  252. tomwer/resources/gui/icons/parameters.svg +1 -1
  253. tomwer/resources/gui/icons/ruler.png +0 -0
  254. tomwer/resources/gui/icons/ruler.svg +273 -0
  255. tomwer/resources/gui/icons/short_description.png +0 -0
  256. tomwer/resources/gui/icons/short_description.svg +58 -0
  257. tomwer/resources/gui/icons/url.png +0 -0
  258. tomwer/resources/gui/icons/url.svg +58 -0
  259. tomwer/resources/gui/illustrations/no_rot.svg +1 -1
  260. tomwer/synctools/stacks/edit/darkflatpatch.py +19 -14
  261. tomwer/synctools/stacks/edit/imagekeyeditor.py +2 -2
  262. tomwer/synctools/stacks/reconstruction/axis.py +4 -4
  263. tomwer/synctools/stacks/reconstruction/castvolume.py +22 -7
  264. tomwer/synctools/stacks/reconstruction/dkrefcopy.py +25 -20
  265. tomwer/synctools/stacks/reconstruction/nabu.py +2 -2
  266. tomwer/synctools/stacks/reconstruction/normalization.py +2 -2
  267. tomwer/synctools/stacks/reconstruction/saaxis.py +2 -2
  268. tomwer/synctools/stacks/reconstruction/sadeltabeta.py +2 -2
  269. tomwer/synctools/test/test_darkRefs.py +7 -58
  270. tomwer/synctools/test/test_foldertransfer.py +6 -6
  271. tomwer/synctools/utils/scanstages.py +6 -6
  272. tomwer/tests/conftest.py +34 -0
  273. tomwer/tests/datasets.py +13 -0
  274. tomwer/tests/test_scripts.py +91 -41
  275. tomwer/tests/utils.py +5 -0
  276. tomwer/third_part/WaitingOverlay.py +110 -0
  277. tomwer/third_part/__init__.py +0 -0
  278. tomwer/version.py +2 -2
  279. tomwer-1.3.12-py3.11-nspkg.pth +1 -0
  280. {tomwer-1.2.1.dist-info → tomwer-1.3.12.dist-info}/METADATA +73 -58
  281. {tomwer-1.2.1.dist-info → tomwer-1.3.12.dist-info}/RECORD +287 -286
  282. {tomwer-1.2.1.dist-info → tomwer-1.3.12.dist-info}/WHEEL +1 -1
  283. orangecontrib/tomwer/widgets/reconstruction/TofuOW.py +0 -197
  284. orangecontrib/tomwer/widgets/reconstruction/icons/XY_lamino.svg +0 -168
  285. orangecontrib/tomwer/widgets/reconstruction/icons/XZ_lamino.svg +0 -275
  286. orangecontrib/tomwer/widgets/reconstruction/icons/YZ_lamino.svg +0 -182
  287. tomwer/app/lamino.py +0 -143
  288. tomwer/core/process/reconstruction/lamino/__init__.py +0 -1
  289. tomwer/core/process/reconstruction/lamino/tofu.py +0 -1000
  290. tomwer/core/process/test/test_lamino.py +0 -76
  291. tomwer/core/test/test_lamino.py +0 -92
  292. tomwer/gui/reconstruction/lamino/__init__.py +0 -31
  293. tomwer/gui/reconstruction/lamino/tofu/TofuOptionLoader.py +0 -107
  294. tomwer/gui/reconstruction/lamino/tofu/__init__.py +0 -1
  295. tomwer/gui/reconstruction/lamino/tofu/misc.py +0 -148
  296. tomwer/gui/reconstruction/lamino/tofu/projections.py +0 -896
  297. tomwer/gui/reconstruction/lamino/tofu/settings.py +0 -75
  298. tomwer/gui/reconstruction/lamino/tofu/tofu.py +0 -432
  299. tomwer/gui/reconstruction/lamino/tofu/tofuexpert.py +0 -567
  300. tomwer/gui/reconstruction/lamino/tofu/tofuoutput.py +0 -760
  301. tomwer/gui/reconstruction/test/test_lamino.py +0 -189
  302. tomwer/resources/gui/icons/esrf_1.svg +0 -307
  303. tomwer/resources/gui/icons/lamino_parameters.svg +0 -70
  304. tomwer/resources/gui/icons/triangle.svg +0 -80
  305. tomwer/resources/gui/illustrations/lamino_angle.png +0 -0
  306. tomwer/resources/gui/illustrations/lamino_angle.svg +0 -509
  307. tomwer/resources/gui/illustrations/lamino_beta_angle.png +0 -0
  308. tomwer/resources/gui/illustrations/lamino_beta_angle.svg +0 -97
  309. tomwer/resources/gui/illustrations/lamino_theta_angle.png +0 -0
  310. tomwer/resources/gui/illustrations/lamino_theta_angle.svg +0 -368
  311. tomwer/resources/gui/illustrations/manual_slice.png +0 -0
  312. tomwer/resources/gui/illustrations/manual_slice.svg +0 -221
  313. tomwer/resources/gui/illustrations/psi_angle.png +0 -0
  314. tomwer/resources/gui/illustrations/psi_angle.svg +0 -479
  315. tomwer/resources/gui/illustrations/rotation_center.png +0 -0
  316. tomwer/resources/gui/illustrations/rotation_center.svg +0 -276
  317. tomwer/resources/gui/illustrations/slice_stack.png +0 -0
  318. tomwer/resources/gui/illustrations/slice_stack.svg +0 -266
  319. tomwer/resources/gui/illustrations/xy_slice.png +0 -0
  320. tomwer/resources/gui/illustrations/xy_slice.svg +0 -269
  321. tomwer/resources/gui/illustrations/xz_slice.png +0 -0
  322. tomwer/resources/gui/illustrations/xz_slice.svg +0 -270
  323. tomwer/resources/gui/illustrations/yz_slice.png +0 -0
  324. tomwer/resources/gui/illustrations/yz_slice.svg +0 -270
  325. tomwer/synctools/stacks/reconstruction/lamino.py +0 -233
  326. tomwer/synctools/test/test_scanstages.py +0 -162
  327. tomwer/tests/utils/__init__.py +0 -247
  328. tomwer/tests/utils/utilstest.py +0 -220
  329. tomwer-1.2.1-py3.11-nspkg.pth +0 -1
  330. /tomwer/core/process/control/{email.py → emailnotifier.py} +0 -0
  331. {tomwer-1.2.1.dist-info → tomwer-1.3.12.dist-info}/LICENSE +0 -0
  332. {tomwer-1.2.1.dist-info → tomwer-1.3.12.dist-info}/entry_points.txt +0 -0
  333. {tomwer-1.2.1.dist-info → tomwer-1.3.12.dist-info}/namespace_packages.txt +0 -0
  334. {tomwer-1.2.1.dist-info → tomwer-1.3.12.dist-info}/top_level.txt +0 -0
@@ -1,75 +0,0 @@
1
- # coding: utf-8
2
- # /*##########################################################################
3
- #
4
- # Copyright (c) 2016-2017 European Synchrotron Radiation Facility
5
- #
6
- # Permission is hereby granted, free of charge, to any person obtaining a copy
7
- # of this software and associated documentation files (the "Software"), to deal
8
- # in the Software without restriction, including without limitation the rights
9
- # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10
- # copies of the Software, and to permit persons to whom the Software is
11
- # furnished to do so, subject to the following conditions:
12
- #
13
- # The above copyright notice and this permission notice shall be included in
14
- # all copies or substantial portions of the Software.
15
- #
16
- # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17
- # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18
- # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19
- # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20
- # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21
- # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22
- # THE SOFTWARE.
23
- #
24
- # ###########################################################################*/
25
-
26
- __authors__ = ["H. Payno"]
27
- __license__ = "MIT"
28
- __date__ = "30/10/2018"
29
-
30
- """Include default settings for the tofu widget"""
31
-
32
- # default parameters for slice stack
33
- SLICE_STACK_RANGE_HS = 50
34
- """default range half size for slice stack reconstruction"""
35
- SLICE_STACK_STEP_SIZE = 1
36
- """default step size for slice stack reconstruction"""
37
- SLICE_STACK_NB_SLICES = 100
38
- """default number of slices for slice stack reconstruction"""
39
-
40
- # default parameters for rotation center
41
- ROT_CENTER_RANGE_HS = 25
42
- """default range half size for rotation center reconstruction"""
43
- ROT_CENTER_STEP_SIZE = 0.5
44
- """default step size for rotation center reconstruction"""
45
- ROT_CENTER_NB_SLICES = 50
46
- """default number of slices for rotation center reconstruction"""
47
-
48
- # default parameters for lamino angle
49
- LAMINO_ANG_RANGE_HS = 0.5
50
- """default range half size for the lamino angle reconstruction"""
51
- LAMINO_ANG_STEP_SIZE = 0.01
52
- """default step size for the lamino angle reconstruction"""
53
- LAMINO_ANG_NB_SLICES = 100
54
- """default number of slices for lamino angle reconstruction"""
55
-
56
- # default parameters for psi angle
57
- PSI_ANG_RANGE_HS = 0.5
58
- """default range half size for the psi angle reconstruction"""
59
- PSI_ANG_STEP_SIZE = 0.01
60
- """default step size for the psi angle reconstruction"""
61
- PSI_ANG_NB_SLICES = 100
62
- """default number of slices for psi angle reconstruction"""
63
-
64
-
65
- _N_SLICE_LIMITS_HIGH = 350
66
- """If the number of slices is upper than this limits then this will generate a
67
- warning and display the information into"""
68
-
69
- _COLOR_HIGH = 250, 0, 0
70
-
71
- _N_SLICE_LIMITS_MEDIUM = 100
72
- """If the number of slices is upper this than limits then this will display the
73
- cut selection information into"""
74
-
75
- _COLOR_MEDIUM = 200, 150, 0
@@ -1,432 +0,0 @@
1
- # /*##########################################################################
2
- # Copyright (C) 2017 European Synchrotron Radiation Facility
3
- #
4
- # This file is part of the PyMca X-ray Fluorescence Toolkit developed at
5
- # the ESRF by the Software group.
6
- #
7
- # Permission is hereby granted, free of charge, to any person obtaining a copy
8
- # of this software and associated documentation files (the "Software"), to deal
9
- # in the Software without restriction, including without limitation the rights
10
- # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11
- # copies of the Software, and to permit persons to whom the Software is
12
- # furnished to do so, subject to the following conditions:
13
- #
14
- # The above copyright notice and this permission notice shall be included in
15
- # all copies or substantial portions of the Software.
16
- #
17
- # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18
- # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19
- # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20
- # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21
- # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22
- # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
23
- # THE SOFTWARE.
24
- #
25
- #############################################################################*/
26
- """Some widget construction to check if a sample moved"""
27
-
28
- __author__ = ["H. Payno"]
29
- __license__ = "MIT"
30
- __date__ = "01/06/2018"
31
-
32
-
33
- import logging
34
-
35
- from silx.gui import qt
36
- from silx.io import dictdump
37
-
38
- from tomwer.core.process.reconstruction.lamino.tofu import (
39
- SCAN_TYPES,
40
- SCAN_TYPES_I,
41
- FFCWhen,
42
- _retrieve_opts_recons_cmd,
43
- )
44
- from tomwer.core.utils.char import PSI_CHAR
45
- from tomwer.gui import icons
46
- from tomwer.gui.reconstruction.lamino.tofu import settings
47
-
48
- from .projections import InputProjectionsScrollArea
49
- from .tofuexpert import ExpertTofuWidget
50
- from .TofuOptionLoader import _getterSetter, _TofuOptionLoader
51
- from .tofuoutput import OutputTofuWidget
52
-
53
- _logger = logging.getLogger(__name__)
54
-
55
-
56
- class TofuWindow(qt.QMainWindow):
57
- """
58
- Widget used to interface lamino reconstruction using tofu
59
- """
60
-
61
- def __init__(self, parent):
62
- qt.QMainWindow.__init__(self, parent)
63
- self.setWindowFlags(qt.Qt.Widget)
64
- # main widget
65
- self._mainWidget = TofuWidget(parent=self)
66
- self.setCentralWidget(self._mainWidget)
67
-
68
- # expose API
69
- self.save = self._mainWidget.save
70
- self.load = self._mainWidget.load
71
- self.loadFromScan = self._mainWidget.loadFromScan
72
- self.getParameters = self._mainWidget.getParameters
73
- self.setParameters = self._mainWidget.setParameters
74
- self.getAdditionalRecoOptions = self._mainWidget.getAdditionalRecoOptions
75
- self.setAdditionalRecoOptions = self._mainWidget.setAdditionalRecoOptions
76
- self.getAdditionalPreprocessOptions = (
77
- self._mainWidget.getAdditionalPreprocessOptions
78
- )
79
- self.setAdditionalPreprocessOptions = (
80
- self._mainWidget.setAdditionalPreprocessOptions
81
- )
82
- self.removeOutputDir = self._mainWidget.removeOutputDir
83
- self.setRemoveOutputDir = self._mainWidget.setRemoveOutputDir
84
-
85
- # menu
86
- style = qt.QApplication.style()
87
- saveIcon = style.standardIcon(qt.QStyle.SP_DialogSaveButton)
88
- self._saveAction = qt.QAction(saveIcon, "save", self)
89
- self._saveAction.setToolTip("save configuration")
90
- self._saveAction.setShortcut(qt.QKeySequence.Save)
91
- self.menuBar().addAction(self._saveAction)
92
- self._saveAction.triggered.connect(self.save)
93
-
94
- loadIcon = style.standardIcon(qt.QStyle.SP_DialogOpenButton)
95
- self._loadAction = qt.QAction(loadIcon, "load", self)
96
- self._loadAction.setToolTip("load configuration")
97
- self._loadAction.setShortcut(qt.QKeySequence.Open)
98
- self.menuBar().addAction(self._loadAction)
99
- self._loadAction.triggered.connect(self.load)
100
-
101
-
102
- class TofuWidget(_TofuOptionLoader, qt.QWidget):
103
- _OPT_RECO_SECTION_ID = "options_reco"
104
- """Variable used to define the section name when saving the configuration
105
- into dict dump"""
106
- _OPT_PREPROCESS_SECTION_ID = "options_preprocess"
107
-
108
- _TOMWER_CONFIG = "tomwer_configuration"
109
- "tomwer processing configuration"
110
-
111
- def __init__(self, parent):
112
- qt.QWidget.__init__(self, parent)
113
- self.setLayout(qt.QVBoxLayout())
114
- self._scanTypeWidget = ScanTypeWidget(parent=self)
115
- self.layout().addWidget(self._scanTypeWidget)
116
-
117
- self._tabs = _TofuTab(parent=self)
118
- self.layout().addWidget(self._tabs)
119
-
120
- _TofuOptionLoader.__init__(
121
- self,
122
- options={
123
- "z-parameter": _getterSetter(
124
- getter=self._scanTypeWidget.getScanType,
125
- setter=self._scanTypeWidget.setScanType,
126
- )
127
- },
128
- childs=[self._tabs],
129
- )
130
-
131
- # expose API
132
- self.getAdditionalRecoOptions = self._tabs.getAdditionalRecoOptions
133
- self.getAdditionalPreprocessOptions = self._tabs.getAdditionalPreprocessOptions
134
- self.removeOutputDir = self._tabs._outputWidget._outputWidget.removeIfExist
135
- self.setRemoveOutputDir = (
136
- self._tabs._outputWidget._outputWidget.setRemoveIfExist
137
- )
138
-
139
- # connect signals
140
- self._scanTypeWidget._scanType.currentIndexChanged.connect(
141
- self._scanTypeChanged
142
- )
143
- self._tabs._outputWidget._volumeAngleGrp._grpPlane.sigPlaneChanged.connect(
144
- self._scanTypeChanged
145
- )
146
- # update display according to the current scan type
147
- self._scanTypeChanged()
148
-
149
- def _scanTypeChanged(self, *args, **kwargs):
150
- scan_type = self._scanTypeWidget._scanType.currentText()
151
- x_center = 0
152
- # change step size type
153
- if scan_type == "slice stack":
154
- _type = "(pixel)"
155
- # z_center = self._tabs._inputWidget._centeringWidget.getZCenter()
156
- # _range = (z_center - settings.SLICE_STACK_RANGE_HS,
157
- # z_center + settings.SLICE_STACK_RANGE_HS)
158
- _range = -settings.SLICE_STACK_RANGE_HS, settings.SLICE_STACK_RANGE_HS
159
- _step_size = settings.SLICE_STACK_STEP_SIZE
160
- _nb_slices = settings.SLICE_STACK_NB_SLICES
161
- elif scan_type == "rotation center":
162
- _type = "(pixel)"
163
- x_center = self._tabs._inputWidget.centeringWidget.getXCenter()
164
- _range = (
165
- x_center - settings.ROT_CENTER_RANGE_HS,
166
- x_center + settings.ROT_CENTER_RANGE_HS,
167
- )
168
- _step_size = settings.ROT_CENTER_STEP_SIZE
169
- _nb_slices = settings.ROT_CENTER_NB_SLICES
170
- elif scan_type == "lamino angle":
171
- _type = "(degree)"
172
- lamino_angle = self._tabs._inputWidget.rotationAngle.getLaminoAngle()
173
- x_center = lamino_angle
174
- _range = (
175
- lamino_angle - settings.LAMINO_ANG_RANGE_HS,
176
- lamino_angle + settings.LAMINO_ANG_RANGE_HS,
177
- )
178
- _step_size = settings.LAMINO_ANG_STEP_SIZE
179
- _nb_slices = settings.LAMINO_ANG_NB_SLICES
180
- elif scan_type == PSI_CHAR + " angle":
181
- _type = "(degree)"
182
- psi_angle = self._tabs._inputWidget.rotationAngle.getPsiAngle()
183
- x_center = psi_angle
184
- # _range = (psi_angle - settings.PSI_ANG_RANGE_HS,
185
- # psi_angle + settings.PSI_ANG_RANGE_HS)
186
- _range = -settings.PSI_ANG_RANGE_HS, settings.PSI_ANG_RANGE_HS
187
- _step_size = settings.PSI_ANG_STEP_SIZE
188
- _nb_slices = settings.PSI_ANG_NB_SLICES
189
- else:
190
- raise NotImplementedError("")
191
-
192
- _stepSizeAndRangeWidget = self._tabs._outputWidget._stepSizeAndRange
193
- _stepSizeAndRangeWidget._setStepSizeType(_type)
194
- _stepSizeAndRangeWidget._z_label.setVisible(scan_type == "slice stack")
195
- _stepSizeAndRangeWidget._zSB.setVisible(scan_type == "slice stack")
196
- # change step range and size
197
- _stepSizeAndRangeWidget.setRegion(region=(_range[0], _range[1], _step_size))
198
- _stepSizeAndRangeWidget._setXCenter(x_center)
199
- _stepSizeAndRangeWidget.setNCut(_nb_slices)
200
- if scan_type == PSI_CHAR + " angle":
201
- scan_type = "psi angle"
202
- self._tabs._outputWidget._setScanType(scan_type)
203
-
204
- def load(self): # pragma: no cover
205
- dialog = qt.QFileDialog(self)
206
- dialog.setNameFilters(["ini (*.ini)"])
207
- dialog.setFileMode(qt.QFileDialog.ExistingFile)
208
-
209
- if not dialog.exec_():
210
- dialog.close()
211
- return
212
- else:
213
- self.loadFile(dialog.selectedFiles()[0])
214
-
215
- def loadFile(self, _file):
216
- _logger.info(("loading", _file))
217
- try:
218
- conf = dictdump.load(_file)
219
- except Exception as error:
220
- _logger.warning(
221
- f"Fail to load configuration from {_file}. Reason is {error}"
222
- )
223
- else:
224
- if self._OPT_RECO_SECTION_ID not in conf:
225
- _logger.warning(
226
- "Dict load is not recognized. Fail to load configuration"
227
- )
228
- reco_opts = {}
229
- else:
230
- reco_opts = conf[self._OPT_RECO_SECTION_ID]
231
- if self._OPT_PREPROCESS_SECTION_ID not in conf:
232
- _logger.warning(
233
- "Dict load is not recognized. Fail to load configuration"
234
- )
235
- preprocess_opts = {}
236
- else:
237
- preprocess_opts = conf[self._OPT_PREPROCESS_SECTION_ID]
238
- if self._TOMWER_CONFIG not in conf:
239
- _logger.warning(
240
- "Dict load is not recognized. Fail to load configuration"
241
- )
242
- tomwer_config = {}
243
- else:
244
- tomwer_config = conf[self._TOMWER_CONFIG]
245
- self.setConfigFromOptionsDict(
246
- reco_opts=reco_opts,
247
- preprocess_opts=preprocess_opts,
248
- tomwer_config=tomwer_config,
249
- )
250
-
251
- def save(self): # pragma: no cover
252
- dialog = qt.QFileDialog(self)
253
- dialog.setNameFilters(["ini (*.ini)"])
254
- dialog.setAcceptMode(qt.QFileDialog.AcceptSave)
255
- dialog.setFileMode(qt.QFileDialog.AnyFile)
256
-
257
- if not dialog.exec_():
258
- dialog.close()
259
- return
260
- else:
261
- self.saveTo(dialog.selectedFiles()[0])
262
-
263
- def saveTo(self, _file):
264
- """Save the parameters used for reconstruction into an ini file"""
265
- if _file.lower().endswith(".ini") is False:
266
- _file = _file + ".ini"
267
- _logger.info(("saving to", _file))
268
- fixedOptions = self.getParameters()
269
- additionalRecoOptions = self.getAdditionalRecoOptions()
270
- additionalPreprocessOptions = self.getAdditionalPreprocessOptions()
271
- pre_proc_ffc = fixedOptions["ffc-when"]
272
- if type(pre_proc_ffc) is str:
273
- pre_proc_ffc = getattr(FFCWhen, pre_proc_ffc)
274
- assert isinstance(pre_proc_ffc, FFCWhen)
275
-
276
- def store(options, key, ddict):
277
- optionsList = _retrieve_opts_recons_cmd(
278
- scan_id=None,
279
- recons_param=fixedOptions,
280
- additional_opts=options,
281
- pre_proc_ffc=pre_proc_ffc is FFCWhen.preprocessing,
282
- )
283
- optionsList = optionsList.split("--")
284
- optionsDict = {}
285
- for opt in optionsList:
286
- if opt == " ":
287
- continue
288
- _opt = opt.lstrip(" ")
289
- if "=" in _opt:
290
- optName, value = _opt.split("=", 1)
291
- value = value.replace("=", "")
292
- elif " " in _opt:
293
- optName, value = _opt.split(" ", 1)
294
- value = value.replace(" ", "")
295
- else:
296
- optName = _opt
297
- value = ""
298
- optName = optName.rstrip(" ")
299
- optionsDict[optName] = value
300
- ddict[key] = optionsDict
301
-
302
- ddict = {}
303
- store(options=additionalRecoOptions, key=self._OPT_RECO_SECTION_ID, ddict=ddict)
304
- store(
305
- options=additionalPreprocessOptions,
306
- key=self._OPT_PREPROCESS_SECTION_ID,
307
- ddict=ddict,
308
- )
309
- config_dict = {
310
- "rm-tif": fixedOptions["rm-tif"],
311
- "ffc-when": fixedOptions["ffc-when"],
312
- "half-acquisition": fixedOptions["half-acquisition"],
313
- "blend": fixedOptions["blend"],
314
- "adjust-mean": fixedOptions["adjust-mean"],
315
- "z": fixedOptions["z"],
316
- }
317
- ddict[self._TOMWER_CONFIG] = config_dict
318
- dictdump.dicttoini(ddict=ddict, inifile=_file)
319
-
320
- def setConfigFromOptionsDict(self, reco_opts, preprocess_opts, tomwer_config):
321
- """
322
- extract from the command line the list of option names and their
323
- values if any to store them
324
-
325
- :param list or tuple options:
326
- """
327
- self._tabs._expertWidget.resetAdditionalRecoOptions()
328
- self._tabs._expertWidget.resetAdditionalPreprocessOptions()
329
- add_options = self.setParameters(reco_opts)
330
- for option, optValue in add_options.items():
331
- self._tabs._expertWidget.addAdditionalRecoOption(
332
- option=option, value=optValue
333
- )
334
- add_options = self.setParameters(preprocess_opts)
335
- for option, optValue in add_options.items():
336
- self._tabs._expertWidget.addAdditionalPreprocessOption(
337
- option=option, value=optValue
338
- )
339
- if "rm-tif" in tomwer_config:
340
- self._tabs._outputWidget.setRemoveTiff(tomwer_config["rm-tif"])
341
- if "half-acquisition" in tomwer_config:
342
- self._tabs._inputWidget.setHalfAcquisition(
343
- tomwer_config["half-acquisition"]
344
- )
345
- if "ffc-when" in tomwer_config:
346
- self._tabs._inputWidget.setWhenApplyFFC(tomwer_config["ffc-when"])
347
- if "blend" in tomwer_config:
348
- self._tabs._inputWidget.setBlend(tomwer_config["blend"])
349
- if "adjust-mean" in tomwer_config:
350
- self._tabs._inputWidget.setAdjustMean(tomwer_config["adjust-mean"])
351
- if "z" in tomwer_config:
352
- self._tabs._outputWidget.setZ(tomwer_config["z"])
353
-
354
- def setAdditionalRecoOptions(self, options):
355
- assert isinstance(options, str)
356
- self._tabs._expertWidget.resetAdditionalRecoOptions()
357
-
358
- def setAdditionalPreprocessOptions(self, options):
359
- assert isinstance(options, str)
360
- self._tabs._expertWidget.resetAdditionalPreprocessOptions()
361
-
362
- def loadFromScan(self, scanID):
363
- self._tabs.loadFromScan(scanID)
364
- self._scanTypeChanged()
365
-
366
-
367
- class _TofuTab(_TofuOptionLoader, qt.QTabWidget):
368
- """
369
- Tab containing the different editor for the tofu reconstruction parameter
370
- """
371
-
372
- def __init__(self, parent):
373
- qt.QTabWidget.__init__(self, parent)
374
-
375
- self._outputWidget = OutputTofuWidget(parent=self)
376
- icon = icons.getQIcon("output")
377
- self.addTab(self._outputWidget, icon, "Output definition")
378
- self._inputWidget = InputProjectionsScrollArea(parent=self)
379
- icon = icons.getQIcon("input")
380
- self.addTab(self._inputWidget, icon, "Projections")
381
- self._expertWidget = ExpertTofuWidget(parent=self)
382
- icon = icons.getQIcon("parameters")
383
- self.addTab(self._expertWidget, icon, "Expert")
384
- # TODO: warning, _expertWidget should always set as last tab
385
- _TofuOptionLoader.__init__(
386
- self,
387
- options=[],
388
- childs=[self._outputWidget, self._inputWidget, self._expertWidget],
389
- )
390
-
391
- # connect signal/SLOT
392
- self._expertWidget._gpuGrp.gpuOptionChanged.connect(self.gpuOptionUpdated)
393
-
394
- def loadFromScan(self, scanID):
395
- for widget in (self._outputWidget, self._inputWidget, self._expertWidget):
396
- widget.loadFromScan(scanID=scanID)
397
-
398
- def getAdditionalRecoOptions(self):
399
- return self._expertWidget.getAdditionalRecoOptions()
400
-
401
- def getAdditionalPreprocessOptions(self):
402
- return self._expertWidget.getAdditionalPreprocessOptions()
403
-
404
- def gpuOptionUpdated(self):
405
- highLimit = self._expertWidget.getHighLimit()
406
- self._outputWidget.setHighLimit(highLimit)
407
-
408
-
409
- class ScanTypeWidget(_TofuOptionLoader, qt.QWidget):
410
- """
411
- Simple widget to define the type of reconstruction we want
412
- """
413
-
414
- def __init__(self, parent):
415
- qt.QWidget.__init__(self, parent)
416
- _TofuOptionLoader.__init__(self, options={"scan_type": self.setScanType})
417
-
418
- self.setLayout(qt.QHBoxLayout())
419
- self.layout().addWidget(qt.QLabel("scan type:", parent=self))
420
- self._scanType = qt.QComboBox(parent=self)
421
- for _type in SCAN_TYPES:
422
- self._scanType.addItem(_type)
423
- self.layout().addWidget(self._scanType)
424
-
425
- def setScanType(self, scan_type):
426
- assert scan_type in SCAN_TYPES_I
427
- index = self._scanType.findText(SCAN_TYPES_I[scan_type])
428
- assert index >= 0
429
- self._scanType.setCurrentIndex(index)
430
-
431
- def getScanType(self):
432
- return SCAN_TYPES[self._scanType.currentText()]