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
@@ -8,6 +8,7 @@ import sys
8
8
  import time
9
9
  from typing import Union
10
10
 
11
+ import silx
11
12
  from silx.gui import qt
12
13
  from silx.io.utils import h5py_read_dataset
13
14
 
@@ -120,7 +121,6 @@ class SAAxisWindow(_SAAxisWindow):
120
121
 
121
122
  def stop(self):
122
123
  self._stopProcessingThread()
123
- super().stop()
124
124
 
125
125
  def _computeEstimatedCor(self) -> Union[float, None]:
126
126
  scan = self.getScan()
@@ -234,9 +234,9 @@ def main(argv):
234
234
  requires_reduced_dark_and_flat(scan=scan, logger_=_logger)
235
235
 
236
236
  if options.use_opengl_plot:
237
- import silx
238
-
239
237
  silx.config.DEFAULT_PLOT_BACKEND = "gl"
238
+ else:
239
+ silx.config.DEFAULT_PLOT_BACKEND = "matplotlib"
240
240
 
241
241
  window = SAAxisWindow(dump_roi=options.dump_roi)
242
242
  window.setWindowTitle("saaxis")
@@ -8,6 +8,7 @@ import sys
8
8
  import time
9
9
  from typing import Union
10
10
 
11
+ import silx
11
12
  from silx.gui import qt
12
13
  from silx.io.utils import h5py_read_dataset
13
14
 
@@ -198,7 +199,6 @@ class SADeltaBetaWindow(_SADeltaBetaWindow):
198
199
 
199
200
  def stop(self):
200
201
  self._stopProcessingThread()
201
- super().stop()
202
202
 
203
203
  def _computeEstimatedCor(self) -> Union[float, None]:
204
204
  scan = self.getScan()
@@ -283,9 +283,9 @@ def main(argv):
283
283
  logging.root.setLevel(logging.DEBUG)
284
284
 
285
285
  if options.use_opengl_plot:
286
- import silx
287
-
288
286
  silx.config.DEFAULT_PLOT_BACKEND = "gl"
287
+ else:
288
+ silx.config.DEFAULT_PLOT_BACKEND = "matplotlib"
289
289
 
290
290
  increase_max_number_file()
