tomwer 1.2.0a2__py3-none-any.whl → 1.2.0a4__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 (34) hide show
  1. orangecontrib/tomwer/widgets/control/SingleTomoObjOW.py +0 -6
  2. orangecontrib/tomwer/widgets/reconstruction/DarkRefAndCopyOW.py +6 -2
  3. orangecontrib/tomwer/widgets/reconstruction/NabuHelicalPrepareWeightsDoubleOW.py +169 -169
  4. tomwer/app/canvas_launcher/mainwindow.py +0 -3
  5. tomwer/app/imagekeyeditor.py +1 -0
  6. tomwer/app/imagekeyupgrader.py +2 -0
  7. tomwer/app/nxtomoeditor.py +2 -0
  8. tomwer/app/zstitching.py +1 -0
  9. tomwer/core/process/reconstruction/nabu/nabucommon.py +57 -12
  10. tomwer/core/process/reconstruction/nabu/nabuscores.py +3 -2
  11. tomwer/core/process/reconstruction/nabu/nabuslices.py +7 -9
  12. tomwer/core/process/reconstruction/nabu/nabuvolume.py +10 -9
  13. tomwer/core/process/reconstruction/nabu/utils.py +10 -36
  14. tomwer/core/process/test/test_nabu.py +5 -5
  15. tomwer/gui/visualization/reconstructionparameters.py +9 -1
  16. tomwer/gui/visualization/volumeviewer.py +2 -0
  17. tomwer/resources/gui/icons/esrf_1.svg +307 -0
  18. tomwer/resources/gui/icons/triangle.svg +80 -0
  19. tomwer/version.py +1 -1
  20. {tomwer-1.2.0a2.dist-info → tomwer-1.2.0a4.dist-info}/METADATA +1 -1
  21. {tomwer-1.2.0a2.dist-info → tomwer-1.2.0a4.dist-info}/RECORD +27 -32
  22. tomwer/third_party/__init__.py +0 -0
  23. tomwer/third_party/nabu/__init__.py +0 -0
  24. tomwer/third_party/nabu/preproc/__init__.py +0 -0
  25. tomwer/third_party/nabu/preproc/phase.py +0 -387
  26. tomwer/third_party/nabu/utils.py +0 -201
  27. tomwer/third_party/tango/__init__.py +0 -0
  28. tomwer/third_party/tango/device.py +0 -15
  29. /tomwer-1.2.0a2-py3.11-nspkg.pth → /tomwer-1.2.0a4-py3.11-nspkg.pth +0 -0
  30. {tomwer-1.2.0a2.dist-info → tomwer-1.2.0a4.dist-info}/LICENSE +0 -0
  31. {tomwer-1.2.0a2.dist-info → tomwer-1.2.0a4.dist-info}/WHEEL +0 -0
  32. {tomwer-1.2.0a2.dist-info → tomwer-1.2.0a4.dist-info}/entry_points.txt +0 -0
  33. {tomwer-1.2.0a2.dist-info → tomwer-1.2.0a4.dist-info}/namespace_packages.txt +0 -0
  34. {tomwer-1.2.0a2.dist-info → tomwer-1.2.0a4.dist-info}/top_level.txt +0 -0
@@ -1,4 +1,4 @@
1
- tomwer-1.2.0a2-py3.11-nspkg.pth,sha256=xeeGR3TjdoVxdFeF6T-zSwZWh6Et--EYuPWu67LxL_c,574
1
+ tomwer-1.2.0a4-py3.11-nspkg.pth,sha256=xeeGR3TjdoVxdFeF6T-zSwZWh6Et--EYuPWu67LxL_c,574
2
2
  orangecontrib/tomwer/__init__.py,sha256=B4DXy1gY_wXmNYa2aOfapmJb2mEuCAjoaNEGnpBs70g,148
3
3
  orangecontrib/tomwer/state_summary.py,sha256=5_dPzweL3r0ye4ZfJo6IV2ThJI8fQhWoO2ySdJJajj8,1711
4
4
  orangecontrib/tomwer/orange/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -42,7 +42,7 @@ orangecontrib/tomwer/widgets/control/NXTomomillOW.py,sha256=M41e4w2dn4U4690EpsT5
42
42
  orangecontrib/tomwer/widgets/control/NXtomoConcatenate.py,sha256=9jf0Qs8jb73hPeLukmulpGRLRRm3rcdHIeks82EwaKA,5998
43
43
  orangecontrib/tomwer/widgets/control/NotifierOW.py,sha256=k_SOG-L7EVwKtAb22aSpkpcdeHFDLFRixEcapQh9NxE,4207
44
44
  orangecontrib/tomwer/widgets/control/ReduceDarkFlatSelectorOW.py,sha256=llc0e2Y8nMtXDQ56WXZoIdvjRwqcwU64yPVRnuyIOxY,2836
45
- orangecontrib/tomwer/widgets/control/SingleTomoObjOW.py,sha256=qXsvoxpU7ZO2GtKCiPVHxAtCf6FDJJbfHe5L7UWq_ak,7086
45
+ orangecontrib/tomwer/widgets/control/SingleTomoObjOW.py,sha256=tQibP4N46T9OUNsm5BsTJQd3v3uZ6d0WMnDJFRHT8yA,6786
46
46
  orangecontrib/tomwer/widgets/control/TimerOW.py,sha256=H-MWEgXXjmSa_9ExPEJr3OhRCHuT8rAAZcb0JWfoB-o,4395
47
47
  orangecontrib/tomwer/widgets/control/TomoObjSerieOW.py,sha256=pVU6M8CUdmO6T8Ib3EnLi1RcsQeXivc_wBbMOP9M2tY,3203
