easydiffraction 0.5.8.post1__tar.gz → 0.6.1__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 (214) hide show
  1. easydiffraction-0.6.1/.prettierignore +1 -0
  2. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.1}/PKG-INFO +2 -2
  3. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.1}/docs/mkdocs.yml +5 -1
  4. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.1}/pyproject.toml +7 -7
  5. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.1}/src/easydiffraction/plotting/plotters/plotter_plotly.py +7 -8
  6. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.1}/tutorials/dmsc-summer-school-2025_analysis-powder-diffraction.py +174 -72
  7. easydiffraction-0.5.8.post1/.prettierignore +0 -0
  8. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.1}/.github/release-drafter.yml +0 -0
  9. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.1}/.github/workflows/build-docs.yml +0 -0
  10. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.1}/.github/workflows/delete-old-runs.yml +0 -0
  11. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.1}/.github/workflows/draft-release-notes.yml +0 -0
  12. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.1}/.github/workflows/publish-pypi.yml +0 -0
  13. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.1}/.github/workflows/scan-security.yml +0 -0
  14. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.1}/.github/workflows/test-code.yaml +0 -0
  15. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.1}/.github/workflows/test-tutorials-colab.yaml +0 -0
  16. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.1}/.github/workflows/test-tutorials.yaml +0 -0
  17. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.1}/.github/workflows/verify-pr-labels.yml +0 -0
  18. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.1}/.gitignore +0 -0
  19. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.1}/CONTRIBUTING.md +0 -0
  20. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.1}/DEVELOPMENT.md +0 -0
  21. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.1}/LICENSE +0 -0
  22. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.1}/README.md +0 -0
  23. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.1}/deps/pycrysfml-0.1.6-py312-none-macosx_14_0_arm64.whl +0 -0
  24. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.1}/deps/pycrysfml-0.1.6-py312-none-win_amd64.whl +0 -0
  25. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.1}/docs/api-reference/analysis.md +0 -0
  26. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.1}/docs/api-reference/core.md +0 -0
  27. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.1}/docs/api-reference/crystallography.md +0 -0
  28. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.1}/docs/api-reference/experiments.md +0 -0
  29. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.1}/docs/api-reference/index.md +0 -0
  30. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.1}/docs/api-reference/plotting.md +0 -0
  31. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.1}/docs/api-reference/project.md +0 -0
  32. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.1}/docs/api-reference/sample_models.md +0 -0
  33. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.1}/docs/api-reference/summary.md +0 -0
  34. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.1}/docs/api-reference/utils.md +0 -0
  35. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.1}/docs/assets/images/user-guide/data-acquisition_2d-raw-data.jpg +0 -0
  36. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.1}/docs/assets/images/user-guide/data-acquisition_instrument.png +0 -0
  37. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.1}/docs/assets/images/user-guide/data-analysis_model.png +0 -0
  38. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.1}/docs/assets/images/user-guide/data-analysis_refinement.png +0 -0
  39. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.1}/docs/assets/images/user-guide/data-reduction_1d-pattern.png +0 -0
  40. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.1}/docs/index.md +0 -0
  41. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.1}/docs/installation-and-setup/index.md +0 -0
  42. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.1}/docs/introduction/index.md +0 -0
  43. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.1}/docs/tutorials/index.md +0 -0
  44. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.1}/docs/user-guide/analysis-workflow/analysis.md +0 -0
  45. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.1}/docs/user-guide/analysis-workflow/experiment.md +0 -0
  46. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.1}/docs/user-guide/analysis-workflow/index.md +0 -0
  47. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.1}/docs/user-guide/analysis-workflow/model.md +0 -0
  48. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.1}/docs/user-guide/analysis-workflow/project.md +0 -0
  49. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.1}/docs/user-guide/analysis-workflow/summary.md +0 -0
  50. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.1}/docs/user-guide/concept.md +0 -0
  51. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.1}/docs/user-guide/data-format.md +0 -0
  52. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.1}/docs/user-guide/first-steps.md +0 -0
  53. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.1}/docs/user-guide/glossary.md +0 -0
  54. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.1}/docs/user-guide/index.md +0 -0
  55. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.1}/docs/user-guide/parameters/_diffrn_radiation.md +0 -0
  56. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.1}/docs/user-guide/parameters/_diffrn_radiation_wavelength.md +0 -0
  57. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.1}/docs/user-guide/parameters/_exptl_crystal.md +0 -0
  58. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.1}/docs/user-guide/parameters/_extinction.md +0 -0
  59. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.1}/docs/user-guide/parameters/_pd_calib.md +0 -0
  60. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.1}/docs/user-guide/parameters/atom_site.md +0 -0
  61. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.1}/docs/user-guide/parameters/background.md +0 -0
  62. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.1}/docs/user-guide/parameters/cell.md +0 -0
  63. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.1}/docs/user-guide/parameters/expt_type.md +0 -0
  64. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.1}/docs/user-guide/parameters/instrument.md +0 -0
  65. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.1}/docs/user-guide/parameters/linked_phases.md +0 -0
  66. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.1}/docs/user-guide/parameters/pd_meas.md +0 -0
  67. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.1}/docs/user-guide/parameters/peak.md +0 -0
  68. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.1}/docs/user-guide/parameters/space_group.md +0 -0
  69. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.1}/docs/user-guide/parameters.md +0 -0
  70. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.1}/prettierrc.toml +0 -0
  71. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.1}/src/easydiffraction/__init__.py +0 -0
  72. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.1}/src/easydiffraction/analysis/__init__.py +0 -0
  73. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.1}/src/easydiffraction/analysis/analysis.py +0 -0
  74. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.1}/src/easydiffraction/analysis/calculation.py +0 -0
  75. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.1}/src/easydiffraction/analysis/calculators/__init__.py +0 -0
  76. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.1}/src/easydiffraction/analysis/calculators/calculator_base.py +0 -0
  77. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.1}/src/easydiffraction/analysis/calculators/calculator_crysfml.py +0 -0
  78. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.1}/src/easydiffraction/analysis/calculators/calculator_cryspy.py +0 -0
  79. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.1}/src/easydiffraction/analysis/calculators/calculator_factory.py +0 -0
  80. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.1}/src/easydiffraction/analysis/calculators/calculator_pdffit.py +0 -0
  81. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.1}/src/easydiffraction/analysis/collections/__init__.py +0 -0
  82. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.1}/src/easydiffraction/analysis/collections/aliases.py +0 -0
  83. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.1}/src/easydiffraction/analysis/collections/constraints.py +0 -0
  84. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.1}/src/easydiffraction/analysis/collections/joint_fit_experiments.py +0 -0
  85. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.1}/src/easydiffraction/analysis/minimization.py +0 -0
  86. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.1}/src/easydiffraction/analysis/minimizers/__init__.py +0 -0
  87. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.1}/src/easydiffraction/analysis/minimizers/fitting_progress_tracker.py +0 -0
  88. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.1}/src/easydiffraction/analysis/minimizers/minimizer_base.py +0 -0
  89. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.1}/src/easydiffraction/analysis/minimizers/minimizer_dfols.py +0 -0
  90. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.1}/src/easydiffraction/analysis/minimizers/minimizer_factory.py +0 -0
  91. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.1}/src/easydiffraction/analysis/minimizers/minimizer_lmfit.py +0 -0
  92. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.1}/src/easydiffraction/analysis/reliability_factors.py +0 -0
  93. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.1}/src/easydiffraction/core/__init__.py +0 -0
  94. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.1}/src/easydiffraction/core/constants.py +0 -0
  95. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.1}/src/easydiffraction/core/objects.py +0 -0
  96. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.1}/src/easydiffraction/core/singletons.py +0 -0
  97. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.1}/src/easydiffraction/crystallography/__init__.py +0 -0
  98. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.1}/src/easydiffraction/crystallography/crystallography.py +0 -0
  99. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.1}/src/easydiffraction/crystallography/space_group_lookup_table.py +0 -0
  100. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.1}/src/easydiffraction/experiments/__init__.py +0 -0
  101. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.1}/src/easydiffraction/experiments/collections/__init__.py +0 -0
  102. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.1}/src/easydiffraction/experiments/collections/background.py +0 -0
  103. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.1}/src/easydiffraction/experiments/collections/datastore.py +0 -0
  104. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.1}/src/easydiffraction/experiments/collections/excluded_regions.py +0 -0
  105. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.1}/src/easydiffraction/experiments/collections/linked_phases.py +0 -0
  106. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.1}/src/easydiffraction/experiments/components/__init__.py +0 -0
  107. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.1}/src/easydiffraction/experiments/components/experiment_type.py +0 -0
  108. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.1}/src/easydiffraction/experiments/components/instrument.py +0 -0
  109. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.1}/src/easydiffraction/experiments/components/peak.py +0 -0
  110. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.1}/src/easydiffraction/experiments/experiment.py +0 -0
  111. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.1}/src/easydiffraction/experiments/experiments.py +0 -0
  112. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.1}/src/easydiffraction/plotting/__init__.py +0 -0
  113. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.1}/src/easydiffraction/plotting/plotters/__init__.py +0 -0
  114. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.1}/src/easydiffraction/plotting/plotters/plotter_ascii.py +0 -0
  115. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.1}/src/easydiffraction/plotting/plotters/plotter_base.py +0 -0
  116. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.1}/src/easydiffraction/plotting/plotting.py +0 -0
  117. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.1}/src/easydiffraction/project.py +0 -0
  118. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.1}/src/easydiffraction/sample_models/__init__.py +0 -0
  119. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.1}/src/easydiffraction/sample_models/collections/__init__.py +0 -0
  120. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.1}/src/easydiffraction/sample_models/collections/atom_sites.py +0 -0
  121. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.1}/src/easydiffraction/sample_models/components/__init__.py +0 -0
  122. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.1}/src/easydiffraction/sample_models/components/cell.py +0 -0
  123. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.1}/src/easydiffraction/sample_models/components/space_group.py +0 -0
  124. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.1}/src/easydiffraction/sample_models/sample_model.py +0 -0
  125. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.1}/src/easydiffraction/sample_models/sample_models.py +0 -0
  126. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.1}/src/easydiffraction/summary.py +0 -0
  127. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.1}/src/easydiffraction/utils/__init__.py +0 -0
  128. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.1}/src/easydiffraction/utils/decorators.py +0 -0
  129. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.1}/src/easydiffraction/utils/formatting.py +0 -0
  130. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.1}/src/easydiffraction/utils/utils.py +0 -0
  131. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.1}/tests/functional_tests/fitting/test_pair-distribution-function.py +0 -0
  132. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.1}/tests/functional_tests/fitting/test_powder-diffraction_constant-wavelength.py +0 -0
  133. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.1}/tests/functional_tests/fitting/test_powder-diffraction_joint-fit.py +0 -0
  134. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.1}/tests/functional_tests/fitting/test_powder-diffraction_multiphase.py +0 -0
  135. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.1}/tests/functional_tests/fitting/test_powder-diffraction_time-of-flight.py +0 -0
  136. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.1}/tests/unit_tests/analysis/calculators/test_calculator_base.py +0 -0
  137. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.1}/tests/unit_tests/analysis/calculators/test_calculator_cryspy.py +0 -0
  138. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.1}/tests/unit_tests/analysis/calculators/test_calculator_factory.py +0 -0
  139. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.1}/tests/unit_tests/analysis/collections/test_joint_fit_experiment.py +0 -0
  140. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.1}/tests/unit_tests/analysis/minimizers/test_fitting_progress_tracker.py +0 -0
  141. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.1}/tests/unit_tests/analysis/minimizers/test_minimizer_base.py +0 -0
  142. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.1}/tests/unit_tests/analysis/minimizers/test_minimizer_dfols.py +0 -0
  143. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.1}/tests/unit_tests/analysis/minimizers/test_minimizer_factory.py +0 -0
  144. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.1}/tests/unit_tests/analysis/minimizers/test_minimizer_lmfit.py +0 -0
  145. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.1}/tests/unit_tests/analysis/test_analysis.py +0 -0
  146. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.1}/tests/unit_tests/analysis/test_minimization.py +0 -0
  147. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.1}/tests/unit_tests/analysis/test_reliability_factors.py +0 -0
  148. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.1}/tests/unit_tests/core/test_objects.py +0 -0
  149. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.1}/tests/unit_tests/core/test_singletons.py +0 -0
  150. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.1}/tests/unit_tests/experiments/collections/test_background.py +0 -0
  151. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.1}/tests/unit_tests/experiments/collections/test_datastore.py +0 -0
  152. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.1}/tests/unit_tests/experiments/collections/test_linked_phases.py +0 -0
  153. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.1}/tests/unit_tests/experiments/components/test_experiment_type.py +0 -0
  154. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.1}/tests/unit_tests/experiments/components/test_instrument.py +0 -0
  155. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.1}/tests/unit_tests/experiments/components/test_peak.py +0 -0
  156. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.1}/tests/unit_tests/experiments/test_experiment.py +0 -0
  157. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.1}/tests/unit_tests/experiments/test_experiments.py +0 -0
  158. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.1}/tests/unit_tests/sample_models/collections/test_atom_sites.py +0 -0
  159. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.1}/tests/unit_tests/sample_models/components/test_cell.py +0 -0
  160. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.1}/tests/unit_tests/sample_models/components/test_space_group.py +0 -0
  161. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.1}/tests/unit_tests/sample_models/test_sample_models.py +0 -0
  162. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.1}/tests/unit_tests/test_project.py +0 -0
  163. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.1}/tests/unit_tests/test_symmetry_lookup_table.py +0 -0
  164. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.1}/tools/build_docs.sh +0 -0
  165. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.1}/tools/cleanup_docs.sh +0 -0
  166. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.1}/tools/create_mkdocs-yml.py +0 -0
  167. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.1}/tools/install_deps.sh +0 -0
  168. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.1}/tools/prepare_docs.sh +0 -0
  169. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.1}/tools/prepare_notebooks.py +0 -0
  170. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.1}/tools/run_notebooks.sh +0 -0
  171. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.1}/tools/update_spdx-headers.py +0 -0
  172. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.1}/tutorials/advanced_joint-fit_pd-neut-xray-cwl_PbSO4.py +0 -0
  173. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.1}/tutorials/basic_single-fit_pd-neut-cwl_LBCO-HRPT.py +0 -0
  174. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.1}/tutorials/cryst-struct_pd-neut-cwl_CoSiO4-D20.py +0 -0
  175. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.1}/tutorials/cryst-struct_pd-neut-cwl_HS-HRPT.py +0 -0
  176. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.1}/tutorials/cryst-struct_pd-neut-tof_Si-SEPD.py +0 -0
  177. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.1}/tutorials/cryst-struct_pd-neut-tof_multidata_NCAF-WISH.py +0 -0
  178. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.1}/tutorials/cryst-struct_pd-neut-tof_multiphase-LBCO-Si_McStas.py +0 -0
  179. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.1}/tutorials/data/NOM_9999_Si_640g_PAC_50_ff_ftfrgr_up-to-50.gr +0 -0
  180. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.1}/tutorials/data/NaCl.gr +0 -0
  181. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.1}/tutorials/data/co2sio4_d20.xye +0 -0
  182. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.1}/tutorials/data/d1a_pbso4.dat +0 -0
  183. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.1}/tutorials/data/d1a_pbso4_first-half.dat +0 -0
  184. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.1}/tutorials/data/d1a_pbso4_second-half.dat +0 -0
  185. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.1}/tutorials/data/hrpt_hs.xye +0 -0
  186. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.1}/tutorials/data/hrpt_lbco.xye +0 -0
  187. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.1}/tutorials/data/lab_pbso4.dat +0 -0
  188. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.1}/tutorials/data/mcstas_lbco-si.xye +0 -0
  189. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.1}/tutorials/data/mcstas_lbco-si.xys +0 -0
  190. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.1}/tutorials/data/mcstas_lbco-si_up-to-108k.xys +0 -0
  191. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.1}/tutorials/data/ni-q27r100-neutron_from-2.gr +0 -0
  192. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.1}/tutorials/data/powder_reduced_Si_2large_bank.xye +0 -0
  193. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.1}/tutorials/data/reduced_LBCO.xye +0 -0
  194. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.1}/tutorials/data/reduced_Si.xye +0 -0
  195. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.1}/tutorials/data/sepd_si.xye +0 -0
  196. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.1}/tutorials/data/wish_ncaf.xye +0 -0
  197. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.1}/tutorials/data/wish_ncaf_2_9.xye +0 -0
  198. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.1}/tutorials/data/wish_ncaf_4_7.xye +0 -0
  199. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.1}/tutorials/data/wish_ncaf_4_7.xys +0 -0
  200. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.1}/tutorials/data/wish_ncaf_5_6.xye +0 -0
  201. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.1}/tutorials/data/wish_ncaf_5_6.xys +0 -0
  202. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.1}/tutorials/data/wish_ybcfo_5_6.xye +0 -0
  203. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.1}/tutorials/pdf_pd-neut-cwl_Ni.py +0 -0
  204. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.1}/tutorials/pdf_pd-neut-tof_Si-NOMAD.py +0 -0
  205. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.1}/tutorials/pdf_pd-xray_NaCl.py +0 -0
  206. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.1}/tutorials/quick_single-fit_pd-neut-cwl_LBCO-HRPT.py +0 -0
  207. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.1}/tutorials-drafts/cryst-struct_pd-neut-tof_multiphase-BSFTO-HRPT.py +0 -0
  208. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.1}/tutorials-drafts/data/DREAM_mantle_bc240_nist_cif.xye +0 -0
  209. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.1}/tutorials-drafts/data/DREAM_mantle_bc240_nist_cif_2.xye +0 -0
  210. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.1}/tutorials-drafts/data/DREAM_mantle_bc240_nist_nc.xye +0 -0
  211. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.1}/tutorials-drafts/data/DREAM_mantle_bc240_nist_nc_2.xye +0 -0
  212. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.1}/tutorials-drafts/data/Si_mp-149_symmetrized_mcstas.cif +0 -0
  213. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.1}/tutorials-drafts/hrpt_n_Bi0p88Sm0p12Fe0p94Ti0p06O3_DW_V_9x8x52_1p49_HI.xye +0 -0
  214. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.1}/tutorials-drafts/test_single-fit_pd-neut-tof_Si-DREAM_nc.py +0 -0
