easydiffraction 0.5.8.post1__tar.gz → 0.6.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 (214) hide show
  1. easydiffraction-0.6.0/.prettierignore +1 -0
  2. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.0}/PKG-INFO +1 -1
  3. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.0}/docs/mkdocs.yml +8 -3
  4. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.0}/pyproject.toml +3 -3
  5. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.0}/src/easydiffraction/plotting/plotters/plotter_plotly.py +5 -0
  6. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.0}/tutorials/dmsc-summer-school-2025_analysis-powder-diffraction.py +179 -72
  7. easydiffraction-0.5.8.post1/.prettierignore +0 -0
  8. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.0}/.github/release-drafter.yml +0 -0
  9. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.0}/.github/workflows/build-docs.yml +0 -0
  10. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.0}/.github/workflows/delete-old-runs.yml +0 -0
  11. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.0}/.github/workflows/draft-release-notes.yml +0 -0
  12. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.0}/.github/workflows/publish-pypi.yml +0 -0
  13. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.0}/.github/workflows/scan-security.yml +0 -0
  14. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.0}/.github/workflows/test-code.yaml +0 -0
  15. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.0}/.github/workflows/test-tutorials-colab.yaml +0 -0
  16. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.0}/.github/workflows/test-tutorials.yaml +0 -0
  17. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.0}/.github/workflows/verify-pr-labels.yml +0 -0
  18. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.0}/.gitignore +0 -0
  19. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.0}/CONTRIBUTING.md +0 -0
  20. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.0}/DEVELOPMENT.md +0 -0
  21. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.0}/LICENSE +0 -0
  22. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.0}/README.md +0 -0
  23. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.0}/deps/pycrysfml-0.1.6-py312-none-macosx_14_0_arm64.whl +0 -0
  24. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.0}/deps/pycrysfml-0.1.6-py312-none-win_amd64.whl +0 -0
  25. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.0}/docs/api-reference/analysis.md +0 -0
  26. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.0}/docs/api-reference/core.md +0 -0
  27. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.0}/docs/api-reference/crystallography.md +0 -0
  28. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.0}/docs/api-reference/experiments.md +0 -0
  29. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.0}/docs/api-reference/index.md +0 -0
  30. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.0}/docs/api-reference/plotting.md +0 -0
  31. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.0}/docs/api-reference/project.md +0 -0
  32. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.0}/docs/api-reference/sample_models.md +0 -0
  33. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.0}/docs/api-reference/summary.md +0 -0
  34. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.0}/docs/api-reference/utils.md +0 -0
  35. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.0}/docs/assets/images/user-guide/data-acquisition_2d-raw-data.jpg +0 -0
  36. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.0}/docs/assets/images/user-guide/data-acquisition_instrument.png +0 -0
  37. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.0}/docs/assets/images/user-guide/data-analysis_model.png +0 -0
  38. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.0}/docs/assets/images/user-guide/data-analysis_refinement.png +0 -0
  39. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.0}/docs/assets/images/user-guide/data-reduction_1d-pattern.png +0 -0
  40. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.0}/docs/index.md +0 -0
  41. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.0}/docs/installation-and-setup/index.md +0 -0
  42. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.0}/docs/introduction/index.md +0 -0
  43. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.0}/docs/tutorials/index.md +0 -0
  44. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.0}/docs/user-guide/analysis-workflow/analysis.md +0 -0
  45. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.0}/docs/user-guide/analysis-workflow/experiment.md +0 -0
  46. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.0}/docs/user-guide/analysis-workflow/index.md +0 -0
  47. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.0}/docs/user-guide/analysis-workflow/model.md +0 -0
  48. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.0}/docs/user-guide/analysis-workflow/project.md +0 -0
  49. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.0}/docs/user-guide/analysis-workflow/summary.md +0 -0
  50. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.0}/docs/user-guide/concept.md +0 -0
  51. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.0}/docs/user-guide/data-format.md +0 -0
  52. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.0}/docs/user-guide/first-steps.md +0 -0
  53. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.0}/docs/user-guide/glossary.md +0 -0
  54. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.0}/docs/user-guide/index.md +0 -0
  55. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.0}/docs/user-guide/parameters/_diffrn_radiation.md +0 -0
  56. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.0}/docs/user-guide/parameters/_diffrn_radiation_wavelength.md +0 -0
  57. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.0}/docs/user-guide/parameters/_exptl_crystal.md +0 -0
  58. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.0}/docs/user-guide/parameters/_extinction.md +0 -0
  59. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.0}/docs/user-guide/parameters/_pd_calib.md +0 -0
  60. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.0}/docs/user-guide/parameters/atom_site.md +0 -0
  61. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.0}/docs/user-guide/parameters/background.md +0 -0
  62. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.0}/docs/user-guide/parameters/cell.md +0 -0
  63. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.0}/docs/user-guide/parameters/expt_type.md +0 -0
  64. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.0}/docs/user-guide/parameters/instrument.md +0 -0
  65. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.0}/docs/user-guide/parameters/linked_phases.md +0 -0
  66. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.0}/docs/user-guide/parameters/pd_meas.md +0 -0
  67. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.0}/docs/user-guide/parameters/peak.md +0 -0
  68. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.0}/docs/user-guide/parameters/space_group.md +0 -0
  69. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.0}/docs/user-guide/parameters.md +0 -0
  70. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.0}/prettierrc.toml +0 -0
  71. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.0}/src/easydiffraction/__init__.py +0 -0
  72. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.0}/src/easydiffraction/analysis/__init__.py +0 -0
  73. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.0}/src/easydiffraction/analysis/analysis.py +0 -0
  74. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.0}/src/easydiffraction/analysis/calculation.py +0 -0
  75. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.0}/src/easydiffraction/analysis/calculators/__init__.py +0 -0
  76. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.0}/src/easydiffraction/analysis/calculators/calculator_base.py +0 -0
  77. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.0}/src/easydiffraction/analysis/calculators/calculator_crysfml.py +0 -0
  78. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.0}/src/easydiffraction/analysis/calculators/calculator_cryspy.py +0 -0
  79. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.0}/src/easydiffraction/analysis/calculators/calculator_factory.py +0 -0
  80. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.0}/src/easydiffraction/analysis/calculators/calculator_pdffit.py +0 -0
  81. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.0}/src/easydiffraction/analysis/collections/__init__.py +0 -0
  82. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.0}/src/easydiffraction/analysis/collections/aliases.py +0 -0
  83. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.0}/src/easydiffraction/analysis/collections/constraints.py +0 -0
  84. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.0}/src/easydiffraction/analysis/collections/joint_fit_experiments.py +0 -0
  85. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.0}/src/easydiffraction/analysis/minimization.py +0 -0
  86. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.0}/src/easydiffraction/analysis/minimizers/__init__.py +0 -0
  87. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.0}/src/easydiffraction/analysis/minimizers/fitting_progress_tracker.py +0 -0
  88. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.0}/src/easydiffraction/analysis/minimizers/minimizer_base.py +0 -0
  89. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.0}/src/easydiffraction/analysis/minimizers/minimizer_dfols.py +0 -0
  90. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.0}/src/easydiffraction/analysis/minimizers/minimizer_factory.py +0 -0
  91. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.0}/src/easydiffraction/analysis/minimizers/minimizer_lmfit.py +0 -0
  92. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.0}/src/easydiffraction/analysis/reliability_factors.py +0 -0
  93. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.0}/src/easydiffraction/core/__init__.py +0 -0
  94. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.0}/src/easydiffraction/core/constants.py +0 -0
  95. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.0}/src/easydiffraction/core/objects.py +0 -0
  96. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.0}/src/easydiffraction/core/singletons.py +0 -0
  97. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.0}/src/easydiffraction/crystallography/__init__.py +0 -0
  98. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.0}/src/easydiffraction/crystallography/crystallography.py +0 -0
  99. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.0}/src/easydiffraction/crystallography/space_group_lookup_table.py +0 -0
  100. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.0}/src/easydiffraction/experiments/__init__.py +0 -0
  101. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.0}/src/easydiffraction/experiments/collections/__init__.py +0 -0
  102. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.0}/src/easydiffraction/experiments/collections/background.py +0 -0
  103. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.0}/src/easydiffraction/experiments/collections/datastore.py +0 -0
  104. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.0}/src/easydiffraction/experiments/collections/excluded_regions.py +0 -0
  105. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.0}/src/easydiffraction/experiments/collections/linked_phases.py +0 -0
  106. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.0}/src/easydiffraction/experiments/components/__init__.py +0 -0
  107. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.0}/src/easydiffraction/experiments/components/experiment_type.py +0 -0
  108. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.0}/src/easydiffraction/experiments/components/instrument.py +0 -0
  109. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.0}/src/easydiffraction/experiments/components/peak.py +0 -0
  110. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.0}/src/easydiffraction/experiments/experiment.py +0 -0
  111. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.0}/src/easydiffraction/experiments/experiments.py +0 -0
  112. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.0}/src/easydiffraction/plotting/__init__.py +0 -0
  113. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.0}/src/easydiffraction/plotting/plotters/__init__.py +0 -0
  114. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.0}/src/easydiffraction/plotting/plotters/plotter_ascii.py +0 -0
  115. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.0}/src/easydiffraction/plotting/plotters/plotter_base.py +0 -0
  116. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.0}/src/easydiffraction/plotting/plotting.py +0 -0
  117. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.0}/src/easydiffraction/project.py +0 -0
  118. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.0}/src/easydiffraction/sample_models/__init__.py +0 -0
  119. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.0}/src/easydiffraction/sample_models/collections/__init__.py +0 -0
  120. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.0}/src/easydiffraction/sample_models/collections/atom_sites.py +0 -0
  121. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.0}/src/easydiffraction/sample_models/components/__init__.py +0 -0
  122. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.0}/src/easydiffraction/sample_models/components/cell.py +0 -0
  123. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.0}/src/easydiffraction/sample_models/components/space_group.py +0 -0
  124. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.0}/src/easydiffraction/sample_models/sample_model.py +0 -0
  125. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.0}/src/easydiffraction/sample_models/sample_models.py +0 -0
  126. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.0}/src/easydiffraction/summary.py +0 -0
  127. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.0}/src/easydiffraction/utils/__init__.py +0 -0
  128. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.0}/src/easydiffraction/utils/decorators.py +0 -0
  129. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.0}/src/easydiffraction/utils/formatting.py +0 -0
  130. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.0}/src/easydiffraction/utils/utils.py +0 -0
  131. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.0}/tests/functional_tests/fitting/test_pair-distribution-function.py +0 -0
  132. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.0}/tests/functional_tests/fitting/test_powder-diffraction_constant-wavelength.py +0 -0
  133. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.0}/tests/functional_tests/fitting/test_powder-diffraction_joint-fit.py +0 -0
  134. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.0}/tests/functional_tests/fitting/test_powder-diffraction_multiphase.py +0 -0
  135. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.0}/tests/functional_tests/fitting/test_powder-diffraction_time-of-flight.py +0 -0
  136. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.0}/tests/unit_tests/analysis/calculators/test_calculator_base.py +0 -0
  137. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.0}/tests/unit_tests/analysis/calculators/test_calculator_cryspy.py +0 -0
  138. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.0}/tests/unit_tests/analysis/calculators/test_calculator_factory.py +0 -0
  139. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.0}/tests/unit_tests/analysis/collections/test_joint_fit_experiment.py +0 -0
  140. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.0}/tests/unit_tests/analysis/minimizers/test_fitting_progress_tracker.py +0 -0
  141. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.0}/tests/unit_tests/analysis/minimizers/test_minimizer_base.py +0 -0
  142. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.0}/tests/unit_tests/analysis/minimizers/test_minimizer_dfols.py +0 -0
  143. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.0}/tests/unit_tests/analysis/minimizers/test_minimizer_factory.py +0 -0
  144. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.0}/tests/unit_tests/analysis/minimizers/test_minimizer_lmfit.py +0 -0
  145. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.0}/tests/unit_tests/analysis/test_analysis.py +0 -0
  146. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.0}/tests/unit_tests/analysis/test_minimization.py +0 -0
  147. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.0}/tests/unit_tests/analysis/test_reliability_factors.py +0 -0
  148. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.0}/tests/unit_tests/core/test_objects.py +0 -0
  149. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.0}/tests/unit_tests/core/test_singletons.py +0 -0
  150. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.0}/tests/unit_tests/experiments/collections/test_background.py +0 -0
  151. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.0}/tests/unit_tests/experiments/collections/test_datastore.py +0 -0
  152. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.0}/tests/unit_tests/experiments/collections/test_linked_phases.py +0 -0
  153. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.0}/tests/unit_tests/experiments/components/test_experiment_type.py +0 -0
  154. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.0}/tests/unit_tests/experiments/components/test_instrument.py +0 -0
  155. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.0}/tests/unit_tests/experiments/components/test_peak.py +0 -0
  156. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.0}/tests/unit_tests/experiments/test_experiment.py +0 -0
  157. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.0}/tests/unit_tests/experiments/test_experiments.py +0 -0
  158. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.0}/tests/unit_tests/sample_models/collections/test_atom_sites.py +0 -0
  159. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.0}/tests/unit_tests/sample_models/components/test_cell.py +0 -0
  160. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.0}/tests/unit_tests/sample_models/components/test_space_group.py +0 -0
  161. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.0}/tests/unit_tests/sample_models/test_sample_models.py +0 -0
  162. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.0}/tests/unit_tests/test_project.py +0 -0
  163. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.0}/tests/unit_tests/test_symmetry_lookup_table.py +0 -0
  164. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.0}/tools/build_docs.sh +0 -0
  165. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.0}/tools/cleanup_docs.sh +0 -0
  166. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.0}/tools/create_mkdocs-yml.py +0 -0
  167. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.0}/tools/install_deps.sh +0 -0
  168. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.0}/tools/prepare_docs.sh +0 -0
  169. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.0}/tools/prepare_notebooks.py +0 -0
  170. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.0}/tools/run_notebooks.sh +0 -0
  171. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.0}/tools/update_spdx-headers.py +0 -0
  172. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.0}/tutorials/advanced_joint-fit_pd-neut-xray-cwl_PbSO4.py +0 -0
  173. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.0}/tutorials/basic_single-fit_pd-neut-cwl_LBCO-HRPT.py +0 -0
  174. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.0}/tutorials/cryst-struct_pd-neut-cwl_CoSiO4-D20.py +0 -0
  175. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.0}/tutorials/cryst-struct_pd-neut-cwl_HS-HRPT.py +0 -0
  176. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.0}/tutorials/cryst-struct_pd-neut-tof_Si-SEPD.py +0 -0
  177. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.0}/tutorials/cryst-struct_pd-neut-tof_multidata_NCAF-WISH.py +0 -0
  178. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.0}/tutorials/cryst-struct_pd-neut-tof_multiphase-LBCO-Si_McStas.py +0 -0
  179. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.0}/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.0}/tutorials/data/NaCl.gr +0 -0
  181. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.0}/tutorials/data/co2sio4_d20.xye +0 -0
  182. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.0}/tutorials/data/d1a_pbso4.dat +0 -0
  183. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.0}/tutorials/data/d1a_pbso4_first-half.dat +0 -0
  184. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.0}/tutorials/data/d1a_pbso4_second-half.dat +0 -0
  185. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.0}/tutorials/data/hrpt_hs.xye +0 -0
  186. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.0}/tutorials/data/hrpt_lbco.xye +0 -0
  187. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.0}/tutorials/data/lab_pbso4.dat +0 -0
  188. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.0}/tutorials/data/mcstas_lbco-si.xye +0 -0
  189. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.0}/tutorials/data/mcstas_lbco-si.xys +0 -0
  190. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.0}/tutorials/data/mcstas_lbco-si_up-to-108k.xys +0 -0
  191. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.0}/tutorials/data/ni-q27r100-neutron_from-2.gr +0 -0
  192. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.0}/tutorials/data/powder_reduced_Si_2large_bank.xye +0 -0
  193. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.0}/tutorials/data/reduced_LBCO.xye +0 -0
  194. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.0}/tutorials/data/reduced_Si.xye +0 -0
  195. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.0}/tutorials/data/sepd_si.xye +0 -0
  196. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.0}/tutorials/data/wish_ncaf.xye +0 -0
  197. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.0}/tutorials/data/wish_ncaf_2_9.xye +0 -0
  198. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.0}/tutorials/data/wish_ncaf_4_7.xye +0 -0
  199. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.0}/tutorials/data/wish_ncaf_4_7.xys +0 -0
  200. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.0}/tutorials/data/wish_ncaf_5_6.xye +0 -0
  201. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.0}/tutorials/data/wish_ncaf_5_6.xys +0 -0
  202. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.0}/tutorials/data/wish_ybcfo_5_6.xye +0 -0
  203. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.0}/tutorials/pdf_pd-neut-cwl_Ni.py +0 -0
  204. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.0}/tutorials/pdf_pd-neut-tof_Si-NOMAD.py +0 -0
  205. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.0}/tutorials/pdf_pd-xray_NaCl.py +0 -0
  206. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.0}/tutorials/quick_single-fit_pd-neut-cwl_LBCO-HRPT.py +0 -0
  207. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.0}/tutorials-drafts/cryst-struct_pd-neut-tof_multiphase-BSFTO-HRPT.py +0 -0
  208. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.0}/tutorials-drafts/data/DREAM_mantle_bc240_nist_cif.xye +0 -0
  209. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.0}/tutorials-drafts/data/DREAM_mantle_bc240_nist_cif_2.xye +0 -0
  210. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.0}/tutorials-drafts/data/DREAM_mantle_bc240_nist_nc.xye +0 -0
  211. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.0}/tutorials-drafts/data/DREAM_mantle_bc240_nist_nc_2.xye +0 -0
  212. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.0}/tutorials-drafts/data/Si_mp-149_symmetrized_mcstas.cif +0 -0
  213. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.0}/tutorials-drafts/hrpt_n_Bi0p88Sm0p12Fe0p94Ti0p06O3_DW_V_9x8x52_1p49_HI.xye +0 -0
  214. {easydiffraction-0.5.8.post1 → easydiffraction-0.6.0}/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.0