48
48
  orangecontrib/tomwer/widgets/control/VolumeSelector.py,sha256=nnqGw8oYaUnTglTrHoCorvqJ_sT_DmK2knazsEVY51k,5081
@@ -138,8 +138,8 @@ orangecontrib/tomwer/widgets/other/icons/hub.png,sha256=wnKSaxw2WnBkSQjI86aLZfdm
138
138
  orangecontrib/tomwer/widgets/other/icons/hub.svg,sha256=9EYoBKY-P-cO17nM48OPA9VDZSCbyGtrMRc80BGHflk,3735
139
139
  orangecontrib/tomwer/widgets/reconstruction/AxisOW.py,sha256=jZtGIbbbTIaAyLfJWijBrEQkBvo7whOXxWcBqtjxoVM,22218
140
140
  orangecontrib/tomwer/widgets/reconstruction/CastNabuVolumeOW.py,sha256=bGKijEHkZu9x14nwjuMnUInVA0zzhVg-p6PltgTDf-w,9047
141
- orangecontrib/tomwer/widgets/reconstruction/DarkRefAndCopyOW.py,sha256=lGpP_w7gWD7eqoxFsrNmwpEBcXxxNo0tJFA-aK0W4Iw,10788
142
- orangecontrib/tomwer/widgets/reconstruction/NabuHelicalPrepareWeightsDoubleOW.py,sha256=6IARMuo_V4nHECu18955_aCFLfAMuku9a2OK_kuGD-k,5408
141
+ orangecontrib/tomwer/widgets/reconstruction/DarkRefAndCopyOW.py,sha256=DyjkZ3RDgUvEkK3yR8qCWQq9eaVus8I-64nvhrHN1ZQ,10988
142
+ orangecontrib/tomwer/widgets/reconstruction/NabuHelicalPrepareWeightsDoubleOW.py,sha256=V8n4V-UYVTMFst59iXk6OzTUVH6B5mdhRDEflQourrs,5688
143
143
  orangecontrib/tomwer/widgets/reconstruction/NabuOW.py,sha256=D_0DjYYLKi-Avry_PUM_0A7UayZSw0CKKhwFvKD76O8,11865
144
144
  orangecontrib/tomwer/widgets/reconstruction/NabuVolumeOW.py,sha256=Updr8SolE-5_5MYtbNE7u3x_0XBm7pVFQSG0Iwyis_w,17925
145
145
  orangecontrib/tomwer/widgets/reconstruction/SAAxisOW.py,sha256=MSDaxFTX1VUvIEVl0GhY8Iflgxl2oKSrUUFhdtRqpKY,18723
@@ -211,19 +211,19 @@ orangecontrib/tomwer/widgets/visualization/icons/volumeviewer.svg,sha256=2uT9_px
211
211
  tomwer/__init__.py,sha256=82Jp1abyG4UWdGuT4nNU7LxaUV6xxkOte5pIz3w69Do,1745
212
212
  tomwer/__main__.py,sha256=jkdSlsmo3fEdkyV5yDRi1IyvQbyAWlXNm5B_G97Dr58,10290
213
213
  tomwer/utils.py,sha256=EgVwJ5CQVjoBvcKNwyVoXv_P4ciI11oxb8fNyy82Lck,8465
214
- tomwer/version.py,sha256=1S-JDYYLsua30ESCSJumhYvRwqqXdhu_CwN0tvMTq8I,4386
214
+ tomwer/version.py,sha256=7RuqY3vyNsEJZB6MimCiGIApoN22hNhPM4iTMD0xvzk,4386
215
215
  tomwer/app/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
216
216
  tomwer/app/axis.py,sha256=UQNxYpHzxnGdNpkV6sJoO_0tPGCxJkylghwbA7ENsM0,5948
217
217
  tomwer/app/canvas.py,sha256=Px0oWLny53xe-2OXnepfRH5ZIcuO_e7wSYmE0femhjg,1379
218
218
  tomwer/app/darkref.py,sha256=R_EMV9fAa0ixvdewItmw6c6n7a6QSx7IGDWsfVbgf_k,269
219
219
  tomwer/app/darkrefpatch.py,sha256=bI76FUXw5buNzJ3ryM3WwpviwTurAZ2coracPv7lDW8,278
220
220
  tomwer/app/diffframe.py,sha256=QYFPh4ZrcXayzBgsounw-5bOW92OqLLRnyUGqK3ETo8,3110
221
- tomwer/app/imagekeyeditor.py,sha256=cxLSx7ECaQDHc62LBRSQL3OoetXtJQNs2FHIbQiMOL4,2789
222
- tomwer/app/imagekeyupgrader.py,sha256=OaUBhzn_xWfNntnNHIjE8kCokjRVIIdaynrq0wGj8CU,3184
221
+ tomwer/app/imagekeyeditor.py,sha256=c4TH9nVn_ELUUeeiCz8nOXLhEpqWZ9zRTMsBofhUsZw,2829
222
+ tomwer/app/imagekeyupgrader.py,sha256=bPxH_oyQK6il9ePhAJTokcAkxDmLJG8R1hhI9tgZizw,3225
223
223
  tomwer/app/intensitynormalization.py,sha256=bk2Hxg0JLYkzZHEk_qqEzztXWtAiHd1asKNd-jrhnFk,6567
224
224
  tomwer/app/lamino.py,sha256=8orl9GkKQb4yyVqAoLLe7GsEVmJeelNUWxAaf1n4J2s,4809
225
225
  tomwer/app/nabuapp.py,sha256=6ytKx88wOYX_Cs6Vl_m7poL7z5gpb4s6iJod4ikaCH4,8027