@@ -0,0 +1 @@
1
+ .pixi
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: easydiffraction
3
- Version: 0.5.8.post1
3
+ Version: 0.6.1
4
4
  Summary: Diffraction data analysis
5
5
  Project-URL: homepage, https://easydiffraction.org
6
6
  Project-URL: documentation, https://docs.easydiffraction.org/lib
@@ -86,7 +86,7 @@ Requires-Dist: pyyaml; extra == 'docs'
86
86
  Provides-Extra: visualization
87
87
  Requires-Dist: darkdetect; extra == 'visualization'
88
88
  Requires-Dist: pandas; extra == 'visualization'
89
- Requires-Dist: plotly<6.1.0; extra == 'visualization'
89
+ Requires-Dist: plotly; extra == 'visualization'
90
90
  Requires-Dist: py3dmol; extra == 'visualization'
91
91
  Description-Content-Type: text/markdown
92
92
 
@@ -30,7 +30,11 @@ extra:
30
30
  #plugins:
31
31
  # - mkdocs-jupyter:
32
32
  # execute_ignore:
33
- # - '*emcee*.ipynb' # Ignore notebooks with 'emcee' in the name from execution
33
+ # - 'quick*.ipynb'
34
+ # - 'basic*.ipynb'
35
+ # - 'advanced*.ipynb'
36
+ # - 'cryst*.ipynb'
37
+ # - 'pdf*.ipynb'
34
38
 