4
4
  Summary: Diffraction data analysis
5
5
  Project-URL: homepage, https://easydiffraction.org
6
6
  Project-URL: documentation, https://docs.easydiffraction.org/lib
@@ -27,9 +27,14 @@ extra:
27
27
  name: EasyDiffraction Library Source Code on GitHub
28
28
 
29
29
  # Jupyter notebooks
30
- #plugins:
31
- # - mkdocs-jupyter:
32
- # execute_ignore:
30
+ plugins:
31
+ - mkdocs-jupyter:
32
+ execute_ignore:
33
+ - 'quick*.ipynb'
34
+ - 'basic*.ipynb'
35
+ - 'advanced*.ipynb'
36
+ - 'cryst*.ipynb'
37
+ - 'pdf*.ipynb'
33
38
  # - '*emcee*.ipynb' # Ignore notebooks with 'emcee' in the name from execution
34
39
 
35
40
  ##################
@@ -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}' #
119
119
 
120
120
  # Configure how versioningit detects versions from Git
121
121
  # - 'match' ensures it only considers tags starting with 'v'
@@ -104,6 +104,11 @@ 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
114
  # In GitHub CI builds (e.g., during Jupyter Book generation), avoid
@@ -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,22 @@
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.
17
+ # For more advanced features and additional capabilities of the EasyDiffraction
18
+ # library, please see the official documentation:
19
+ # https://docs.easydiffraction.org/lib
20
+
21
+ # This notebook is self-contained and designed for hands-on learning.
16
22
  # However, if you're interested in exploring more advanced features or learning