226
- tomwer/app/nxtomoeditor.py,sha256=rbijDaFU72KZ1Wsv7NMrJzicovi4dnx6oYE_S_Iw8tU,2796
226
+ tomwer/app/nxtomoeditor.py,sha256=BabQ8lSBzMqZLyoKN8k2ubDj6dxYApp_Ipi1SjSN1So,2837
227
227
  tomwer/app/patchrawdarkflat.py,sha256=HsWKKyFpUwO2Pig06nMYWa9RYXeUzdkE2MQeIkhCRl4,3827
228
228
  tomwer/app/radiostack.py,sha256=Weh8Yvq69bQgBYs9nXrHY_yp_yM_flbiWMi4E5f5CJs,2531
229
229
  tomwer/app/reducedarkflat.py,sha256=QK_RAszzNDHCOTgqi28DydmnUnAPBRJHnONUF_Hy0lU,6520
@@ -235,11 +235,11 @@ tomwer/app/scanviewer.py,sha256=0HI7uV7zRiK-2MyLlAE6vCMdgmiFfMbsF33CNoxKlLw,2646
235
235
  tomwer/app/sinogramviewer.py,sha256=9V5o2OiHOyYxiWOdjZjjQuC8hRdrsOQCbpQ0QYPfSbc,3620
236
236
  tomwer/app/slicestack.py,sha256=OpvgRgXj62ThovS1wAaCTFoneJkIOwRT5BMV75hEf2M,2371
237
237
  tomwer/app/stopdatalistener.py,sha256=p5G6sP2DUXEREZzFf0QGowU9C7hX7nexWZHmC0bTIM4,957
238
- tomwer/app/zstitching.py,sha256=8zJ0scR8bRgYquNODRU0AMQLEPVjhmikbAWmRthC188,9446
238
+ tomwer/app/zstitching.py,sha256=9qmMx5YaiJ1fSjD1Yz31UKEcEJLuQSyWRGz_tEaOVk0,9486
239
239
  tomwer/app/canvas_launcher/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
240
240
  tomwer/app/canvas_launcher/config.py,sha256=D4qyh_3ynl7o1P2f8mhAefhNnraaLpVi1v4vDYaA2Yo,7249
241
241
  tomwer/app/canvas_launcher/environ.py,sha256=tHIlYXcFWinNLTV7dL2iBOWCp9oe9iouibU9NlzFbCk,2500
242
- tomwer/app/canvas_launcher/mainwindow.py,sha256=bidGGsB14rquKnE104NdiPvtGnvvm7E1GxCPQ4BpbGk,18268
242
+ tomwer/app/canvas_launcher/mainwindow.py,sha256=r_zw7tZ1rMOZczBOTn7lgnyqPFqEUckdgePIqgCSm_c,18184
243
243
  tomwer/app/canvas_launcher/splash.py,sha256=2z3q5QwoQ_ad-a2UI0R8hR3252MWG7DggXPOgDZfgBA,560
244
244
  tomwer/app/canvas_launcher/widgetsscheme.py,sha256=S4x1LO798fOxL3-g2WDuAh0T2Y_Kbg79DbH3siwKPiM,2859
245
245
  tomwer/core/__init__.py,sha256=lLfviCLw9VdT6SQ_9eYhqFe8QtUA-Dv-JDGpgxQ8Yzs,1373
@@ -310,13 +310,13 @@ tomwer/core/process/reconstruction/lamino/tofu.py,sha256=53_n2xcHiF3InqUf0ZnnyIn
310
310
  tomwer/core/process/reconstruction/nabu/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
311
311
  tomwer/core/process/reconstruction/nabu/castvolume.py,sha256=g2NuI78KFIWy2iZmg4iJkUlqE2b2Ji4LPXKytcyGnXY,10246
312
312
  tomwer/core/process/reconstruction/nabu/helical.py,sha256=rWp7DP-Uphrxhm4ztK1RwTNhnDFj0H3FTz37zuip7vU,1749
313
- tomwer/core/process/reconstruction/nabu/nabucommon.py,sha256=GKLEJjtxc-7uxlw84qIXKZQ86j9Sjwbi64l3RMLRonQ,22795
314
- tomwer/core/process/reconstruction/nabu/nabuscores.py,sha256=PvCdk87vmjM79Nz-aXKbZGcrzDfpxZsTg4wGL2gREzc,12752
315
- tomwer/core/process/reconstruction/nabu/nabuslices.py,sha256=jI-Q3k0qhBTIW3P7HSgiWZu9AewclUUfUiwfJ7MRwQU,36356
316
- tomwer/core/process/reconstruction/nabu/nabuvolume.py,sha256=DIBEymVgNCQUTlAgh4LqfBmMoCw1ZZsr4mOVQxEERV4,20627
313
+ tomwer/core/process/reconstruction/nabu/nabucommon.py,sha256=J9FaOe9tX_EL9oNid1BDt16YFiYUWc6ZD24SMg1LV7c,24543
314
+ tomwer/core/process/reconstruction/nabu/nabuscores.py,sha256=8ZGomiSz7yUncap9hXRhmwXG2-TBlnUf5Umav8CvdkQ,12825
315
+ tomwer/core/process/reconstruction/nabu/nabuslices.py,sha256=tKRkJRmazD8ogYw7_zKdfMmyU40DR6vBGbaozjiUiAA,36278
316
+ tomwer/core/process/reconstruction/nabu/nabuvolume.py,sha256=AKJEuuazHtsbCmOABoLkINd14arF8K5Z6zPB8OKT1l4,20688
317
317
  tomwer/core/process/reconstruction/nabu/settings.py,sha256=bH5bW88tikwGQXIBNVznefXNldlClhKk-LhhU3qOcO0,2264