35
39
  ##################
36
40
  # Add new settings
@@ -65,10 +65,10 @@ docs = [
65
65
  'pyyaml', # YAML parser
66
66
  ]
67
67
  visualization = [
68
- 'darkdetect', # Detecting dark mode
69
- 'pandas', # Displaying tables in juptyer notebooks
70
- 'plotly<6.1.0', # Interactive plots. 0.6.0 => Empty charts in Jupyter notebooks ...
71
- 'py3Dmol', # Visualisation of crystal structures
68
+ 'darkdetect', # Detecting dark mode
69
+ 'pandas', # Displaying tables in juptyer notebooks
70
+ 'plotly', # Interactive plots
71
+ 'py3Dmol', # Visualisation of crystal structures
72
72
  ]
73
73
 
74
74
  [project.urls]
@@ -113,9 +113,9 @@ source = 'versioningit' # Use versioningit to manage the version
113
113
  # source code.
114
114
 
115
115
  [tool.versioningit.format]
116
- distance = '{base_version}.post{distance}' # example: 1.2.3.post42
117
- dirty = '{base_version}' # example: 1.2.3
118
- distance-dirty = '{base_version}.post{distance}' # example: 1.2.3.post42
116
+ distance = '{base_version}+d{distance}' # example: 0.5.8+d3, 1.2.3.post4+d2
117
+ dirty = '{base_version}' # example: 0.5.8, 1.2.3.post4
118
+ distance-dirty = '{base_version}+d{distance}' # see 1st example
119
119
 