17
23
  # about additional capabilities of the EasyDiffraction library, please refer to
18
24
  # the official documentation: https://docs.easydiffraction.org/lib
19
25
  #
20
26
  # 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
27
+ # classes. However, for the sake of simplicity in this notebook, we will import
22
28
  # the entire library.
23
29
 
24
30
  # %% [markdown] tags=["doc-link"]
@@ -38,8 +44,8 @@ import easydiffraction as ed
38
44
  # concepts and steps involved in fitting a crystal structure using powder
39
45
  # diffraction data.
40
46
  #
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.
47
+ # For this part of the notebook, we will use the powder diffraction data
48
+ # previously simulated using the Si crystal structure.
43
49
  #
44
50
  # ### 📦 Create a Project – 'reference'
45
51
  #
@@ -73,7 +79,7 @@ project_1.info.description = 'Fitting simulated powder diffraction pattern of Si
73
79
  # %% [markdown]
74
80
  # ### 🔬 Create an Experiment
75
81
  #
76
- # Now we will create an experiment within the project. An experiment
82
+ # An experiment
77
83
  # represents a specific diffraction measurement performed on a specific sample
78
84
  # using a particular instrument. It contains details about the measured data,
79
85
  # instrument parameters, and other relevant information.
@@ -103,7 +109,7 @@ ed.download_from_repository(file_name, destination=dir_path)
103
109
  # In this case, the experiment is defined as a powder diffraction measurement