318
318
  tomwer/core/process/reconstruction/nabu/target.py,sha256=_Z4gViprjR3Vm4KASqsASStLA9GM1wTyoi3Pg0PUSeg,1481
319
- tomwer/core/process/reconstruction/nabu/utils.py,sha256=WFNVrgOeBncgiNB7pbeNZyncbBolLit5k78qM3c-nUM,14011
319
+ tomwer/core/process/reconstruction/nabu/utils.py,sha256=G6wfaQn8_9h_AX9MUCnY-OTSLuA8L7bzymUyCO5_IlM,12956
320
320
  tomwer/core/process/reconstruction/normalization/__init__.py,sha256=TDtATpMVFkEOT93wLXLpW0A_TOeiQDiM7AWAqX4FIB0,119
321
321
  tomwer/core/process/reconstruction/normalization/normalization.py,sha256=G-eAZIct47RvzvHNMbKsG4Dt58vTSKhvH-NnIMzxzOs,13210
322
322
  tomwer/core/process/reconstruction/normalization/params.py,sha256=porWC6G5lQWF-4JB03B56uGmuMxjx3u0ZMums-Bh2p8,4790
@@ -352,7 +352,7 @@ tomwer/core/process/test/test_data_listener.py,sha256=ab_FZM7f-lXzQ6eMY-4aCFyTUq
352
352
  tomwer/core/process/test/test_data_transfer.py,sha256=q6NBX2keRfjwI1-8zth01zFZqNTECkNN8XzuEHNq94Y,15387
353
353
  tomwer/core/process/test/test_data_watcher.py,sha256=y0FpUqxlpKZu7OhuwlxeLPX5ESPXj_2m2lKjEWrVCV4,3138
354
354
  tomwer/core/process/test/test_lamino.py,sha256=MPMzmXbrqRX2hbt-RT3XM6qpCU7s4E0mAYK7GdroWfM,3009
355
- tomwer/core/process/test/test_nabu.py,sha256=9fThzBWgs5O6fCbgumaHOVp_HEeUe0sqcH1QgRZ-SJ4,19273
355
+ tomwer/core/process/test/test_nabu.py,sha256=OrZcTPV8oOzb1x7845ha4JAHMNZzNqVVxi_GzZ4Cjds,19279
356
356
  tomwer/core/process/test/test_normalization.py,sha256=WPdXga1OYq8WB7xWhYw0owSf0PT20eVcKOPLhfvv1wQ,4008
357
357
  tomwer/core/process/test/test_timer.py,sha256=T25A7c81696c7D_sZiAy59b9RX-F6MdvUy-_st-qLVQ,3027
358
358
  tomwer/core/process/visualization/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -573,12 +573,12 @@ tomwer/gui/visualization/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZ
573
573
  tomwer/gui/visualization/dataviewer.py,sha256=trHX7R_eMOK9bkHHTMjIOAILMvzOX72IotAsrCyQoOA,26335
574
574
  tomwer/gui/visualization/fullscreenplot.py,sha256=ptLrhF8DUsYNMj-KDioe9Y-KxnOzqepGlS8K2A2hjck,3639
575
575
  tomwer/gui/visualization/nxtomometadata.py,sha256=uR2bHPnMp66mOJkE9WscTcQaiasr01pt3IbLUPP1F5M,683
576
- tomwer/gui/visualization/reconstructionparameters.py,sha256=vzHshk136LHw4df09kj5cvoNozUsMpdCOWHxeGpobgs,9785
576
+ tomwer/gui/visualization/reconstructionparameters.py,sha256=19W0uAdkda8kzp9rWj4gbMuG4t16kBc3j6RwM_1hogk,10230
577
577
  tomwer/gui/visualization/scanoverview.py,sha256=zX1sKNKFb-HznOTOZqLr6HbmFjzdR35sBVmETBTcxNU,9215
578
578
  tomwer/gui/visualization/sinogramviewer.py,sha256=JH_Ws2sJM9uls8rygXw2CMDvVwVG_1O-trtyI7OxAdE,10116
579
579
  tomwer/gui/visualization/tomoobjoverview.py,sha256=YzocBQXhgnzI8IsJg5junE7218WcJdvSNH4r6DQgo74,1991
580
580
  tomwer/gui/visualization/volumeoverview.py,sha256=6Hv1TtsDlaGQPCJKW-IkGy_r5Buue-O95tl1KkpMD-0,2491
581
- tomwer/gui/visualization/volumeviewer.py,sha256=12fJ7Hop_plkczEpIZwTNSvgASNdTd7eAUrx2x6yoGw,16502
581
+ tomwer/gui/visualization/volumeviewer.py,sha256=eOFIultoKryz2B3tslG3YFzo945n94zSviEz8vxaapk,16750
582
582
  tomwer/gui/visualization/diffviewer/__init__.py,sha256=rZ7qOTfAChU3FouCdkZllXT9ZZqTdo1XhLZMfmOqUAE,39
583
583
  tomwer/gui/visualization/diffviewer/diffviewer.py,sha256=XyEd8-wWt-8qf4H1RZPMwQbjpvB7EbOpu00nOL_psmc,22015
584
584
  tomwer/gui/visualization/diffviewer/shiftwidget.py,sha256=ZY-P1nEudYXXYqnioTa9dG_gEte_Nf84RlXUKp8rgdE,21029
@@ -623,6 +623,7 @@ tomwer/resources/gui/icons/datalistener_deactivate.png,sha256=vB2zaa8UNPCrrMnTMo
623
623
  tomwer/resources/gui/icons/datalistener_deactivate.svg,sha256=W2dXJ1z33pDrcQYW0kVv9W3Bo53kif1pQvejPD0ardQ,3857