120
120
  # Configure how versioningit detects versions from Git
121
121
  # - 'match' ensures it only considers tags starting with 'v'
@@ -12,7 +12,7 @@ except ImportError:
12
12
  display = None
13
13
  HTML = None
14
14
 
15
- from easydiffraction.utils.utils import is_github_ci
15
+ from easydiffraction.utils.utils import is_pycharm
16
16
 
17
17
  from .plotter_base import SERIES_CONFIG
18
18
  from .plotter_base import PlotterBase
@@ -104,15 +104,14 @@ class PlotlyPlotter(PlotterBase):
104
104
  layout=layout,
105
105
  )
106
106
 
107
+ # Format the axes ticks
108
+ # Keeps decimals for small numbers; groups thousands for large ones
109
+ fig.update_xaxes(tickformat=',.6~g', separatethousands=True)
110
+ fig.update_yaxes(tickformat=',.6~g', separatethousands=True)
111
+
107
112
  # Show the figure
108
113
 
109
- # In GitHub CI builds (e.g., during Jupyter Book generation), avoid
110
- #
111
- # calling `fig.show()`
112
- # because it can emit `application/vnd.plotly.v1+json` outputs that some toolchains warn about.
113
- # Instead, convert the figure to HTML and display it directly.
114
- # Use a regular Figure and show it
115
- if not is_github_ci() or display is None or HTML is None:
114
+ if is_pycharm() or display is None or HTML is None:
116
115
  fig.show(config=config)
117
116
  else:
118
117
  html_fig = pio.to_html(
@@ -1,7 +1,7 @@
1
1
  # %% [markdown]
2
2
  # # Fitting Powder Diffraction data
3
3
  #
4
- # This tutorial guides you through the Rietveld refinement of crystal
4
+ # This notebook guides you through the Rietveld refinement of crystal
5
5
  # structures using simulated powder diffraction data. It consists of two parts:
6
6
  # - Introduction: A simple reference fit using silicon (Si) crystal structure.
7
7
  # - Exercise: A more complex fit using La₀.₅Ba₀.₅CoO₃ (LBCO) crystal structure.
@@ -9,16 +9,17 @@
9
9
  # ## 🛠️ Import Library
10
10
  #
11
11
  # We start by importing the necessary library for the analysis. In this
12
- # tutorial, we use the EasyDiffraction library, which offers tools for
13
- # analyzing and refining powder diffraction data.
12
+ # notebook, we use the EasyDiffraction library. As mentioned in the
13
+ # introduction to EasyScience, EasyDiffraction is built on that framework and
14
+ # offers a high-level interface focused specifically for diffraction analysis.
14
15
  #
15
- # This tutorial is self-contained and designed for hands-on learning.
16
+ # This notebook is self-contained and designed for hands-on learning.
16
17
  # However, if you're interested in exploring more advanced features or learning
17
18
  # about additional capabilities of the EasyDiffraction library, please refer to
18
19
  # the official documentation: https://docs.easydiffraction.org/lib
19
20
  #
20
21
  # Depending on your requirements, you may choose to import only specific
21
- # classes. However, for the sake of simplicity in this tutorial, we will import
22
+ # classes. However, for the sake of simplicity in this notebook, we will import
22
23
  # the entire library.
23
24
 
24
25
  # %% [markdown] tags=["doc-link"]
@@ -38,8 +39,8 @@ import easydiffraction as ed
38
39
  # concepts and steps involved in fitting a crystal structure using powder
39
40
  # diffraction data.
40
41
  #
41
- # For this part of the tutorial, we will use the powder diffraction data
42
- # from the previous tutorial, simulated using the Si crystal structure.
42
+ # For this part of the notebook, we will use the powder diffraction data
43
+ # previously simulated using the Si crystal structure.
43
44
  #
44
45
  # ### 📦 Create a Project – 'reference'
45
46
  #
@@ -73,7 +74,7 @@ project_1.info.description = 'Fitting simulated powder diffraction pattern of Si
73
74
  # %% [markdown]
74
75
  # ### 🔬 Create an Experiment
75
76
  #
76
- # Now we will create an experiment within the project. An experiment
77
+ # An experiment
77
78
  # represents a specific diffraction measurement performed on a specific sample
78
79
  # using a particular instrument. It contains details about the measured data,
79
80
  # instrument parameters, and other relevant information.
@@ -103,7 +104,7 @@ ed.download_from_repository(file_name, destination=dir_path)
103
104
  # In this case, the experiment is defined as a powder diffraction measurement
104
105
  # using time-of-flight neutrons. The measured data is loaded from a file
105
106
  # containing the reduced diffraction pattern of Si from the data reduction
106
- # tutorial.
107
+ # notebook.
107
108
 
108
109
  # %% [markdown] tags=["doc-link"]
109
110
  # 📖 See [documentation](https://docs.easydiffraction.org/lib/user-guide/analysis-workflow/experiment/#defining-an-experiment-manually)
@@ -149,12 +150,12 @@ project_1.plot_meas(expt_name='sim_si')
149
150
 
150
151
  # %% [markdown]
151
152
  # If you zoom in on the highest TOF peak (around 120,000 μs), you will notice
152
- # that it has a broad and unusual shape. This distortion, along with some more
153
- # effects on the low TOF peaks, is a result of the simplified data reduction
154
- # process. Obtaining a more accurate diffraction pattern would require a more
155
- # advanced data reduction, which is beyond the scope of this tutorial.
156
- # Therefore, we will simply exclude both the low and high TOF regions from the
157
- # analysis by adding an excluded regions to the experiment.
153
+ # that it has a broad and unusual shape. This distortion, along with additional
154
+ # effects on the low TOF peaks, is most likely an artifact related to the
155
+ # simplifications made during the simulation and/or reduction process and is
156
+ # currently under investigation. However, this is outside the scope of this
157
+ # school. Therefore, we will simply exclude both the low and high TOF regions
158
+ # from the analysis by adding an excluded regions to the experiment.
158
159
  #
159
160
  # In real experiments, it is often necessary to exclude certain regions from
160
161
  # the measured data. For example, the direct beam can significantly increase
@@ -206,11 +207,16 @@ project_1.experiments['sim_si'].instrument.calib_d_to_tof_linear = ed.get_value_
206
207
 
207
208
  # %% [markdown]
208
209
  # Before proceeding, let's take a quick look at the concept of parameters in
209
- # EasyDiffraction. Every parameter is an object, which has different attributes,
210
- # such as `value`, `free`, etc. To display the parameter of interest, you can
211
- # simply print the parameter object. For example, to display the linear
212
- # conversion factor from d-spacing to TOF, which is the `calib_d_to_tof_linear`
213
- # parameter, you can do the following:
210
+ # EasyDiffraction, which is similar to the parameter concept in EasyScience.
211
+ # The current version of EasyDiffraction is transitioning to reuse the
212
+ # parameter system from EasyScience.
213
+ #
214
+ # That is, every parameter is an object, which has different attributes,
215
+ # such as `value`, `units`, etc. To display the parameter of interest, you can
216
+ # simply print the parameter object.
217
+ #
218
+ # For example, to display the linear conversion factor from d-spacing to TOF,
219
+ # which is the `calib_d_to_tof_linear` parameter, you can do the following:
214
220
 
215
221
  # %%
216
222
  project_1.experiments['sim_si'].instrument.calib_d_to_tof_linear
@@ -242,16 +248,32 @@ project_1.experiments['sim_si'].instrument.calib_d_to_tof_linear.value
242
248
  # fitting process. The peak profile describes the shape of the diffraction
243
249
  # peaks. They include parameters for the broadening and asymmetry of the peaks.
244
250
  #
251
+ # There are several commonly used peak profile functions:
252
+ # - **Gaussian**: Describes peaks with a symmetric bell-shaped curve, often
253
+ # used when instrumental broadening dominates.
254
+ # [Click for more details.](https://mantidproject.github.io/docs-versioned/v6.1.0/fitting/fitfunctions/Gaussian.html)
255
+ # - **Lorentzian**: Produces narrower central peaks with longer tails,
256
+ # frequently used to model size broadening effects.
257
+ # [Click for more details.](https://mantidproject.github.io/docs-versioned/v6.1.0/fitting/fitfunctions/Lorentzian.html)
258
+ # - **Pseudo-Voigt**: A linear combination of Gaussian and Lorentzian
259
+ # components, providing flexibility to represent real diffraction peaks.
260
+ # [Click for more details.](https://mantidproject.github.io/docs-versioned/v6.1.0/fitting/fitfunctions/PseudoVoigt.html)
261
+ # - **Pseudo-Voigt convoluted with Ikeda-Carpenter**: Incorporates the
262
+ # asymmetry introduced by the neutron pulse shape in time-of-flight
263
+ # instruments. This is a common choice for TOF neutron powder diffraction
264
+ # data.
265
+ # [Click for more details.](https://docs.mantidproject.org/v6.1.0/fitting/fitfunctions/IkedaCarpenterPV.html)
266
+ #
245
267
  # Here, we use a pseudo-Voigt peak profile function with Ikeda-Carpenter
246
- # asymmetry, which is a common choice for neutron powder diffraction data.
268
+ # asymmetry.
247
269
  #
248
- # The values are typically determined experimentally on the same instrument and
249
- # under the same configuration as the data being analyzed based on measurements
250
- # of a standard sample. We consider the Si sample as a standard reference.
251
- # Therefore, we will set the initial values of the peak profile parameters
252
- # based on the values obtained from another simulation and refine them during
253
- # the fitting process. The refined parameters will be used as a starting point
254
- # for the more complex fit in the next part of the tutorial.
270
+ # The parameter values are typically determined experimentally on the same
271
+ # instrument and under the same configuration as the data being analyzed,
272
+ # using measurements of a standard sample. In our case, the Si sample serves
273
+ # as this standard reference. We will refine the peak profile parameters here,
274
+ # and these refined values will be used as starting points for the more
275
+ # complex fit in the next part of the notebook. For this initial fit, we will
276
+ # provide reasonable physical guesses as starting values.
255
277
 
256
278
  # %% [markdown] tags=["doc-link"]
257
279
  # 📖 See [documentation](https://docs.easydiffraction.org/lib/user-guide/analysis-workflow/experiment/#peak-category)
@@ -453,7 +475,20 @@ project_1.experiments['sim_si'].linked_phases.add(id='si', scale=1.0)
453
475
  # ### 🚀 Analyze and Fit the Data
454
476
  #
455
477
  # After setting up the experiment and sample model, we can now analyze the
456
- # measured diffraction pattern and perform the fit.
478
+ # measured diffraction pattern and perform the fit. Building on the analogies
479
+ # from the EasyScience library and the previous notebooks, we can say that all
480
+ # the parameters we introduced earlier — those defining the sample model (crystal
481
+ # structure parameters) and the experiment (instrument, background, and peak
482
+ # profile parameters) — together form the complete set of parameters that can be
483
+ # refined during the fitting process.
484
+ #
485
+ # Unlike in the previous analysis notebooks, we will not create a **math_model**
486
+ # object here. The mathematical model used to calculate the expected diffraction
487
+ # pattern is already defined in the library and will be applied automatically
488
+ # during the fitting process.
489
+
490
+ # %% [markdown]
491
+ # **Reminder:**
457
492
  #
458
493
  # The fitting process involves comparing the measured diffraction pattern with
459
494
  # the calculated diffraction pattern based on the sample model and instrument
@@ -464,7 +499,7 @@ project_1.experiments['sim_si'].linked_phases.add(id='si', scale=1.0)
464
499
 
465
500
  # %% [markdown] tags=["doc-link"]
466
501
  # 📖 See [documentation](https://docs.easydiffraction.org/lib/user-guide/analysis-workflow/analysis/#minimization-optimization)
467
- # for more details about the fitting process.
502
+ # for more details about the fitting process in EasyDiffraction.
468
503
 
469
504
  # %% [markdown]
470
505
  # #### Set Fit Parameters
@@ -475,6 +510,9 @@ project_1.experiments['sim_si'].linked_phases.add(id='si', scale=1.0)
475
510
  # patterns. This is done by setting the `free` attribute of the
476
511
  # corresponding parameters to `True`.
477
512
  #
513
+ # Note: setting `param.free = True` is equivalent to using
514
+ # `param.fixed = False` in the EasyScience library.
515
+ #
478
516
  # We will refine the scale factor of the Si phase, the intensities of the
479
517
  # background points as well as the peak profile parameters. The structure
480
518
  # parameters of the Si phase will not be refined, as this sample is
@@ -567,9 +605,23 @@ project_1.plot_meas_vs_calc(expt_name='sim_si')
567
605
  # time-of-flight (TOF) axis, which represents the time it takes for neutrons
568
606
  # to travel from the sample to the detector. However, it is sometimes more
569
607
  # convenient to visualize the diffraction pattern in the d-spacing axis,
570
- # which represents the distance between planes in the crystal lattice. The
571
- # d-spacing can be calculated from the TOF values using the instrument
572
- # parameters. The `plot_meas_vs_calc` method of the project allows us to
608
+ # which represents the distance between planes in the crystal lattice.
609
+ #
610
+ # The conversion from d-spacing to TOF was already introduced in the data
611
+ # reduction notebook. As a reminder, the two are related through the
612
+ # instrument calibration parameters according to the equation:
613
+ #
614
+ # $$
615
+ # \text{TOF} = \text{offset} + \text{linear} \cdot d + \text{quad} \cdot d^{2},
616
+ # $$
617
+ #
618
+ # where `offset`, `linear`, and `quad` are calibration parameters.
619
+ #
620
+ # In our case, only the `linear` term is used (the `calib_d_to_tof_linear`
621
+ # parameter we set earlier). The `offset` and `quad` terms were not part of
622
+ # the data reduction and are therefore set to 0 by default.
623
+ #
624
+ # The `plot_meas_vs_calc` method of the project allows us to
573
625
  # plot the measured and calculated diffraction patterns in the d-spacing axis
574
626
  # by setting the `d_spacing` parameter to `True`.
575
627
 
@@ -578,28 +630,35 @@ project_1.plot_meas_vs_calc(expt_name='sim_si', d_spacing=True)
578
630
 
579
631
  # %% [markdown]
580
632
  # As you can see, the calculated diffraction pattern now matches the measured
581
- # pattern much more closely. Typically, additional parameters are included in
582
- # the refinement process to further improve the fit. However, we will stop
583
- # here, as the goal of this part of the tutorial is to demonstrate that the
584
- # data reduction and fitting process function correctly. The fit is not
585
- # perfect, but it is sufficient to show that the fitting process works and that
586
- # the parameters are being adjusted appropriately. The next part of the
587
- # tutorial will be more advanced and will involve fitting a more complex
588
- # crystal structure: La₀.₅Ba₀.₅CoO₃ (LBCO).
633
+ # pattern much more closely. Typically, additional experimental parameters are included in
634
+ # the refinement process to further improve the fit. In this example, the structural
635
+ # parameters are not refined because the Si crystal structure is a well-known
636
+ # standard reference used to calibrate both the instrument and the experimental
637
+ # setup. The refined experimental parameters obtained here will then be applied
638
+ # when fitting the crystal structures of other materials.
639
+ #
640
+ # In the next part of the notebook, we will move to a more advanced case and
641
+ # fit a more complex crystal structure: La₀.₅Ba₀.₅CoO₃ (LBCO).
589
642
  #
590
- # Before we advance, we save the data to disk.
643
+ # %% [markdown]
644
+ # #### Save Project
645
+ #
646
+ # Before moving on, we can save the project to disk for later use. This will
647
+ # preserve the entire project structure, including experiments, sample models,
648
+ # and fitting results. The project is saved into a directory specified by the
649
+ # `dir_path` attribute of the project object.
591
650
 
592
651
  # %%
593
- project_1.save_as('powder_diffraction_Si')
652
+ project_1.save_as(dir_path='powder_diffraction_Si')
594
653
 
595
654
  # %% [markdown]
596
655
  # ## 💪 Exercise: Complex Fit – LBCO
597
656
  #
598
657
  # Now that you have a basic understanding of the fitting process, we will
599
658
  # undertake a more complex fit of the La₀.₅Ba₀.₅CoO₃ (LBCO) crystal structure
600
- # using simulated powder diffraction data from the previous tutorial.
659
+ # using simulated powder diffraction data from the data reduction notebook.
601
660
  #
602
- # You can use the same approach as in the previous part of the tutorial, but
661
+ # You can use the same approach as in the previous part of the notebook, but
603
662
  # this time we will refine a more complex crystal structure LBCO with multiple
604
663
  # atoms in the unit cell.
605
664
  #
@@ -612,7 +671,7 @@ project_1.save_as('powder_diffraction_Si')
612
671
 
613
672
  # %% [markdown] tags=["dmsc-school-hint"]
614
673
  # You can use the same approach as in the previous part of the
615
- # tutorial, but this time we will create a new project for the LBCO fit.
674
+ # notebook, but this time we will create a new project for the LBCO fit.
616
675
 
617
676
  # %% [markdown]
618
677
  # **Solution:**
@@ -635,7 +694,7 @@ project_2.info.description = 'Fitting simulated powder diffraction pattern of La
635
694
 
636
695
  # %% [markdown] tags=["dmsc-school-hint"]
637
696
  # You can use the same approach as in the previous part of the
638
- # tutorial, but this time you need to use the data file for LBCO.
697
+ # notebook, but this time you need to use the data file for LBCO.
639
698
 
640
699
  # %% [markdown]
641
700
  # **Solution:**
@@ -670,7 +729,7 @@ project_2.experiments.add(
670
729
  # You can use the `plot_meas` method of the project to visualize the
671
730
  # measured diffraction pattern. You can also use the `excluded_regions`
672
731
  # attribute of the experiment to exclude specific regions from the analysis
673
- # as we did in the previous part of the tutorial.
732
+ # as we did in the previous part of the notebook.
674
733
 
675
734
  # %% [markdown]
676
735
  # **Solution:**
@@ -694,7 +753,7 @@ project_2.plot_meas(expt_name='sim_lbco')
694
753
 
695
754
  # %% [markdown] tags=["dmsc-school-hint"]
696
755
  # Use the values from the data reduction process for the LBCO and
697
- # follow the same approach as in the previous part of the tutorial.
756
+ # follow the same approach as in the previous part of the notebook.
698
757
 
699
758
  # %% [markdown]
700
759
  # **Solution:**
@@ -712,7 +771,7 @@ project_2.experiments['sim_lbco'].instrument.calib_d_to_tof_linear = ed.get_valu
712
771
  # **Hint:**
713
772
 
714
773
  # %% [markdown] tags=["dmsc-school-hint"]
715
- # Use the values from the previous part of the tutorial. You can
774
+ # Use the values from the previous part of the notebook. You can
716
775
  # either manually copy the values from the Si fit or use the `value` attribute
717
776
  # of the parameters from the Si experiment to set the initial values for the
718
777
  # LBCO experiment. This will help us to have a good starting point for the fit.
@@ -740,7 +799,7 @@ project_2.experiments['sim_lbco'].peak.asym_alpha_1 = project_1.experiments['sim
740
799
  # **Hint:**
741
800
 
742
801
  # %% [markdown] tags=["dmsc-school-hint"]
743
- # Use the same approach as in the previous part of the tutorial, but
802
+ # Use the same approach as in the previous part of the notebook, but
744
803
  # this time you need to set the background points for the LBCO experiment. You
745
804
  # can zoom in on the measured diffraction pattern to determine the approximate
746
805
  # background level.
@@ -799,6 +858,33 @@ project_2.experiments['sim_lbco'].background.add(x=110000, y=0.2)
799
858
  # O O 0.0 0.5 0.5 c 1.0 Biso 1.66
800
859
  # ```
801
860
 
861
+ # %% [markdown]
862
+ # Note that the `occupancy` of the La and Ba atoms is 0.5 and those atoms
863
+ # are located in the same position (0, 0, 0) in the unit cell. This means that
864
+ # an extra attribute `occupancy` needs to be set for those atoms later in the
865
+ # sample model.
866
+ #
867
+ # We model the La/Ba site using the virtual crystal approximation.
868
+ # In this approach, the scattering is taken as a weighted average of La and Ba.
869
+ # This reproduces the average diffraction pattern well but does not capture
870
+ # certain real-world effects.
871
+ #
872
+ # The edge cases are:
873
+ # - **Random distribution**.
874
+ # La and Ba atoms are placed randomly. The Bragg peaks still match the
875
+ # average structure, but the pattern also shows extra background
876
+ # (diffuse scattering) between the peaks, but this is usually neglected
877
+ # in the analysis.
878
+ # - **Perfect ordering**.
879
+ # La and Ba arrange themselves in a regular pattern, creating a larger
880
+ # repeating unit. This gives rise to extra peaks
881
+ # ("superlattice reflections") and changes the intensity of some existing
882
+ # peaks.
883
+ # - **Virtual crystal approximation (our model)**.
884
+ # We replace the site with a single "virtual atom" that averages La and Ba.
885
+ # This gives the correct average Bragg peaks but leaves out the extra
886
+ # background of the random case and the extra peaks of the ordered case.
887
+
802
888
  # %% [markdown]
803
889
  # #### Exercise 3.1: Create Sample Model
804
890
  #
@@ -810,7 +896,7 @@ project_2.experiments['sim_lbco'].background.add(x=110000, y=0.2)
810
896
 
811
897
  # %% [markdown] tags=["dmsc-school-hint"]
812
898
  # You can use the same approach as in the previous part of the
813
- # tutorial, but this time you need to use the model name corresponding to the
899
+ # notebook, but this time you need to use the model name corresponding to the
814
900
  # LBCO structure, e.g. 'lbco'.
815
901
 
816
902
  # %% [markdown]
@@ -865,9 +951,6 @@ project_2.sample_models['lbco'].cell.length_a = 3.88
865
951
  # %% [markdown] tags=["dmsc-school-hint"]
866
952
  # Use the atom sites from the CIF data. You can use the `add` method of
867
953
  # the `atom_sites` attribute of the sample model to add the atom sites.
868
- # Note that the `occupancy` of the La and Ba atoms is 0.5 and those atoms
869
- # are located in the same position (0, 0, 0) in the unit cell. This means that
870
- # an extra attribute `occupancy` needs to be set for those atoms.
871
954
 
872
955
  # %% [markdown]
873
956
  # **Solution:**
@@ -942,8 +1025,7 @@ project_2.experiments['sim_lbco'].linked_phases.add(id='lbco', scale=1.0)
942
1025
 
943
1026
  # %% [markdown] tags=["dmsc-school-hint"]
944
1027
  # You can start with the scale factor and the background
945
- # points, as in the Si fit, but this time you will refine the LBCO
946
- # phase related parameters.
1028
+ # points, as in the Si fit.
947
1029
 
948
1030
  # %% [markdown]
949
1031
  # **Solution:**
@@ -1021,7 +1103,7 @@ project_2.plot_meas_vs_calc(expt_name='sim_lbco')
1021
1103
  # %% [markdown]
1022
1104
  # #### Exercise 5.4: Refine the LBCO Lattice Parameter
1023
1105
  #
1024
- # To improve the fit, refine the lattice parameter of the LBCO phase.
1106
+ # To improve the fit, refine the lattice parameters of the LBCO phase.
1025
1107
 
1026
1108
  # %% [markdown]
1027
1109
  # **Hint:**
@@ -1029,6 +1111,12 @@ project_2.plot_meas_vs_calc(expt_name='sim_lbco')
1029
1111
  # %% [markdown] tags=["dmsc-school-hint"]
1030
1112
  # To achieve this, we will set the `free` attribute of the `length_a`
1031
1113
  # parameter of the LBCO cell to `True`.
1114
+ #
1115
+ # LBCO has a cubic crystal structure (space group `P m -3 m`), which means
1116
+ # that `length_b` and `length_c` are constrained to be equal to `length_a`.
1117
+ # Therefore, only `length_a` needs to be refined; the other two will be
1118
+ # updated automatically. All cell angles are fixed at 90°, so they do not
1119
+ # require refinement.
1032
1120
 
1033
1121
  # %% [markdown]
1034
1122
  # **Solution:**
@@ -1096,7 +1184,7 @@ project_2.plot_meas_vs_calc(expt_name='sim_lbco', d_spacing=True, x_min=1.35, x_
1096
1184
  # %% [markdown] tags=["dmsc-school-hint"]
1097
1185
  # You can set the `free` attribute of the peak profile parameters to `True`
1098
1186
  # to allow the fitting process to adjust them. You can use the same approach as
1099
- # in the previous part of the tutorial, but this time you will refine the peak
1187
+ # in the previous part of the notebook, but this time you will refine the peak
1100
1188
  # profile parameters of the LBCO phase.
1101
1189
 
1102
1190
  # %% [markdown]
@@ -1166,7 +1254,7 @@ project_2.plot_meas_vs_calc(expt_name='sim_lbco', x_min=1.53, x_max=1.7, d_spaci
1166
1254
  # 2. ✅ The unexplained peaks are due to the presence of an impurity phase
1167
1255
  # in the sample, which is not included in the current model.
1168
1256
  # 3. ❌ The data reduction process is not likely to introduce such specific
1169
- # peaks, as it is tested and verified in the previous part of the tutorial.
1257
+ # peaks, as it is tested and verified in the previous part of the notebook.
1170
1258
  # 4. ❌ This could also be the case in real experiments, but in this case,
1171
1259
  # we know that the sample is LBCO, as it was simulated based on the CIF data.
1172
1260
 
@@ -1181,8 +1269,8 @@ project_2.plot_meas_vs_calc(expt_name='sim_lbco', x_min=1.53, x_max=1.7, d_spaci
1181
1269
 
1182
1270
  # %% [markdown] tags=["dmsc-school-hint"]
1183
1271
  # Check the positions of the unexplained peaks in the diffraction pattern.
1184
- # Compare them with the known diffraction patterns in the introduction section
1185
- # of the tutorial.
1272
+ # Compare them with the known diffraction patterns in the previous part
1273
+ # of the notebook.
1186
1274
 
1187
1275
  # %% [markdown]
1188
1276
  # **Solution:**
@@ -1211,7 +1299,7 @@ project_2.plot_meas_vs_calc(expt_name='sim_lbco', x_min=1, x_max=1.7, d_spacing=
1211
1299
 
1212
1300
  # %% [markdown] tags=["dmsc-school-hint"]
1213
1301
  # You can use the same approach as in the previous part of the
1214
- # tutorial, but this time you need to create a sample model for Si and link it
1302
+ # notebook, but this time you need to create a sample model for Si and link it
1215
1303
  # to the LBCO experiment.
1216
1304
 
1217
1305
  # %% [markdown]
@@ -1285,7 +1373,7 @@ project_2.plot_meas_vs_calc(expt_name='sim_lbco', x_min=88000, x_max=101000)
1285
1373
  # All previously unexplained peaks are now accounted for in the pattern, and
1286
1374
  # the fit is improved. Some discrepancies in the peak intensities remain, but
1287
1375
  # further improvements would require more advanced data reduction and analysis,
1288
- # which are beyond the scope of this tutorial.
1376
+ # which are beyond the scope of this school.
1289
1377
  #
1290
1378
  # To review the analysis results, you can generate and print a summary
1291
1379
  # report using the `show_report()` method, as demonstrated in the cell below.
@@ -1301,15 +1389,15 @@ project_2.plot_meas_vs_calc(expt_name='sim_lbco', x_min=88000, x_max=101000)
1301
1389
  project_2.summary.show_report()
1302
1390
 
1303
1391
  # %% [markdown]
1304
- # Finally, we save the project to disk.
1392
+ # Finally, we save the project to disk to preserve the current state of the analysis.
1305
1393
 
1306
1394
  # %%
1307
- project_2.save_as('powder_diffraction_LBCO_Si')
1395
+ project_2.save_as(dir_path='powder_diffraction_LBCO_Si')
1308
1396
 
1309
1397
  # %% [markdown]
1310
1398
  # #### Final Remarks
1311
1399
  #
1312
- # In this part of the tutorial, you learned how to use EasyDiffraction
1400
+ # In this part of the notebook, you learned how to use EasyDiffraction
1313
1401
  # to refine lattice parameters of a more complex crystal structure,
1314
1402
  # La₀.₅Ba₀.₅CoO₃ (LBCO).
1315
1403
  # In real experiments, you might also refine additional parameters,
@@ -1322,8 +1410,22 @@ project_2.save_as('powder_diffraction_LBCO_Si')
1322
1410
  # %% [markdown]
1323
1411
  # ## 🎁 Bonus
1324
1412
  #
1325
- # You've now completed the diffraction data analysis part of the
1326
- # DMSC Summer School.
1327
- # To keep learning and exploring more features of the EasyDiffraction library,
1328
- # visit the official tutorials page, where you'll find more examples:
1329
- # https://docs.easydiffraction.org/lib/tutorials/
1413
+ # Congratulations — you've now completed the diffraction data analysis part of
1414
+ # the DMSC Summer School!
1415
+ #
1416
+ # If you'd like to keep exploring, the EasyDiffraction library offers many
1417
+ # additional tutorials and examples on the official documentation site:
1418
+ # 👉 https://docs.easydiffraction.org/lib/tutorials/
1419
+ #
1420
+ # Besides the Python package, EasyDiffraction also comes with a graphical
1421
+ # user interface (GUI) that lets you perform similar analyses without writing
1422
+ # code. To be fair, it's not *quite* feature-complete compared to the Python
1423
+ # library yet — but we're working on it! 🚧
1424
+ #
1425
+ # If you prefer a point-and-click interface over coding, the GUI provides a
1426
+ # user-friendly way to analyze diffraction data. You can download it as a
1427
+ # standalone application here:
1428
+ # 👉 https://easydiffraction.org
1429
+ #
1430
+ # We'd love to hear your feedback on EasyDiffraction — both the library and
1431
+ # the GUI! 💬
File without changes