autosaxs 3.0.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 (292) hide show
  1. autosaxs-3.0.0/LICENSE +74 -0
  2. autosaxs-3.0.0/PKG-INFO +193 -0
  3. autosaxs-3.0.0/README.md +139 -0
  4. autosaxs-3.0.0/pyproject.toml +77 -0
  5. autosaxs-3.0.0/setup.cfg +4 -0
  6. autosaxs-3.0.0/src/autosaxs/__init__.py +45 -0
  7. autosaxs-3.0.0/src/autosaxs/cli/__init__.py +6 -0
  8. autosaxs-3.0.0/src/autosaxs/cli/cli.py +871 -0
  9. autosaxs-3.0.0/src/autosaxs/cli/deferred_pip_upgrade.py +409 -0
  10. autosaxs-3.0.0/src/autosaxs/cli/package_update.py +109 -0
  11. autosaxs-3.0.0/src/autosaxs/core/__init__.py +2 -0
  12. autosaxs-3.0.0/src/autosaxs/core/context.py +149 -0
  13. autosaxs-3.0.0/src/autosaxs/core/event_bus.py +62 -0
  14. autosaxs-3.0.0/src/autosaxs/core/gnom.py +293 -0
  15. autosaxs-3.0.0/src/autosaxs/core/gnom_quality.py +951 -0
  16. autosaxs-3.0.0/src/autosaxs/core/guinier.py +882 -0
  17. autosaxs-3.0.0/src/autosaxs/core/integrator.py +80 -0
  18. autosaxs-3.0.0/src/autosaxs/core/kratky.py +180 -0
  19. autosaxs-3.0.0/src/autosaxs/core/path_expression.py +175 -0
  20. autosaxs-3.0.0/src/autosaxs/core/pddf.py +189 -0
  21. autosaxs-3.0.0/src/autosaxs/core/processor.py +13 -0
  22. autosaxs-3.0.0/src/autosaxs/core/report.py +931 -0
  23. autosaxs-3.0.0/src/autosaxs/core/report_fragments.py +948 -0
  24. autosaxs-3.0.0/src/autosaxs/core/utils.py +1483 -0
  25. autosaxs-3.0.0/src/autosaxs/core/viewer.py +693 -0
  26. autosaxs-3.0.0/src/autosaxs/core/viewer_interface.py +43 -0
  27. autosaxs-3.0.0/src/autosaxs/foreign/__init__.py +2 -0
  28. autosaxs-3.0.0/src/autosaxs/foreign/aiAssistantFramework/__init__.py +1 -0
  29. autosaxs-3.0.0/src/autosaxs/foreign/aiAssistantFramework/lib/__init__.py +3 -0
  30. autosaxs-3.0.0/src/autosaxs/foreign/aiAssistantFramework/lib/llm.py +307 -0
  31. autosaxs-3.0.0/src/autosaxs/foreign/supervised_ml/__init__.py +1 -0
  32. autosaxs-3.0.0/src/autosaxs/foreign/supervised_ml/plot_util.py +950 -0
  33. autosaxs-3.0.0/src/autosaxs/foreign/supervised_ml/util.py +187 -0
  34. autosaxs-3.0.0/src/autosaxs/foreign/supervised_ml/whittaker_smooth.py +25 -0
  35. autosaxs-3.0.0/src/autosaxs/pipeline/__init__.py +15 -0
  36. autosaxs-3.0.0/src/autosaxs/pipeline/api.py +154 -0
  37. autosaxs-3.0.0/src/autosaxs/pipeline/cli_interface.py +472 -0
  38. autosaxs-3.0.0/src/autosaxs/pipeline/gui.py +455 -0
  39. autosaxs-3.0.0/src/autosaxs/pipeline/gui_interface.py +199 -0
  40. autosaxs-3.0.0/src/autosaxs/pipeline/saxs_controller.py +1396 -0
  41. autosaxs-3.0.0/src/autosaxs/resources/__init__.py +7 -0
  42. autosaxs-3.0.0/src/autosaxs/resources/agent_quickstart.txt +23 -0
  43. autosaxs-3.0.0/src/autosaxs/resources/ai_skills/__init__.py +7 -0
  44. autosaxs-3.0.0/src/autosaxs/resources/ai_skills/router_template.md +73 -0
  45. autosaxs-3.0.0/src/autosaxs/resources/ai_skills/subskill_template.md +54 -0
  46. autosaxs-3.0.0/src/autosaxs/resources/config_base.conf +53 -0
  47. autosaxs-3.0.0/src/autosaxs/resources/help/__init__.py +1 -0
  48. autosaxs-3.0.0/src/autosaxs/resources/help/guisaxs_liveview/__init__.py +1 -0
  49. autosaxs-3.0.0/src/autosaxs/resources/help/guisaxs_liveview/__pycache__/__init__.cpython-313.pyc +0 -0
  50. autosaxs-3.0.0/src/autosaxs/resources/help/guisaxs_liveview/html/algorithms/calibrate.html +36 -0
  51. autosaxs-3.0.0/src/autosaxs/resources/help/guisaxs_liveview/html/algorithms/fit_distances.html +39 -0
  52. autosaxs-3.0.0/src/autosaxs/resources/help/guisaxs_liveview/html/algorithms/fit_sizes.html +38 -0
  53. autosaxs-3.0.0/src/autosaxs/resources/help/guisaxs_liveview/html/algorithms/guinier.html +39 -0
  54. autosaxs-3.0.0/src/autosaxs/resources/help/guisaxs_liveview/html/algorithms/index.html +43 -0
  55. autosaxs-3.0.0/src/autosaxs/resources/help/guisaxs_liveview/html/algorithms/integrate.html +27 -0
  56. autosaxs-3.0.0/src/autosaxs/resources/help/guisaxs_liveview/html/algorithms/integrate_proxy.html +29 -0
  57. autosaxs-3.0.0/src/autosaxs/resources/help/guisaxs_liveview/html/algorithms/model_bodies.html +33 -0
  58. autosaxs-3.0.0/src/autosaxs/resources/help/guisaxs_liveview/html/algorithms/model_dam.html +36 -0
  59. autosaxs-3.0.0/src/autosaxs/resources/help/guisaxs_liveview/html/algorithms/model_density.html +35 -0
  60. autosaxs-3.0.0/src/autosaxs/resources/help/guisaxs_liveview/html/algorithms/model_mixture.html +35 -0
  61. autosaxs-3.0.0/src/autosaxs/resources/help/guisaxs_liveview/html/algorithms/subtract.html +39 -0
  62. autosaxs-3.0.0/src/autosaxs/resources/help/guisaxs_liveview/html/analysis_monodisperse.html +73 -0
  63. autosaxs-3.0.0/src/autosaxs/resources/help/guisaxs_liveview/html/analysis_polydisperse.html +65 -0
  64. autosaxs-3.0.0/src/autosaxs/resources/help/guisaxs_liveview/html/assets/cal_create_mask.png +0 -0
  65. autosaxs-3.0.0/src/autosaxs/resources/help/guisaxs_liveview/html/assets/cal_overview.png +0 -0
  66. autosaxs-3.0.0/src/autosaxs/resources/help/guisaxs_liveview/html/assets/cal_run.png +0 -0
  67. autosaxs-3.0.0/src/autosaxs/resources/help/guisaxs_liveview/html/assets/main_analysis_icons.png +0 -0
  68. autosaxs-3.0.0/src/autosaxs/resources/help/guisaxs_liveview/html/assets/main_buffer_wizard.png +0 -0
  69. autosaxs-3.0.0/src/autosaxs/resources/help/guisaxs_liveview/html/assets/main_drop_tif.png +0 -0
  70. autosaxs-3.0.0/src/autosaxs/resources/help/guisaxs_liveview/html/assets/main_mono_icon.png +0 -0
  71. autosaxs-3.0.0/src/autosaxs/resources/help/guisaxs_liveview/html/assets/main_overview.png +0 -0
  72. autosaxs-3.0.0/src/autosaxs/resources/help/guisaxs_liveview/html/assets/main_poly_icon.png +0 -0
  73. autosaxs-3.0.0/src/autosaxs/resources/help/guisaxs_liveview/html/assets/main_process_history.png +0 -0
  74. autosaxs-3.0.0/src/autosaxs/resources/help/guisaxs_liveview/html/assets/main_s_buffer.png +0 -0
  75. autosaxs-3.0.0/src/autosaxs/resources/help/guisaxs_liveview/html/assets/main_set_buffer.png +0 -0
  76. autosaxs-3.0.0/src/autosaxs/resources/help/guisaxs_liveview/html/assets/main_set_calibration.png +0 -0
  77. autosaxs-3.0.0/src/autosaxs/resources/help/guisaxs_liveview/html/assets/main_subtraction_wizard.png +0 -0
  78. autosaxs-3.0.0/src/autosaxs/resources/help/guisaxs_liveview/html/assets/mask_overview.png +0 -0
  79. autosaxs-3.0.0/src/autosaxs/resources/help/guisaxs_liveview/html/assets/mask_save.png +0 -0
  80. autosaxs-3.0.0/src/autosaxs/resources/help/guisaxs_liveview/html/assets/mono_overview.png +0 -0
  81. autosaxs-3.0.0/src/autosaxs/resources/help/guisaxs_liveview/html/assets/poly_overview.png +0 -0
  82. autosaxs-3.0.0/src/autosaxs/resources/help/guisaxs_liveview/html/calibration.html +58 -0
  83. autosaxs-3.0.0/src/autosaxs/resources/help/guisaxs_liveview/html/concepts.html +137 -0
  84. autosaxs-3.0.0/src/autosaxs/resources/help/guisaxs_liveview/html/index.html +20 -0
  85. autosaxs-3.0.0/src/autosaxs/resources/help/guisaxs_liveview/html/main_window.html +100 -0
  86. autosaxs-3.0.0/src/autosaxs/resources/help/guisaxs_liveview/html/mask.html +65 -0
  87. autosaxs-3.0.0/src/autosaxs/resources/help/guisaxs_liveview/html/quickstart.html +28 -0
  88. autosaxs-3.0.0/src/autosaxs/resources/help/guisaxs_liveview/html/troubleshooting.html +30 -0
  89. autosaxs-3.0.0/src/autosaxs/resources/help/guisaxs_liveview/manifest.yaml +51 -0
  90. autosaxs-3.0.0/src/autosaxs/resources/help/guisaxs_liveview/style/help.css +52 -0
  91. autosaxs-3.0.0/src/autosaxs/resources/help/guisaxs_liveview_loader.py +55 -0
  92. autosaxs-3.0.0/src/autosaxs/resources/prompts/visual/guinier_plot.txt +24 -0
  93. autosaxs-3.0.0/src/autosaxs/resources/prompts/visual/kratky_plot.txt +26 -0
  94. autosaxs-3.0.0/src/autosaxs/resources/prompts/visual/loglog_plot.txt +27 -0
  95. autosaxs-3.0.0/src/autosaxs/resources/prompts/visual/saxs_1d.txt +25 -0
  96. autosaxs-3.0.0/src/autosaxs/resources/readme/__init__.py +2 -0
  97. autosaxs-3.0.0/src/autosaxs/resources/readme/autosaxs_skills_explained.py +115 -0
  98. autosaxs-3.0.0/src/autosaxs/resources/readme/images/hero_model_dam_frequency.gif +0 -0
  99. autosaxs-3.0.0/src/autosaxs/resources/readme/readme_header.md +139 -0
  100. autosaxs-3.0.0/src/autosaxs/resources/readme/skills_docs_header.md +41 -0
  101. autosaxs-3.0.0/src/autosaxs/resources/schemas/report_summary.schema.json +55 -0
  102. autosaxs-3.0.0/src/autosaxs/skill/__init__.py +104 -0
  103. autosaxs-3.0.0/src/autosaxs/skill/analyze_kratky.py +459 -0
  104. autosaxs-3.0.0/src/autosaxs/skill/average.py +532 -0
  105. autosaxs-3.0.0/src/autosaxs/skill/calibrate/__init__.py +311 -0
  106. autosaxs-3.0.0/src/autosaxs/skill/calibrate/autocalib.py +1011 -0
  107. autosaxs-3.0.0/src/autosaxs/skill/calibrate/autocalib_refine.py +274 -0
  108. autosaxs-3.0.0/src/autosaxs/skill/calibrate/autocalib_viz.py +286 -0
  109. autosaxs-3.0.0/src/autosaxs/skill/common.py +142 -0
  110. autosaxs-3.0.0/src/autosaxs/skill/config.py +123 -0
  111. autosaxs-3.0.0/src/autosaxs/skill/deps.py +55 -0
  112. autosaxs-3.0.0/src/autosaxs/skill/fit_bodies.py +45 -0
  113. autosaxs-3.0.0/src/autosaxs/skill/fit_dammif.py +44 -0
  114. autosaxs-3.0.0/src/autosaxs/skill/fit_distances/__init__.py +7 -0
  115. autosaxs-3.0.0/src/autosaxs/skill/fit_distances/artifacts.py +382 -0
  116. autosaxs-3.0.0/src/autosaxs/skill/fit_distances/distances.py +450 -0
  117. autosaxs-3.0.0/src/autosaxs/skill/fit_distances/optimize.py +220 -0
  118. autosaxs-3.0.0/src/autosaxs/skill/fit_distances/quality_io.py +168 -0
  119. autosaxs-3.0.0/src/autosaxs/skill/fit_distances/runners.py +295 -0
  120. autosaxs-3.0.0/src/autosaxs/skill/fit_distances/vis.py +217 -0
  121. autosaxs-3.0.0/src/autosaxs/skill/fit_guinier/__init__.py +357 -0
  122. autosaxs-3.0.0/src/autosaxs/skill/fit_guinier/guinier.py +321 -0
  123. autosaxs-3.0.0/src/autosaxs/skill/fit_mixture/__init__.py +71 -0
  124. autosaxs-3.0.0/src/autosaxs/skill/fit_mixture/mixture.py +5 -0
  125. autosaxs-3.0.0/src/autosaxs/skill/fit_sizes/__init__.py +7 -0
  126. autosaxs-3.0.0/src/autosaxs/skill/fit_sizes/artifacts.py +313 -0
  127. autosaxs-3.0.0/src/autosaxs/skill/fit_sizes/ensemble.py +247 -0
  128. autosaxs-3.0.0/src/autosaxs/skill/fit_sizes/optimize.py +240 -0
  129. autosaxs-3.0.0/src/autosaxs/skill/fit_sizes/parametric.py +182 -0
  130. autosaxs-3.0.0/src/autosaxs/skill/fit_sizes/quality_io.py +245 -0
  131. autosaxs-3.0.0/src/autosaxs/skill/fit_sizes/runners.py +85 -0
  132. autosaxs-3.0.0/src/autosaxs/skill/fit_sizes/sizes.py +529 -0
  133. autosaxs-3.0.0/src/autosaxs/skill/fit_sizes/vis.py +204 -0
  134. autosaxs-3.0.0/src/autosaxs/skill/fit_sizes/yaml_io.py +221 -0
  135. autosaxs-3.0.0/src/autosaxs/skill/gnom_fit_common.py +59 -0
  136. autosaxs-3.0.0/src/autosaxs/skill/integrate.py +213 -0
  137. autosaxs-3.0.0/src/autosaxs/skill/integrate_proxy.py +410 -0
  138. autosaxs-3.0.0/src/autosaxs/skill/model_bodies.py +468 -0
  139. autosaxs-3.0.0/src/autosaxs/skill/model_dam/__init__.py +7 -0
  140. autosaxs-3.0.0/src/autosaxs/skill/model_dam/dam.py +704 -0
  141. autosaxs-3.0.0/src/autosaxs/skill/model_dam/vis.py +612 -0
  142. autosaxs-3.0.0/src/autosaxs/skill/model_density/__init__.py +7 -0
  143. autosaxs-3.0.0/src/autosaxs/skill/model_density/density.py +627 -0
  144. autosaxs-3.0.0/src/autosaxs/skill/model_density/vis.py +705 -0
  145. autosaxs-3.0.0/src/autosaxs/skill/model_dr_mc/__init__.py +295 -0
  146. autosaxs-3.0.0/src/autosaxs/skill/model_dr_mc/artifacts.py +153 -0
  147. autosaxs-3.0.0/src/autosaxs/skill/model_dr_mc/runner.py +224 -0
  148. autosaxs-3.0.0/src/autosaxs/skill/model_dr_mc/vis.py +117 -0
  149. autosaxs-3.0.0/src/autosaxs/skill/model_mixture/__init__.py +418 -0
  150. autosaxs-3.0.0/src/autosaxs/skill/model_mixture/mixture.py +631 -0
  151. autosaxs-3.0.0/src/autosaxs/skill/plot.py +205 -0
  152. autosaxs-3.0.0/src/autosaxs/skill/plot_2d.py +137 -0
  153. autosaxs-3.0.0/src/autosaxs/skill/process_monodisperse.py +309 -0
  154. autosaxs-3.0.0/src/autosaxs/skill/report_individual.py +238 -0
  155. autosaxs-3.0.0/src/autosaxs/skill/report_summary.py +176 -0
  156. autosaxs-3.0.0/src/autosaxs/skill/skill_wrap.py +515 -0
  157. autosaxs-3.0.0/src/autosaxs/skill/subtract.py +632 -0
  158. autosaxs-3.0.0/src/autosaxs.egg-info/PKG-INFO +193 -0
  159. autosaxs-3.0.0/src/autosaxs.egg-info/SOURCES.txt +290 -0
  160. autosaxs-3.0.0/src/autosaxs.egg-info/dependency_links.txt +1 -0
  161. autosaxs-3.0.0/src/autosaxs.egg-info/entry_points.txt +4 -0
  162. autosaxs-3.0.0/src/autosaxs.egg-info/requires.txt +32 -0
  163. autosaxs-3.0.0/src/autosaxs.egg-info/top_level.txt +3 -0
  164. autosaxs-3.0.0/src/guisaxs_liveview/__init__.py +2 -0
  165. autosaxs-3.0.0/src/guisaxs_liveview/__main__.py +13 -0
  166. autosaxs-3.0.0/src/guisaxs_liveview/viewer3d.py +13 -0
  167. autosaxs-3.0.0/src/guisaxs_skills/__init__.py +4 -0
  168. autosaxs-3.0.0/src/guisaxs_skills/__main__.py +13 -0
  169. autosaxs-3.0.0/src/guisaxs_skills/app.py +22 -0
  170. autosaxs-3.0.0/src/guisaxs_skills/core/event_bus.py +46 -0
  171. autosaxs-3.0.0/src/guisaxs_skills/core/events.py +82 -0
  172. autosaxs-3.0.0/src/guisaxs_skills/core/models.py +94 -0
  173. autosaxs-3.0.0/src/guisaxs_skills/core/paths.py +32 -0
  174. autosaxs-3.0.0/src/guisaxs_skills/core/settings.py +17 -0
  175. autosaxs-3.0.0/src/guisaxs_skills/liveview/__init__.py +20 -0
  176. autosaxs-3.0.0/src/guisaxs_skills/liveview/app.py +23 -0
  177. autosaxs-3.0.0/src/guisaxs_skills/liveview/controller/__init__.py +3 -0
  178. autosaxs-3.0.0/src/guisaxs_skills/liveview/controller/controller.py +301 -0
  179. autosaxs-3.0.0/src/guisaxs_skills/liveview/controller/history.py +178 -0
  180. autosaxs-3.0.0/src/guisaxs_skills/liveview/controller/ingest.py +131 -0
  181. autosaxs-3.0.0/src/guisaxs_skills/liveview/controller/monodisperse.py +265 -0
  182. autosaxs-3.0.0/src/guisaxs_skills/liveview/controller/polydisperse.py +225 -0
  183. autosaxs-3.0.0/src/guisaxs_skills/liveview/controller/processing_mode.py +59 -0
  184. autosaxs-3.0.0/src/guisaxs_skills/liveview/controller/session.py +342 -0
  185. autosaxs-3.0.0/src/guisaxs_skills/liveview/ingest/__init__.py +24 -0
  186. autosaxs-3.0.0/src/guisaxs_skills/liveview/ingest/dir_tree_observer.py +410 -0
  187. autosaxs-3.0.0/src/guisaxs_skills/liveview/ingest/poll_watcher.py +114 -0
  188. autosaxs-3.0.0/src/guisaxs_skills/liveview/ingest/stability.py +92 -0
  189. autosaxs-3.0.0/src/guisaxs_skills/liveview/ingest/tiff_revision.py +72 -0
  190. autosaxs-3.0.0/src/guisaxs_skills/liveview/ingest/watcher.py +112 -0
  191. autosaxs-3.0.0/src/guisaxs_skills/liveview/pipeline/__init__.py +4 -0
  192. autosaxs-3.0.0/src/guisaxs_skills/liveview/pipeline/executor.py +1124 -0
  193. autosaxs-3.0.0/src/guisaxs_skills/liveview/pipeline/jobs.py +111 -0
  194. autosaxs-3.0.0/src/guisaxs_skills/liveview/pipeline/monodisperse_pipeline.py +321 -0
  195. autosaxs-3.0.0/src/guisaxs_skills/liveview/pipeline/polydisperse_pipeline.py +156 -0
  196. autosaxs-3.0.0/src/guisaxs_skills/liveview/pipeline/queue.py +161 -0
  197. autosaxs-3.0.0/src/guisaxs_skills/liveview/services/__init__.py +11 -0
  198. autosaxs-3.0.0/src/guisaxs_skills/liveview/services/artifacts.py +359 -0
  199. autosaxs-3.0.0/src/guisaxs_skills/liveview/services/calibration/__init__.py +4 -0
  200. autosaxs-3.0.0/src/guisaxs_skills/liveview/services/calibration/display.py +106 -0
  201. autosaxs-3.0.0/src/guisaxs_skills/liveview/services/calibration/storage.py +57 -0
  202. autosaxs-3.0.0/src/guisaxs_skills/liveview/services/dam_models.py +437 -0
  203. autosaxs-3.0.0/src/guisaxs_skills/liveview/services/denss_models.py +157 -0
  204. autosaxs-3.0.0/src/guisaxs_skills/liveview/services/history/__init__.py +4 -0
  205. autosaxs-3.0.0/src/guisaxs_skills/liveview/services/history/middle_from_stem.py +104 -0
  206. autosaxs-3.0.0/src/guisaxs_skills/liveview/services/history/right_from_stem.py +49 -0
  207. autosaxs-3.0.0/src/guisaxs_skills/liveview/services/skills.py +53 -0
  208. autosaxs-3.0.0/src/guisaxs_skills/liveview/session/__init__.py +24 -0
  209. autosaxs-3.0.0/src/guisaxs_skills/liveview/session/output_paths.py +104 -0
  210. autosaxs-3.0.0/src/guisaxs_skills/liveview/session/persistence.py +136 -0
  211. autosaxs-3.0.0/src/guisaxs_skills/liveview/session/state.py +159 -0
  212. autosaxs-3.0.0/src/guisaxs_skills/liveview/session/workdir.py +33 -0
  213. autosaxs-3.0.0/src/guisaxs_skills/liveview/ui/__init__.py +2 -0
  214. autosaxs-3.0.0/src/guisaxs_skills/liveview/ui/attention.py +148 -0
  215. autosaxs-3.0.0/src/guisaxs_skills/liveview/ui/icons.py +92 -0
  216. autosaxs-3.0.0/src/guisaxs_skills/liveview/ui/log_panel.py +63 -0
  217. autosaxs-3.0.0/src/guisaxs_skills/liveview/ui/panels/__init__.py +5 -0
  218. autosaxs-3.0.0/src/guisaxs_skills/liveview/ui/panels/left.py +379 -0
  219. autosaxs-3.0.0/src/guisaxs_skills/liveview/ui/panels/middle.py +362 -0
  220. autosaxs-3.0.0/src/guisaxs_skills/liveview/ui/panels/right/__init__.py +3 -0
  221. autosaxs-3.0.0/src/guisaxs_skills/liveview/ui/panels/right/config_restore.py +243 -0
  222. autosaxs-3.0.0/src/guisaxs_skills/liveview/ui/panels/right/form_helpers.py +36 -0
  223. autosaxs-3.0.0/src/guisaxs_skills/liveview/ui/panels/right/monodisperse/__init__.py +3 -0
  224. autosaxs-3.0.0/src/guisaxs_skills/liveview/ui/panels/right/monodisperse/artifact_presenter.py +584 -0
  225. autosaxs-3.0.0/src/guisaxs_skills/liveview/ui/panels/right/monodisperse/config_sync.py +121 -0
  226. autosaxs-3.0.0/src/guisaxs_skills/liveview/ui/panels/right/monodisperse/coordinator.py +142 -0
  227. autosaxs-3.0.0/src/guisaxs_skills/liveview/ui/panels/right/monodisperse/format_display.py +110 -0
  228. autosaxs-3.0.0/src/guisaxs_skills/liveview/ui/panels/right/monodisperse/gnom_pane.py +156 -0
  229. autosaxs-3.0.0/src/guisaxs_skills/liveview/ui/panels/right/monodisperse/guinier_pane.py +146 -0
  230. autosaxs-3.0.0/src/guisaxs_skills/liveview/ui/panels/right/monodisperse/plot_clicks.py +112 -0
  231. autosaxs-3.0.0/src/guisaxs_skills/liveview/ui/panels/right/monodisperse/plots.py +341 -0
  232. autosaxs-3.0.0/src/guisaxs_skills/liveview/ui/panels/right/monodisperse/shape_pane.py +389 -0
  233. autosaxs-3.0.0/src/guisaxs_skills/liveview/ui/panels/right/monodisperse/wizard.py +125 -0
  234. autosaxs-3.0.0/src/guisaxs_skills/liveview/ui/panels/right/panel.py +420 -0
  235. autosaxs-3.0.0/src/guisaxs_skills/liveview/ui/panels/right/polydisperse/__init__.py +6 -0
  236. autosaxs-3.0.0/src/guisaxs_skills/liveview/ui/panels/right/polydisperse/artifact_presenter.py +398 -0
  237. autosaxs-3.0.0/src/guisaxs_skills/liveview/ui/panels/right/polydisperse/config_sync.py +106 -0
  238. autosaxs-3.0.0/src/guisaxs_skills/liveview/ui/panels/right/polydisperse/coordinator.py +122 -0
  239. autosaxs-3.0.0/src/guisaxs_skills/liveview/ui/panels/right/polydisperse/mixture_pane.py +344 -0
  240. autosaxs-3.0.0/src/guisaxs_skills/liveview/ui/panels/right/polydisperse/plot_clicks.py +159 -0
  241. autosaxs-3.0.0/src/guisaxs_skills/liveview/ui/panels/right/polydisperse/plots.py +211 -0
  242. autosaxs-3.0.0/src/guisaxs_skills/liveview/ui/panels/right/polydisperse/sizes_pane.py +165 -0
  243. autosaxs-3.0.0/src/guisaxs_skills/liveview/ui/panels/right/polydisperse/window_widget.py +110 -0
  244. autosaxs-3.0.0/src/guisaxs_skills/liveview/ui/skill_form_utils.py +128 -0
  245. autosaxs-3.0.0/src/guisaxs_skills/liveview/ui/widgets/__init__.py +17 -0
  246. autosaxs-3.0.0/src/guisaxs_skills/liveview/ui/widgets/plots.py +852 -0
  247. autosaxs-3.0.0/src/guisaxs_skills/liveview/ui/widgets/viewer_3d.py +252 -0
  248. autosaxs-3.0.0/src/guisaxs_skills/liveview/ui/windows/__init__.py +1 -0
  249. autosaxs-3.0.0/src/guisaxs_skills/liveview/ui/windows/polydisperse.py +67 -0
  250. autosaxs-3.0.0/src/guisaxs_skills/liveview/ui/wizards/__init__.py +12 -0
  251. autosaxs-3.0.0/src/guisaxs_skills/liveview/ui/wizards/left.py +781 -0
  252. autosaxs-3.0.0/src/guisaxs_skills/liveview/ui/wizards/mask.py +996 -0
  253. autosaxs-3.0.0/src/guisaxs_skills/liveview/ui/wizards/monodisperse.py +67 -0
  254. autosaxs-3.0.0/src/guisaxs_skills/liveview/ui/wizards/right.py +532 -0
  255. autosaxs-3.0.0/src/guisaxs_skills/liveview/ui/wizards/subtraction.py +191 -0
  256. autosaxs-3.0.0/src/guisaxs_skills/liveview/window.py +344 -0
  257. autosaxs-3.0.0/src/guisaxs_skills/logic/app_relaunch.py +53 -0
  258. autosaxs-3.0.0/src/guisaxs_skills/logic/autosaxs_cli.py +46 -0
  259. autosaxs-3.0.0/src/guisaxs_skills/logic/default_output_dir.py +26 -0
  260. autosaxs-3.0.0/src/guisaxs_skills/logic/inputs_copy.py +86 -0
  261. autosaxs-3.0.0/src/guisaxs_skills/logic/package_update.py +45 -0
  262. autosaxs-3.0.0/src/guisaxs_skills/logic/path_display.py +30 -0
  263. autosaxs-3.0.0/src/guisaxs_skills/logic/path_normalize.py +19 -0
  264. autosaxs-3.0.0/src/guisaxs_skills/logic/result_parser.py +45 -0
  265. autosaxs-3.0.0/src/guisaxs_skills/logic/runner_qprocess.py +171 -0
  266. autosaxs-3.0.0/src/guisaxs_skills/logic/session_state.py +51 -0
  267. autosaxs-3.0.0/src/guisaxs_skills/logic/skill_catalog.py +205 -0
  268. autosaxs-3.0.0/src/guisaxs_skills/logic/smart_defaults.py +472 -0
  269. autosaxs-3.0.0/src/guisaxs_skills/logic/workdir.py +57 -0
  270. autosaxs-3.0.0/src/guisaxs_skills/ui/about_dialog.py +38 -0
  271. autosaxs-3.0.0/src/guisaxs_skills/ui/artifacts_panel.py +51 -0
  272. autosaxs-3.0.0/src/guisaxs_skills/ui/catalog_tabs.py +52 -0
  273. autosaxs-3.0.0/src/guisaxs_skills/ui/curve_plot.py +94 -0
  274. autosaxs-3.0.0/src/guisaxs_skills/ui/data_panel.py +125 -0
  275. autosaxs-3.0.0/src/guisaxs_skills/ui/help_dialog.py +23 -0
  276. autosaxs-3.0.0/src/guisaxs_skills/ui/help_toc.py +52 -0
  277. autosaxs-3.0.0/src/guisaxs_skills/ui/html_help_dialog.py +249 -0
  278. autosaxs-3.0.0/src/guisaxs_skills/ui/isosurface_mesh_data.py +342 -0
  279. autosaxs-3.0.0/src/guisaxs_skills/ui/log_view.py +31 -0
  280. autosaxs-3.0.0/src/guisaxs_skills/ui/main_window.py +279 -0
  281. autosaxs-3.0.0/src/guisaxs_skills/ui/path_field.py +378 -0
  282. autosaxs-3.0.0/src/guisaxs_skills/ui/preview_panel.py +571 -0
  283. autosaxs-3.0.0/src/guisaxs_skills/ui/run_controls.py +40 -0
  284. autosaxs-3.0.0/src/guisaxs_skills/ui/saxs_interactive_3d.py +1578 -0
  285. autosaxs-3.0.0/src/guisaxs_skills/ui/skill_form.py +730 -0
  286. autosaxs-3.0.0/src/guisaxs_skills/ui/skill_header.py +26 -0
  287. autosaxs-3.0.0/src/guisaxs_skills/ui/style.py +172 -0
  288. autosaxs-3.0.0/src/guisaxs_skills/ui/toast.py +146 -0
  289. autosaxs-3.0.0/src/guisaxs_skills/ui/update_dialog.py +34 -0
  290. autosaxs-3.0.0/tests/test_guisaxs_liveview.py +978 -0
  291. autosaxs-3.0.0/tests/test_skill.py +1893 -0
  292. autosaxs-3.0.0/tests/test_skills_real_data.py +564 -0