624
624
  tomwer/resources/gui/icons/delta_beta.png,sha256=gcRqLJ3ybHsGNxj6pWV2Vh3XJwvlrkf6l8W7ap-mo00,1869
625
625
  tomwer/resources/gui/icons/delta_beta.svg,sha256=j8vUteCDAbST0MkcwEEXxRC1VsZP_eZsWL6c89E_mCI,2426
626
+ tomwer/resources/gui/icons/esrf_1.svg,sha256=6a4sJBjjAON3zvLumC9xa3g61bVURle8KJqdBh4U3h4,21483
626
627
  tomwer/resources/gui/icons/exit.png,sha256=ovcPdlUS1ZLJ5aalNzvOXtrPacpe089f59Z97Sk-WZk,1002
627
628
  tomwer/resources/gui/icons/exit.svg,sha256=bDa7822wNHLLQIOyn3cYB8LPo8FdmO0KzWghiydoZrI,10773
628
629
  tomwer/resources/gui/icons/full_screen.png,sha256=XaVKDMuUpMBx6Ra07cEYQBqqtrp969zovS_EPVLJHdo,674
@@ -699,6 +700,7 @@ tomwer/resources/gui/icons/stitching_modeRefine.svg,sha256=gsSLWIPgKcwQzZ8Ds2pjQ
699
700
  tomwer/resources/gui/icons/switch.png,sha256=OYhfT5uV_tSAfiFOF6ul57cC9Vs6vKgNM8TfFshv9Ic,491
700
701
  tomwer/resources/gui/icons/tomwer.png,sha256=C3Pg4DHiFgV6UFedNKvqQWihhZGdsPg8lxa08ve58JQ,24955
701
702
  tomwer/resources/gui/icons/tomwer_large.png,sha256=kStquHhlb65WUEojlLUAkWVYfv3Ku2a3AQNrdFZuxBQ,176673
703
+ tomwer/resources/gui/icons/triangle.svg,sha256=iAtFlXpq2TujOMjvN4xi9mEtqGEim061tmDnvwrKCiI,2849
702
704
  tomwer/resources/gui/icons/unlocked.png,sha256=zkUuqKlzSi8nxXitwYwdV2_Y0emtDXioKG2jLQ-NrNs,365
703
705
  tomwer/resources/gui/icons/unlocked.svg,sha256=T2xH018d4KoCm40w6-ggDbcEq49OrkwGjQ_dQxS-074,2141
704
706
  tomwer/resources/gui/icons/unsharp_mask.png,sha256=sM7_Y6jkQlCIaDsw9hNuOnbSbeoFo3_uPz5aFs0fAr4,100796
@@ -773,17 +775,10 @@ tomwer/tests/test_scripts.py,sha256=cAiWjkQtaG3p0nRVaDUY9RNieAb1tC6UT6vsyBkcBsE,
773
775
  tomwer/tests/test_utils.py,sha256=D0rNDSK6csEOYBY_7gD-4A3jp8rYAm8L1_Xg34A9I2s,305
774
776
  tomwer/tests/utils/__init__.py,sha256=AAO9QsJsqO7uEg7t7fOOdniqaD4Nw6g3gQO-Fb8hXE4,8653
775
777
  tomwer/tests/utils/utilstest.py,sha256=mNDjZhyzPatgMH0IwwiaFWUu8UBpzuhP5NLgxo1rrQE,7341