104
110
  # using time-of-flight neutrons. The measured data is loaded from a file
105
111
  # containing the reduced diffraction pattern of Si from the data reduction
106
- # tutorial.
112
+ # notebook.
107
113
 
108
114
  # %% [markdown] tags=["doc-link"]
109
115
  # 📖 See [documentation](https://docs.easydiffraction.org/lib/user-guide/analysis-workflow/experiment/#defining-an-experiment-manually)
@@ -149,12 +155,12 @@ project_1.plot_meas(expt_name='sim_si')
149
155
 
150
156
  # %% [markdown]
151
157
  # 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.
158
+ # that it has a broad and unusual shape. This distortion, along with additional
159
+ # effects on the low TOF peaks, is most likely an artifact related to the
160
+ # simplifications made during the simulation and/or reduction process and is
161
+ # currently under investigation. However, this is outside the scope of this
162
+ # school. Therefore, we will simply exclude both the low and high TOF regions
163
+ # from the analysis by adding an excluded regions to the experiment.
158
164
  #
159
165
  # In real experiments, it is often necessary to exclude certain regions from
160
166
  # the measured data. For example, the direct beam can significantly increase
@@ -206,11 +212,16 @@ project_1.experiments['sim_si'].instrument.calib_d_to_tof_linear = ed.get_value_
206
212
 