autosaxs-3.0.0/LICENSE ADDED
@@ -0,0 +1,74 @@
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document.
10
+
11
+ "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License.
12
+
13
+ "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity.
14
+
15
+ "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License.
16
+
17
+ "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files.
18
+
19
+ "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types.
20
+
21
+ "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below).
22
+
23
+ "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof.
24
+
25
+ "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution."
26
+
27
+ "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work.
28
+
29
+ 2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form.
30
+
31
+ 3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed.
32
+
33
+ 4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions:
34
+
35
+ (a) You must give any other recipients of the Work or Derivative Works a copy of this License; and
36
+
37
+ (b) You must cause any modified files to carry prominent notices stating that You changed the files; and
38
+
39
+ (c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and
40
+
41
+ (d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License.
42
+
43
+ You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License.
44
+
45
+ 5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions.
46
+
47
+ 6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file.
48
+
49
+ 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License.
50
+
51
+ 8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages.
52
+
53
+ 9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability.
54
+
55
+ END OF TERMS AND CONDITIONS
56
+
57
+ APPENDIX: How to apply the Apache License to your work.
58
+
59
+ To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives.
60
+
61
+ Copyright 2025-2026 Mikhail S. Lifar
62
+ (The Smart Materials Research Institute, Southern Federal University)
63
+
64
+ Licensed under the Apache License, Version 2.0 (the "License");
65
+ you may not use this file except in compliance with the License.
66
+ You may obtain a copy of the License at
67
+
68
+ http://www.apache.org/licenses/LICENSE-2.0
69
+
70
+ Unless required by applicable law or agreed to in writing, software
71
+ distributed under the License is distributed on an "AS IS" BASIS,
72
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
73
+ See the License for the specific language governing permissions and
74
+ limitations under the License.
@@ -0,0 +1,193 @@
1
+ Metadata-Version: 2.4
2
+ Name: autosaxs
3
+ Version: 3.0.0
4
+ Summary: Interactive SAXS pipeline core: calibration, integration, subtraction, ATSAS descriptors, plots, shape fitting, reports. After install, run `autosaxs --help`: epilog lists get-docs, get-skills, get-default-config (export docs and default config into your workspace).
5
+ Author-email: "Mikhail S. Lifar" <mikhailkulkov11@gmail.com>
6
+ License-Expression: Apache-2.0
7
+ Project-URL: Homepage, https://github.com/MikhailLifar/autoSAXS
8
+ Project-URL: Repository, https://github.com/MikhailLifar/autoSAXS
9
+ Project-URL: Issues, https://github.com/MikhailLifar/autoSAXS/issues
10
+ Project-URL: Documentation, https://github.com/MikhailLifar/autoSAXS#readme
11
+ Keywords: saxs,small-angle scattering,pyFAI,ATSAS,calibration,integration
12
+ Classifier: Development Status :: 3 - Alpha
13
+ Classifier: Intended Audience :: Science/Research
14
+ Classifier: Operating System :: OS Independent
15
+ Classifier: Programming Language :: Python :: 3
16
+ Classifier: Programming Language :: Python :: 3.10
17
+ Classifier: Programming Language :: Python :: 3.11
18
+ Classifier: Programming Language :: Python :: 3.12
19
+ Classifier: Programming Language :: Python :: 3.13
20
+ Classifier: Topic :: Scientific/Engineering :: Physics
21
+ Requires-Python: >=3.10
22
+ Description-Content-Type: text/markdown
23
+ License-File: LICENSE
24
+ Requires-Dist: ase
25
+ Requires-Dist: denss>=1.8.0
26
+ Requires-Dist: fabio
27
+ Requires-Dist: matplotlib
28
+ Requires-Dist: mcsas3>=1.0.6
29
+ Requires-Dist: numpy<2.4,>=2.0
30
+ Requires-Dist: pandas
31
+ Requires-Dist: pyFAI
32
+ Requires-Dist: PyYAML
33
+ Requires-Dist: reportlab
34
+ Requires-Dist: sasmodels
35
+ Requires-Dist: scikit-image
36
+ Requires-Dist: scikit-learn
37
+ Requires-Dist: scipy
38
+ Requires-Dist: seaborn
39
+ Requires-Dist: squarify
40
+ Provides-Extra: dev
41
+ Requires-Dist: build; extra == "dev"
42
+ Requires-Dist: import-linter; extra == "dev"
43
+ Requires-Dist: pip; extra == "dev"
44
+ Requires-Dist: twine; extra == "dev"
45
+ Provides-Extra: gui
46
+ Requires-Dist: customtkinter; extra == "gui"
47
+ Requires-Dist: PyQt5; extra == "gui"
48
+ Requires-Dist: watchdog; extra == "gui"
49
+ Provides-Extra: llm
50
+ Requires-Dist: httpx; extra == "llm"
51
+ Requires-Dist: openai; extra == "llm"
52
+ Requires-Dist: requests; extra == "llm"
53
+ Dynamic: license-file
54
+
55
+ # autoSAXS
56
+
57
+ **autoSAXS** is a Python toolkit for reproducible small-angle X-ray scattering (SAXS) pipelines — from detector images to subtracted curves, size distributions, and shape models — usable from a **CLI**, from **Python**, from desktop GUIs or through your favourite AI agent.
58
+
59
+ <p align="center">
60
+ <img src="https://raw.githubusercontent.com/MikhailLifar/autoSAXS/main/readme-assets/hero_model_dam_frequency.gif" alt="model_dam frequency / occupancy map" width="420"/>
61
+ </p>
62
+
63
+ ## Why autoSAXS
64
+
65
+ - **One skills API for everything** — the same processing steps run as `autosaxs <skill> …` or as Python functions with stable signatures, so scripts, GUIs, and agents share one surface.
66
+ - **Unique algorithms** — **automatic calibration** from calibrant frames and **automatic buffer scaling** for robust sample−buffer subtraction, reducing manual tuning at the beamline.
67
+ - **Flexible inputs** — path expressions (file, directory, or glob) instead of “one file only,” with consistent expansion rules.
68
+ - **Opt-in caching** — re-run interactive work without recomputing unchanged steps.
69
+ - **GUIs when you want them** — `guisaxs-skills` (form-driven skill runner) and `guisaxs-liveview` (watch-folder live processing with optional monodisperse / polydisperse analysis).
70
+ - **Built for automation** — designed for reproducible beamline-to-analysis workflows and LLM/agent-driven runs via the CLI.
71
+ - **Seamless AI integration** — ship a built-in **`saxs-processing`** Cursor/agent skill (`autosaxs get-skills`) so assistants can orchestrate the pipeline from documented procedures.
72
+
73
+ ## Use cases
74
+
75
+ - Synchrotron or lab SAXS: calibrate geometry, integrate TIFF stacks, average frames, and subtract buffer.
76
+ - Monodisperse analysis: Guinier → pair-distance distribution p(r) → optional ab initio shape recovery, 3d primitives modeling or electron density inference.
77
+ - Polydisperse analysis: Guinier → size distribution D(R) → optional McSAS or ATSAS MIXTURE.
78
+ - Live experiments: watch a folder for new detector images and process them as they arrive.
79
+ - Scripting and agents: drive the full pipeline from Python or `autosaxs` without reimplementing I/O conventions.
80
+
81
+ ## Install
82
+
83
+ Core + CLI:
84
+
85
+ ```bash
86
+ python -m pip install autosaxs
87
+ autosaxs --help
88
+ ```
89
+
90
+ With desktop GUIs (`guisaxs-skills`, `guisaxs-liveview`):
91
+
92
+ ```bash
93
+ python -m pip install "autosaxs[gui]"
94
+ ```
95
+
96
+ Optional LLM helper stack (`openai` / `httpx` / `requests`):
97
+
98
+ ```bash
99
+ python -m pip install "autosaxs[llm]"
100
+ ```
101
+
102
+ Helper commands (export docs and defaults into a directory):
103
+
104
+ - `autosaxs get-docs` — write the short `README.md` and detailed `autosaxs-docs/skills_reference.md`
105
+ - `autosaxs get-skills` — write Cursor-style `saxs-processing/` skill
106
+ - `autosaxs get-default-config` — copy bundled `config_base.conf`
107
+
108
+ From git `main` (development): `python -m pip install "autosaxs @ git+https://github.com/MikhailLifar/autoSAXS.git"` or `autosaxs -U`
109
+
110
+ ## Main features
111
+
112
+ Pipeline stages exposed as skills: **calibrate → integrate / average → subtract → analyze → model → report**, including Guinier, Kratky, `fit-distances` (p(r)), `fit-sizes` (D(R)), `model-dam`, `model-bodies`, `model-density` (DENSS), `model-dr-mc` (McSAS), `model-mixture`, and reporting helpers.
113
+
114
+ Apps:
115
+ **guisaxs-skills** (catalog + forms + isolated CLI runs, beta version)
116
+ **guisaxs-liveview** (queued live integration, buffer subtraction, optional analysis wizards).
117
+
118
+ Full per-skill documentation: [`autosaxs-docs/skills_reference.md`](autosaxs-docs/skills_reference.md).
119
+
120
+ ## Quick start
121
+
122
+ Monodisperse protein walkthrough using [`examples/monodisperse_protein/`](examples/monodisperse_protein/) (AgBh calibrant, mask, sample + buffer TIFFs). `--q-min` / `--q-max` are the buffer-matching window in nm⁻¹ — pick them from the sample+buffer overlay; `4.8`–`5.8` fits this example.
123
+
124
+ ### Python
125
+
126
+ ```python
127
+ from pathlib import Path
128
+ from autosaxs.skill import calibrate, integrate, subtract, process_monodisperse
129
+
130
+ ex = Path("examples/monodisperse_protein")
131
+
132
+ calibrate(
133
+ ex / "AgBh700_96.9_calib.tif",
134
+ output_dir=str(ex / "calibration"),
135
+ mask=ex / "mask-20260706_133745.txt",
136
+ wavelength=1.445,
137
+ )
138
+ integrate(
139
+ f"{ex / 'ihs27_buffer.tif'}, {ex / 'ihs27_sample.tif'}",
140
+ ex / "calibration" / "integrator",
141
+ output_dir=str(ex / "integrated"),
142
+ )
143
+ subtract(
144
+ ex / "integrated" / "int_ihs27_sample.dat",
145
+ ex / "integrated" / "int_ihs27_buffer.dat",
146
+ output_dir=str(ex / "subtracted"),
147
+ q_min=4.8,
148
+ q_max=5.8,
149
+ )
150
+ process_monodisperse(ex / "subtracted" / "sub_ihs27_sample.dat")
151
+ ```
152
+
153
+ ### CLI
154
+
155
+ ```bash
156
+ cd examples/monodisperse_protein
157
+
158
+ autosaxs calibrate AgBh700_96.9_calib.tif \
159
+ --mask mask-20260706_133745.txt --wavelength 1.445 -o calibration/
160
+
161
+ autosaxs integrate "ihs27_buffer.tif, ihs27_sample.tif" \
162
+ calibration/integrator/ -o integrated/
163
+
164
+ autosaxs subtract integrated/int_ihs27_sample.dat integrated/int_ihs27_buffer.dat \
165
+ --q-min 4.8 --q-max 5.8 -o subtracted/
166
+
167
+ autosaxs process-monodisperse subtracted/sub_ihs27_sample.dat
168
+ ```
169
+
170
+ ### Online GUI
171
+
172
+ ```bash
173
+ guisaxs-liveview
174
+ ```
175
+
176
+ ## Acknowledgements
177
+
178
+ autoSAXS builds on the SAXS ecosystem rather than replacing it:
179
+
180
+ - **[pyFAI](https://pyfai.readthedocs.io/)** — detector geometry, calibration, and 1D integration.
181
+ - **[ATSAS](https://www.embl-hamburg.de/biosaxs/download.html)** — tools such as `autorg`, `datgnom`, `gnom`, `dammif`, `mixture`, and `bodies` (external install; recommended **ATSAS 3.2.1**). Importing autoSAXS **warns** if ATSAS is missing; skills that shell out to ATSAS **raise** immediately when it is unavailable.
182
+ - **[DENSS](https://www.tdgrant.com/denss)** — electron-density reconstruction (`model_density`); pulled in via the `denss` PyPI dependency.
183
+ - **[McSAS](https://github.com/BAMresearch/McSAS) / McSAS3** — Monte Carlo polydisperse sizing (`model_dr_mc`).
184
+
185
+ ## Contacts
186
+
187
+ - **Mikhail S. Lifar** — `mikhailkulkov11@gmail.com`
188
+ - Affiliation: The Smart Materials Research Institute, Southern Federal University (Rostov-on-Don)
189
+ - Project: [github.com/MikhailLifar/autoSAXS](https://github.com/MikhailLifar/autoSAXS)
190
+
191
+ ## Contributing
192
+
193
+ Issues and pull requests are welcome on GitHub. Bug reports, clearer docs, and new skill coverage all help. Licensed under the **Apache License 2.0**.
@@ -0,0 +1,139 @@
1
+ # autoSAXS
2
+
3
+ **autoSAXS** is a Python toolkit for reproducible small-angle X-ray scattering (SAXS) pipelines — from detector images to subtracted curves, size distributions, and shape models — usable from a **CLI**, from **Python**, from desktop GUIs or through your favourite AI agent.
4
+
5
+ <p align="center">
6
+ <img src="https://raw.githubusercontent.com/MikhailLifar/autoSAXS/main/readme-assets/hero_model_dam_frequency.gif" alt="model_dam frequency / occupancy map" width="420"/>
7
+ </p>
8
+
9
+ ## Why autoSAXS
10
+
11
+ - **One skills API for everything** — the same processing steps run as `autosaxs <skill> …` or as Python functions with stable signatures, so scripts, GUIs, and agents share one surface.
12
+ - **Unique algorithms** — **automatic calibration** from calibrant frames and **automatic buffer scaling** for robust sample−buffer subtraction, reducing manual tuning at the beamline.
13
+ - **Flexible inputs** — path expressions (file, directory, or glob) instead of “one file only,” with consistent expansion rules.
14
+ - **Opt-in caching** — re-run interactive work without recomputing unchanged steps.
15
+ - **GUIs when you want them** — `guisaxs-skills` (form-driven skill runner) and `guisaxs-liveview` (watch-folder live processing with optional monodisperse / polydisperse analysis).
16
+ - **Built for automation** — designed for reproducible beamline-to-analysis workflows and LLM/agent-driven runs via the CLI.
17
+ - **Seamless AI integration** — ship a built-in **`saxs-processing`** Cursor/agent skill (`autosaxs get-skills`) so assistants can orchestrate the pipeline from documented procedures.
18
+
19
+ ## Use cases
20
+
21
+ - Synchrotron or lab SAXS: calibrate geometry, integrate TIFF stacks, average frames, and subtract buffer.
22
+ - Monodisperse analysis: Guinier → pair-distance distribution p(r) → optional ab initio shape recovery, 3d primitives modeling or electron density inference.
23
+ - Polydisperse analysis: Guinier → size distribution D(R) → optional McSAS or ATSAS MIXTURE.
24
+ - Live experiments: watch a folder for new detector images and process them as they arrive.
25
+ - Scripting and agents: drive the full pipeline from Python or `autosaxs` without reimplementing I/O conventions.
26
+
27
+ ## Install
28
+
29
+ Core + CLI:
30
+
31
+ ```bash
32
+ python -m pip install autosaxs
33
+ autosaxs --help
34
+ ```
35
+
36
+ With desktop GUIs (`guisaxs-skills`, `guisaxs-liveview`):
37
+
38
+ ```bash
39
+ python -m pip install "autosaxs[gui]"
40
+ ```
41
+
42
+ Optional LLM helper stack (`openai` / `httpx` / `requests`):
43
+
44
+ ```bash
45
+ python -m pip install "autosaxs[llm]"
46
+ ```
47
+
48
+ Helper commands (export docs and defaults into a directory):
49
+
50
+ - `autosaxs get-docs` — write the short `README.md` and detailed `autosaxs-docs/skills_reference.md`
51
+ - `autosaxs get-skills` — write Cursor-style `saxs-processing/` skill
52
+ - `autosaxs get-default-config` — copy bundled `config_base.conf`
53
+
54
+ From git `main` (development): `python -m pip install "autosaxs @ git+https://github.com/MikhailLifar/autoSAXS.git"` or `autosaxs -U`
55
+
56
+ ## Main features
57
+
58
+ Pipeline stages exposed as skills: **calibrate → integrate / average → subtract → analyze → model → report**, including Guinier, Kratky, `fit-distances` (p(r)), `fit-sizes` (D(R)), `model-dam`, `model-bodies`, `model-density` (DENSS), `model-dr-mc` (McSAS), `model-mixture`, and reporting helpers.
59
+
60
+ Apps:
61
+ **guisaxs-skills** (catalog + forms + isolated CLI runs, beta version)
62
+ **guisaxs-liveview** (queued live integration, buffer subtraction, optional analysis wizards).
63
+
64
+ Full per-skill documentation: [`autosaxs-docs/skills_reference.md`](autosaxs-docs/skills_reference.md).
65
+
66
+ ## Quick start
67
+
68
+ Monodisperse protein walkthrough using [`examples/monodisperse_protein/`](examples/monodisperse_protein/) (AgBh calibrant, mask, sample + buffer TIFFs). `--q-min` / `--q-max` are the buffer-matching window in nm⁻¹ — pick them from the sample+buffer overlay; `4.8`–`5.8` fits this example.
69
+
70
+ ### Python
71
+
72
+ ```python
73
+ from pathlib import Path
74
+ from autosaxs.skill import calibrate, integrate, subtract, process_monodisperse
75
+
76
+ ex = Path("examples/monodisperse_protein")
77
+
78
+ calibrate(
79
+ ex / "AgBh700_96.9_calib.tif",
80
+ output_dir=str(ex / "calibration"),
81
+ mask=ex / "mask-20260706_133745.txt",
82
+ wavelength=1.445,
83
+ )
84
+ integrate(
85
+ f"{ex / 'ihs27_buffer.tif'}, {ex / 'ihs27_sample.tif'}",
86
+ ex / "calibration" / "integrator",
87
+ output_dir=str(ex / "integrated"),
88
+ )
89
+ subtract(
90
+ ex / "integrated" / "int_ihs27_sample.dat",
91
+ ex / "integrated" / "int_ihs27_buffer.dat",
92
+ output_dir=str(ex / "subtracted"),
93
+ q_min=4.8,
94
+ q_max=5.8,
95
+ )
96
+ process_monodisperse(ex / "subtracted" / "sub_ihs27_sample.dat")
97
+ ```
98
+
99
+ ### CLI
100
+
101
+ ```bash
102
+ cd examples/monodisperse_protein
103
+
104
+ autosaxs calibrate AgBh700_96.9_calib.tif \
105
+ --mask mask-20260706_133745.txt --wavelength 1.445 -o calibration/
106
+
107
+ autosaxs integrate "ihs27_buffer.tif, ihs27_sample.tif" \
108
+ calibration/integrator/ -o integrated/
109
+
110
+ autosaxs subtract integrated/int_ihs27_sample.dat integrated/int_ihs27_buffer.dat \
111
+ --q-min 4.8 --q-max 5.8 -o subtracted/
112
+
113
+ autosaxs process-monodisperse subtracted/sub_ihs27_sample.dat
114
+ ```
115
+
116
+ ### Online GUI
117
+
118
+ ```bash
119
+ guisaxs-liveview
120
+ ```
121
+
122
+ ## Acknowledgements
123
+
124
+ autoSAXS builds on the SAXS ecosystem rather than replacing it:
125
+
126
+ - **[pyFAI](https://pyfai.readthedocs.io/)** — detector geometry, calibration, and 1D integration.
127
+ - **[ATSAS](https://www.embl-hamburg.de/biosaxs/download.html)** — tools such as `autorg`, `datgnom`, `gnom`, `dammif`, `mixture`, and `bodies` (external install; recommended **ATSAS 3.2.1**). Importing autoSAXS **warns** if ATSAS is missing; skills that shell out to ATSAS **raise** immediately when it is unavailable.
128
+ - **[DENSS](https://www.tdgrant.com/denss)** — electron-density reconstruction (`model_density`); pulled in via the `denss` PyPI dependency.
129
+ - **[McSAS](https://github.com/BAMresearch/McSAS) / McSAS3** — Monte Carlo polydisperse sizing (`model_dr_mc`).
130
+
131
+ ## Contacts
132
+
133
+ - **Mikhail S. Lifar** — `mikhailkulkov11@gmail.com`
134
+ - Affiliation: The Smart Materials Research Institute, Southern Federal University (Rostov-on-Don)
135
+ - Project: [github.com/MikhailLifar/autoSAXS](https://github.com/MikhailLifar/autoSAXS)
136
+
137
+ ## Contributing
138
+
139
+ Issues and pull requests are welcome on GitHub. Bug reports, clearer docs, and new skill coverage all help. Licensed under the **Apache License 2.0**.
@@ -0,0 +1,77 @@
1
+ [build-system]
2
+ requires = ["setuptools>=77", "wheel"]
3
+ build-backend = "setuptools.build_meta"
4
+
5
+ [project]
6
+ name = "autosaxs"
7
+ version = "3.0.0"
8
+ description = "Interactive SAXS pipeline core: calibration, integration, subtraction, ATSAS descriptors, plots, shape fitting, reports. After install, run `autosaxs --help`: epilog lists get-docs, get-skills, get-default-config (export docs and default config into your workspace)."
9
+ readme = "README.md"
10
+ requires-python = ">=3.10"
11
+ license = "Apache-2.0"
12
+ license-files = ["LICENSE"]
13
+ authors = [
14
+ { name = "Mikhail S. Lifar", email = "mikhailkulkov11@gmail.com" },
15
+ ]
16
+ keywords = ["saxs", "small-angle scattering", "pyFAI", "ATSAS", "calibration", "integration"]
17
+ classifiers = [
18
+ "Development Status :: 3 - Alpha",
19
+ "Intended Audience :: Science/Research",
20
+ "Operating System :: OS Independent",
21
+ "Programming Language :: Python :: 3",
22
+ "Programming Language :: Python :: 3.10",
23
+ "Programming Language :: Python :: 3.11",
24
+ "Programming Language :: Python :: 3.12",
25
+ "Programming Language :: Python :: 3.13",
26
+ "Topic :: Scientific/Engineering :: Physics",
27
+ ]
28
+ dependencies = [
29
+ "ase",
30
+ "denss>=1.8.0",
31
+ "fabio",
32
+ "matplotlib",
33
+ "mcsas3>=1.0.6",
34
+ "numpy>=2.0,<2.4",
35
+ "pandas",
36
+ "pyFAI",
37
+ "PyYAML",
38
+ "reportlab",
39
+ "sasmodels",
40
+ "scikit-image",
41
+ "scikit-learn",
42
+ "scipy",
43
+ "seaborn",
44
+ "squarify",
45
+ ]
46
+
47
+ [project.urls]
48
+ Homepage = "https://github.com/MikhailLifar/autoSAXS"
49
+ Repository = "https://github.com/MikhailLifar/autoSAXS"
50
+ Issues = "https://github.com/MikhailLifar/autoSAXS/issues"
51
+ Documentation = "https://github.com/MikhailLifar/autoSAXS#readme"
52
+
53
+ [project.scripts]
54
+ autosaxs = "autosaxs.cli:main"
55
+ guisaxs-skills = "guisaxs_skills.__main__:main"
56
+ guisaxs-liveview = "guisaxs_liveview.__main__:main"
57
+
58
+ [project.optional-dependencies]
59
+ dev = ["build", "import-linter", "pip", "twine"]
60
+ gui = ["customtkinter", "PyQt5", "watchdog"]
61
+ llm = ["httpx", "openai", "requests"]
62
+
63
+ [tool.setuptools.packages.find]
64
+ where = ["src"]
65
+ include = ["autosaxs*", "guisaxs_skills*", "guisaxs_liveview*"]
66
+
67
+ [tool.setuptools.package-data]
68
+ autosaxs = [
69
+ "resources/agent_quickstart.txt",
70
+ "resources/ai_skills/*.md",
71
+ "resources/config_base.conf",
72
+ "resources/help/guisaxs_liveview/**/*",
73
+ "resources/prompts/**/*.txt",
74
+ "resources/readme/*.md",
75
+ "resources/readme/images/**/*",
76
+ "resources/schemas/*.json",
77
+ ]
@@ -0,0 +1,4 @@
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+
@@ -0,0 +1,45 @@
1
+ # autosaxs: interactive SAXS pipeline core (controller, processor, skill, utils, guinier, event_bus, cli, viewer, context, gui, gui_interface, api, polydispfit, report)
2
+ from __future__ import annotations
3
+
4
+ import logging
5
+ from importlib.metadata import PackageNotFoundError, version as _pkg_version
6
+
7
+ try:
8
+ __version__ = _pkg_version("autosaxs")
9
+ except PackageNotFoundError:
10
+ # Editable/source tree without an installed distribution metadata entry.
11
+ __version__ = "0.0.0+local"
12
+
13
+ # pyFAI logs API deprecations (set_wavelength, AzimuthalIntegrator, …) via this
14
+ # logger with full stack traces; keep calling the same APIs but don't spam users.
15
+ logging.getLogger("pyFAI.DEPRECATION").setLevel(logging.ERROR)
16
+
17
+ from .skill.skill_wrap import warn_atsas_on_import
18
+
19
+ warn_atsas_on_import()
20
+
21
+ from .core.event_bus import EventBus, EventType
22
+ from .core.context import Context
23
+ from .pipeline import cli_interface
24
+ from .core import integrator
25
+ from .core import processor
26
+ from .core import utils
27
+ from .core import viewer
28
+ from .pipeline import api
29
+ from . import skill
30
+ from .pipeline.saxs_controller import Controller
31
+
32
+ __all__ = [
33
+ "EventBus",
34
+ "EventType",
35
+ "Context",
36
+ "Controller",
37
+ "cli_interface",
38
+ "integrator",
39
+ "processor",
40
+ "utils",
41
+ "viewer",
42
+ "api",
43
+ "skill",
44
+ "__version__",
45
+ ]
@@ -0,0 +1,6 @@
1
+ """CLI surface: argument parsing and path-expression helpers."""
2
+
3
+ from .cli import main
4
+
5
+ __all__ = ["main"]
6
+