291
291
  scan = ScanFactory.create_scan_object(
tomwer/app/nabuapp.py CHANGED
@@ -44,12 +44,6 @@ class DataViewer(_DataViewer):
44
44
  if event.key() is qt.Qt.Key_F5:
45
45
  self._updateDisplay()
46
46
 
47
- def event(self, event) -> bool:
48
- if event.type() == qt.QEvent.DeferredDelete:
49
- self.cleanBeforeQuit()
50
- self.closed.emit()
51
- return super().event(event)
52
-
53
47
 
54
48
  class NabuProcessingThread(qt.QThread):
55
49
  def init(self, data, config, dry_run=False):
@@ -185,10 +179,6 @@ class NabuWindow(NabuDialog):
185
179
  self._dataViewer.close()
186
180
  self._dataViewer = None
187
181
 
188
- def _aboutToQuit(self):
189
- if self._dataViewer is not None:
190
- self._dataViewer.cleanBeforeQuit()
191
-
192
182
 
193
183
  def main(argv):
194
184
  import os
@@ -248,7 +238,6 @@ def main(argv):
248
238
  widget.setWindowIcon(icons.getQIcon("tomwer"))
249
239
  splash.finish(widget)
250
240
  widget.show()
251
- qt.QApplication.instance().aboutToQuit.connect(widget._aboutToQuit)
252
241
 
253
242
  app.exec_()
254
243
 
tomwer/app/radiostack.py CHANGED
@@ -7,9 +7,10 @@ import os
7
7
  import signal
8
8
  import sys
9
9
 
10
+ import silx
10
11
  from silx.gui import qt
11
12
 
12
- from tomwer.core.scan.hdf5scan import HDF5TomoScan
13
+ from tomwer.core.scan.nxtomoscan import NXtomoScan
13
14
  from tomwer.core.utils.resource import increase_max_number_file
14
15
  from tomwer.gui import icons
15
16
  from tomwer.gui.stacks import RadioStack
@@ -29,7 +30,7 @@ def addFolderAndSubFolder(stack, path):
29
30
  _path = os.path.join(path, f)
30
31
  if os.path.isdir(_path) is True:
31
32
  addFolderAndSubFolder(stack, _path)
32
- elif os.path.isfile(_path) and HDF5TomoScan.is_nexus_nxtomo_file(_path):
33
+ elif os.path.isfile(_path) and NXtomoScan.is_nexus_nxtomo_file(_path):
33
34
  stack.addLeafScan(_path)
34
35
 
35
36
 
@@ -60,10 +61,11 @@ def main(argv):
60
61
  increase_max_number_file()
61
62
 
62
63
  options = parser.parse_args(argv[1:])
63
- if options.use_opengl_plot:
64
- import silx
65
64
 
65
+ if options.use_opengl_plot:
66
66
  silx.config.DEFAULT_PLOT_BACKEND = "gl"
67
+ else:
68
+ silx.config.DEFAULT_PLOT_BACKEND = "matplotlib"
67
69
 
68
70
  global app # QApplication must be global to avoid seg fault on quit
69
71
  app = qt.QApplication.instance() or qt.QApplication(["tomwer"])
tomwer/app/samplemoved.py CHANGED
@@ -7,6 +7,7 @@ import os
7
7
  import signal
8
8
  import sys
9
9
 
10
+ import silx
10
11
  from silx.gui import qt
11
12
 
12
13
  from tomwer.core.scan.scanfactory import ScanFactory
@@ -54,9 +55,9 @@ def main(argv):
54
55
  options = parser.parse_args(argv[1:])
55
56
 
56
57
  if options.use_opengl_plot:
57
- import silx
58
-
59
58
  silx.config.DEFAULT_PLOT_BACKEND = "gl"
59
+ else:
60
+ silx.config.DEFAULT_PLOT_BACKEND = "matplotlib"
60
61
 
61
62
  increase_max_number_file()
62
63
 
tomwer/app/scanviewer.py CHANGED
@@ -45,10 +45,12 @@ def main(argv):
45
45
  scan_path=options.scan_path, entry=options.entry
46
46
  )
47
47
 
48
- if options.use_opengl_plot:
49
- import silx
48
+ import silx
50
49
 
50
+ if options.use_opengl_plot:
51
51
  silx.config.DEFAULT_PLOT_BACKEND = "gl"
52
+ else:
53
+ silx.config.DEFAULT_PLOT_BACKEND = "matplotlib"
52
54
 
53
55
  increase_max_number_file()
54
56
 
@@ -7,6 +7,7 @@ import signal
7
7
  import sys
8
8
  import weakref
9
9
 
10
+ import silx
10
11
  from silx.gui import qt
11
12
 
12
13
  from tomwer.core.scan.scanfactory import ScanFactory
@@ -72,9 +73,9 @@ def main(argv):
72
73
  options = parser.parse_args(argv[1:])
73
74
 
74
75
  if options.use_opengl_plot:
75
- import silx
76
-
77
76
  silx.config.DEFAULT_PLOT_BACKEND = "gl"
77
+ else:
78
+ silx.config.DEFAULT_PLOT_BACKEND = "matplotlib"
78
79
 
79
80
  scan = ScanFactory.create_scan_object(options.scan_path, entry=options.entry)
80
81
  increase_max_number_file()
tomwer/app/slicestack.py CHANGED
@@ -7,6 +7,7 @@ import os
7
7
  import signal
8
8
  import sys
9
9
 
10
+ import silx
10
11
  from silx.gui import qt
11
12
 
12
13
  from tomwer.core.utils.resource import increase_max_number_file
@@ -57,9 +58,9 @@ def main(argv):
57
58
  options = parser.parse_args(argv[1:])
58
59
 
59
60
  if options.use_opengl_plot:
60
- import silx
61
-
62
61
  silx.config.DEFAULT_PLOT_BACKEND = "gl"
62
+ else:
63
+ silx.config.DEFAULT_PLOT_BACKEND = "matplotlib"
63
64
 
64
65
  increase_max_number_file()
65
66
 
tomwer/app/zstitching.py CHANGED
@@ -5,18 +5,24 @@ import argparse
5
5
  import logging
6
6
  import signal