207
213
  # %% [markdown]
208
214
  # 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:
215
+ # EasyDiffraction, which is similar to the parameter concept in EasyScience.
216
+ # The current version of EasyDiffraction is transitioning to reuse the
217
+ # parameter system from EasyScience.
218
+ #
219
+ # That is, every parameter is an object, which has different attributes,
220
+ # such as `value`, `units`, etc. To display the parameter of interest, you can
221
+ # simply print the parameter object.
222
+ #
223
+ # For example, to display the linear conversion factor from d-spacing to TOF,
224
+ # which is the `calib_d_to_tof_linear` parameter, you can do the following:
214
225
 
215
226
  # %%
216
227
  project_1.experiments['sim_si'].instrument.calib_d_to_tof_linear
@@ -242,16 +253,32 @@ project_1.experiments['sim_si'].instrument.calib_d_to_tof_linear.value
242
253
  # fitting process. The peak profile describes the shape of the diffraction
243
254
  # peaks. They include parameters for the broadening and asymmetry of the peaks.
244
255
  #
256
+ # There are several commonly used peak profile functions:
257
+ # - **Gaussian**: Describes peaks with a symmetric bell-shaped curve, often
258
+ # used when instrumental broadening dominates.
259
+ # [Click for more details.](https://mantidproject.github.io/docs-versioned/v6.1.0/fitting/fitfunctions/Gaussian.html)
260
+ # - **Lorentzian**: Produces narrower central peaks with longer tails,
261
+ # frequently used to model size broadening effects.
262
+ # [Click for more details.](https://mantidproject.github.io/docs-versioned/v6.1.0/fitting/fitfunctions/Lorentzian.html)
263
+ # - **Pseudo-Voigt**: A linear combination of Gaussian and Lorentzian
264
+ # components, providing flexibility to represent real diffraction peaks.
265
+ # [Click for more details.](https://mantidproject.github.io/docs-versioned/v6.1.0/fitting/fitfunctions/PseudoVoigt.html)
266
+ # - **Pseudo-Voigt convoluted with Ikeda-Carpenter**: Incorporates the
267
+ # asymmetry introduced by the neutron pulse shape in time-of-flight
268
+ # instruments. This is a common choice for TOF neutron powder diffraction
269
+ # data.
270
+ # [Click for more details.](https://docs.mantidproject.org/v6.1.0/fitting/fitfunctions/IkedaCarpenterPV.html)
271
+ #
245
272
  # Here, we use a pseudo-Voigt peak profile function with Ikeda-Carpenter
246
- # asymmetry, which is a common choice for neutron powder diffraction data.
273
+ # asymmetry.
247
274
  #
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.
275
+ # The parameter values are typically determined experimentally on the same
276
+ # instrument and under the same configuration as the data being analyzed,
277
+ # using measurements of a standard sample. In our case, the Si sample serves
278
+ # as this standard reference. We will refine the peak profile parameters here,
279
+ # and these refined values will be used as starting points for the more
280
+ # complex fit in the next part of the notebook. For this initial fit, we will
281
+ # provide reasonable physical guesses as starting values.
255
282
 
256
283
  # %% [markdown] tags=["doc-link"]
257
284
  # 📖 See [documentation](https://docs.easydiffraction.org/lib/user-guide/analysis-workflow/experiment/#peak-category)
@@ -453,7 +480,20 @@ project_1.experiments['sim_si'].linked_phases.add(id='si', scale=1.0)
453
480
  # ### 🚀 Analyze and Fit the Data
454
481
  #
455
482
  # After setting up the experiment and sample model, we can now analyze the
456
- # measured diffraction pattern and perform the fit.
483
+ # measured diffraction pattern and perform the fit. Building on the analogies
484
+ # from the EasyScience library and the previous notebooks, we can say that all
485
+ # the parameters we introduced earlier — those defining the sample model (crystal
486
+ # structure parameters) and the experiment (instrument, background, and peak
487
+ # profile parameters) — together form the complete set of parameters that can be
488
+ # refined during the fitting process.
489
+ #
490
+ # Unlike in the previous analysis notebooks, we will not create a **math_model**
491
+ # object here. The mathematical model used to calculate the expected diffraction
492
+ # pattern is already defined in the library and will be applied automatically
493
+ # during the fitting process.
494
+
495
+ # %% [markdown]
496
+ # **Reminder:**
457
497
  #
458
498
  # The fitting process involves comparing the measured diffraction pattern with
459
499
  # the calculated diffraction pattern based on the sample model and instrument
@@ -464,7 +504,7 @@ project_1.experiments['sim_si'].linked_phases.add(id='si', scale=1.0)
464
504
 