776
- tomwer/third_party/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
777
- tomwer/third_party/nabu/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
778
- tomwer/third_party/nabu/utils.py,sha256=mgY5lik4jv_HCMd3wKyjuqeRU_JgevwCoEB5N_HDtLE,5411
779
- tomwer/third_party/nabu/preproc/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
780
- tomwer/third_party/nabu/preproc/phase.py,sha256=H8rR68wiYSWb1z0OQZESdiaQ1MnCMfe37sNsG4dYsOk,14386
781
- tomwer/third_party/tango/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
782
- tomwer/third_party/tango/device.py,sha256=RP1HbQkWQKWpE8GdcxIz-lXvhTfrdhoEKe4OxBDbLtE,220
783
- tomwer-1.2.0a2.dist-info/LICENSE,sha256=yR_hIZ1MfDh9x2_s23uFqBH7m5DgrBl9nJKkE37YChM,1877
784
- tomwer-1.2.0a2.dist-info/METADATA,sha256=YGQRmkPlCN3g-fFLxSdvGjmgZ2Z5wDUTBQFVJwLpgwc,10865
785
- tomwer-1.2.0a2.dist-info/WHEEL,sha256=pkctZYzUS4AYVn6dJ-7367OJZivF2e8RA9b_ZBjif18,92
786
- tomwer-1.2.0a2.dist-info/entry_points.txt,sha256=fIcDnCxjgwzfIylLYhUsFyiNZjZMxsfRQBxi4f-cJg8,440
787
- tomwer-1.2.0a2.dist-info/namespace_packages.txt,sha256=Iut-JTfT11SZHHm77_ZeszD7pZDWXcTweCbvrJpqDyQ,14
788
- tomwer-1.2.0a2.dist-info/top_level.txt,sha256=Yz5zKh0FPiImtzHYcPuztG1AO8-6KEpUWgoChGbA0Ys,21
789
- tomwer-1.2.0a2.dist-info/RECORD,,
778
+ tomwer-1.2.0a4.dist-info/LICENSE,sha256=yR_hIZ1MfDh9x2_s23uFqBH7m5DgrBl9nJKkE37YChM,1877
779
+ tomwer-1.2.0a4.dist-info/METADATA,sha256=3StXR6mgEch20U40_O-D0AsBWY6uEzigWGvK0p1UMrw,10865
780
+ tomwer-1.2.0a4.dist-info/WHEEL,sha256=pkctZYzUS4AYVn6dJ-7367OJZivF2e8RA9b_ZBjif18,92
781
+ tomwer-1.2.0a4.dist-info/entry_points.txt,sha256=fIcDnCxjgwzfIylLYhUsFyiNZjZMxsfRQBxi4f-cJg8,440
782
+ tomwer-1.2.0a4.dist-info/namespace_packages.txt,sha256=Iut-JTfT11SZHHm77_ZeszD7pZDWXcTweCbvrJpqDyQ,14
783
+ tomwer-1.2.0a4.dist-info/top_level.txt,sha256=Yz5zKh0FPiImtzHYcPuztG1AO8-6KEpUWgoChGbA0Ys,21
784
+ tomwer-1.2.0a4.dist-info/RECORD,,
File without changes
File without changes
File without changes
@@ -1,387 +0,0 @@
1
- #!/usr/bin/env python
2
- # -*- coding: utf-8 -*-
3
-
4
- import numpy as np
5
- from math import pi
6
- from bisect import bisect
7
- from ..utils import generate_powers
8
- from silx.utils.enum import Enum as _Enum
9
-
10
-
11
- def lmicron_to_db(Lmicron, energy, distance):
12
- """
13
- Utility to convert the "Lmicron" parameter of PyHST
14
- to a value of delta/beta.
15
-
16
- Parameters
17
- ----------
18
- Lmicron: float
19
- Length in microns, values of the parameter "PAGANIN_Lmicron"
20
- in PyHST2 parameter file.
21
- energy: float
22
- Energy in keV.
23
- distance: float
24
- Sample-detector distance in microns
25
-
26
- Formula
27
- -------
28
- The conversion is done using the formula
29
-
30
- $$
31
- L^2 = \pi \lambda D \frac{\delta}{\beta} # noqa W605
32
- $$
33
- The PyHST2 normalization differs from the one used by other softwares
34
- like tomopy by a factor $1/(4\pi^2)$
35
- """
36
- L2 = Lmicron**2
37
- wavelength = 1.23984199e-3 / energy
38
- return L2 / (pi * wavelength * distance)
39
-
40
-
41
- class PaddingMode(_Enum):
42
- ZEROS = "zeros"
43
- MEAN = "mean"
44
- EDGE = "edge"
45
- SYMMETRIC = "symmetric"
46
- REFLECT = "reflect"
47
-
48
-
49
- class PaganinPhaseRetrieval(object):
50
- """
51
- Paganin Phase Retrieval for an infinitely distant point source.
52
- Formula (10) in [1].
53
-
54
- Parameters
55
- ----------
56
- shape: int or tuple
57
- Shape of each radio, in the format (num_rows, num_columns), i.e
58
- (size_vertical, size_horizontal).
59
- If an integer is provided, the shape is assumed to be square.
60
- distance : float, optional
61
- Propagation distance in cm.
62
- energy : float, optional
63
- Energy in keV.
64
- delta_beta: float, optional
65
- delta/beta ratio, where n = (1 - delta) + i*beta is the complex
66
- refractive index of the sample.
67
- pixel_size : float, optional
68
- Detector pixel size in microns.
69
- padding : str, optional
70
- Padding method. Available are "zeros", "mean", "edge", "sym",
71
- "reflect". Default is "edge".
72
- Please refer to the "Padding" section below for more details.
73
- margin: tuple, optional
74
- The user may provide integers values U, D, L, R as a tuple under the
75
- form ((U, D), (L, R)) (same syntax as numpy.pad()).
76
- The resulting filtered radio will have a size equal to
77
- (size_vertic - U - D, size_horiz - L - R).
78
- These values serve to create a "margin" for the filtering process,
79
- where U, D, L R are the margin of the Up, Down, Left and Right part,
80
- respectively.
81
- The filtering is done on a subset of the input radio. The subset
82
- size is (Nrows - U - D, Ncols - R - L).
83
- The margins is used to do the padding for the rest of the padded
84
- array.
85
-
86
- For example in one dimension, where padding="edge":
87
-
88
- <------------------------------ padded_size --------------------------->
89
- [padding=edge | padding=data | radio data | padding=data | padding=edge]
90
- <------ N2 ---><----- L -----><- (N-L-R)--><----- R -----><----- N2 --->
91
-
92
- Some or all the values U, D, L, R can be 0. In this case,
93
- the padding of the parts related to the zero values will
94
- fall back to the one of "padding" parameter.
95
- For example, if padding="edge" and L, R are 0, then
96
- the left and right parts will be padded with the edges, while
97
- the Up and Down parts will be padded using the the user-provided
98
- margins of the radio, and the final data will have shape
99
- (Nrows - U - D, Ncols).
100
- Some or all the values U, D, L, R can be the string "auto".
101
- In this case, the values of U, D, L, R are automatically computed
102
- as a function of the Paganin filter width.
103
- use_R2C: bool, optional
104
- Whether to use Real-to-Complex (R2C) transform instead of
105
- standard Complex-to-Complex transform, providing better performances
106
-
107
- Padding methods
108
- ---------------
109
- The phase retrieval is a convolution done in Fourier domain using FFT,
110
- so the Fourier transform size has to be at least twice the size of
111
- the original data. Mathematically, the data should be padded with zeros
112
- before being Fourier transformed. However, in practice, this can lead
113
- to artefacts at the edges (Gibbs effect) if the data does not go to
114
- zero at the edges.
115
- Apart from applying an apodization (Hamming, Blackman, etc), a common
116
- strategy to avoid these artefacts is to pad the data.
117
- In tomography reconstruction, this is usually done by replicating the
118
- last(s) value(s) of the edges ; but one can think of other methods:
119
-
120
- - "zeros": the data is simply padded with zeros.
121
- - "mean": the upper side of extended data is padded with the mean of
122
- the first row, the lower side with the mean of the last row, etc.
123
- - "edge": the data is padded by replicating the edges.
124
- This is the default mode.
125
- - "sym": the data is padded by mirroring the data with respect
126
- to its edges. See numpy.pad().
127
- - "reflect": the data is padded by reflecting the data with respect
128
- to its edges, including the edges. See numpy.pad().
129
-
130
-
131
- Formulas
132
- --------
133
- The radio is divided, in the Fourier domain, by the original
134
- "Paganin filter" [1]
135
-
136
- $$
137
- F + 1 + \frac{\delta}{\beta} \lambda D \rho |k|^2 # noqa W605
138
- $$
139
- where $k$ is the wave vector, computed as
140
-
141
- $$
142
- k_l = \frac{1}{P} (\frac{-1}{2} + \frac{l}{N-1})
143
- $$
144
- where $P$ is the pixel size, $N$ the number of pixels in one direction,
145
- and $l \in [0, N-1]$. # noqa W605
146
- The factor $\rho$ is either $\pi$ or $1/(4\pi^2)$ # noqa W605
147
- depending on the convention (default is the former).
148
-
149
-
150
- References
151
- -----------
152
- [1] D. Paganin Et Al, "Simultaneous phase and amplitude extraction
153
- from a single defocused image of a homogeneous object",
154
- Journal of Microscopy, Vol 206, Part 1, 2002
155
- """
156
-
157
- powers = generate_powers()
158
-
159
- def __init__(
160
- self,
161
- shape,
162
- distance=50,
163
- energy=20,
164
- delta_beta=250.0,
165
- pixel_size=1,
166
- padding="edge",
167
- margin=None,
168
- use_R2C=True,
169
- ):
170
- self._init_parameters(
171
- distance, energy, pixel_size, delta_beta, padding, use_R2C
172
- )
173
- self._calc_shape(shape, margin)
174
- self.compute_filter()
175
-
176
- def _init_parameters(
177
- self, distance, energy, pixel_size, delta_beta, padding, use_R2C
178
- ):
179
- self.distance_cm = distance
180
- self.distance_micron = distance * 1e4
181
- self.energy_kev = energy
182
- self.pixel_size_micron = pixel_size
183
- self.delta_beta = delta_beta
184
- self.wavelength_micron = 1.23984199e-3 / self.energy_kev
185
- self.padding = padding
186
- self.padding_methods = {
187
- PaddingMode.ZEROS: self._pad_zeros,
188
- PaddingMode.MEAN: self._pad_mean,
189
- PaddingMode.EDGE: self._pad_edge,
190
- PaddingMode.SYMMETRIC: self._pad_sym,
191
- PaddingMode.REFLECT: self._pad_reflect,
192
- }
193
- self.use_R2C = use_R2C
194
- if use_R2C:
195
- self.fft_func = np.fft.rfft2
196
- self.ifft_func = np.fft.irfft2
197
- else:
198
- self.fft_func = np.fft.fft2
199
- self.ifft_func = np.fft.ifft2
200
-
201
- def _calc_shape(self, shape, margin):
202
- if np.isscalar(shape):
203
- shape = (shape, shape)
204
- else:
205
- assert len(shape) == 2
206
- self.shape = shape
207
- self._set_margin_value(margin)
208
- self._calc_padded_shape()
209
-
210
- def _set_margin_value(self, margin):
211
- self.margin = margin
212
- if margin is None:
213
- self.shape_inner = self.shape
214
- self.use_margin = False
215
- self.margin = ((0, 0), (0, 0))
216
- return
217
- self.use_margin = True
218
- try:
219
- ((U, D), (L, R)) = margin
220
- except ValueError:
221
- raise ValueError("Expected margin in the format ((U, D), (L, R))")
222
- for val in [U, D, L, R]:
223
- if type(val) is str and val != "auto":
224
- raise ValueError("Expected either an integer, or 'auto'")
225
- if int(val) != val or val < 0:
226
- raise ValueError("Expected positive integers for margin values")
227
- self.shape_inner = (self.shape[0] - U - D, self.shape[1] - L - R)
228
-
229
- def _calc_padded_shape(self):
230
- """
231
- Compute the padded shape.
232
- If margin = 0, length_padded = next_power(2*length).
233
- Otherwise : length_padded = next_power(2*(length - margins))
234
-
235
- Principle
236
- ----------
237
-
238
- <--------------------- nx_p --------------------->
239
- | | original data | |
240
- < -- Pl - ><-- L -->< -- nx --><-- R --><-- Pr -->
241
- <----------- nx0 ----------->
242
-
243
- Pl, Pr : left/right padding length
244
- L, R : left/right margin
245
- nx : length of inner data (and length of final result)
246
- nx0 : length of original data
247
- nx_p : total length of padded data
248
- """
249
- n_y, n_x = self.shape_inner
250
- n_y_p = self._get_next_power(2 * n_y)
251
- n_x_p = self._get_next_power(2 * n_x)
252
- self.shape_padded = (n_y_p, n_x_p)
253
- self.data_padded = np.zeros((n_y_p, n_x_p), dtype=np.float64)
254
-
255
- ((U, D), (L, R)) = self.margin
256
- n_y0, n_x0 = self.shape
257
- self.pad_top_len = (n_y_p - n_y0) // 2
258
- self.pad_bottom_len = n_y_p - n_y0 - self.pad_top_len
259
- self.pad_left_len = (n_x_p - n_x0) // 2
260
- self.pad_right_len = n_x_p - n_x0 - self.pad_left_len
261
-
262
- def _get_next_power(self, n):
263
- """
264
- Given a number, get the closest (upper) number p such that
265
- p is a power of 2, 3, 5 and 7.
266
- """
267
- idx = bisect(self.powers, n)
268
- if self.powers[idx - 1] == n:
269
- return n
270
- return self.powers[idx]
271
-
272
- def compute_filter(self):
273
- nyp, nxp = self.shape_padded
274
- fftfreq = np.fft.rfftfreq if self.use_R2C else np.fft.fftfreq
275
- fy = np.fft.fftfreq(nyp, d=self.pixel_size_micron)
276
- fx = fftfreq(nxp, d=self.pixel_size_micron)
277
- self._coords_grid = np.add.outer(fy**2, fx**2)
278
- #
279
- k2 = self._coords_grid
280
- D = self.distance_micron
281
- L = self.wavelength_micron
282
- db = self.delta_beta
283
- self.paganin_filter = 1.0 / (1 + db * L * D * pi * k2) # HST / savu
284
- # ~ self.paganin_filter = 1.0 / (1 + db * L * D * k2/ (4*pi)) # Paganin / tomopy
285
-
286
- def pad_with_values(self, data, top_val=0, bottom_val=0, left_val=0, right_val=0):
287
- """
288
- Pad the data into `self.padded_data` with values.
289
-
290
- Parameters
291
- ----------
292
- data: numpy.ndarray
293
- data (radio)
294
- top_val: float or numpy.ndarray, optional
295
- Value(s) to fill the top of the padded data with.
296
- bottom_val: float or numpy.ndarray, optional
297
- Value(s) to fill the bottom of the padded data with.
298
- left_val: float or numpy.ndarray, optional
299
- Value(s) to fill the left of the padded data with.
300
- right_val: float or numpy.ndarray, optional
301
- Value(s) to fill the right of the padded data with.
302
- """
303
- self.data_padded.fill(0)
304
- Pu, Pd = self.pad_top_len, self.pad_bottom_len
305
- Pl, Pr = self.pad_left_len, self.pad_right_len
306
- self.data_padded[:Pu, :] = top_val
307
- self.data_padded[-Pd:, :] = bottom_val
308
- self.data_padded[:, :Pl] = left_val
309
- self.data_padded[:, -Pr:] = right_val
310
- self.data_padded[Pu:-Pd, Pl:-Pr] = data
311
- # Transform the data to the FFT layout
312
- self.data_padded = np.roll(self.data_padded, (-Pu, -Pl), axis=(0, 1))
313
-
314
- def _pad_zeros(self, data):
315
- return self.pad_with_values(
316
- data, top_val=0, bottom_val=0, left_val=0, right_val=0
317
- )
318
-
319
- def _pad_mean(self, data):
320
- """
321
- Pad the data at each border with a different constant value.
322
- The value depends on the padding size:
323
- - On the left, value = mean(first data column)
324
- - On the right, value = mean(last data column)
325
- - On the top, value = mean(first data row)
326
- - On the bottom, value = mean(last data row)
327
- """
328
- return self.pad_with_values(
329
- data,
330
- top_val=np.mean(data[0, :]),
331
- bottom_val=np.mean(data[-1, :]),
332
- left_val=np.mean(data[:, 0]),
333
- right_val=np.mean(data[:, -1]),
334
- )
335
-
336
- def _pad_numpy(self, data, mode):
337
- data_padded = np.pad(
338
- data,
339
- (
340
- (self.pad_top_len, self.pad_bottom_len),
341
- (self.pad_left_len, self.pad_right_len),
342
- ),
343
- mode=mode.value,
344
- )
345
- # Transform the data to the FFT layout
346
- Pu, Pl = self.pad_top_len, self.pad_left_len
347
- return np.roll(data_padded, (-Pu, -Pl), axis=(0, 1))
348
-
349
- def _pad_edge(self, data):
350
- self.data_padded = self._pad_numpy(data, mode=PaddingMode.EDGE)
351
-
352
- def _pad_sym(self, data):
353
- self.data_padded = self._pad_numpy(data, mode=PaddingMode.SYMMETRIC)
354
-
355
- def _pad_reflect(self, data):
356
- self.data_padded = self._pad_numpy(data, mode=PaddingMode.REFLECT)
357
-
358
- def pad_data(self, data, padding_method=None):
359
- padding_method = padding_method or self.padding
360
- padding_method = PaddingMode.from_value(padding_method)
361
- if padding_method not in self.padding_methods:
362
- raise ValueError(
363
- "Unknown padding method %s. Available are: %s"
364
- % (padding_method, str(list(self.padding_methods.keys())))
365
- )
366
- pad_func = self.padding_methods[padding_method]
367
- pad_func(data)
368
- return self.data_padded
369
-
370
- def apply_filter(self, radio, padding_method=None):
371
- self.pad_data(radio, padding_method=padding_method)
372
- radio_f = self.fft_func(self.data_padded)
373
- radio_f *= self.paganin_filter
374
- radio_filtered = self.ifft_func(radio_f).real
375
- s0, s1 = self.shape_inner
376
- ((U, _), (L, _)) = self.margin
377
- return radio_filtered[U : U + s0, L : L + s1]
378
-
379
- def lmicron_to_db(self, Lmicron):
380
- """
381
- Utility to convert the "Lmicron" parameter of PyHST
382
- to a value of delta/beta.
383
- Please see the doc of nabu.preproc.phase.lmicron_to_db()
384
- """
385
- return lmicron_to_db(Lmicron, self.energy_kev, self.distance_micron)
386
-
387
- __call__ = apply_filter