7
7
  import sys
8
+ import functools
8
9
 
10
+ import silx
9
11
  from silx.gui import qt
10
12
 
11
13
  from nabu.utils import Progress
12
14
  from nabu.stitching.config import StitchingType
13
15
 
16
+ from tomwer.core.settings import SlurmSettingsMode
14
17
  from tomwer.core.utils.resource import increase_max_number_file
18
+ from tomwer.gui import icons
15
19
  from tomwer.core.process.stitching.nabustitcher import StitcherTask
16
20
  from tomwer.io.utils.tomoobj import get_tomo_objs_instances
17
21
  from tomwer.gui.utils.splashscreen import getMainSplashScreen
18
22
  from tomwer.gui.stitching.stitching import ZStitchingWindow as _ZStitchingWindow
23
+ from tomwer.gui.stitching import action as stitching_action
19
24
  from tomwer.gui.cluster.slurm import SlurmSettingsWidget
25
+ from tomwer.core.scan.scanbase import TomwerScanBase
20
26
 
21
27
  logging.basicConfig(level=logging.WARNING)
22
28
 
@@ -31,12 +37,30 @@ class MainWidget(qt.QTabWidget):
31
37
  parent=None,
32
38
  ) -> None:
33
39
  super().__init__(parent)
34
- self._stitchingConfigWindow = _ZStitchingWindow(parent=self)
40
+ self._stitchingConfigWindow = _ZStitchingWindow(
41
+ parent=self, with_configuration_action=False
42
+ )
35
43
  self.addTab(self._stitchingConfigWindow, "stitching config")
44
+ settingsClass = SlurmSettingsMode.get_settings_class(
45
+ SlurmSettingsMode.STITCHING
46
+ )
36
47
  self._slurmConfig = SlurmSettingsWidget(
37
- parent=self, n_gpu=0, jobLimitation=None
48
+ parent=self, n_gpu=settingsClass.N_GPUS_PER_WORKER, jobLimitation=None
49
+ )
50
+ self._slurmConfig.setConfiguration(
51
+ {
52
+ "cpu-per-task": settingsClass.N_CORES_PER_TASK,
53
+ "n_tasks": settingsClass.N_TASKS,
54
+ "n_jobs": settingsClass.N_JOBS,
55
+ "memory": settingsClass.MEMORY_PER_WORKER,
56
+ "partition": settingsClass.PARTITION,
57
+ "n_gpus": settingsClass.N_GPUS_PER_WORKER,
58
+ "job_name": settingsClass.PROJECT_NAME,
59
+ "walltime": settingsClass.DEFAULT_WALLTIME,
60
+ "python_venv": settingsClass.PYTHON_VENV,
61
+ }
38
62
  )
39
- self._slurmConfig.setNJobs(20)
63
+
40
64
  self._stitchingConfigWindow.setCallbackToGetSlurmConfig(
41
65
  self._slurmConfig.getConfiguration
42
66
  )
@@ -133,16 +157,63 @@ class MainWindow(qt.QDialog):
133
157
  def __init__(self, parent=None) -> None:
134
158
  super().__init__(parent)
135
159
  self.setLayout(qt.QVBoxLayout())
160
+ # menu
161
+ self._menuBar = qt.QMenuBar(self)
162
+ self.layout().addWidget(self._menuBar)
163
+ self._menu = qt.QMenu("&Stitching")
164
+ self._menuBar.addMenu(self._menu)
165
+ # save / load configuration
166
+ self._loadConfigurationAction = stitching_action.LoadConfigurationAction(
167
+ self, "&Load configuration"
168
+ )
169
+ self._menu.addAction(self._loadConfigurationAction)
170
+ self._saveConfigurationAction = stitching_action.SaveConfigurationAction(
171
+ self, "&Save configuration"
172
+ )
173
+ self._menu.addAction(self._saveConfigurationAction)
174
+ # separator
175
+ self._menu.addSeparator()
176
+ # add tomo object
177
+ self._addTomoObjectAction = stitching_action.AddTomoObjectAction(
178
+ self, "&Add tomo object (volume or NXtomo)"
179
+ )
180
+ self._menu.addAction(self._addTomoObjectAction)
181
+
182
+ # main window
136
183
  self.setWindowTitle("tomwer z-stitching")