465
505
  # %% [markdown] tags=["doc-link"]
466
506
  # 📖 See [documentation](https://docs.easydiffraction.org/lib/user-guide/analysis-workflow/analysis/#minimization-optimization)
467
- # for more details about the fitting process.
507
+ # for more details about the fitting process in EasyDiffraction.
468
508
 
469
509
  # %% [markdown]
470
510
  # #### Set Fit Parameters
@@ -475,6 +515,9 @@ project_1.experiments['sim_si'].linked_phases.add(id='si', scale=1.0)
475
515
  # patterns. This is done by setting the `free` attribute of the
476
516
  # corresponding parameters to `True`.
477
517
  #
518
+ # Note: setting `param.free = True` is equivalent to using
519
+ # `param.fixed = False` in the EasyScience library.
520
+ #
478
521
  # We will refine the scale factor of the Si phase, the intensities of the
479
522
  # background points as well as the peak profile parameters. The structure
480
523
  # parameters of the Si phase will not be refined, as this sample is
@@ -567,9 +610,23 @@ project_1.plot_meas_vs_calc(expt_name='sim_si')
567
610
  # time-of-flight (TOF) axis, which represents the time it takes for neutrons
568
611
  # to travel from the sample to the detector. However, it is sometimes more
569
612
  # 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
613
+ # which represents the distance between planes in the crystal lattice.
614
+ #
615
+ # The conversion from d-spacing to TOF was already introduced in the data
616
+ # reduction notebook. As a reminder, the two are related through the
617
+ # instrument calibration parameters according to the equation:
618
+ #
619
+ # $$
620
+ # \text{TOF} = \text{offset} + \text{linear} \cdot d + \text{quad} \cdot d^{2},
621
+ # $$
622
+ #
623
+ # where `offset`, `linear`, and `quad` are calibration parameters.
624
+ #
625
+ # In our case, only the `linear` term is used (the `calib_d_to_tof_linear`
626
+ # parameter we set earlier). The `offset` and `quad` terms were not part of
627
+ # the data reduction and are therefore set to 0 by default.
628
+ #
629
+ # The `plot_meas_vs_calc` method of the project allows us to
573
630
  # plot the measured and calculated diffraction patterns in the d-spacing axis
574
631
  # by setting the `d_spacing` parameter to `True`.
575
632
 
@@ -578,28 +635,35 @@ project_1.plot_meas_vs_calc(expt_name='sim_si', d_spacing=True)
578
635
 
579
636
  # %% [markdown]
580
637
  # 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).
638
+ # pattern much more closely. Typically, additional experimental parameters are included in
639
+ # the refinement process to further improve the fit. In this example, the structural
640
+ # parameters are not refined because the Si crystal structure is a well-known
641
+ # standard reference used to calibrate both the instrument and the experimental
642
+ # setup. The refined experimental parameters obtained here will then be applied
643
+ # when fitting the crystal structures of other materials.
644
+ #
645
+ # In the next part of the notebook, we will move to a more advanced case and
646
+ # fit a more complex crystal structure: La₀.₅Ba₀.₅CoO₃ (LBCO).
589
647
  #
590
- # Before we advance, we save the data to disk.
648
+ # %% [markdown]
649
+ # #### Save Project
650
+ #
651
+ # Before moving on, we can save the project to disk for later use. This will
652
+ # preserve the entire project structure, including experiments, sample models,
653
+ # and fitting results. The project is saved into a directory specified by the
654
+ # `dir_path` attribute of the project object.
591
655
 
592
656
  # %%
593
- project_1.save_as('powder_diffraction_Si')
657
+ project_1.save_as(dir_path='powder_diffraction_Si')
594
658
 
595
659
  # %% [markdown]
596
660
  # ## 💪 Exercise: Complex Fit – LBCO
597
661
  #
598
662
  # Now that you have a basic understanding of the fitting process, we will
599
663
  # undertake a more complex fit of the La₀.₅Ba₀.₅CoO₃ (LBCO) crystal structure
600
- # using simulated powder diffraction data from the previous tutorial.
664
+ # using simulated powder diffraction data from the data reduction notebook.
601
665
  #
602
- # You can use the same approach as in the previous part of the tutorial, but
666
+ # You can use the same approach as in the previous part of the notebook, but
603
667
  # this time we will refine a more complex crystal structure LBCO with multiple
604
668
  # atoms in the unit cell.
605
669
  #
@@ -612,7 +676,7 @@ project_1.save_as('powder_diffraction_Si')
612
676
 
613
677
  # %% [markdown] tags=["dmsc-school-hint"]
614
678
  # 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.
679
+ # notebook, but this time we will create a new project for the LBCO fit.
616
680
 
617
681
  # %% [markdown]
618
682
  # **Solution:**
@@ -635,7 +699,7 @@ project_2.info.description = 'Fitting simulated powder diffraction pattern of La
635
699
 
636
700
  # %% [markdown] tags=["dmsc-school-hint"]
637
701
  # 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.
702
+ # notebook, but this time you need to use the data file for LBCO.
639
703
 
640
704
  # %% [markdown]
641
705
  # **Solution:**
