ptychodus 1.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (326) hide show
  1. ptychodus-1.0/.git_archival.txt +4 -0
  2. ptychodus-1.0/.gitattributes +1 -0
  3. ptychodus-1.0/.github/workflows/python-package.yml +33 -0
  4. ptychodus-1.0/.gitignore +153 -0
  5. ptychodus-1.0/Dockerfile +20 -0
  6. ptychodus-1.0/LICENSE +42 -0
  7. ptychodus-1.0/PKG-INFO +172 -0
  8. ptychodus-1.0/README.rst +98 -0
  9. ptychodus-1.0/doc/api.rst +12 -0
  10. ptychodus-1.0/doc/dist.rst +36 -0
  11. ptychodus-1.0/doc/globus.rst +52 -0
  12. ptychodus-1.0/doc/streaming.rst +45 -0
  13. ptychodus-1.0/polaris.yaml +40 -0
  14. ptychodus-1.0/pyproject.toml +83 -0
  15. ptychodus-1.0/requirements-dev.txt +20 -0
  16. ptychodus-1.0/setup.cfg +4 -0
  17. ptychodus-1.0/src/ptychodus/__init__.py +19 -0
  18. ptychodus-1.0/src/ptychodus/__main__.py +145 -0
  19. ptychodus-1.0/src/ptychodus/api/__init__.py +0 -0
  20. ptychodus-1.0/src/ptychodus/api/fluorescence.py +62 -0
  21. ptychodus-1.0/src/ptychodus/api/geometry.py +150 -0
  22. ptychodus-1.0/src/ptychodus/api/object.py +218 -0
  23. ptychodus-1.0/src/ptychodus/api/observer.py +92 -0
  24. ptychodus-1.0/src/ptychodus/api/parametric.py +480 -0
  25. ptychodus-1.0/src/ptychodus/api/patterns.py +148 -0
  26. ptychodus-1.0/src/ptychodus/api/plugins.py +185 -0
  27. ptychodus-1.0/src/ptychodus/api/probe.py +282 -0
  28. ptychodus-1.0/src/ptychodus/api/product.py +83 -0
  29. ptychodus-1.0/src/ptychodus/api/propagator.py +147 -0
  30. ptychodus-1.0/src/ptychodus/api/reconstructor.py +122 -0
  31. ptychodus-1.0/src/ptychodus/api/scan.py +112 -0
  32. ptychodus-1.0/src/ptychodus/api/settings.py +108 -0
  33. ptychodus-1.0/src/ptychodus/api/tree.py +38 -0
  34. ptychodus-1.0/src/ptychodus/api/typing.py +10 -0
  35. ptychodus-1.0/src/ptychodus/api/units.py +3 -0
  36. ptychodus-1.0/src/ptychodus/api/visualization.py +208 -0
  37. ptychodus-1.0/src/ptychodus/api/workflow.py +122 -0
  38. ptychodus-1.0/src/ptychodus/controller/__init__.py +5 -0
  39. ptychodus-1.0/src/ptychodus/controller/agent/__init__.py +6 -0
  40. ptychodus-1.0/src/ptychodus/controller/agent/core.py +163 -0
  41. ptychodus-1.0/src/ptychodus/controller/agent/item_delegate.py +121 -0
  42. ptychodus-1.0/src/ptychodus/controller/agent/list_model.py +34 -0
  43. ptychodus-1.0/src/ptychodus/controller/automation.py +205 -0
  44. ptychodus-1.0/src/ptychodus/controller/core.py +183 -0
  45. ptychodus-1.0/src/ptychodus/controller/data.py +110 -0
  46. ptychodus-1.0/src/ptychodus/controller/image.py +241 -0
  47. ptychodus-1.0/src/ptychodus/controller/memory.py +30 -0
  48. ptychodus-1.0/src/ptychodus/controller/object/__init__.py +5 -0
  49. ptychodus-1.0/src/ptychodus/controller/object/core.py +233 -0
  50. ptychodus-1.0/src/ptychodus/controller/object/editor_factory.py +79 -0
  51. ptychodus-1.0/src/ptychodus/controller/object/frc.py +58 -0
  52. ptychodus-1.0/src/ptychodus/controller/object/tree_model.py +227 -0
  53. ptychodus-1.0/src/ptychodus/controller/object/xmcd.py +112 -0
  54. ptychodus-1.0/src/ptychodus/controller/parametric.py +785 -0
  55. ptychodus-1.0/src/ptychodus/controller/patterns/__init__.py +5 -0
  56. ptychodus-1.0/src/ptychodus/controller/patterns/core.py +148 -0
  57. ptychodus-1.0/src/ptychodus/controller/patterns/dataset.py +184 -0
  58. ptychodus-1.0/src/ptychodus/controller/patterns/info.py +123 -0
  59. ptychodus-1.0/src/ptychodus/controller/patterns/wizard/__init__.py +5 -0
  60. ptychodus-1.0/src/ptychodus/controller/patterns/wizard/core.py +62 -0
  61. ptychodus-1.0/src/ptychodus/controller/patterns/wizard/files.py +322 -0
  62. ptychodus-1.0/src/ptychodus/controller/patterns/wizard/metadata.py +81 -0
  63. ptychodus-1.0/src/ptychodus/controller/patterns/wizard/patterns.py +303 -0
  64. ptychodus-1.0/src/ptychodus/controller/probe/__init__.py +5 -0
  65. ptychodus-1.0/src/ptychodus/controller/probe/core.py +282 -0
  66. ptychodus-1.0/src/ptychodus/controller/probe/editor_factory.py +296 -0
  67. ptychodus-1.0/src/ptychodus/controller/probe/fluorescence.py +292 -0
  68. ptychodus-1.0/src/ptychodus/controller/probe/illumination.py +95 -0
  69. ptychodus-1.0/src/ptychodus/controller/probe/propagator.py +173 -0
  70. ptychodus-1.0/src/ptychodus/controller/probe/stxm.py +91 -0
  71. ptychodus-1.0/src/ptychodus/controller/probe/tree_model.py +235 -0
  72. ptychodus-1.0/src/ptychodus/controller/probe/zernike.py +106 -0
  73. ptychodus-1.0/src/ptychodus/controller/product/__init__.py +5 -0
  74. ptychodus-1.0/src/ptychodus/controller/product/core.py +342 -0
  75. ptychodus-1.0/src/ptychodus/controller/product/editor.py +196 -0
  76. ptychodus-1.0/src/ptychodus/controller/ptychi/__init__.py +5 -0
  77. ptychodus-1.0/src/ptychodus/controller/ptychi/core.py +97 -0
  78. ptychodus-1.0/src/ptychodus/controller/ptychi/object.py +472 -0
  79. ptychodus-1.0/src/ptychodus/controller/ptychi/opr.py +113 -0
  80. ptychodus-1.0/src/ptychodus/controller/ptychi/optimizer.py +93 -0
  81. ptychodus-1.0/src/ptychodus/controller/ptychi/positions.py +296 -0
  82. ptychodus-1.0/src/ptychodus/controller/ptychi/probe.py +259 -0
  83. ptychodus-1.0/src/ptychodus/controller/ptychi/reconstructor.py +313 -0
  84. ptychodus-1.0/src/ptychodus/controller/ptychonn.py +51 -0
  85. ptychodus-1.0/src/ptychodus/controller/ptychopinn.py +217 -0
  86. ptychodus-1.0/src/ptychodus/controller/reconstructor.py +301 -0
  87. ptychodus-1.0/src/ptychodus/controller/scan/__init__.py +5 -0
  88. ptychodus-1.0/src/ptychodus/controller/scan/core.py +225 -0
  89. ptychodus-1.0/src/ptychodus/controller/scan/editor_factory.py +229 -0
  90. ptychodus-1.0/src/ptychodus/controller/scan/table_model.py +114 -0
  91. ptychodus-1.0/src/ptychodus/controller/settings.py +127 -0
  92. ptychodus-1.0/src/ptychodus/controller/tike/__init__.py +5 -0
  93. ptychodus-1.0/src/ptychodus/controller/tike/core.py +58 -0
  94. ptychodus-1.0/src/ptychodus/controller/tike/view_controllers.py +248 -0
  95. ptychodus-1.0/src/ptychodus/controller/visualization/__init__.py +9 -0
  96. ptychodus-1.0/src/ptychodus/controller/visualization/controller.py +191 -0
  97. ptychodus-1.0/src/ptychodus/controller/visualization/parameters.py +71 -0
  98. ptychodus-1.0/src/ptychodus/controller/visualization/widget.py +38 -0
  99. ptychodus-1.0/src/ptychodus/controller/workflow/__init__.py +5 -0
  100. ptychodus-1.0/src/ptychodus/controller/workflow/authorization.py +54 -0
  101. ptychodus-1.0/src/ptychodus/controller/workflow/compute.py +71 -0
  102. ptychodus-1.0/src/ptychodus/controller/workflow/controller.py +49 -0
  103. ptychodus-1.0/src/ptychodus/controller/workflow/execution.py +59 -0
  104. ptychodus-1.0/src/ptychodus/controller/workflow/input_data.py +51 -0
  105. ptychodus-1.0/src/ptychodus/controller/workflow/output_data.py +59 -0
  106. ptychodus-1.0/src/ptychodus/controller/workflow/status.py +78 -0
  107. ptychodus-1.0/src/ptychodus/controller/workflow/table_model.py +71 -0
  108. ptychodus-1.0/src/ptychodus/model/__init__.py +5 -0
  109. ptychodus-1.0/src/ptychodus/model/agent/__init__.py +13 -0
  110. ptychodus-1.0/src/ptychodus/model/agent/argo.py +73 -0
  111. ptychodus-1.0/src/ptychodus/model/agent/chat.py +81 -0
  112. ptychodus-1.0/src/ptychodus/model/agent/core.py +49 -0
  113. ptychodus-1.0/src/ptychodus/model/agent/properties.py +50 -0
  114. ptychodus-1.0/src/ptychodus/model/agent/settings.py +35 -0
  115. ptychodus-1.0/src/ptychodus/model/analysis/__init__.py +20 -0
  116. ptychodus-1.0/src/ptychodus/model/analysis/affine.py +154 -0
  117. ptychodus-1.0/src/ptychodus/model/analysis/barycentric.py +112 -0
  118. ptychodus-1.0/src/ptychodus/model/analysis/core.py +41 -0
  119. ptychodus-1.0/src/ptychodus/model/analysis/frc.py +105 -0
  120. ptychodus-1.0/src/ptychodus/model/analysis/illumination.py +138 -0
  121. ptychodus-1.0/src/ptychodus/model/analysis/propagator.py +158 -0
  122. ptychodus-1.0/src/ptychodus/model/analysis/settings.py +36 -0
  123. ptychodus-1.0/src/ptychodus/model/analysis/stxm.py +106 -0
  124. ptychodus-1.0/src/ptychodus/model/analysis/xmcd.py +137 -0
  125. ptychodus-1.0/src/ptychodus/model/automation/__init__.py +9 -0
  126. ptychodus-1.0/src/ptychodus/model/automation/buffer.py +71 -0
  127. ptychodus-1.0/src/ptychodus/model/automation/core.py +193 -0
  128. ptychodus-1.0/src/ptychodus/model/automation/processor.py +91 -0
  129. ptychodus-1.0/src/ptychodus/model/automation/repository.py +69 -0
  130. ptychodus-1.0/src/ptychodus/model/automation/settings.py +28 -0
  131. ptychodus-1.0/src/ptychodus/model/automation/watcher.py +100 -0
  132. ptychodus-1.0/src/ptychodus/model/automation/workflow.py +48 -0
  133. ptychodus-1.0/src/ptychodus/model/core.py +285 -0
  134. ptychodus-1.0/src/ptychodus/model/fluorescence/__init__.py +10 -0
  135. ptychodus-1.0/src/ptychodus/model/fluorescence/core.py +220 -0
  136. ptychodus-1.0/src/ptychodus/model/fluorescence/settings.py +29 -0
  137. ptychodus-1.0/src/ptychodus/model/fluorescence/two_step.py +93 -0
  138. ptychodus-1.0/src/ptychodus/model/fluorescence/vspi.py +182 -0
  139. ptychodus-1.0/src/ptychodus/model/memory.py +20 -0
  140. ptychodus-1.0/src/ptychodus/model/metadata.py +137 -0
  141. ptychodus-1.0/src/ptychodus/model/patterns/__init__.py +21 -0
  142. ptychodus-1.0/src/ptychodus/model/patterns/api.py +134 -0
  143. ptychodus-1.0/src/ptychodus/model/patterns/core.py +58 -0
  144. ptychodus-1.0/src/ptychodus/model/patterns/dataset.py +420 -0
  145. ptychodus-1.0/src/ptychodus/model/patterns/processor.py +100 -0
  146. ptychodus-1.0/src/ptychodus/model/patterns/settings.py +84 -0
  147. ptychodus-1.0/src/ptychodus/model/patterns/sizer.py +224 -0
  148. ptychodus-1.0/src/ptychodus/model/phase_unwrapper.py +463 -0
  149. ptychodus-1.0/src/ptychodus/model/product/__init__.py +24 -0
  150. ptychodus-1.0/src/ptychodus/model/product/api.py +475 -0
  151. ptychodus-1.0/src/ptychodus/model/product/core.py +120 -0
  152. ptychodus-1.0/src/ptychodus/model/product/geometry.py +161 -0
  153. ptychodus-1.0/src/ptychodus/model/product/item.py +166 -0
  154. ptychodus-1.0/src/ptychodus/model/product/item_factory.py +148 -0
  155. ptychodus-1.0/src/ptychodus/model/product/metadata.py +139 -0
  156. ptychodus-1.0/src/ptychodus/model/product/object/__init__.py +15 -0
  157. ptychodus-1.0/src/ptychodus/model/product/object/builder.py +116 -0
  158. ptychodus-1.0/src/ptychodus/model/product/object/builder_factory.py +83 -0
  159. ptychodus-1.0/src/ptychodus/model/product/object/item.py +109 -0
  160. ptychodus-1.0/src/ptychodus/model/product/object/item_factory.py +48 -0
  161. ptychodus-1.0/src/ptychodus/model/product/object/random.py +115 -0
  162. ptychodus-1.0/src/ptychodus/model/product/object/settings.py +37 -0
  163. ptychodus-1.0/src/ptychodus/model/product/object_repository.py +65 -0
  164. ptychodus-1.0/src/ptychodus/model/product/probe/__init__.py +28 -0
  165. ptychodus-1.0/src/ptychodus/model/product/probe/average_pattern.py +46 -0
  166. ptychodus-1.0/src/ptychodus/model/product/probe/builder.py +136 -0
  167. ptychodus-1.0/src/ptychodus/model/product/probe/builder_factory.py +107 -0
  168. ptychodus-1.0/src/ptychodus/model/product/probe/disk.py +55 -0
  169. ptychodus-1.0/src/ptychodus/model/product/probe/fzp.py +106 -0
  170. ptychodus-1.0/src/ptychodus/model/product/probe/item.py +95 -0
  171. ptychodus-1.0/src/ptychodus/model/product/probe/item_factory.py +48 -0
  172. ptychodus-1.0/src/ptychodus/model/product/probe/multimodal.py +209 -0
  173. ptychodus-1.0/src/ptychodus/model/product/probe/rect.py +62 -0
  174. ptychodus-1.0/src/ptychodus/model/product/probe/settings.py +66 -0
  175. ptychodus-1.0/src/ptychodus/model/product/probe/super_gaussian.py +46 -0
  176. ptychodus-1.0/src/ptychodus/model/product/probe/zernike.py +155 -0
  177. ptychodus-1.0/src/ptychodus/model/product/probe_repository.py +65 -0
  178. ptychodus-1.0/src/ptychodus/model/product/repository.py +138 -0
  179. ptychodus-1.0/src/ptychodus/model/product/scan/__init__.py +24 -0
  180. ptychodus-1.0/src/ptychodus/model/product/scan/bounding_box.py +38 -0
  181. ptychodus-1.0/src/ptychodus/model/product/scan/builder.py +87 -0
  182. ptychodus-1.0/src/ptychodus/model/product/scan/builder_factory.py +91 -0
  183. ptychodus-1.0/src/ptychodus/model/product/scan/cartesian.py +106 -0
  184. ptychodus-1.0/src/ptychodus/model/product/scan/concentric.py +62 -0
  185. ptychodus-1.0/src/ptychodus/model/product/scan/item.py +152 -0
  186. ptychodus-1.0/src/ptychodus/model/product/scan/item_factory.py +46 -0
  187. ptychodus-1.0/src/ptychodus/model/product/scan/lissajous.py +67 -0
  188. ptychodus-1.0/src/ptychodus/model/product/scan/settings.py +74 -0
  189. ptychodus-1.0/src/ptychodus/model/product/scan/spiral.py +54 -0
  190. ptychodus-1.0/src/ptychodus/model/product/scan/streaming.py +40 -0
  191. ptychodus-1.0/src/ptychodus/model/product/scan/transform.py +115 -0
  192. ptychodus-1.0/src/ptychodus/model/product/scan_repository.py +63 -0
  193. ptychodus-1.0/src/ptychodus/model/product/settings.py +37 -0
  194. ptychodus-1.0/src/ptychodus/model/product/validator.py +79 -0
  195. ptychodus-1.0/src/ptychodus/model/ptychi/__init__.py +31 -0
  196. ptychodus-1.0/src/ptychodus/model/ptychi/affine.py +56 -0
  197. ptychodus-1.0/src/ptychodus/model/ptychi/autodiff.py +201 -0
  198. ptychodus-1.0/src/ptychodus/model/ptychi/core.py +98 -0
  199. ptychodus-1.0/src/ptychodus/model/ptychi/device.py +35 -0
  200. ptychodus-1.0/src/ptychodus/model/ptychi/dm.py +174 -0
  201. ptychodus-1.0/src/ptychodus/model/ptychi/enums.py +86 -0
  202. ptychodus-1.0/src/ptychodus/model/ptychi/epie.py +171 -0
  203. ptychodus-1.0/src/ptychodus/model/ptychi/helper.py +722 -0
  204. ptychodus-1.0/src/ptychodus/model/ptychi/lsqml.py +202 -0
  205. ptychodus-1.0/src/ptychodus/model/ptychi/pie.py +171 -0
  206. ptychodus-1.0/src/ptychodus/model/ptychi/rpie.py +171 -0
  207. ptychodus-1.0/src/ptychodus/model/ptychi/settings.py +548 -0
  208. ptychodus-1.0/src/ptychodus/model/ptychonn/__init__.py +11 -0
  209. ptychodus-1.0/src/ptychodus/model/ptychonn/buffers.py +85 -0
  210. ptychodus-1.0/src/ptychodus/model/ptychonn/core.py +80 -0
  211. ptychodus-1.0/src/ptychodus/model/ptychonn/model.py +65 -0
  212. ptychodus-1.0/src/ptychodus/model/ptychonn/reconstructor.py +208 -0
  213. ptychodus-1.0/src/ptychodus/model/ptychonn/settings.py +51 -0
  214. ptychodus-1.0/src/ptychodus/model/ptychopinn/__init__.py +5 -0
  215. ptychodus-1.0/src/ptychodus/model/ptychopinn/core.py +65 -0
  216. ptychodus-1.0/src/ptychodus/model/ptychopinn/enums.py +9 -0
  217. ptychodus-1.0/src/ptychodus/model/ptychopinn/reconstructor.py +273 -0
  218. ptychodus-1.0/src/ptychodus/model/ptychopinn/settings.py +88 -0
  219. ptychodus-1.0/src/ptychodus/model/reconstructor/__init__.py +11 -0
  220. ptychodus-1.0/src/ptychodus/model/reconstructor/api.py +157 -0
  221. ptychodus-1.0/src/ptychodus/model/reconstructor/core.py +69 -0
  222. ptychodus-1.0/src/ptychodus/model/reconstructor/log.py +21 -0
  223. ptychodus-1.0/src/ptychodus/model/reconstructor/matcher.py +89 -0
  224. ptychodus-1.0/src/ptychodus/model/reconstructor/presenter.py +116 -0
  225. ptychodus-1.0/src/ptychodus/model/reconstructor/queue.py +135 -0
  226. ptychodus-1.0/src/ptychodus/model/reconstructor/settings.py +15 -0
  227. ptychodus-1.0/src/ptychodus/model/tike/__init__.py +17 -0
  228. ptychodus-1.0/src/ptychodus/model/tike/core.py +76 -0
  229. ptychodus-1.0/src/ptychodus/model/tike/reconstructor.py +284 -0
  230. ptychodus-1.0/src/ptychodus/model/tike/settings.py +168 -0
  231. ptychodus-1.0/src/ptychodus/model/visualization/__init__.py +5 -0
  232. ptychodus-1.0/src/ptychodus/model/visualization/color_axis.py +46 -0
  233. ptychodus-1.0/src/ptychodus/model/visualization/color_model.py +114 -0
  234. ptychodus-1.0/src/ptychodus/model/visualization/color_model_renderer.py +84 -0
  235. ptychodus-1.0/src/ptychodus/model/visualization/colormap.py +56 -0
  236. ptychodus-1.0/src/ptychodus/model/visualization/colormap_renderer.py +81 -0
  237. ptychodus-1.0/src/ptychodus/model/visualization/components.py +65 -0
  238. ptychodus-1.0/src/ptychodus/model/visualization/core.py +173 -0
  239. ptychodus-1.0/src/ptychodus/model/visualization/renderer.py +45 -0
  240. ptychodus-1.0/src/ptychodus/model/visualization/transformation.py +132 -0
  241. ptychodus-1.0/src/ptychodus/model/workflow/__init__.py +17 -0
  242. ptychodus-1.0/src/ptychodus/model/workflow/api.py +178 -0
  243. ptychodus-1.0/src/ptychodus/model/workflow/authorizer.py +43 -0
  244. ptychodus-1.0/src/ptychodus/model/workflow/core.py +267 -0
  245. ptychodus-1.0/src/ptychodus/model/workflow/executor.py +106 -0
  246. ptychodus-1.0/src/ptychodus/model/workflow/globus.py +298 -0
  247. ptychodus-1.0/src/ptychodus/model/workflow/locator.py +137 -0
  248. ptychodus-1.0/src/ptychodus/model/workflow/settings.py +23 -0
  249. ptychodus-1.0/src/ptychodus/model/workflow/status.py +52 -0
  250. ptychodus-1.0/src/ptychodus/plugins/aps2id_diffraction_file.py +89 -0
  251. ptychodus-1.0/src/ptychodus/plugins/csaxs_diffraction_file.py +84 -0
  252. ptychodus-1.0/src/ptychodus/plugins/cssi_position_file.py +41 -0
  253. ptychodus-1.0/src/ptychodus/plugins/csv_object_file.py +31 -0
  254. ptychodus-1.0/src/ptychodus/plugins/csv_probe_file.py +38 -0
  255. ptychodus-1.0/src/ptychodus/plugins/cxi_file.py +125 -0
  256. ptychodus-1.0/src/ptychodus/plugins/deconvolution.py +53 -0
  257. ptychodus-1.0/src/ptychodus/plugins/delimited_position_file.py +81 -0
  258. ptychodus-1.0/src/ptychodus/plugins/fresnel_zone_plate.py +25 -0
  259. ptychodus-1.0/src/ptychodus/plugins/h5_diffraction_file.py +222 -0
  260. ptychodus-1.0/src/ptychodus/plugins/h5_product_file.py +204 -0
  261. ptychodus-1.0/src/ptychodus/plugins/isn_diffraction_file.py +100 -0
  262. ptychodus-1.0/src/ptychodus/plugins/lcls_file_readers.py +167 -0
  263. ptychodus-1.0/src/ptychodus/plugins/lynx_diffraction_file.py +69 -0
  264. ptychodus-1.0/src/ptychodus/plugins/lynx_orchestra_position_file.py +89 -0
  265. ptychodus-1.0/src/ptychodus/plugins/lynx_sgz_position_file.py +85 -0
  266. ptychodus-1.0/src/ptychodus/plugins/mda_position_file.py +526 -0
  267. ptychodus-1.0/src/ptychodus/plugins/nanomax_position_file.py +47 -0
  268. ptychodus-1.0/src/ptychodus/plugins/nexus/__init__.py +24 -0
  269. ptychodus-1.0/src/ptychodus/plugins/nexus/nexus_diffraction_file.py +286 -0
  270. ptychodus-1.0/src/ptychodus/plugins/nexus/velociprobe_position_file.py +91 -0
  271. ptychodus-1.0/src/ptychodus/plugins/npy_diffraction_file.py +79 -0
  272. ptychodus-1.0/src/ptychodus/plugins/npy_object_file.py +31 -0
  273. ptychodus-1.0/src/ptychodus/plugins/npy_probe_file.py +31 -0
  274. ptychodus-1.0/src/ptychodus/plugins/npz_diffraction_file.py +97 -0
  275. ptychodus-1.0/src/ptychodus/plugins/npz_product_file.py +202 -0
  276. ptychodus-1.0/src/ptychodus/plugins/nsls2_diffraction_file.py +76 -0
  277. ptychodus-1.0/src/ptychodus/plugins/nsls2_product_file.py +77 -0
  278. ptychodus-1.0/src/ptychodus/plugins/ptychoshelves_position_file.py +41 -0
  279. ptychodus-1.0/src/ptychodus/plugins/ptychoshelves_product_file.py +115 -0
  280. ptychodus-1.0/src/ptychodus/plugins/slac_npz_file.py +103 -0
  281. ptychodus-1.0/src/ptychodus/plugins/tiff_diffraction_file.py +113 -0
  282. ptychodus-1.0/src/ptychodus/plugins/upscaling.py +127 -0
  283. ptychodus-1.0/src/ptychodus/plugins/workflow.py +177 -0
  284. ptychodus-1.0/src/ptychodus/plugins/xrf_maps_file.py +108 -0
  285. ptychodus-1.0/src/ptychodus/ptychodus_bdp.py +230 -0
  286. ptychodus-1.0/src/ptychodus/ptychodus_stream_processor.py +193 -0
  287. ptychodus-1.0/src/ptychodus/view/__init__.py +5 -0
  288. ptychodus-1.0/src/ptychodus/view/agent.py +49 -0
  289. ptychodus-1.0/src/ptychodus/view/automation.py +95 -0
  290. ptychodus-1.0/src/ptychodus/view/core.py +153 -0
  291. ptychodus-1.0/src/ptychodus/view/image.py +311 -0
  292. ptychodus-1.0/src/ptychodus/view/make_qrc.sh +6 -0
  293. ptychodus-1.0/src/ptychodus/view/object.py +89 -0
  294. ptychodus-1.0/src/ptychodus/view/patterns.py +125 -0
  295. ptychodus-1.0/src/ptychodus/view/probe.py +247 -0
  296. ptychodus-1.0/src/ptychodus/view/product.py +119 -0
  297. ptychodus-1.0/src/ptychodus/view/ptychodus.svg +100 -0
  298. ptychodus-1.0/src/ptychodus/view/reconstructor.py +100 -0
  299. ptychodus-1.0/src/ptychodus/view/repository.py +93 -0
  300. ptychodus-1.0/src/ptychodus/view/resources.py +1616 -0
  301. ptychodus-1.0/src/ptychodus/view/resources.qrc +24 -0
  302. ptychodus-1.0/src/ptychodus/view/scan.py +28 -0
  303. ptychodus-1.0/src/ptychodus/view/settings.py +40 -0
  304. ptychodus-1.0/src/ptychodus/view/test.py +26 -0
  305. ptychodus-1.0/src/ptychodus/view/visualization.py +356 -0
  306. ptychodus-1.0/src/ptychodus/view/widgets/__init__.py +22 -0
  307. ptychodus-1.0/src/ptychodus/view/widgets/angle_widget.py +59 -0
  308. ptychodus-1.0/src/ptychodus/view/widgets/combo_box_item_delegate.py +74 -0
  309. ptychodus-1.0/src/ptychodus/view/widgets/decimal_line_edit.py +100 -0
  310. ptychodus-1.0/src/ptychodus/view/widgets/decimal_slider.py +120 -0
  311. ptychodus-1.0/src/ptychodus/view/widgets/exception_dialog.py +43 -0
  312. ptychodus-1.0/src/ptychodus/view/widgets/group_box.py +53 -0
  313. ptychodus-1.0/src/ptychodus/view/widgets/length_widget.py +78 -0
  314. ptychodus-1.0/src/ptychodus/view/widgets/progress_bar_item_delegate.py +31 -0
  315. ptychodus-1.0/src/ptychodus/view/widgets/uuid_line_edit.py +15 -0
  316. ptychodus-1.0/src/ptychodus/view/workflow.py +182 -0
  317. ptychodus-1.0/src/ptychodus.egg-info/PKG-INFO +172 -0
  318. ptychodus-1.0/src/ptychodus.egg-info/SOURCES.txt +324 -0
  319. ptychodus-1.0/src/ptychodus.egg-info/dependency_links.txt +1 -0
  320. ptychodus-1.0/src/ptychodus.egg-info/entry_points.txt +2 -0
  321. ptychodus-1.0/src/ptychodus.egg-info/requires.txt +27 -0
  322. ptychodus-1.0/src/ptychodus.egg-info/top_level.txt +1 -0
  323. ptychodus-1.0/tests/aperture.py +61 -0
  324. ptychodus-1.0/tests/test_phase_unwrap.py +25 -0
  325. ptychodus-1.0/tests/test_propagation.py +5 -0
  326. ptychodus-1.0/tests/test_zernike.py +56 -0