137
184
  self._mainWindow = MainWidget(parent=self)
138
185
  self.layout().addWidget(self._mainWindow)
139
186
 
187
+ # button
140
188
  types = qt.QDialogButtonBox.Apply
141
189
  self._buttons = qt.QDialogButtonBox(self)
142
190
  self._buttons.setStandardButtons(types)
143
191
  self.layout().addWidget(self._buttons)
144
192
  self._buttons.button(qt.QDialogButtonBox.Apply).setText("Launch stitching")
193
+
194
+ # connect signal / slot
145
195
  self._buttons.button(qt.QDialogButtonBox.Apply).clicked.connect(self.accept)
196
+ self._loadConfigurationAction.triggered.connect(
197
+ functools.partial(
198
+ self._mainWindow._stitchingConfigWindow._loadSettings, file_path=None
199
+ )
200
+ )
201
+ self._saveConfigurationAction.triggered.connect(
202
+ functools.partial(
203
+ self._mainWindow._stitchingConfigWindow._saveSettings, file_path=None
204
+ )
205
+ )
206
+ self._addTomoObjectAction.triggered.connect(self._callbackAddTomoObj)
207
+
208
+ def _callbackAddTomoObj(self, *args, **kwargs):
209
+ """move interface to the z-ordered list and call the 'add tomo obj' callback"""
210
+ orderedListWidget = (
211
+ self._mainWindow._stitchingConfigWindow._widget._mainWidget._zOrderedList
212
+ )
213
+ self._mainWindow._stitchingConfigWindow._widget._mainWidget.setCurrentWidget(
214
+ orderedListWidget
215
+ )
216
+ orderedListWidget._callbackAddTomoObj()
146
217
 
147
218
  def close(self):
148
219
  self._mainWindow.close()
@@ -227,13 +298,18 @@ def main(argv):
227
298
  action="store_true",
228
299
  default=False,
229
300
  )
230
-
301
+ parser.add_argument(
302
+ "--check-scans",
303
+ help="If True will check scans before adding them. This check scan validity (virtual dataset contains data...)",
304
+ action="store_true",
305
+ default=False,
306
+ )
231
307
  options = parser.parse_args(argv[1:])
232
308
 
233
309
  if options.use_opengl_plot:
234
- import silx
235
-
236
310
  silx.config.DEFAULT_PLOT_BACKEND = "gl"
311
+ else:
312
+ silx.config.DEFAULT_PLOT_BACKEND = "matplotlib"
237
313
 
238
314
  if options.debug:
239
315
  logging.root.setLevel(logging.DEBUG)
@@ -258,6 +334,8 @@ def main(argv):
258
334
 
259
335
  window = MainWindow()
260
336
  window.setWindowFlags(qt.Qt.Window)
337
+ window.setWindowTitle("tomwer: z-stitching")
338
+ window.setWindowIcon(icons.getQIcon("tomwer"))
261
339
 
262
340
  window.show()
263
341
  from sluurp.utils import has_sbatch_available
@@ -271,6 +349,10 @@ def main(argv):
271
349
 
272
350
  tomo_objs, (has_scans, has_vols) = get_tomo_objs_instances(options.tomo_objs)
273
351
  for tomo_obj in tomo_objs:
352
+ if isinstance(tomo_obj, TomwerScanBase):
353
+ tomo_obj.set_check_behavior(
354
+ run_check=options.check_scans
355
+ ) # speed up processing
274
356
  window.addTomoObj(tomo_obj=tomo_obj)
275
357
  if has_scans and has_vols:
276
358
  _logger.warning(
@@ -31,8 +31,11 @@ __license__ = "MIT"
31
31
  __date__ = "12/10/2021"
32
32
 
33
33
 
34
+ import logging
34
35
  from tomwer.core.settings import SlurmSettings as _SlurmSettings
35
36
 
37
+ _logger = logging.getLogger(__name__)
38
+
36
39
 
37
40
  class SlurmClusterConfiguration:
38
41
  """Object shipping the configuration of a slurm cluster"""
@@ -48,6 +51,8 @@ class SlurmClusterConfiguration:
48
51
  walltime=_SlurmSettings.DEFAULT_WALLTIME,
49
52
  python_venv=_SlurmSettings.PYTHON_VENV,
50
53
  n_jobs=_SlurmSettings.N_JOBS,
54
+ modules_to_load: tuple = _SlurmSettings.MODULES_TO_LOAD,
55
+ sbatch_extra_params: dict = _SlurmSettings.SBATCH_EXTRA_PARAMS,
51
56
  ) -> None:
52
57
  self._n_cpu_per_task = n_cpu_per_task
53
58
  self._n_task = n_tasks
@@ -57,7 +62,13 @@ class SlurmClusterConfiguration:
57
62
  self._project_name = project_name
58
63
  self._walltime = walltime
59
64
  self._python_venv = python_venv
65
+ self._modules_to_load = modules_to_load
60
66
  self._n_jobs = n_jobs
67
+ self._sbatch_extra_params = sbatch_extra_params
68
+ if python_venv not in (None, "") and len(modules_to_load) > 0:
69
+ _logger.warning(
70
+ "Either 'modules to load' of 'python venv' can be provided. Not both"
71
+ )
61
72
 
62
73
  @property
63
74
  def n_cpu_per_task(self):
@@ -95,11 +106,19 @@ class SlurmClusterConfiguration:
95
106
  def python_venv(self):
96
107
  return self._python_venv
97
108
 
109
+ @property
110
+ def modules_to_load(self) -> tuple:
111
+ return self._modules_to_load
112
+
98
113
  @property
99
114
  def port_range(self) -> tuple:
100
115
  """port range as (start:int, strop:int, step: int)"""
101
116
  return self._port_range
102
117
 
118
+ @property
119
+ def sbatch_extra_params(self) -> dict:
120
+ return self._sbatch_extra_params
121
+
103
122
  @property
104
123
  def dashboard_port(self):
105
124
  return self._dashboard_port
@@ -115,6 +134,8 @@ class SlurmClusterConfiguration:
115
134
  "job_name": self.project_name,
116
135
  "walltime": self.walltime,
117
136
  "python_venv": self.python_venv,
137
+ "modules": self.modules_to_load,
138
+ "sbatch_extra_params": self.sbatch_extra_params,
118
139
  }
119
140
 
120
141
  @staticmethod
@@ -140,8 +161,13 @@ class SlurmClusterConfiguration:
140
161
  self._walltime = dict_["walltime"]
141
162
  if "python_venv" in dict_:
142
163
  self._python_venv = dict_["python_venv"]
164
+ modules = dict_.get("modules", None)
165
+ if modules is not None:
166
+ self._modules_to_load = modules
143
167
  if "port_range" in dict_:
144
168
  self._port_range = dict_["port_range"]
145
169
  if "dashboard_port" in dict_:
146
170
  self._dashboard_port = dict_["dashboard_port"]
171
+ if "sbatch_extra_params" in dict_:
172
+ self._sbatch_extra_params = dict_["sbatch_extra_params"]
147
173
  return self