@@ -670,7 +734,7 @@ project_2.experiments.add(
670
734
  # You can use the `plot_meas` method of the project to visualize the
671
735
  # measured diffraction pattern. You can also use the `excluded_regions`
672
736
  # attribute of the experiment to exclude specific regions from the analysis
673
- # as we did in the previous part of the tutorial.
737
+ # as we did in the previous part of the notebook.
674
738
 
675
739
  # %% [markdown]
676
740
  # **Solution:**
@@ -694,7 +758,7 @@ project_2.plot_meas(expt_name='sim_lbco')
694
758
 
695
759
  # %% [markdown] tags=["dmsc-school-hint"]
696
760
  # 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.
761
+ # follow the same approach as in the previous part of the notebook.
698
762
 
699
763
  # %% [markdown]
700
764
  # **Solution:**
@@ -712,7 +776,7 @@ project_2.experiments['sim_lbco'].instrument.calib_d_to_tof_linear = ed.get_valu
712
776
  # **Hint:**
713
777
 
714
778
  # %% [markdown] tags=["dmsc-school-hint"]
715
- # Use the values from the previous part of the tutorial. You can
779
+ # Use the values from the previous part of the notebook. You can
716
780
  # either manually copy the values from the Si fit or use the `value` attribute
717
781
  # of the parameters from the Si experiment to set the initial values for the
718
782
  # LBCO experiment. This will help us to have a good starting point for the fit.
@@ -740,7 +804,7 @@ project_2.experiments['sim_lbco'].peak.asym_alpha_1 = project_1.experiments['sim
740
804
  # **Hint:**
741
805
 
742
806
  # %% [markdown] tags=["dmsc-school-hint"]
743
- # Use the same approach as in the previous part of the tutorial, but
807
+ # Use the same approach as in the previous part of the notebook, but
744
808
  # this time you need to set the background points for the LBCO experiment. You
745
809
  # can zoom in on the measured diffraction pattern to determine the approximate
746
810
  # background level.
@@ -799,6 +863,33 @@ project_2.experiments['sim_lbco'].background.add(x=110000, y=0.2)
799
863
  # O O 0.0 0.5 0.5 c 1.0 Biso 1.66
800
864
  # ```
801
865
 
866
+ # %% [markdown]
867
+ # Note that the `occupancy` of the La and Ba atoms is 0.5 and those atoms
868
+ # are located in the same position (0, 0, 0) in the unit cell. This means that
869
+ # an extra attribute `occupancy` needs to be set for those atoms later in the
870
+ # sample model.
871
+ #
872
+ # We model the La/Ba site using the virtual crystal approximation.
873
+ # In this approach, the scattering is taken as a weighted average of La and Ba.
874
+ # This reproduces the average diffraction pattern well but does not capture
875
+ # certain real-world effects.
876
+ #
877
+ # The edge cases are:
878
+ # - **Random distribution**.
879
+ # La and Ba atoms are placed randomly. The Bragg peaks still match the
880
+ # average structure, but the pattern also shows extra background
881
+ # (diffuse scattering) between the peaks, but this is usually neglected
882
+ # in the analysis.
883
+ # - **Perfect ordering**.
884
+ # La and Ba arrange themselves in a regular pattern, creating a larger
885
+ # repeating unit. This gives rise to extra peaks
886
+ # ("superlattice reflections") and changes the intensity of some existing
887
+ # peaks.
888
+ # - **Virtual crystal approximation (our model)**.
889
+ # We replace the site with a single "virtual atom" that averages La and Ba.
890
+ # This gives the correct average Bragg peaks but leaves out the extra
891
+ # background of the random case and the extra peaks of the ordered case.
892
+
802
893
  # %% [markdown]
803
894
  # #### Exercise 3.1: Create Sample Model
804
895
  #
@@ -810,7 +901,7 @@ project_2.experiments['sim_lbco'].background.add(x=110000, y=0.2)
810
901
 
811
902
  # %% [markdown] tags=["dmsc-school-hint"]
812
903
  # 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
904
+ # notebook, but this time you need to use the model name corresponding to the
814
905
  # LBCO structure, e.g. 'lbco'.
815
906
 
816
907
  # %% [markdown]
@@ -865,9 +956,6 @@ project_2.sample_models['lbco'].cell.length_a = 3.88
865
956
  # %% [markdown] tags=["dmsc-school-hint"]
866
957
  # Use the atom sites from the CIF data. You can use the `add` method of
867
958
  # 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
959
 
872
960
  # %% [markdown]
873
961
  # **Solution:**
@@ -942,8 +1030,7 @@ project_2.experiments['sim_lbco'].linked_phases.add(id='lbco', scale=1.0)
942
1030
 
943
1031
  # %% [markdown] tags=["dmsc-school-hint"]
944
1032
  # 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.
1033
+ # points, as in the Si fit.
947
1034
 
948
1035
  # %% [markdown]
949
1036
  # **Solution:**
@@ -1021,7 +1108,7 @@ project_2.plot_meas_vs_calc(expt_name='sim_lbco')
1021
1108
  # %% [markdown]
1022
1109
  # #### Exercise 5.4: Refine the LBCO Lattice Parameter
1023
1110
  #
1024
- # To improve the fit, refine the lattice parameter of the LBCO phase.
1111
+ # To improve the fit, refine the lattice parameters of the LBCO phase.
1025
1112
 
1026
1113
  # %% [markdown]
1027
1114
  # **Hint:**
@@ -1029,6 +1116,12 @@ project_2.plot_meas_vs_calc(expt_name='sim_lbco')
1029
1116
  # %% [markdown] tags=["dmsc-school-hint"]
1030
1117
  # To achieve this, we will set the `free` attribute of the `length_a`
1031
1118
  # parameter of the LBCO cell to `True`.
1119
+ #
1120
+ # LBCO has a cubic crystal structure (space group `P m -3 m`), which means
1121
+ # that `length_b` and `length_c` are constrained to be equal to `length_a`.
1122
+ # Therefore, only `length_a` needs to be refined; the other two will be
1123
+ # updated automatically. All cell angles are fixed at 90°, so they do not
1124
+ # require refinement.
1032
1125
 
1033
1126
  # %% [markdown]
1034
1127
  # **Solution:**
@@ -1096,7 +1189,7 @@ project_2.plot_meas_vs_calc(expt_name='sim_lbco', d_spacing=True, x_min=1.35, x_
1096
1189
  # %% [markdown] tags=["dmsc-school-hint"]
1097
1190
  # You can set the `free` attribute of the peak profile parameters to `True`
1098
1191
  # 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
1192
+ # in the previous part of the notebook, but this time you will refine the peak
1100
1193
  # profile parameters of the LBCO phase.
1101
1194
 
1102
1195
  # %% [markdown]
@@ -1166,7 +1259,7 @@ project_2.plot_meas_vs_calc(expt_name='sim_lbco', x_min=1.53, x_max=1.7, d_spaci
1166
1259
  # 2. ✅ The unexplained peaks are due to the presence of an impurity phase
1167
1260
  # in the sample, which is not included in the current model.
1168
1261
  # 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.
1262
+ # peaks, as it is tested and verified in the previous part of the notebook.
1170
1263
  # 4. ❌ This could also be the case in real experiments, but in this case,
1171
1264
  # we know that the sample is LBCO, as it was simulated based on the CIF data.
1172
1265
 
@@ -1181,8 +1274,8 @@ project_2.plot_meas_vs_calc(expt_name='sim_lbco', x_min=1.53, x_max=1.7, d_spaci
1181
1274
 
1182
1275
  # %% [markdown] tags=["dmsc-school-hint"]
1183
1276
  # 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.
1277
+ # Compare them with the known diffraction patterns in the previous part
1278
+ # of the notebook.
1186
1279
 
1187
1280
  # %% [markdown]
1188
1281
  # **Solution:**
@@ -1211,7 +1304,7 @@ project_2.plot_meas_vs_calc(expt_name='sim_lbco', x_min=1, x_max=1.7, d_spacing=
1211
1304
 
1212
1305
  # %% [markdown] tags=["dmsc-school-hint"]
1213
1306
  # 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
1307
+ # notebook, but this time you need to create a sample model for Si and link it
1215
1308
  # to the LBCO experiment.
1216
1309
 
1217
1310
  # %% [markdown]
@@ -1285,7 +1378,7 @@ project_2.plot_meas_vs_calc(expt_name='sim_lbco', x_min=88000, x_max=101000)
1285
1378
  # All previously unexplained peaks are now accounted for in the pattern, and
1286
1379
  # the fit is improved. Some discrepancies in the peak intensities remain, but
1287
1380
  # further improvements would require more advanced data reduction and analysis,
1288
- # which are beyond the scope of this tutorial.
1381
+ # which are beyond the scope of this school.
1289
1382
  #
1290
1383
  # To review the analysis results, you can generate and print a summary
1291
1384
  # report using the `show_report()` method, as demonstrated in the cell below.
@@ -1301,15 +1394,15 @@ project_2.plot_meas_vs_calc(expt_name='sim_lbco', x_min=88000, x_max=101000)
1301
1394
  project_2.summary.show_report()
1302
1395
 
1303
1396
  # %% [markdown]
1304
- # Finally, we save the project to disk.
1397
+ # Finally, we save the project to disk to preserve the current state of the analysis.
1305
1398
 
1306
1399
  # %%
1307
- project_2.save_as('powder_diffraction_LBCO_Si')
1400
+ project_2.save_as(dir_path='powder_diffraction_LBCO_Si')
1308
1401
 
1309
1402
  # %% [markdown]
1310
1403
  # #### Final Remarks
1311
1404
  #
1312
- # In this part of the tutorial, you learned how to use EasyDiffraction
1405
+ # In this part of the notebook, you learned how to use EasyDiffraction
1313
1406
  # to refine lattice parameters of a more complex crystal structure,
1314
1407
  # La₀.₅Ba₀.₅CoO₃ (LBCO).
1315
1408
  # In real experiments, you might also refine additional parameters,
@@ -1322,8 +1415,22 @@ project_2.save_as('powder_diffraction_LBCO_Si')
1322
1415
  # %% [markdown]
1323
1416
  # ## 🎁 Bonus
1324
1417
  #
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/
1418
+ # Congratulations — you've now completed the diffraction data analysis part of
1419
+ # the DMSC Summer School!
1420
+ #
1421
+ # If you'd like to keep exploring, the EasyDiffraction library offers many
1422
+ # additional tutorials and examples on the official documentation site:
1423
+ # 👉 https://docs.easydiffraction.org/lib/tutorials/
1424
+ #
1425
+ # Besides the Python package, EasyDiffraction also comes with a graphical
1426
+ # user interface (GUI) that lets you perform similar analyses without writing
1427
+ # code. To be fair, it's not *quite* feature-complete compared to the Python
1428
+ # library yet — but we're working on it! 🚧
1429
+ #
1430
+ # If you prefer a point-and-click interface over coding, the GUI provides a
1431
+ # user-friendly way to analyze diffraction data. You can download it as a
1432
+ # standalone application here:
1433
+ # 👉 https://easydiffraction.org
1434
+ #
1435
+ # We'd love to hear your feedback on EasyDiffraction — both the library and
1436
+ # the GUI! 💬
File without changes