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
@@ -0,0 +1,273 @@
1
+ <?xml version="1.0" encoding="UTF-8" standalone="no"?>
2
+ <!-- Created with Inkscape (http://www.inkscape.org/) -->
3
+
4
+ <svg
5
+ width="48"
6
+ height="48"
7
+ viewBox="0 0 12.7 12.7"
8
+ version="1.1"
9
+ id="svg5"
10
+ inkscape:version="1.2.2 (b0a8486541, 2022-12-01)"
11
+ sodipodi:docname="ruler.svg"
12
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
13
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
14
+ xmlns="http://www.w3.org/2000/svg"
15
+ xmlns:svg="http://www.w3.org/2000/svg">
16
+ <sodipodi:namedview
17
+ id="namedview7"
18
+ pagecolor="#ffffff"
19
+ bordercolor="#000000"
20
+ borderopacity="0.25"
21
+ inkscape:showpageshadow="2"
22
+ inkscape:pageopacity="0.0"
23
+ inkscape:pagecheckerboard="0"
24
+ inkscape:deskcolor="#d1d1d1"
25
+ inkscape:document-units="mm"
26
+ showgrid="true"
27
+ inkscape:zoom="6.7277216"
28
+ inkscape:cx="60.86756"
29
+ inkscape:cy="-1.635026"
30
+ inkscape:window-width="1920"
31
+ inkscape:window-height="1163"
32
+ inkscape:window-x="1920"
33
+ inkscape:window-y="0"
34
+ inkscape:window-maximized="1"
35
+ inkscape:current-layer="layer1">
36
+ <inkscape:grid
37
+ type="xygrid"
38
+ id="grid3452" />
39
+ </sodipodi:namedview>
40
+ <defs
41
+ id="defs2">
42
+ <marker
43
+ style="overflow:visible"
44
+ id="marker2158"
45
+ refX="0"
46
+ refY="0"
47
+ orient="auto"
48
+ inkscape:stockid="Dot"
49
+ markerWidth="1"
50
+ markerHeight="1"
51
+ viewBox="0 0 5.6666667 5.6666667"
52
+ inkscape:isstock="true"
53
+ inkscape:collect="always"
54
+ preserveAspectRatio="xMidYMid">
55
+ <path
56
+ transform="scale(0.5)"
57
+ style="fill:context-stroke;fill-rule:evenodd;stroke:context-stroke;stroke-width:1pt"
58
+ d="M 5,0 C 5,2.76 2.76,5 0,5 -2.76,5 -5,2.76 -5,0 c 0,-2.76 2.3,-5 5,-5 2.76,0 5,2.24 5,5 z"
59
+ id="path2156"
60
+ sodipodi:nodetypes="sssss" />
61
+ </marker>
62
+ <marker
63
+ style="overflow:visible"
64
+ id="Dot"
65
+ refX="0"
66
+ refY="0"
67
+ orient="auto"
68
+ inkscape:stockid="Dot"
69
+ markerWidth="1"
70
+ markerHeight="1"
71
+ viewBox="0 0 5.6666667 5.6666667"
72
+ inkscape:isstock="true"
73
+ inkscape:collect="always"
74
+ preserveAspectRatio="xMidYMid">
75
+ <path
76
+ transform="scale(0.5)"
77
+ style="fill:context-stroke;fill-rule:evenodd;stroke:context-stroke;stroke-width:1pt"
78
+ d="M 5,0 C 5,2.76 2.76,5 0,5 -2.76,5 -5,2.76 -5,0 c 0,-2.76 2.3,-5 5,-5 2.76,0 5,2.24 5,5 z"
79
+ id="Dot1"
80
+ sodipodi:nodetypes="sssss" />
81
+ </marker>
82
+ <marker
83
+ style="overflow:visible"
84
+ id="Dot-3"
85
+ refX="0"
86
+ refY="0"
87
+ orient="auto"
88
+ inkscape:stockid="Dot"
89
+ markerWidth="1"
90
+ markerHeight="1"
91
+ viewBox="0 0 5.6666667 5.6666667"
92
+ inkscape:isstock="true"
93
+ inkscape:collect="always"
94
+ preserveAspectRatio="xMidYMid">
95
+ <path
96
+ transform="scale(0.5)"
97
+ style="fill:context-stroke;fill-rule:evenodd;stroke:context-stroke;stroke-width:1pt"
98
+ d="M 5,0 C 5,2.76 2.76,5 0,5 -2.76,5 -5,2.76 -5,0 c 0,-2.76 2.3,-5 5,-5 2.76,0 5,2.24 5,5 z"
99
+ id="Dot1-6"
100
+ sodipodi:nodetypes="sssss" />
101
+ </marker>
102
+ <marker
103
+ style="overflow:visible"
104
+ id="Dot-3-5"
105
+ refX="0"
106
+ refY="0"
107
+ orient="auto"
108
+ inkscape:stockid="Dot"
109
+ markerWidth="1"
110
+ markerHeight="1"
111
+ viewBox="0 0 5.6666667 5.6666667"
112
+ inkscape:isstock="true"
113
+ inkscape:collect="always"
114
+ preserveAspectRatio="xMidYMid">
115
+ <path
116
+ transform="scale(0.5)"
117
+ style="fill:context-stroke;fill-rule:evenodd;stroke:context-stroke;stroke-width:1pt"
118
+ d="M 5,0 C 5,2.76 2.76,5 0,5 -2.76,5 -5,2.76 -5,0 c 0,-2.76 2.3,-5 5,-5 2.76,0 5,2.24 5,5 z"
119
+ id="Dot1-6-3"
120
+ sodipodi:nodetypes="sssss" />
121
+ </marker>
122
+ <marker
123
+ style="overflow:visible"
124
+ id="marker2158-6"
125
+ refX="0"
126
+ refY="0"
127
+ orient="auto"
128
+ inkscape:stockid="Dot"
129
+ markerWidth="1"
130
+ markerHeight="1"
131
+ viewBox="0 0 5.6666667 5.6666667"
132
+ inkscape:isstock="true"
133
+ inkscape:collect="always"
134
+ preserveAspectRatio="xMidYMid">
135
+ <path
136
+ transform="scale(0.5)"
137
+ style="fill:context-stroke;fill-rule:evenodd;stroke:context-stroke;stroke-width:1pt"
138
+ d="M 5,0 C 5,2.76 2.76,5 0,5 -2.76,5 -5,2.76 -5,0 c 0,-2.76 2.3,-5 5,-5 2.76,0 5,2.24 5,5 z"
139
+ id="path2156-2"
140
+ sodipodi:nodetypes="sssss" />
141
+ </marker>
142
+ <marker
143
+ style="overflow:visible"
144
+ id="Dot-3-5-1"
145
+ refX="0"
146
+ refY="0"
147
+ orient="auto"
148
+ inkscape:stockid="Dot"
149
+ markerWidth="1"
150
+ markerHeight="1"
151
+ viewBox="0 0 5.6666667 5.6666667"
152
+ inkscape:isstock="true"
153
+ inkscape:collect="always"
154
+ preserveAspectRatio="xMidYMid">
155
+ <path
156
+ transform="scale(0.5)"
157
+ style="fill:context-stroke;fill-rule:evenodd;stroke:context-stroke;stroke-width:1pt"
158
+ d="M 5,0 C 5,2.76 2.76,5 0,5 -2.76,5 -5,2.76 -5,0 c 0,-2.76 2.3,-5 5,-5 2.76,0 5,2.24 5,5 z"
159
+ id="Dot1-6-3-2"
160
+ sodipodi:nodetypes="sssss" />
161
+ </marker>
162
+ <marker
163
+ style="overflow:visible"
164
+ id="marker2158-6-0"
165
+ refX="0"
166
+ refY="0"
167
+ orient="auto"
168
+ inkscape:stockid="Dot"
169
+ markerWidth="1"
170
+ markerHeight="1"
171
+ viewBox="0 0 5.6666667 5.6666667"
172
+ inkscape:isstock="true"
173
+ inkscape:collect="always"
174
+ preserveAspectRatio="xMidYMid">
175
+ <path
176
+ transform="scale(0.5)"
177
+ style="fill:context-stroke;fill-rule:evenodd;stroke:context-stroke;stroke-width:1pt"
178
+ d="M 5,0 C 5,2.76 2.76,5 0,5 -2.76,5 -5,2.76 -5,0 c 0,-2.76 2.3,-5 5,-5 2.76,0 5,2.24 5,5 z"
179
+ id="path2156-2-9"
180
+ sodipodi:nodetypes="sssss" />
181
+ </marker>
182
+ <marker
183
+ style="overflow:visible"
184
+ id="marker2158-6-6"
185
+ refX="0"
186
+ refY="0"
187
+ orient="auto"
188
+ inkscape:stockid="Dot"
189
+ markerWidth="1"
190
+ markerHeight="1"
191
+ viewBox="0 0 5.6666667 5.6666667"
192
+ inkscape:isstock="true"
193
+ inkscape:collect="always"
194
+ preserveAspectRatio="xMidYMid">
195
+ <path
196
+ transform="scale(0.5)"
197
+ style="fill:context-stroke;fill-rule:evenodd;stroke:context-stroke;stroke-width:1pt"
198
+ d="M 5,0 C 5,2.76 2.76,5 0,5 -2.76,5 -5,2.76 -5,0 c 0,-2.76 2.3,-5 5,-5 2.76,0 5,2.24 5,5 z"
199
+ id="path2156-2-0"
200
+ sodipodi:nodetypes="sssss" />
201
+ </marker>
202
+ <marker
203
+ style="overflow:visible"
204
+ id="Dot-3-5-1-2"
205
+ refX="0"
206
+ refY="0"
207
+ orient="auto"
208
+ inkscape:stockid="Dot"
209
+ markerWidth="1"
210
+ markerHeight="1"
211
+ viewBox="0 0 5.6666667 5.6666667"
212
+ inkscape:isstock="true"
213
+ inkscape:collect="always"
214
+ preserveAspectRatio="xMidYMid">
215
+ <path
216
+ transform="scale(0.5)"
217
+ style="fill:context-stroke;fill-rule:evenodd;stroke:context-stroke;stroke-width:1pt"
218
+ d="M 5,0 C 5,2.76 2.76,5 0,5 -2.76,5 -5,2.76 -5,0 c 0,-2.76 2.3,-5 5,-5 2.76,0 5,2.24 5,5 z"
219
+ id="Dot1-6-3-2-6"
220
+ sodipodi:nodetypes="sssss" />
221
+ </marker>
222
+ </defs>
223
+ <g
224
+ inkscape:label="Layer 1"
225
+ inkscape:groupmode="layer"
226
+ id="layer1">
227
+ <rect
228
+ style="fill:#ffffff;fill-opacity:1;stroke:#000000;stroke-width:0.4;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:3.5;stroke-dasharray:none;stroke-opacity:1"
229
+ id="rect234"
230
+ width="2.2563748"
231
+ height="13.271752"
232
+ x="7.9736362"
233
+ y="-6.5288706"
234
+ ry="0.33685613"
235
+ transform="rotate(44.246507)" />
236
+ <path
237
+ style="fill:none;fill-opacity:1;stroke:#000000;stroke-width:0.4;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:3.5;stroke-dasharray:none;stroke-opacity:1;marker-end:url(#Dot)"
238
+ d="M 3.7284007,10.909518 2.6226078,9.821972"
239
+ id="path1741" />
240
+ <path
241
+ style="fill:#ffffff;fill-opacity:1;stroke:#000000;stroke-width:0.4;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:3.5;stroke-dasharray:none;stroke-opacity:1;marker-end:url(#marker2158)"
242
+ d="M 4.5846537,9.9373806 4.0595052,9.4357496"
243
+ id="path1743" />
244
+ <path
245
+ style="fill:none;fill-opacity:1;stroke:#000000;stroke-width:0.4;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:3.5;stroke-dasharray:none;stroke-opacity:1;marker-end:url(#Dot-3)"
246
+ d="M 5.6609211,9.076106 4.5551282,7.98856"
247
+ id="path1741-7" />
248
+ <path
249
+ style="fill:none;fill-opacity:1;stroke:#000000;stroke-width:0.4;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:3.5;stroke-dasharray:none;stroke-opacity:1;marker-end:url(#Dot-3-5)"
250
+ d="M 7.3190237,7.3712884 6.2132308,6.2837424"
251
+ id="path1741-7-5" />
252
+ <path
253
+ style="fill:none;fill-opacity:1;stroke:#000000;stroke-width:0.4;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:3.5;stroke-dasharray:none;stroke-opacity:1;marker-end:url(#Dot-3-5-1)"
254
+ d="M 9.0589949,5.663934 7.9532027,4.576388"
255
+ id="path1741-7-5-7" />
256
+ <path
257
+ style="fill:#ffffff;fill-opacity:1;stroke:#000000;stroke-width:0.4;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:3.5;stroke-dasharray:none;stroke-opacity:1;marker-end:url(#marker2158-6)"
258
+ d="M 6.301306,8.1024081 5.7761575,7.6007771"
259
+ id="path1743-9" />
260
+ <path
261
+ style="fill:#ffffff;fill-opacity:1;stroke:#000000;stroke-width:0.4;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:3.5;stroke-dasharray:none;stroke-opacity:1;marker-end:url(#marker2158-6-0)"
262
+ d="M 8.0338077,6.4004863 7.5086592,5.8988553"
263
+ id="path1743-9-3" />
264
+ <path
265
+ style="fill:#ffffff;fill-opacity:1;stroke:#000000;stroke-width:0.4;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:3.5;stroke-dasharray:none;stroke-opacity:1;marker-end:url(#marker2158-6-6)"
266
+ d="M 9.7570035,4.5519285 9.2318545,4.0502975"
267
+ id="path1743-9-6" />
268
+ <path
269
+ style="fill:none;fill-opacity:1;stroke:#000000;stroke-width:0.4;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:3.5;stroke-dasharray:none;stroke-opacity:1;marker-end:url(#Dot-3-5-1-2)"
270
+ d="M 10.848322,3.6556113 9.7425292,2.5680653"
271
+ id="path1741-7-5-7-1" />
272
+ </g>
273
+ </svg>
@@ -0,0 +1,58 @@
1
+ <?xml version="1.0" encoding="UTF-8" standalone="no"?>
2
+ <!-- Created with Inkscape (http://www.inkscape.org/) -->
3
+
4
+ <svg
5
+ width="48"
6
+ height="48"
7
+ viewBox="0 0 12.7 12.7"
8
+ version="1.1"
9
+ id="svg975"
10
+ inkscape:version="1.2.2 (b0a8486541, 2022-12-01)"
11
+ sodipodi:docname="short.svg"
12
+ inkscape:export-filename="short.png"
13
+ inkscape:export-xdpi="96"
14
+ inkscape:export-ydpi="96"
15
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
16
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
17
+ xmlns="http://www.w3.org/2000/svg"
18
+ xmlns:svg="http://www.w3.org/2000/svg">
19
+ <sodipodi:namedview
20
+ id="namedview977"
21
+ pagecolor="#ffffff"
22
+ bordercolor="#000000"
23
+ borderopacity="0.25"
24
+ inkscape:showpageshadow="2"
25
+ inkscape:pageopacity="0.0"
26
+ inkscape:pagecheckerboard="0"
27
+ inkscape:deskcolor="#d1d1d1"
28
+ inkscape:document-units="mm"
29
+ showgrid="false"
30
+ inkscape:zoom="6.7277216"
31
+ inkscape:cx="13.154528"
32
+ inkscape:cy="36.862405"
33
+ inkscape:window-width="1920"
34
+ inkscape:window-height="1131"
35
+ inkscape:window-x="0"
36
+ inkscape:window-y="32"
37
+ inkscape:window-maximized="1"
38
+ inkscape:current-layer="layer1" />
39
+ <defs
40
+ id="defs972" />
41
+ <g
42
+ inkscape:label="Layer 1"
43
+ inkscape:groupmode="layer"
44
+ id="layer1">
45
+ <text
46
+ xml:space="preserve"
47
+ style="font-style:italic;font-size:5.95578px;font-family:'Nimbus Sans';-inkscape-font-specification:'Nimbus Sans Italic';opacity:0.907409;fill:#000000;stroke-width:0.759712;stroke-miterlimit:3.5"
48
+ x="-0.02063646"
49
+ y="7.5627742"
50
+ id="text1150"
51
+ transform="scale(0.89694342,1.1148975)"><tspan
52
+ sodipodi:role="line"
53
+ id="tspan1148"
54
+ style="stroke-width:0.759713"
55
+ x="-0.02063646"
56
+ y="7.5627742">short</tspan></text>
57
+ </g>
58
+ </svg>
Binary file
@@ -0,0 +1,58 @@
1
+ <?xml version="1.0" encoding="UTF-8" standalone="no"?>
2
+ <!-- Created with Inkscape (http://www.inkscape.org/) -->
3
+
4
+ <svg
5
+ width="48"
6
+ height="48"
7
+ viewBox="0 0 12.7 12.7"
8
+ version="1.1"
9
+ id="svg5"
10
+ inkscape:version="1.2.2 (b0a8486541, 2022-12-01)"
11
+ sodipodi:docname="url.svg"
12
+ inkscape:export-filename="url.png"
13
+ inkscape:export-xdpi="96"
14
+ inkscape:export-ydpi="96"
15
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
16
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
17
+ xmlns="http://www.w3.org/2000/svg"
18
+ xmlns:svg="http://www.w3.org/2000/svg">
19
+ <sodipodi:namedview
20
+ id="namedview7"
21
+ pagecolor="#ffffff"
22
+ bordercolor="#000000"
23
+ borderopacity="0.25"
24
+ inkscape:showpageshadow="2"
25
+ inkscape:pageopacity="0.0"
26
+ inkscape:pagecheckerboard="0"
27
+ inkscape:deskcolor="#d1d1d1"
28
+ inkscape:document-units="mm"
29
+ showgrid="false"
30
+ inkscape:zoom="3.3638608"
31
+ inkscape:cx="36.119211"
32
+ inkscape:cy="25.863139"
33
+ inkscape:window-width="1920"
34
+ inkscape:window-height="1131"
35
+ inkscape:window-x="0"
36
+ inkscape:window-y="32"
37
+ inkscape:window-maximized="1"
38
+ inkscape:current-layer="layer1" />
39
+ <defs
40
+ id="defs2" />
41
+ <g
42
+ inkscape:label="Layer 1"
43
+ inkscape:groupmode="layer"
44
+ id="layer1">
45
+ <text
46
+ xml:space="preserve"
47
+ style="font-style:italic;font-size:9.97676px;font-family:'Nimbus Sans';-inkscape-font-specification:'Nimbus Sans Italic';opacity:0.907409;fill:#000000;fill-opacity:1;stroke:#000000;stroke-width:1.27262;stroke-miterlimit:3.5"
48
+ x="0.16326435"
49
+ y="9.5309248"
50
+ id="text236"
51
+ transform="scale(0.97072659,1.0301562)"><tspan
52
+ sodipodi:role="line"
53
+ id="tspan234"
54
+ style="fill:#000000;fill-opacity:1;stroke:none;stroke-width:1.27263"
55
+ x="0.16326435"
56
+ y="9.5309248">url</tspan></text>
57
+ </g>
58
+ </svg>
@@ -14,7 +14,7 @@
14
14
  height="160"
15
15
  version="1.1"
16
16
  inkscape:version="0.48.5 r10040"
17
- sodipodi:docname="lamino_beta_angle.svg">
17
+ sodipodi:docname="no_rot.svg">
18
18
  <sodipodi:namedview
19
19
  pagecolor="#ffffff"
20
20
  bordercolor="#666666"
@@ -38,7 +38,7 @@ from tomwer.core.process.edit import darkflatpatch
38
38
  from tomwer.core.scan.edfscan import EDFTomoScan
39
39
  from tomwer.core.scan.scanbase import TomwerScanBase
40
40
  from tomwer.core.settings import get_lbsram_path, isOnLbsram
41
- from tomwer.core.utils import isLowOnMemory
41
+ from tomwer.core.utils.lbsram import is_low_on_memory
42
42
 
43
43
  from ..processingstack import FIFO, ProcessingThread
44
44
 
@@ -60,7 +60,7 @@ class DarkFlatPatchProcessStack(FIFO, qt.QObject):
60
60
  assert isinstance(data, TomwerScanBase)
61
61
  self._computationThread.finished.connect(self._end_threaded_computation)
62
62
 
63
- if isOnLbsram(data) and isLowOnMemory(get_lbsram_path()) is True:
63
+ if isOnLbsram(data) and is_low_on_memory(get_lbsram_path()) is True:
64
64
  # if computer is running into low memory on lbsram skip it
65
65
  mess = "low memory, skip dark-flat-patch reconstruction for", data.path
66
66
  _logger.processSkipped(mess)
@@ -142,18 +142,23 @@ class _DarkFlatPatchProcessingThread(ProcessingThread, SuperviseProcess):
142
142
  for key in keys:
143
143
  if isinstance(configuration_to_dump[key], DataUrl):
144
144
  configuration_to_dump[key] = configuration_to_dump[key].path()
145
- try:
146
- darkflatpatch.DarkFlatPatchTask._register_process(
147
- process_file=self._scan.process_file,
148
- entry=entry,
149
- configuration=configuration_to_dump,
150
- results={},
151
- process=darkflatpatch.DarkFlatPatchTask,
152
- process_index=index,
153
- overwrite=True,
154
- )
155
- except Exception as e:
156
- _logger.warning(f"Fail to register DarkFlatPatch process. Reason is {e}")
145
+
146
+ with self._scan.acquire_process_file_lock():
147
+
148
+ try:
149
+ darkflatpatch.DarkFlatPatchTask._register_process(
150
+ process_file=self._scan.process_file,
151
+ entry=entry,
152
+ configuration=configuration_to_dump,
153
+ results={},
154
+ process=darkflatpatch.DarkFlatPatchTask,
155
+ process_index=index,
156
+ overwrite=True,
157
+ )
158
+ except Exception as e:
159
+ _logger.warning(
160
+ f"Fail to register DarkFlatPatch process. Reason is {e}"
161
+ )
157
162
  info = f"Dark-flat patched for {self._scan}."
158
163
  _logger.processSucceed(info)
159
164
  ProcessManager().notify_dataset_state(
@@ -36,7 +36,7 @@ from silx.gui import qt
36
36
  from tomwer.core.process.edit import imagekeyeditor
37
37
  from tomwer.core.scan.scanbase import TomwerScanBase
38
38
  from tomwer.core.settings import get_lbsram_path, isOnLbsram
39
- from tomwer.core.utils import isLowOnMemory
39
+ from tomwer.core.utils.lbsram import is_low_on_memory
40
40
 
41
41
  from ..processingstack import FIFO, ProcessingThread
42
42
 
@@ -57,7 +57,7 @@ class ImageKeyEditorProcessStack(FIFO, qt.QObject):
57
57
  assert isinstance(data, TomwerScanBase)
58
58
  self._computationThread.finished.connect(self._end_threaded_computation)
59
59
 
60
- if isOnLbsram(data) and isLowOnMemory(get_lbsram_path()) is True:
60
+ if isOnLbsram(data) and is_low_on_memory(get_lbsram_path()) is True:
61
61
  # if computer is running into low memory on lbsram skip it
62
62
  mess = f"low memory, skip image-key-edition for {data.path}"
63
63
  _logger.processSkipped(mess)
@@ -37,10 +37,10 @@ from silx.gui import qt
37
37
  from tomwer.core.process.reconstruction.axis import AxisTask
38
38
  from tomwer.core.process.reconstruction.axis.axis import NoAxisUrl
39
39
  from tomwer.core.process.reconstruction.axis.mode import AxisMode
40
- from tomwer.core.scan.hdf5scan import HDF5TomoScan
40
+ from tomwer.core.scan.nxtomoscan import NXtomoScan
41
41
  from tomwer.core.scan.scanbase import TomwerScanBase
42
42
  from tomwer.core.settings import get_lbsram_path, isOnLbsram
43
- from tomwer.core.utils import isLowOnMemory
43
+ from tomwer.core.utils.lbsram import is_low_on_memory
44
44
  from tomwer.synctools.axis import QAxisRP
45
45
 
46
46
  from ..processingstack import FIFO, ProcessingThread
@@ -70,7 +70,7 @@ class AxisProcessStack(FIFO, qt.QObject):
70
70
  self._data_currently_computed = data
71
71
  self._axis_params.frame_width = data.dim_1
72
72
  mode = self._axis_params.mode
73
- if isOnLbsram(data) and isLowOnMemory(get_lbsram_path()) is True:
73
+ if isOnLbsram(data) and is_low_on_memory(get_lbsram_path()) is True:
74
74
  # if computer is running into low memory on lbsram skip it
75
75
  mess = "low memory, skip axis calculation", data.path
76
76
  ProcessManager().notify_dataset_state(
@@ -92,7 +92,7 @@ class AxisProcessStack(FIFO, qt.QObject):
92
92
  cor = 0
93
93
  data._axis_params.set_relative_value(cor)
94
94
  cor = data._axis_params.relative_cor_value
95
- if isinstance(data, HDF5TomoScan):
95
+ if isinstance(data, NXtomoScan):
96
96
  entry = data.entry
97
97
  else:
98
98
  entry = "entry"
@@ -38,7 +38,7 @@ from tomwer.core.process.reconstruction.nabu.castvolume import CastVolumeTask
38
38
  from tomwer.core.scan.scanbase import TomwerScanBase
39
39
  from tomwer.core.settings import get_lbsram_path, isOnLbsram
40
40
  from tomwer.core.tomwer_object import TomwerObject
41
- from tomwer.core.utils import isLowOnMemory
41
+ from tomwer.core.utils.lbsram import is_low_on_memory
42
42
  from tomwer.core.volume.volumebase import TomwerVolumeBase
43
43
  from tomwer.core.volume.volumefactory import VolumeFactory
44
44
 
@@ -81,7 +81,7 @@ class CastVolumeProcessStack(FIFO, qt.QObject):
81
81
  if (
82
82
  path is not None
83
83
  and isOnLbsram(path)
84
- and isLowOnMemory(get_lbsram_path()) is True
84
+ and is_low_on_memory(get_lbsram_path()) is True
85
85
  ):
86
86
  # if computer is running into low memory on lbsram skip it
87
87
  mess = f"low memory, skip volume cast {data}"
@@ -94,11 +94,26 @@ class CastVolumeProcessStack(FIFO, qt.QObject):
94
94
  self.scan_ready(scan=data)
95
95
  else:
96
96
  self._data_currently_computed = data
97
- self._computationThread.init(data=data, configuration=configuration)
98
- # need to manage connect before starting it because
99
- fct_callback = functools.partial(self._end_threaded_computation, callback)
100
- self._computationThread.finished.connect(fct_callback)
101
- self._computationThread.start()
97
+ try:
98
+ self._computationThread.init(data=data, configuration=configuration)
99
+ except ValueError as e:
100
+ # initialization can fail (for example for cast volume is there is no volume or be case this will raise an error)
101
+ # then we want to keep the thread active
102
+ self._data_currently_computed = None
103
+ ProcessManager().notify_dataset_state(
104
+ dataset=data, process=self._process_id, state=DatasetState.SKIPPED
105
+ )
106
+ _logger.processSkipped(f"thread initialization failed. Error is {e}")
107
+ if callback is not None:
108
+ callback()
109
+ self.scan_ready(scan=data)
110
+ else:
111
+ # need to manage connect before starting it because
112
+ fct_callback = functools.partial(
113
+ self._end_threaded_computation, callback
114
+ )
115
+ self._computationThread.finished.connect(fct_callback)
116
+ self._computationThread.start()
102
117
 
103
118
  def _end_computation(self, data, future_tomo_obj, callback):
104
119
  """
@@ -38,7 +38,7 @@ from silx.gui import qt
38
38
  from tomwer.core.process.reconstruction.darkref.darkrefscopy import DarkRefsCopy
39
39
  from tomwer.core.scan.scanbase import TomwerScanBase
40
40
  from tomwer.core.settings import get_lbsram_path, isOnLbsram
41
- from tomwer.core.utils import isLowOnMemory
41
+ from tomwer.core.utils.lbsram import is_low_on_memory
42
42
 
43
43
  from ..processingstack import FIFO, ProcessingThread
44
44
 
@@ -53,7 +53,12 @@ class DarkRefCopyProcessStack(FIFO, qt.QObject):
53
53
  """Signal emit when dark or flat are set by a scan. str is the scan identifier"""
54
54
 
55
55
  def __init__(self, process_id=None):
56
- self._save_dir = tempfile.mkdtemp()
56
+ try:
57
+ self._save_dir = tempfile.mkdtemp()
58
+ except Exception as e:
59
+ _logger.warning(
60
+ f"unable to create save dir. Error is {e}. Won't be able to copy any dark or flat"
61
+ )
57
62
  qt.QObject.__init__(self)
58
63
  FIFO.__init__(self, process_id=process_id)
59
64
 
@@ -77,26 +82,32 @@ class DarkRefCopyProcessStack(FIFO, qt.QObject):
77
82
  process=self,
78
83
  state=DatasetState.ON_GOING,
79
84
  )
80
- _logger.processStarted(f"dk-ref-copy {data}")
85
+ _logger.processStarted(f"dk-flat-copy {data}")
81
86
  assert isinstance(data, TomwerScanBase)
82
87
  self._data_currently_computed = data
83
- if isOnLbsram(data) and isLowOnMemory(get_lbsram_path()) is True:
88
+ if isOnLbsram(data) and is_low_on_memory(get_lbsram_path()) is True:
84
89
  # if computer is running into low memory on lbsram skip it
85
- mess = "low memory, skip dk-ref-copy", data.path
86
- ProcessManager().notify_dataset_state(
87
- dataset=data, process=self._process_id, state=DatasetState.SKIPPED
88
- )
89
- _logger.processSkipped(mess)
90
- if callback is not None:
91
- callback()
92
- self.scan_ready(scan=data)
90
+ mess = "low memory, skip dk-flat-copy", data.path
91
+ try:
92
+ ProcessManager().notify_dataset_state(
93
+ dataset=data, process=self, state=DatasetState.SKIPPED
94
+ )
95
+ _logger.processSkipped(mess)
96
+ if callback is not None:
97
+ callback()
98
+ except Exception as e:
99
+ _logger.error(e)
100
+ try:
101
+ FIFO._end_threaded_computation(self)
102
+ except Exception as e:
103
+ _logger.error(e)
93
104
  else:
94
105
  self._data_currently_computed = data
95
106
  self._computationThread.init(data=data, inputs=configuration)
96
107
  # need to manage connect before starting it because
97
108
  fct_callback = functools.partial(self._end_threaded_computation, callback)
98
109
  self._computationThread.finished.connect(fct_callback)
99
- self._computationThread.sigRefSetted.connect(self._repeatSigRefSetted)
110
+ self._computationThread.sigRefSetted.connect(self.sigRefSetted)
100
111
  self._computationThread.start()
101
112
 
102
113
  def _end_computation(self, data, future_tomo_obj, callback):
@@ -121,9 +132,6 @@ class DarkRefCopyProcessStack(FIFO, qt.QObject):
121
132
  def _create_processing_thread(self, process_id=None) -> qt.QThread:
122
133
  return _ProcessingThread(process_id=process_id, save_dir=self._save_dir)
123
134
 
124
- def _repeatSigRefSetted(self, *args, **kwargs):
125
- self.sigRefSetted.emit(*args, **kwargs)
126
-
127
135
 
128
136
  class _ProcessingThread(ProcessingThread, SuperviseProcess):
129
137
  """
@@ -156,15 +164,12 @@ class _ProcessingThread(ProcessingThread, SuperviseProcess):
156
164
  process = DarkRefsCopyWithSig(
157
165
  parent=self.parent(), inputs=inputs, process_id=self.process_id
158
166
  )
159
- process.sigRefSetted.connect(self._repeatSigRefSetted)
167
+ process.sigRefSetted.connect(self.sigRefSetted)
160
168
  try:
161
169
  process.run()
162
170
  except Exception as e:
163
171
  _logger.warning(e)
164
172
 
165
- def _repeatSigRefSetted(self, *args, **kwargs):
166
- self.sigRefSetted.emit(*args, **kwargs)
167
-
168
173
 
169
174
  class DarkRefsCopyWithSig(qt.QObject, DarkRefsCopy):
170
175
  sigRefSetted = qt.Signal(str)
@@ -36,7 +36,7 @@ from silx.gui.utils import blockSignals
36
36
 
37
37
  from tomwer.core.scan.scanbase import TomwerScanBase
38
38
  from tomwer.core.settings import get_lbsram_path, isOnLbsram
39
- from tomwer.core.utils import isLowOnMemory
39
+ from tomwer.core.utils.lbsram import is_low_on_memory
40
40
  from tomwer.core.process.reconstruction.nabu.nabuslices import NabuSlicesTask
41
41
  from tomwer.core.process.reconstruction.nabu.nabuvolume import NabuVolumeTask
42
42
 
@@ -66,7 +66,7 @@ class NabuSliceProcessStack(FIFO, qt.QObject):
66
66
  assert isinstance(data, TomwerScanBase)
67
67
  self._computationThread.finished.connect(self._end_threaded_computation)
68
68
 
69
- if isOnLbsram(data) and isLowOnMemory(get_lbsram_path()) is True:
69
+ if isOnLbsram(data) and is_low_on_memory(get_lbsram_path()) is True:
70
70
  # if computer is running into low memory on lbsram skip it
71
71
  mess = f"low memory, skip nabu reconstruction for {data.path}"
72
72
  _logger.processSkipped(mess)