tomwer/core/log/logger.py CHANGED
@@ -51,10 +51,14 @@ from tomwer.core.log.processlog import (
51
51
 
52
52
  # These are the sequences need to get colored ouput
53
53
  _RESET_SEQ = "\033[0m"
54
- _COLOR_SEQ = "\033[1;%dm"
55
54
  _BOLD_SEQ = "\033[1m"
56
55
 
57
- _BLACK, _RED, _GREEN, _YELLOW, _BLUE, _MAGENTA, _CYAN, _WHITE = range(8)
56
+ _BLACK = "\033[30m"
57
+ _RED = "\033[31m"
58
+ _GREEN = "\033[32m"
59
+ _YELLOW = "\033[33m"
60
+ _BLUE = "\033[34m"
61
+ _MAGENTA = "\033[35m"
58
62
 
59
63
  LOG_COLORS = {
60
64
  "WARNING": _MAGENTA,
@@ -90,9 +94,7 @@ class _ColoredFormatter(logging.Formatter):
90
94
  def format(self, record):
91
95
  levelname = record.levelname
92
96
  if self.use_color is True and levelname in LOG_COLORS:
93
- levelname_color = (
94
- _COLOR_SEQ % (30 + LOG_COLORS[levelname]) + levelname + _RESET_SEQ
95
- )
97
+ levelname_color = LOG_COLORS[levelname] + levelname + _RESET_SEQ
96
98
  record.levelname = levelname_color
97
99
  record.asctime = self.formatTime(record, self.datefmt)
98
100
  return logging.Formatter.format(self, record)
@@ -41,7 +41,7 @@ from tomwer.core.process.task import Task
41
41
  from tomwer.core.scan.scanbase import TomwerScanBase
42
42
  from tomwer.core.scan.scanfactory import ScanFactory
43
43
 
44
- from silx.utils.deprecation import deprecated_warning
44
+ from tomwer.core.utils.deprecation import deprecated_warning
45
45
 
46
46
  _logger = logging.getLogger(__name__)
47
47
 
@@ -37,13 +37,13 @@ import typing
37
37
  from ewokscore.task import Task as EwoksTask
38
38
  from nxtomomill import converter as nxtomomill_converter
39
39
  from silx.io.utils import h5py_read_dataset
40
- from tomoscan.io import HDF5File
40
+ from silx.io.utils import open as open_hdf5
41
41
 
42
42
  import tomwer.version
43
43
  from tomwer.core import settings
44
44
  from tomwer.core.process.task import BaseProcessInfo
45
45
  from tomwer.core.scan.blissscan import BlissScan
46
- from tomwer.core.scan.hdf5scan import HDF5TomoScan
46
+ from tomwer.core.scan.nxtomoscan import NXtomoScan
47
47
 
48
48
  from .rpcserver import DataListenerThread
49
49
 
@@ -102,6 +102,11 @@ class DataListener(BaseProcessInfo):
102
102
  TIMOUT_READ_FILE = 30
103
103
  "When the event 'scan_ended' is received all data might not have been write" " yet"
104
104
 
105
+ SWMR_MODE = None
106
+ """The bliss writer is not using the swmr mode. This class has independant behavior regarding the tomoscan / nxotmo get_swmr_mode which is
107
+ dedicated to the internal tomotools behavior
108
+ """
109
+
105
110
  def __init__(self):
106
111
  super().__init__()
107
112
  self._host = settings.JSON_RPC_HOST
@@ -191,7 +196,7 @@ class DataListener(BaseProcessInfo):
191
196
  for mf_emf in self.convert(bliss_file=sample_file, entry=entry):
192
197
  master_file, entry_master_file = mf_emf
193
198
  if master_file is not None and entry_master_file is not None:
194
- scan = HDF5TomoScan(scan=master_file, entry=entry_master_file)
199
+ scan = NXtomoScan(scan=master_file, entry=entry_master_file)
195
200
 
196
201
  try:
197
202
  # register process.
@@ -224,7 +229,7 @@ class DataListener(BaseProcessInfo):
224
229
  """Return the list of scans dir for this bliss_file / entry"""
225
230
 
226
231
  def get_scan_indexes():
227
- with HDF5File(bliss_file, "r", swmr=True) as h5f:
232
+ with open_hdf5(bliss_file) as h5f:
228
233
  entry_node = h5f[entry]
229
234
  if _SCAN_NUMBER_PATH in entry_node:
230
235
  return h5py_read_dataset(entry_node[_SCAN_NUMBER_PATH])
@@ -249,7 +254,7 @@ class DataListener(BaseProcessInfo):
249
254
  """Return the proposal file of the experimentation if registred by the
250
255
  data listener"""
251
256
  if entry is None:
252
- with HDF5File(process_file, "r", swmr=True) as h5f:
257
+ with open_hdf5(process_file) as h5f:
253
258
  entries = BaseProcessInfo._get_process_nodes(
254
259
  root_node=h5f, process=DataListener
255
260
  )
@@ -264,7 +269,7 @@ class DataListener(BaseProcessInfo):
264
269
  entry = list(entries.keys())[0]
265
270
  _logger.info("take %s as default entry" % entry)
266
271
 
267
- with HDF5File(process_file, "r", swmr=True) as h5f:
272
+ with open_hdf5(process_file) as h5f:
268
273
  dl_nodes = BaseProcessInfo._get_process_nodes(
269
274
  root_node=h5f[entry], process=DataListener
270
275
  )
@@ -306,7 +311,7 @@ class DataListener(BaseProcessInfo):
306
311
  """Return the proposal file of the experimentation if registred by the
307
312
  data listener"""
308
313
  if entry is None:
309
- with HDF5File(process_file, "r", swmr=True) as h5f:
314
+ with open_hdf5(process_file) as h5f:
310
315
  entries = BaseProcessInfo._get_process_nodes(
311
316
  root_node=h5f, process=DataListener
312
317
  )
@@ -321,7 +326,7 @@ class DataListener(BaseProcessInfo):
321
326
  entry = list(entries.keys())[0]
322
327
  _logger.info("take %s as default entry" % entry)
323
328
 
324
- with HDF5File(process_file, "r", swmr=True) as h5f:
329
+ with open_hdf5(process_file) as h5f:
325
330
  dl_nodes = BaseProcessInfo._get_process_nodes(
326
331
  root_node=h5f[entry], process=DataListener
327
332
  )
@@ -355,7 +360,7 @@ class DataListener(BaseProcessInfo):
355
360
  """Return the proposal file of the experimentation if registred by the
356
361
  data listener"""
357
362
  if entry is None:
358
- with HDF5File(process_file, "r", swmr=True) as h5f:
363
+ with open_hdf5(process_file) as h5f:
359
364
  entries = BaseProcessInfo._get_process_nodes(
360
365
  root_node=h5f, process=DataListener
361
366
  )
@@ -370,7 +375,7 @@ class DataListener(BaseProcessInfo):
370
375
  entry = list(entries.keys())[0]
371
376
  _logger.info("take %s as default entry" % entry)
372
377
 
373
- with HDF5File(process_file, "r", swmr=True) as h5f:
378
+ with open_hdf5(process_file) as h5f:
374
379
  dl_nodes = BaseProcessInfo._get_process_nodes(
375
380
  root_node=h5f[entry], process=DataListener
376
381
  )
@@ -405,7 +410,7 @@ class DataListener(BaseProcessInfo):
405
410
  specific sequence data
406
411
  """
407
412
  if entry is None:
408
- with HDF5File(process_file, "r", swmr=True) as h5f:
413
+ with open_hdf5(process_file) as h5f:
409
414
  entries = BaseProcessInfo._get_process_nodes(
410
415
  root_node=h5f, process=DataListener
411
416
  )
@@ -420,7 +425,7 @@ class DataListener(BaseProcessInfo):
420
425
  entry = list(entries.keys())[0]
421
426
  _logger.info("take %s as default entry" % entry)
422
427
 
423
- with HDF5File(process_file, "r", swmr=True) as h5f:
428
+ with open_hdf5(process_file) as h5f:
424
429
  dl_nodes = BaseProcessInfo._get_process_nodes(
425
430
  root_node=h5f[entry], process=DataListener
426
431
  )
@@ -498,7 +503,7 @@ class DataListener(BaseProcessInfo):
498
503
  # write
499
504
  def sequence_is_finished():
500
505
  try:
501
- with HDF5File(bliss_file, "r", swmr=True) as h5f:
506
+ with open_hdf5(bliss_file) as h5f:
502
507
  end_scan_path = "/".join((entry, "end_time"))
503
508
  return end_scan_path in h5f
504
509
  except Exception:
@@ -548,7 +553,7 @@ class DataListener(BaseProcessInfo):
548
553
  return res == "Y"
549
554
 
550
555
  def _signal_scan_ready(self, scan):
551
- assert isinstance(scan, HDF5TomoScan)
556
+ assert isinstance(scan, NXtomoScan)
552
557
  pass
553
558
 
554
559
  def activate(self, activate=True):
@@ -50,15 +50,6 @@ except ImportError:
50
50
  has_rsync = True
51
51
 
52
52
 
53
- def get_info_val(lines, key):
54
- r = range(len(lines))
55
- key = key + "="
56
- for i in r:
57
- if key in lines[i]:
58
- val = float(lines[i].split("=")[1])
59
- return val
60
-
61
-
62
53
  class _DataWatcherEDFProcess(_DataWatcherProcess):
63
54
  """
64
55
  Base class for edf acquisition observation