@@ -0,0 +1,4 @@
1
+ node: $Format:%H$
2
+ node-date: $Format:%cI$
3
+ describe-name: $Format:%(describe:tags=true)$
4
+ ref-names: $Format:%D$
@@ -0,0 +1 @@
1
+ .git_archival.txt export-subst
@@ -0,0 +1,33 @@
1
+ # This workflow will install Python dependencies, run tests and lint with a variety of Python versions
2
+ # For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
3
+
4
+ name: Python package
5
+
6
+ on:
7
+ push:
8
+ branches: [ "master" ]
9
+ pull_request:
10
+ branches: [ "master" ]
11
+
12
+ jobs:
13
+ build:
14
+
15
+ runs-on: ubuntu-latest
16
+ strategy:
17
+ fail-fast: false
18
+ matrix:
19
+ python-version: ["3.10", "3.11", "3.12"]
20
+
21
+ steps:
22
+ - uses: actions/checkout@v4
23
+ - name: Set up Python ${{ matrix.python-version }}
24
+ uses: actions/setup-python@v5
25
+ with:
26
+ python-version: ${{ matrix.python-version }}
27
+ - name: Install with minimal dependencies
28
+ run: |
29
+ python -m pip install --upgrade pip
30
+ python -m pip install .
31
+ - name: Test CLI with headless minimal install
32
+ run: |
33
+ ptychodus --version
@@ -0,0 +1,153 @@
1
+ # Byte-compiled / optimized / DLL files
2
+ __pycache__/
3
+ *.py[cod]
4
+ *$py.class
5
+
6
+ # C extensions
7
+ *.so
8
+
9
+ # Distribution / packaging
10
+ .Python
11
+ build/
12
+ develop-eggs/
13
+ dist/
14
+ downloads/
15
+ eggs/
16
+ .eggs/
17
+ lib/
18
+ lib64/
19
+ parts/
20
+ sdist/
21
+ var/
22
+ wheels/
23
+ share/python-wheels/
24
+ *.egg-info/
25
+ .installed.cfg
26
+ *.egg
27
+ MANIFEST
28
+
29
+ # PyInstaller
30
+ # Usually these files are written by a python script from a template
31
+ # before PyInstaller builds the exe, so as to inject date/other infos into it.
32
+ *.manifest
33
+ *.spec
34
+
35
+ # Installer logs
36
+ pip-log.txt
37
+ pip-delete-this-directory.txt
38
+
39
+ # Unit test / coverage reports
40
+ htmlcov/
41
+ .tox/
42
+ .nox/
43
+ .coverage
44
+ .coverage.*
45
+ .cache
46
+ nosetests.xml
47
+ coverage.xml
48
+ *.cover
49
+ *.py,cover
50
+ .hypothesis/
51
+ .pytest_cache/
52
+ cover/
53
+
54
+ # Translations
55
+ *.mo
56
+ *.pot
57
+
58
+ # Django stuff:
59
+ *.log
60
+ local_settings.py
61
+ db.sqlite3
62
+ db.sqlite3-journal
63
+
64
+ # Flask stuff:
65
+ instance/
66
+ .webassets-cache
67
+
68
+ # Scrapy stuff:
69
+ .scrapy
70
+
71
+ # Sphinx documentation
72
+ docs/_build/
73
+
74
+ # PyBuilder
75
+ .pybuilder/
76
+ target/
77
+
78
+ # Jupyter Notebook
79
+ .ipynb_checkpoints
80
+
81
+ # IPython
82
+ profile_default/
83
+ ipython_config.py
84
+
85
+ # pyenv
86
+ # For a library or package, you might want to ignore these files since the code is
87
+ # intended to run in multiple environments; otherwise, check them in:
88
+ # .python-version
89
+
90
+ # pipenv
91
+ # According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
92
+ # However, in case of collaboration, if having platform-specific dependencies or dependencies
93
+ # having no cross-platform support, pipenv may install dependencies that don't work, or not
94
+ # install all needed dependencies.
95
+ #Pipfile.lock
96
+
97
+ # poetry
98
+ # Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
99
+ # This is especially recommended for binary packages to ensure reproducibility, and is more
100
+ # commonly ignored for libraries.
101
+ # https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
102
+ #poetry.lock
103
+
104
+ # PEP 582; used by e.g. github.com/David-OConnor/pyflow
105
+ __pypackages__/
106
+
107
+ # Celery stuff
108
+ celerybeat-schedule
109
+ celerybeat.pid
110
+
111
+ # SageMath parsed files
112
+ *.sage.py
113
+
114
+ # Environments
115
+ .env
116
+ .venv
117
+ env/
118
+ venv/
119
+ ENV/
120
+ env.bak/
121
+ venv.bak/
122
+
123
+ # Spyder project settings
124
+ .spyderproject
125
+ .spyproject
126
+
127
+ # Rope project settings
128
+ .ropeproject
129
+
130
+ # mkdocs documentation
131
+ /site
132
+
133
+ # mypy
134
+ .mypy_cache/
135
+ .dmypy.json
136
+ dmypy.json
137
+
138
+ # Pyre type checker
139
+ .pyre/
140
+
141
+ # pytype static type analyzer
142
+ .pytype/
143
+
144
+ # Cython debug symbols
145
+ cython_debug/
146
+
147
+ # PyCharm
148
+ # JetBrains specific template is maintained in a separate JetBrains.gitignore that can
149
+ # be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
150
+ # and can be added to the global gitignore or merged into this file. For a more nuclear
151
+ # option (not recommended) you can uncomment the following to ignore the entire idea folder.
152
+ #.idea/
153
+ .aider*
@@ -0,0 +1,20 @@
1
+ #FROM python:3.12-slim-bullseye
2
+ FROM pytorch/pytorch:2.7.0-cuda12.6-cudnn9-runtime
3
+
4
+ # Set the working directory in the container
5
+ WORKDIR /app
6
+
7
+ # Copy the sources
8
+ COPY . /src
9
+
10
+ # Install & upgrade software
11
+ RUN apt-get update && \
12
+ apt-get install -y git libqt5gui5 && \
13
+ rm -rf /var/lib/apt/lists/* && \
14
+ python3 -m pip install --root-user-action=ignore --no-cache-dir --upgrade pip && \
15
+ python3 -m pip install --root-user-action=ignore --no-cache-dir /src[globus,gui,ptychi] && \
16
+ rm -rf /src
17
+
18
+ # Run ptychodus when the container launches
19
+ #ENV QT_DEBUG_PLUGINS=1
20
+ CMD ["python3", "-m", "ptychodus"]
ptychodus-1.0/LICENSE ADDED
@@ -0,0 +1,42 @@
1
+ Copyright (c) 2024, UChicago Argonne, LLC. All rights reserved.
2
+
3
+ Copyright 2024. UChicago Argonne, LLC. This software was produced
4
+ under U.S. Government contract DE-AC02-06CH11357 for Argonne National
5
+ Laboratory (ANL), which is operated by UChicago Argonne, LLC for the
6
+ U.S. Department of Energy. The U.S. Government has rights to use,
7
+ reproduce, and distribute this software. NEITHER THE GOVERNMENT NOR
8
+ UChicago Argonne, LLC MAKES ANY WARRANTY, EXPRESS OR IMPLIED, OR
9
+ ASSUMES ANY LIABILITY FOR THE USE OF THIS SOFTWARE. If software is
10
+ modified to produce derivative works, such modified software should
11
+ be clearly marked, so as not to confuse it with the version available
12
+ from ANL.
13
+
14
+ Additionally, redistribution and use in source and binary forms, with
15
+ or without modification, are permitted provided that the following
16
+ conditions are met:
17
+
18
+ * Redistributions of source code must retain the above copyright
19
+ notice, this list of conditions and the following disclaimer.
20
+
21
+ * Redistributions in binary form must reproduce the above copyright
22
+ notice, this list of conditions and the following disclaimer in
23
+ the documentation and/or other materials provided with the
24
+ distribution.
25
+
26
+ * Neither the name of UChicago Argonne, LLC, Argonne National
27
+ Laboratory, ANL, the U.S. Government, nor the names of its
28
+ contributors may be used to endorse or promote products derived
29
+ from this software without specific prior written permission.
30
+
31
+ THIS SOFTWARE IS PROVIDED BY UChicago Argonne, LLC AND CONTRIBUTORS
32
+ "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
33
+ LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
34
+ FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL UChicago
35
+ Argonne, LLC OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
36
+ INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
37
+ BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
38
+ LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
39
+ CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
40
+ LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
41
+ ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
42
+ POSSIBILITY OF SUCH DAMAGE.
ptychodus-1.0/PKG-INFO ADDED
@@ -0,0 +1,172 @@
1
+ Metadata-Version: 2.4
2
+ Name: ptychodus
3
+ Version: 1.0
4
+ Summary: Ptychodus is a ptychography data analysis application.
5
+ License: Copyright (c) 2024, UChicago Argonne, LLC. All rights reserved.
6
+
7
+ Copyright 2024. UChicago Argonne, LLC. This software was produced
8
+ under U.S. Government contract DE-AC02-06CH11357 for Argonne National
9
+ Laboratory (ANL), which is operated by UChicago Argonne, LLC for the
10
+ U.S. Department of Energy. The U.S. Government has rights to use,
11
+ reproduce, and distribute this software. NEITHER THE GOVERNMENT NOR
12
+ UChicago Argonne, LLC MAKES ANY WARRANTY, EXPRESS OR IMPLIED, OR
13
+ ASSUMES ANY LIABILITY FOR THE USE OF THIS SOFTWARE. If software is
14
+ modified to produce derivative works, such modified software should
15
+ be clearly marked, so as not to confuse it with the version available
16
+ from ANL.
17
+
18
+ Additionally, redistribution and use in source and binary forms, with
19
+ or without modification, are permitted provided that the following
20
+ conditions are met:
21
+
22
+ * Redistributions of source code must retain the above copyright
23
+ notice, this list of conditions and the following disclaimer.
24
+
25
+ * Redistributions in binary form must reproduce the above copyright
26
+ notice, this list of conditions and the following disclaimer in
27
+ the documentation and/or other materials provided with the
28
+ distribution.
29
+
30
+ * Neither the name of UChicago Argonne, LLC, Argonne National
31
+ Laboratory, ANL, the U.S. Government, nor the names of its
32
+ contributors may be used to endorse or promote products derived
33
+ from this software without specific prior written permission.
34
+
35
+ THIS SOFTWARE IS PROVIDED BY UChicago Argonne, LLC AND CONTRIBUTORS
36
+ "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
37
+ LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
38
+ FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL UChicago
39
+ Argonne, LLC OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
40
+ INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
41
+ BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
42
+ LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
43
+ CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
44
+ LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
45
+ ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
46
+ POSSIBILITY OF SUCH DAMAGE.
47
+
48
+ Requires-Python: >=3.10
49
+ Description-Content-Type: text/x-rst
50
+ License-File: LICENSE
51
+ Requires-Dist: h5py>=3
52
+ Requires-Dist: hdf5plugin
53
+ Requires-Dist: matplotlib
54
+ Requires-Dist: numpy
55
+ Requires-Dist: psutil
56
+ Requires-Dist: requests
57
+ Requires-Dist: scikit-image
58
+ Requires-Dist: scipy
59
+ Requires-Dist: tables
60
+ Requires-Dist: tifffile
61
+ Requires-Dist: watchdog
62
+ Provides-Extra: globus
63
+ Requires-Dist: gladier; extra == "globus"
64
+ Requires-Dist: gladier-tools>=0.5.4; extra == "globus"
65
+ Provides-Extra: gui
66
+ Requires-Dist: PyQt5; extra == "gui"
67
+ Provides-Extra: ptychonn
68
+ Requires-Dist: ptychonn==0.3.*,>=0.3.7; extra == "ptychonn"
69
+ Provides-Extra: tike
70
+ Requires-Dist: tike==0.25.*,>=0.25.3; extra == "tike"
71
+ Provides-Extra: ptychi
72
+ Requires-Dist: ptychi==1.*; extra == "ptychi"
73
+ Dynamic: license-file
74
+
75
+ Ptychodus
76
+ =========
77
+
78
+ `ptychodus`_ is a ptychography analysis application that supports multiple reconstruction libraries.
79
+
80
+
81
+ Standard Installation
82
+ ---------------------
83
+
84
+ 1. Install `miniforge <https://github.com/conda-forge/miniforge>`_.
85
+
86
+ 2. Install ptychodus.
87
+
88
+ * To install `ptychodus` with the GUI and all optional packages:
89
+
90
+ .. code-block:: shell
91
+
92
+ $ conda create -c conda-forge -n ptychodus ptychodus-all
93
+
94
+ * To install `ptychodus` with the GUI and no optional packages:
95
+
96
+ .. code-block:: shell
97
+
98
+ $ conda create -c conda-forge -n ptychodus ptychodus
99
+
100
+ * To install `ptychodus` without the GUI or optional packages:
101
+
102
+ .. code-block:: shell
103
+
104
+ $ conda create -c conda-forge -n ptychodus ptychodus-core
105
+
106
+ 3. Activate the `ptychodus` conda environment to run ptychodus.
107
+
108
+ .. code-block:: shell
109
+
110
+ $ conda activate ptychodus
111
+ $ ptychodus -h
112
+
113
+ usage: ptychodus [-h] [-b {reconstruct,train}] [-f FILE_PREFIX] [-s SETTINGS_FILE] [-v] [-w OUTPUT_DIR]
114
+
115
+ ptychodus is a ptychography analysis application
116
+
117
+ options:
118
+ -h, --help show this help message and exit
119
+ -b {reconstruct,train}, --batch {reconstruct,train}
120
+ run action non-interactively
121
+ -f FILE_PREFIX, --file-prefix FILE_PREFIX
122
+ replace file path prefix in settings
123
+ -s SETTINGS_FILE, --settings SETTINGS_FILE
124
+ use settings from file
125
+ -v, --version show program's version number and exit
126
+ -w OUTPUT_DIR, --write OUTPUT_DIR
127
+ stage reconstruction inputs to directory
128
+
129
+ $ ptychodus
130
+
131
+
132
+ Developer Installation
133
+ ----------------------
134
+
135
+ * For a developer installation:
136
+
137
+ .. code-block:: shell
138
+
139
+ $ git clone https://github.com/AdvancedPhotonSource/ptychodus.git
140
+ $ conda create -c conda-forge -n ptychodus --file ptychodus/requirements-dev.txt
141
+ $ conda activate ptychodus
142
+ $ pip install -e ./ptychodus
143
+
144
+ * To install the `pty-chi`_ backend:
145
+
146
+ .. code-block:: shell
147
+
148
+ $ pip install ptychi
149
+
150
+ * To install the `PtychoNN`_ backend:
151
+
152
+ .. code-block:: shell
153
+
154
+ $ conda install -n ptychodus -c conda-forge ptychonn
155
+
156
+ * Launch `ptychodus`:
157
+
158
+ .. code-block:: shell
159
+
160
+ $ conda activate ptychodus
161
+ $ ptychodus
162
+
163
+
164
+ Reporting Bugs
165
+ --------------
166
+
167
+ Open a bug at https://github.com/AdvancedPhotonSource/ptychodus/issues.
168
+
169
+ .. _`ptychodus`: https://github.com/AdvancedPhotonSource/ptychodus
170
+ .. _`pty-chi`: https://github.com/AdvancedPhotonSource/pty-chi
171
+ .. _`PtychoNN`: https://github.com/mcherukara/PtychoNN
172
+ .. _`PvaPy`: https://github.com/epics-base/pvaPy
@@ -0,0 +1,98 @@
1
+ Ptychodus
2
+ =========
3
+
4
+ `ptychodus`_ is a ptychography analysis application that supports multiple reconstruction libraries.
5
+
6
+
7
+ Standard Installation
8
+ ---------------------
9
+
10
+ 1. Install `miniforge <https://github.com/conda-forge/miniforge>`_.
11
+
12
+ 2. Install ptychodus.
13
+
14
+ * To install `ptychodus` with the GUI and all optional packages:
15
+
16
+ .. code-block:: shell
17
+
18
+ $ conda create -c conda-forge -n ptychodus ptychodus-all
19
+
20
+ * To install `ptychodus` with the GUI and no optional packages:
21
+
22
+ .. code-block:: shell
23
+
24
+ $ conda create -c conda-forge -n ptychodus ptychodus
25
+
26
+ * To install `ptychodus` without the GUI or optional packages:
27
+
28
+ .. code-block:: shell
29
+
30
+ $ conda create -c conda-forge -n ptychodus ptychodus-core
31
+
32
+ 3. Activate the `ptychodus` conda environment to run ptychodus.
33
+
34
+ .. code-block:: shell
35
+
36
+ $ conda activate ptychodus
37
+ $ ptychodus -h
38
+
39
+ usage: ptychodus [-h] [-b {reconstruct,train}] [-f FILE_PREFIX] [-s SETTINGS_FILE] [-v] [-w OUTPUT_DIR]
40
+
41
+ ptychodus is a ptychography analysis application
42
+
43
+ options:
44
+ -h, --help show this help message and exit
45
+ -b {reconstruct,train}, --batch {reconstruct,train}
46
+ run action non-interactively
47
+ -f FILE_PREFIX, --file-prefix FILE_PREFIX
48
+ replace file path prefix in settings
49
+ -s SETTINGS_FILE, --settings SETTINGS_FILE
50
+ use settings from file
51
+ -v, --version show program's version number and exit
52
+ -w OUTPUT_DIR, --write OUTPUT_DIR
53
+ stage reconstruction inputs to directory
54
+
55
+ $ ptychodus
56
+
57
+
58
+ Developer Installation
59
+ ----------------------
60
+
61
+ * For a developer installation:
62
+
63
+ .. code-block:: shell
64
+
65
+ $ git clone https://github.com/AdvancedPhotonSource/ptychodus.git
66
+ $ conda create -c conda-forge -n ptychodus --file ptychodus/requirements-dev.txt
67
+ $ conda activate ptychodus
68
+ $ pip install -e ./ptychodus
69
+
70
+ * To install the `pty-chi`_ backend:
71
+
72
+ .. code-block:: shell
73
+
74
+ $ pip install ptychi
75
+
76
+ * To install the `PtychoNN`_ backend:
77
+
78
+ .. code-block:: shell
79
+
80
+ $ conda install -n ptychodus -c conda-forge ptychonn
81
+
82
+ * Launch `ptychodus`:
83
+
84
+ .. code-block:: shell
85
+
86
+ $ conda activate ptychodus
87
+ $ ptychodus
88
+
89
+
90
+ Reporting Bugs
91
+ --------------
92
+
93
+ Open a bug at https://github.com/AdvancedPhotonSource/ptychodus/issues.
94
+
95
+ .. _`ptychodus`: https://github.com/AdvancedPhotonSource/ptychodus
96
+ .. _`pty-chi`: https://github.com/AdvancedPhotonSource/pty-chi
97
+ .. _`PtychoNN`: https://github.com/mcherukara/PtychoNN
98
+ .. _`PvaPy`: https://github.com/epics-base/pvaPy
@@ -0,0 +1,12 @@
1
+ #!/usr/bin/env python
2
+
3
+ from pathlib import Path
4
+ from ptychodus.model import ModelCore
5
+
6
+ def main() -> int:
7
+ settings_file = Path("path/to/settings.ini")
8
+
9
+ with ModelCore(settings_file) as model:
10
+ input_product_api = model.workflow_api.create_product("new_product_name")
11
+ output_product_api = input_product_api.reconstruct_local()
12
+ output_product_api.save_product("/path/to/file.h5", file_type="HDF5")
@@ -0,0 +1,36 @@
1
+ Distribution Instructions
2
+ =========================
3
+
4
+ Python Package Index (PyPI)
5
+ ---------------------------
6
+
7
+ From the ptychodus directory, create wheel in ./dist/
8
+
9
+ .. code-block:: shell
10
+
11
+ $ python -m build .
12
+
13
+ Upload to PyPI
14
+
15
+ .. code-block:: shell
16
+
17
+ $ twine upload dist/*
18
+
19
+ Docker
20
+ ------
21
+
22
+ Build Docker image
23
+
24
+ .. code-block:: shell
25
+
26
+ $ podman build -t ptychodus:latest .
27
+
28
+
29
+ Run container
30
+
31
+ .. code-block:: shell
32
+
33
+ $ xhost +local:podman
34
+ $ podman run -it --rm -e "DISPLAY=$DISPLAY" -v "$HOME/.Xauthority:/root/.Xauthority:ro" --network host \
35
+ --gpus all --ipc=host --ulimit memlock=-1 --ulimit stack=67108864 python-ptychodus
36
+ $ xhost -local:podman
@@ -0,0 +1,52 @@
1
+ Globus Compute Demonstration
2
+ ============================
3
+
4
+ Perform steps 1-4 on the local and remote computers.
5
+
6
+ 1. Install Anaconda
7
+
8
+ .. code-block:: shell
9
+
10
+ $ wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh
11
+ $ sh Miniconda3-latest-Linux-x86_64.sh
12
+
13
+ 2. Make conda available in your current bash environment
14
+
15
+ .. code-block:: shell
16
+
17
+ $ eval "$(~/miniconda3/bin/conda shell.bash hook)"
18
+
19
+ 3. Create the "ptychodus" conda environment
20
+
21
+ .. code-block:: shell
22
+ $ conda create -c conda-forge -n ptychodus ptychodus-all
23
+
24
+ 4. Activate the "ptychodus" conda environment
25
+
26
+ .. code-block:: shell
27
+ $ conda activate ptychodus
28
+
29
+ 5. On the remote computer, install the funcX endpoint PyPI package into the "ptychodus" conda environment
30
+
31
+ .. code-block:: shell
32
+ $ python -m pip install funcx-endpoint
33
+
34
+ 6. Configure and start the funcX endpoint
35
+
36
+ .. code-block:: shell
37
+ $ cp ptychodus/ptychodusFuncXPolarisConfig.py ~/.funcx/default/config.py
38
+ $ vi ~/.funcx/default/config.py
39
+ $ funcx-endpoint configure
40
+ $ funcx-endpoint start
41
+
42
+ 7. For data transfer, use a guest collection on Globus Connect Server 5 (GCS5) or use Globus Connect Personal endpoint. See https://docs.globus.org/how-to/guest-collection-share-and-access/ for help setting up a guest collection on GCS5.
43
+ 8. On the local computer, launch the reconstruction tasks from the "Remote" view.
44
+ 9. On the remote computer, watch the queue (qstat) and funcX endpoint logs
45
+
46
+ .. code-block:: shell
47
+ $ tail -f ~/.funcx/default/endpoint.log
48
+
49
+ 10. When the demo is done, stop the funcX endpoint on the remote computer
50
+
51
+ .. code-block:: shell
52
+ $ funcx-endpoint stop
@@ -0,0 +1,45 @@
1
+ Streaming Demonstration
2
+ =======================
3
+
4
+ * To install the `PvaPy`_ backend:
5
+
6
+ .. code-block:: shell
7
+
8
+ $ conda install -n ptychodus -c apsu pvapy
9
+
10
+ * In terminal 1:
11
+
12
+ .. code-block:: shell
13
+
14
+ $ pvapy-hpc-consumer \
15
+ --input-channel pvapy:image \
16
+ --control-channel consumer:*:control \
17
+ --status-channel consumer:*:status \
18
+ --output-channel consumer:*:output \
19
+ --processor-class ptychodus.PtychodusAdImageProcessor \
20
+ --processor-args '{ "settingsFilePath": "/path/to/ptychodus.ini", "reconstructFrameId": 1000 }' \
21
+ --report-period 10 \
22
+ --log-level debug
23
+
24
+ * In terminal 2:
25
+
26
+ .. code-block:: shell
27
+
28
+ # application status
29
+ $ pvget consumer:1:status
30
+
31
+ # configure application
32
+ $ pvput consumer:1:control '{"command" : "configure", "args" : "{\"nPatternsTotal\": 1000}"}'
33
+
34
+ # get last command status
35
+ $ pvget consumer:1:control
36
+
37
+ # start area detector sim server
38
+ $ pvapy-ad-sim-server -cn pvapy:image -if /path/to/fly001.npy -rt 120 -fps 1000
39
+
40
+ * At the end of the demo,
41
+
42
+ .. code-block:: shell
43
+
44
+ # shutdown consumer process
45
+ pvput consumer:1:control '{"command" : "stop"}'