easydiffraction 0.5.8__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.
- easydiffraction-0.6.0/.github/workflows/draft-release-notes.yml +47 -0
- {easydiffraction-0.5.8 → easydiffraction-0.6.0}/.github/workflows/test-code.yaml +13 -0
- easydiffraction-0.6.0/.prettierignore +1 -0
- {easydiffraction-0.5.8 → easydiffraction-0.6.0}/PKG-INFO +1 -1
- {easydiffraction-0.5.8 → easydiffraction-0.6.0}/docs/mkdocs.yml +8 -3
- {easydiffraction-0.5.8 → easydiffraction-0.6.0}/docs/user-guide/analysis-workflow/experiment.md +13 -5
- {easydiffraction-0.5.8 → easydiffraction-0.6.0}/docs/user-guide/analysis-workflow/model.md +3 -3
- {easydiffraction-0.5.8 → easydiffraction-0.6.0}/docs/user-guide/first-steps.md +34 -4
- {easydiffraction-0.5.8 → easydiffraction-0.6.0}/pyproject.toml +9 -6
- {easydiffraction-0.5.8 → easydiffraction-0.6.0}/src/easydiffraction/analysis/calculators/calculator_crysfml.py +2 -1
- {easydiffraction-0.5.8 → easydiffraction-0.6.0}/src/easydiffraction/analysis/calculators/calculator_cryspy.py +2 -1
- {easydiffraction-0.5.8 → easydiffraction-0.6.0}/src/easydiffraction/analysis/calculators/calculator_pdffit.py +2 -1
- {easydiffraction-0.5.8 → easydiffraction-0.6.0}/src/easydiffraction/analysis/minimizers/minimizer_factory.py +3 -0
- {easydiffraction-0.5.8 → easydiffraction-0.6.0}/src/easydiffraction/experiments/collections/excluded_regions.py +15 -15
- {easydiffraction-0.5.8 → easydiffraction-0.6.0}/src/easydiffraction/plotting/plotters/plotter_base.py +1 -2
- {easydiffraction-0.5.8 → easydiffraction-0.6.0}/src/easydiffraction/plotting/plotters/plotter_plotly.py +5 -0
- {easydiffraction-0.5.8 → easydiffraction-0.6.0}/src/easydiffraction/utils/utils.py +25 -6
- {easydiffraction-0.5.8 → easydiffraction-0.6.0}/tests/functional_tests/fitting/test_powder-diffraction_multiphase.py +1 -1
- {easydiffraction-0.5.8 → easydiffraction-0.6.0}/tools/prepare_notebooks.py +7 -0
- {easydiffraction-0.5.8 → easydiffraction-0.6.0}/tutorials/cryst-struct_pd-neut-tof_multidata_NCAF-WISH.py +4 -4
- {easydiffraction-0.5.8 → easydiffraction-0.6.0}/tutorials/cryst-struct_pd-neut-tof_multiphase-LBCO-Si_McStas.py +2 -2
- {easydiffraction-0.5.8 → easydiffraction-0.6.0}/tutorials/dmsc-summer-school-2025_analysis-powder-diffraction.py +379 -144
- {easydiffraction-0.5.8 → easydiffraction-0.6.0}/tutorials/quick_single-fit_pd-neut-cwl_LBCO-HRPT.py +2 -2
- {easydiffraction-0.5.8 → easydiffraction-0.6.0}/tutorials-drafts/cryst-struct_pd-neut-tof_multiphase-BSFTO-HRPT.py +2 -2
- easydiffraction-0.5.8/.github/workflows/draft-release-notes.yml +0 -54
- easydiffraction-0.5.8/.prettierignore +0 -0
- {easydiffraction-0.5.8 → easydiffraction-0.6.0}/.github/release-drafter.yml +0 -0
- {easydiffraction-0.5.8 → easydiffraction-0.6.0}/.github/workflows/build-docs.yml +0 -0
- {easydiffraction-0.5.8 → easydiffraction-0.6.0}/.github/workflows/delete-old-runs.yml +0 -0
- {easydiffraction-0.5.8 → easydiffraction-0.6.0}/.github/workflows/publish-pypi.yml +0 -0
- {easydiffraction-0.5.8 → easydiffraction-0.6.0}/.github/workflows/scan-security.yml +0 -0
- {easydiffraction-0.5.8 → easydiffraction-0.6.0}/.github/workflows/test-tutorials-colab.yaml +0 -0
- {easydiffraction-0.5.8 → easydiffraction-0.6.0}/.github/workflows/test-tutorials.yaml +0 -0
- {easydiffraction-0.5.8 → easydiffraction-0.6.0}/.github/workflows/verify-pr-labels.yml +0 -0
- {easydiffraction-0.5.8 → easydiffraction-0.6.0}/.gitignore +0 -0
- {easydiffraction-0.5.8 → easydiffraction-0.6.0}/CONTRIBUTING.md +0 -0
- {easydiffraction-0.5.8 → easydiffraction-0.6.0}/DEVELOPMENT.md +0 -0
- {easydiffraction-0.5.8 → easydiffraction-0.6.0}/LICENSE +0 -0
- {easydiffraction-0.5.8 → easydiffraction-0.6.0}/README.md +0 -0
- {easydiffraction-0.5.8 → easydiffraction-0.6.0}/deps/pycrysfml-0.1.6-py312-none-macosx_14_0_arm64.whl +0 -0
- {easydiffraction-0.5.8 → easydiffraction-0.6.0}/deps/pycrysfml-0.1.6-py312-none-win_amd64.whl +0 -0
- {easydiffraction-0.5.8 → easydiffraction-0.6.0}/docs/api-reference/analysis.md +0 -0
- {easydiffraction-0.5.8 → easydiffraction-0.6.0}/docs/api-reference/core.md +0 -0
- {easydiffraction-0.5.8 → easydiffraction-0.6.0}/docs/api-reference/crystallography.md +0 -0
- {easydiffraction-0.5.8 → easydiffraction-0.6.0}/docs/api-reference/experiments.md +0 -0
- {easydiffraction-0.5.8 → easydiffraction-0.6.0}/docs/api-reference/index.md +0 -0
- {easydiffraction-0.5.8 → easydiffraction-0.6.0}/docs/api-reference/plotting.md +0 -0
- {easydiffraction-0.5.8 → easydiffraction-0.6.0}/docs/api-reference/project.md +0 -0
- {easydiffraction-0.5.8 → easydiffraction-0.6.0}/docs/api-reference/sample_models.md +0 -0
- {easydiffraction-0.5.8 → easydiffraction-0.6.0}/docs/api-reference/summary.md +0 -0
- {easydiffraction-0.5.8 → easydiffraction-0.6.0}/docs/api-reference/utils.md +0 -0
- {easydiffraction-0.5.8 → easydiffraction-0.6.0}/docs/assets/images/user-guide/data-acquisition_2d-raw-data.jpg +0 -0
- {easydiffraction-0.5.8 → easydiffraction-0.6.0}/docs/assets/images/user-guide/data-acquisition_instrument.png +0 -0
- {easydiffraction-0.5.8 → easydiffraction-0.6.0}/docs/assets/images/user-guide/data-analysis_model.png +0 -0
- {easydiffraction-0.5.8 → easydiffraction-0.6.0}/docs/assets/images/user-guide/data-analysis_refinement.png +0 -0
- {easydiffraction-0.5.8 → easydiffraction-0.6.0}/docs/assets/images/user-guide/data-reduction_1d-pattern.png +0 -0
- {easydiffraction-0.5.8 → easydiffraction-0.6.0}/docs/index.md +0 -0
- {easydiffraction-0.5.8 → easydiffraction-0.6.0}/docs/installation-and-setup/index.md +0 -0
- {easydiffraction-0.5.8 → easydiffraction-0.6.0}/docs/introduction/index.md +0 -0
- {easydiffraction-0.5.8 → easydiffraction-0.6.0}/docs/tutorials/index.md +0 -0
- {easydiffraction-0.5.8 → easydiffraction-0.6.0}/docs/user-guide/analysis-workflow/analysis.md +0 -0
- {easydiffraction-0.5.8 → easydiffraction-0.6.0}/docs/user-guide/analysis-workflow/index.md +0 -0
- {easydiffraction-0.5.8 → easydiffraction-0.6.0}/docs/user-guide/analysis-workflow/project.md +0 -0
- {easydiffraction-0.5.8 → easydiffraction-0.6.0}/docs/user-guide/analysis-workflow/summary.md +0 -0
- {easydiffraction-0.5.8 → easydiffraction-0.6.0}/docs/user-guide/concept.md +0 -0
- {easydiffraction-0.5.8 → easydiffraction-0.6.0}/docs/user-guide/data-format.md +0 -0
- {easydiffraction-0.5.8 → easydiffraction-0.6.0}/docs/user-guide/glossary.md +0 -0
- {easydiffraction-0.5.8 → easydiffraction-0.6.0}/docs/user-guide/index.md +0 -0
- {easydiffraction-0.5.8 → easydiffraction-0.6.0}/docs/user-guide/parameters/_diffrn_radiation.md +0 -0
- {easydiffraction-0.5.8 → easydiffraction-0.6.0}/docs/user-guide/parameters/_diffrn_radiation_wavelength.md +0 -0
- {easydiffraction-0.5.8 → easydiffraction-0.6.0}/docs/user-guide/parameters/_exptl_crystal.md +0 -0
- {easydiffraction-0.5.8 → easydiffraction-0.6.0}/docs/user-guide/parameters/_extinction.md +0 -0
- {easydiffraction-0.5.8 → easydiffraction-0.6.0}/docs/user-guide/parameters/_pd_calib.md +0 -0
- {easydiffraction-0.5.8 → easydiffraction-0.6.0}/docs/user-guide/parameters/atom_site.md +0 -0
- {easydiffraction-0.5.8 → easydiffraction-0.6.0}/docs/user-guide/parameters/background.md +0 -0
- {easydiffraction-0.5.8 → easydiffraction-0.6.0}/docs/user-guide/parameters/cell.md +0 -0
- {easydiffraction-0.5.8 → easydiffraction-0.6.0}/docs/user-guide/parameters/expt_type.md +0 -0
- {easydiffraction-0.5.8 → easydiffraction-0.6.0}/docs/user-guide/parameters/instrument.md +0 -0
- {easydiffraction-0.5.8 → easydiffraction-0.6.0}/docs/user-guide/parameters/linked_phases.md +0 -0
- {easydiffraction-0.5.8 → easydiffraction-0.6.0}/docs/user-guide/parameters/pd_meas.md +0 -0
- {easydiffraction-0.5.8 → easydiffraction-0.6.0}/docs/user-guide/parameters/peak.md +0 -0
- {easydiffraction-0.5.8 → easydiffraction-0.6.0}/docs/user-guide/parameters/space_group.md +0 -0
- {easydiffraction-0.5.8 → easydiffraction-0.6.0}/docs/user-guide/parameters.md +0 -0
- {easydiffraction-0.5.8 → easydiffraction-0.6.0}/prettierrc.toml +0 -0
- {easydiffraction-0.5.8 → easydiffraction-0.6.0}/src/easydiffraction/__init__.py +0 -0
- {easydiffraction-0.5.8 → easydiffraction-0.6.0}/src/easydiffraction/analysis/__init__.py +0 -0
- {easydiffraction-0.5.8 → easydiffraction-0.6.0}/src/easydiffraction/analysis/analysis.py +0 -0
- {easydiffraction-0.5.8 → easydiffraction-0.6.0}/src/easydiffraction/analysis/calculation.py +0 -0
- {easydiffraction-0.5.8 → easydiffraction-0.6.0}/src/easydiffraction/analysis/calculators/__init__.py +0 -0
- {easydiffraction-0.5.8 → easydiffraction-0.6.0}/src/easydiffraction/analysis/calculators/calculator_base.py +0 -0
- {easydiffraction-0.5.8 → easydiffraction-0.6.0}/src/easydiffraction/analysis/calculators/calculator_factory.py +0 -0
- {easydiffraction-0.5.8 → easydiffraction-0.6.0}/src/easydiffraction/analysis/collections/__init__.py +0 -0
- {easydiffraction-0.5.8 → easydiffraction-0.6.0}/src/easydiffraction/analysis/collections/aliases.py +0 -0
- {easydiffraction-0.5.8 → easydiffraction-0.6.0}/src/easydiffraction/analysis/collections/constraints.py +0 -0
- {easydiffraction-0.5.8 → easydiffraction-0.6.0}/src/easydiffraction/analysis/collections/joint_fit_experiments.py +0 -0
- {easydiffraction-0.5.8 → easydiffraction-0.6.0}/src/easydiffraction/analysis/minimization.py +0 -0
- {easydiffraction-0.5.8 → easydiffraction-0.6.0}/src/easydiffraction/analysis/minimizers/__init__.py +0 -0
- {easydiffraction-0.5.8 → easydiffraction-0.6.0}/src/easydiffraction/analysis/minimizers/fitting_progress_tracker.py +0 -0
- {easydiffraction-0.5.8 → easydiffraction-0.6.0}/src/easydiffraction/analysis/minimizers/minimizer_base.py +0 -0
- {easydiffraction-0.5.8 → easydiffraction-0.6.0}/src/easydiffraction/analysis/minimizers/minimizer_dfols.py +0 -0
- {easydiffraction-0.5.8 → easydiffraction-0.6.0}/src/easydiffraction/analysis/minimizers/minimizer_lmfit.py +0 -0
- {easydiffraction-0.5.8 → easydiffraction-0.6.0}/src/easydiffraction/analysis/reliability_factors.py +0 -0
- {easydiffraction-0.5.8 → easydiffraction-0.6.0}/src/easydiffraction/core/__init__.py +0 -0
- {easydiffraction-0.5.8 → easydiffraction-0.6.0}/src/easydiffraction/core/constants.py +0 -0
- {easydiffraction-0.5.8 → easydiffraction-0.6.0}/src/easydiffraction/core/objects.py +0 -0
- {easydiffraction-0.5.8 → easydiffraction-0.6.0}/src/easydiffraction/core/singletons.py +0 -0
- {easydiffraction-0.5.8 → easydiffraction-0.6.0}/src/easydiffraction/crystallography/__init__.py +0 -0
- {easydiffraction-0.5.8 → easydiffraction-0.6.0}/src/easydiffraction/crystallography/crystallography.py +0 -0
- {easydiffraction-0.5.8 → easydiffraction-0.6.0}/src/easydiffraction/crystallography/space_group_lookup_table.py +0 -0
- {easydiffraction-0.5.8 → easydiffraction-0.6.0}/src/easydiffraction/experiments/__init__.py +0 -0
- {easydiffraction-0.5.8 → easydiffraction-0.6.0}/src/easydiffraction/experiments/collections/__init__.py +0 -0
- {easydiffraction-0.5.8 → easydiffraction-0.6.0}/src/easydiffraction/experiments/collections/background.py +0 -0
- {easydiffraction-0.5.8 → easydiffraction-0.6.0}/src/easydiffraction/experiments/collections/datastore.py +0 -0
- {easydiffraction-0.5.8 → easydiffraction-0.6.0}/src/easydiffraction/experiments/collections/linked_phases.py +0 -0
- {easydiffraction-0.5.8 → easydiffraction-0.6.0}/src/easydiffraction/experiments/components/__init__.py +0 -0
- {easydiffraction-0.5.8 → easydiffraction-0.6.0}/src/easydiffraction/experiments/components/experiment_type.py +0 -0
- {easydiffraction-0.5.8 → easydiffraction-0.6.0}/src/easydiffraction/experiments/components/instrument.py +0 -0
- {easydiffraction-0.5.8 → easydiffraction-0.6.0}/src/easydiffraction/experiments/components/peak.py +0 -0
- {easydiffraction-0.5.8 → easydiffraction-0.6.0}/src/easydiffraction/experiments/experiment.py +0 -0
- {easydiffraction-0.5.8 → easydiffraction-0.6.0}/src/easydiffraction/experiments/experiments.py +0 -0
- {easydiffraction-0.5.8 → easydiffraction-0.6.0}/src/easydiffraction/plotting/__init__.py +0 -0
- {easydiffraction-0.5.8 → easydiffraction-0.6.0}/src/easydiffraction/plotting/plotters/__init__.py +0 -0
- {easydiffraction-0.5.8 → easydiffraction-0.6.0}/src/easydiffraction/plotting/plotters/plotter_ascii.py +0 -0
- {easydiffraction-0.5.8 → easydiffraction-0.6.0}/src/easydiffraction/plotting/plotting.py +0 -0
- {easydiffraction-0.5.8 → easydiffraction-0.6.0}/src/easydiffraction/project.py +0 -0
- {easydiffraction-0.5.8 → easydiffraction-0.6.0}/src/easydiffraction/sample_models/__init__.py +0 -0
- {easydiffraction-0.5.8 → easydiffraction-0.6.0}/src/easydiffraction/sample_models/collections/__init__.py +0 -0
- {easydiffraction-0.5.8 → easydiffraction-0.6.0}/src/easydiffraction/sample_models/collections/atom_sites.py +0 -0
- {easydiffraction-0.5.8 → easydiffraction-0.6.0}/src/easydiffraction/sample_models/components/__init__.py +0 -0
- {easydiffraction-0.5.8 → easydiffraction-0.6.0}/src/easydiffraction/sample_models/components/cell.py +0 -0
- {easydiffraction-0.5.8 → easydiffraction-0.6.0}/src/easydiffraction/sample_models/components/space_group.py +0 -0
- {easydiffraction-0.5.8 → easydiffraction-0.6.0}/src/easydiffraction/sample_models/sample_model.py +0 -0
- {easydiffraction-0.5.8 → easydiffraction-0.6.0}/src/easydiffraction/sample_models/sample_models.py +0 -0
- {easydiffraction-0.5.8 → easydiffraction-0.6.0}/src/easydiffraction/summary.py +0 -0
- {easydiffraction-0.5.8 → easydiffraction-0.6.0}/src/easydiffraction/utils/__init__.py +0 -0
- {easydiffraction-0.5.8 → easydiffraction-0.6.0}/src/easydiffraction/utils/decorators.py +0 -0
- {easydiffraction-0.5.8 → easydiffraction-0.6.0}/src/easydiffraction/utils/formatting.py +0 -0
- {easydiffraction-0.5.8 → easydiffraction-0.6.0}/tests/functional_tests/fitting/test_pair-distribution-function.py +0 -0
- {easydiffraction-0.5.8 → easydiffraction-0.6.0}/tests/functional_tests/fitting/test_powder-diffraction_constant-wavelength.py +0 -0
- {easydiffraction-0.5.8 → easydiffraction-0.6.0}/tests/functional_tests/fitting/test_powder-diffraction_joint-fit.py +0 -0
- {easydiffraction-0.5.8 → easydiffraction-0.6.0}/tests/functional_tests/fitting/test_powder-diffraction_time-of-flight.py +0 -0
- {easydiffraction-0.5.8 → easydiffraction-0.6.0}/tests/unit_tests/analysis/calculators/test_calculator_base.py +0 -0
- {easydiffraction-0.5.8 → easydiffraction-0.6.0}/tests/unit_tests/analysis/calculators/test_calculator_cryspy.py +0 -0
- {easydiffraction-0.5.8 → easydiffraction-0.6.0}/tests/unit_tests/analysis/calculators/test_calculator_factory.py +0 -0
- {easydiffraction-0.5.8 → easydiffraction-0.6.0}/tests/unit_tests/analysis/collections/test_joint_fit_experiment.py +0 -0
- {easydiffraction-0.5.8 → easydiffraction-0.6.0}/tests/unit_tests/analysis/minimizers/test_fitting_progress_tracker.py +0 -0
- {easydiffraction-0.5.8 → easydiffraction-0.6.0}/tests/unit_tests/analysis/minimizers/test_minimizer_base.py +0 -0
- {easydiffraction-0.5.8 → easydiffraction-0.6.0}/tests/unit_tests/analysis/minimizers/test_minimizer_dfols.py +0 -0
- {easydiffraction-0.5.8 → easydiffraction-0.6.0}/tests/unit_tests/analysis/minimizers/test_minimizer_factory.py +0 -0
- {easydiffraction-0.5.8 → easydiffraction-0.6.0}/tests/unit_tests/analysis/minimizers/test_minimizer_lmfit.py +0 -0
- {easydiffraction-0.5.8 → easydiffraction-0.6.0}/tests/unit_tests/analysis/test_analysis.py +0 -0
- {easydiffraction-0.5.8 → easydiffraction-0.6.0}/tests/unit_tests/analysis/test_minimization.py +0 -0
- {easydiffraction-0.5.8 → easydiffraction-0.6.0}/tests/unit_tests/analysis/test_reliability_factors.py +0 -0
- {easydiffraction-0.5.8 → easydiffraction-0.6.0}/tests/unit_tests/core/test_objects.py +0 -0
- {easydiffraction-0.5.8 → easydiffraction-0.6.0}/tests/unit_tests/core/test_singletons.py +0 -0
- {easydiffraction-0.5.8 → easydiffraction-0.6.0}/tests/unit_tests/experiments/collections/test_background.py +0 -0
- {easydiffraction-0.5.8 → easydiffraction-0.6.0}/tests/unit_tests/experiments/collections/test_datastore.py +0 -0
- {easydiffraction-0.5.8 → easydiffraction-0.6.0}/tests/unit_tests/experiments/collections/test_linked_phases.py +0 -0
- {easydiffraction-0.5.8 → easydiffraction-0.6.0}/tests/unit_tests/experiments/components/test_experiment_type.py +0 -0
- {easydiffraction-0.5.8 → easydiffraction-0.6.0}/tests/unit_tests/experiments/components/test_instrument.py +0 -0
- {easydiffraction-0.5.8 → easydiffraction-0.6.0}/tests/unit_tests/experiments/components/test_peak.py +0 -0
- {easydiffraction-0.5.8 → easydiffraction-0.6.0}/tests/unit_tests/experiments/test_experiment.py +0 -0
- {easydiffraction-0.5.8 → easydiffraction-0.6.0}/tests/unit_tests/experiments/test_experiments.py +0 -0
- {easydiffraction-0.5.8 → easydiffraction-0.6.0}/tests/unit_tests/sample_models/collections/test_atom_sites.py +0 -0
- {easydiffraction-0.5.8 → easydiffraction-0.6.0}/tests/unit_tests/sample_models/components/test_cell.py +0 -0
- {easydiffraction-0.5.8 → easydiffraction-0.6.0}/tests/unit_tests/sample_models/components/test_space_group.py +0 -0
- {easydiffraction-0.5.8 → easydiffraction-0.6.0}/tests/unit_tests/sample_models/test_sample_models.py +0 -0
- {easydiffraction-0.5.8 → easydiffraction-0.6.0}/tests/unit_tests/test_project.py +0 -0
- {easydiffraction-0.5.8 → easydiffraction-0.6.0}/tests/unit_tests/test_symmetry_lookup_table.py +0 -0
- {easydiffraction-0.5.8 → easydiffraction-0.6.0}/tools/build_docs.sh +0 -0
- {easydiffraction-0.5.8 → easydiffraction-0.6.0}/tools/cleanup_docs.sh +0 -0
- {easydiffraction-0.5.8 → easydiffraction-0.6.0}/tools/create_mkdocs-yml.py +0 -0
- {easydiffraction-0.5.8 → easydiffraction-0.6.0}/tools/install_deps.sh +0 -0
- {easydiffraction-0.5.8 → easydiffraction-0.6.0}/tools/prepare_docs.sh +0 -0
- {easydiffraction-0.5.8 → easydiffraction-0.6.0}/tools/run_notebooks.sh +0 -0
- {easydiffraction-0.5.8 → easydiffraction-0.6.0}/tools/update_spdx-headers.py +0 -0
- {easydiffraction-0.5.8 → easydiffraction-0.6.0}/tutorials/advanced_joint-fit_pd-neut-xray-cwl_PbSO4.py +0 -0
- {easydiffraction-0.5.8 → easydiffraction-0.6.0}/tutorials/basic_single-fit_pd-neut-cwl_LBCO-HRPT.py +0 -0
- {easydiffraction-0.5.8 → easydiffraction-0.6.0}/tutorials/cryst-struct_pd-neut-cwl_CoSiO4-D20.py +0 -0
- {easydiffraction-0.5.8 → easydiffraction-0.6.0}/tutorials/cryst-struct_pd-neut-cwl_HS-HRPT.py +0 -0
- {easydiffraction-0.5.8 → easydiffraction-0.6.0}/tutorials/cryst-struct_pd-neut-tof_Si-SEPD.py +0 -0
- {easydiffraction-0.5.8 → easydiffraction-0.6.0}/tutorials/data/NOM_9999_Si_640g_PAC_50_ff_ftfrgr_up-to-50.gr +0 -0
- {easydiffraction-0.5.8 → easydiffraction-0.6.0}/tutorials/data/NaCl.gr +0 -0
- {easydiffraction-0.5.8 → easydiffraction-0.6.0}/tutorials/data/co2sio4_d20.xye +0 -0
- {easydiffraction-0.5.8 → easydiffraction-0.6.0}/tutorials/data/d1a_pbso4.dat +0 -0
- {easydiffraction-0.5.8 → easydiffraction-0.6.0}/tutorials/data/d1a_pbso4_first-half.dat +0 -0
- {easydiffraction-0.5.8 → easydiffraction-0.6.0}/tutorials/data/d1a_pbso4_second-half.dat +0 -0
- {easydiffraction-0.5.8 → easydiffraction-0.6.0}/tutorials/data/hrpt_hs.xye +0 -0
- {easydiffraction-0.5.8 → easydiffraction-0.6.0}/tutorials/data/hrpt_lbco.xye +0 -0
- {easydiffraction-0.5.8 → easydiffraction-0.6.0}/tutorials/data/lab_pbso4.dat +0 -0
- {easydiffraction-0.5.8 → easydiffraction-0.6.0}/tutorials/data/mcstas_lbco-si.xye +0 -0
- {easydiffraction-0.5.8 → easydiffraction-0.6.0}/tutorials/data/mcstas_lbco-si.xys +0 -0
- {easydiffraction-0.5.8 → easydiffraction-0.6.0}/tutorials/data/mcstas_lbco-si_up-to-108k.xys +0 -0
- {easydiffraction-0.5.8 → easydiffraction-0.6.0}/tutorials/data/ni-q27r100-neutron_from-2.gr +0 -0
- {easydiffraction-0.5.8 → easydiffraction-0.6.0}/tutorials/data/powder_reduced_Si_2large_bank.xye +0 -0
- {easydiffraction-0.5.8 → easydiffraction-0.6.0}/tutorials/data/reduced_LBCO.xye +0 -0
- {easydiffraction-0.5.8 → easydiffraction-0.6.0}/tutorials/data/reduced_Si.xye +0 -0
- {easydiffraction-0.5.8 → easydiffraction-0.6.0}/tutorials/data/sepd_si.xye +0 -0
- {easydiffraction-0.5.8 → easydiffraction-0.6.0}/tutorials/data/wish_ncaf.xye +0 -0
- {easydiffraction-0.5.8 → easydiffraction-0.6.0}/tutorials/data/wish_ncaf_2_9.xye +0 -0
- {easydiffraction-0.5.8 → easydiffraction-0.6.0}/tutorials/data/wish_ncaf_4_7.xye +0 -0
- {easydiffraction-0.5.8 → easydiffraction-0.6.0}/tutorials/data/wish_ncaf_4_7.xys +0 -0
- {easydiffraction-0.5.8 → easydiffraction-0.6.0}/tutorials/data/wish_ncaf_5_6.xye +0 -0
- {easydiffraction-0.5.8 → easydiffraction-0.6.0}/tutorials/data/wish_ncaf_5_6.xys +0 -0
- {easydiffraction-0.5.8 → easydiffraction-0.6.0}/tutorials/data/wish_ybcfo_5_6.xye +0 -0
- {easydiffraction-0.5.8 → easydiffraction-0.6.0}/tutorials/pdf_pd-neut-cwl_Ni.py +0 -0
- {easydiffraction-0.5.8 → easydiffraction-0.6.0}/tutorials/pdf_pd-neut-tof_Si-NOMAD.py +0 -0
- {easydiffraction-0.5.8 → easydiffraction-0.6.0}/tutorials/pdf_pd-xray_NaCl.py +0 -0
- {easydiffraction-0.5.8 → easydiffraction-0.6.0}/tutorials-drafts/data/DREAM_mantle_bc240_nist_cif.xye +0 -0
- {easydiffraction-0.5.8 → easydiffraction-0.6.0}/tutorials-drafts/data/DREAM_mantle_bc240_nist_cif_2.xye +0 -0
- {easydiffraction-0.5.8 → easydiffraction-0.6.0}/tutorials-drafts/data/DREAM_mantle_bc240_nist_nc.xye +0 -0
- {easydiffraction-0.5.8 → easydiffraction-0.6.0}/tutorials-drafts/data/DREAM_mantle_bc240_nist_nc_2.xye +0 -0
- {easydiffraction-0.5.8 → easydiffraction-0.6.0}/tutorials-drafts/data/Si_mp-149_symmetrized_mcstas.cif +0 -0
- {easydiffraction-0.5.8 → easydiffraction-0.6.0}/tutorials-drafts/hrpt_n_Bi0p88Sm0p12Fe0p94Ti0p06O3_DW_V_9x8x52_1p49_HI.xye +0 -0
- {easydiffraction-0.5.8 → easydiffraction-0.6.0}/tutorials-drafts/test_single-fit_pd-neut-tof_Si-DREAM_nc.py +0 -0
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
# Drafts your next Release notes as pull requests are merged into
|
|
2
|
+
# default branch
|
|
3
|
+
|
|
4
|
+
name: Update release draft
|
|
5
|
+
|
|
6
|
+
on:
|
|
7
|
+
# Runs on pushes targeting the default branch (updates the real draft release)
|
|
8
|
+
push:
|
|
9
|
+
branches:
|
|
10
|
+
- main
|
|
11
|
+
- master
|
|
12
|
+
|
|
13
|
+
jobs:
|
|
14
|
+
draft-release-notes:
|
|
15
|
+
permissions:
|
|
16
|
+
# write permission is required to create a github release
|
|
17
|
+
contents: write
|
|
18
|
+
|
|
19
|
+
runs-on: ubuntu-latest
|
|
20
|
+
|
|
21
|
+
steps:
|
|
22
|
+
- name: Drafts the next release notes
|
|
23
|
+
uses: enhantica/drafterino@v1
|
|
24
|
+
|
|
25
|
+
with:
|
|
26
|
+
config: |
|
|
27
|
+
title: 'easydiffraction $COMPUTED_VERSION'
|
|
28
|
+
tag: 'v$COMPUTED_VERSION'
|
|
29
|
+
note-template: '- $PR_TITLE (#$PR_NUMBER)'
|
|
30
|
+
|
|
31
|
+
default-bump: post
|
|
32
|
+
|
|
33
|
+
major-bump-labels: ['[scope] significant']
|
|
34
|
+
minor-bump-labels: ['[scope] enhancement']
|
|
35
|
+
patch-bump-labels: ['[scope] bug', '[scope] maintenance']
|
|
36
|
+
post-bump-labels: ['[scope] documentation']
|
|
37
|
+
|
|
38
|
+
release-notes:
|
|
39
|
+
- title: 'Added'
|
|
40
|
+
labels: ['[scope] significant', '[scope] enhancement']
|
|
41
|
+
- title: 'Fixed'
|
|
42
|
+
labels: ['[scope] bug']
|
|
43
|
+
- title: 'Changed'
|
|
44
|
+
labels: ['[scope] maintenance', '[scope] documentation']
|
|
45
|
+
|
|
46
|
+
env:
|
|
47
|
+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
@@ -197,6 +197,19 @@ jobs:
|
|
|
197
197
|
export PYTHONPATH="$(pwd)/src${PYTHONPATH:+:$PYTHONPATH}"
|
|
198
198
|
python -m pytest tests/functional_tests/ --color=yes -n auto
|
|
199
199
|
|
|
200
|
+
# Ensures a consistent high version like 999.0.0 when not on a tagged commit
|
|
201
|
+
# This is needed for testing the package in the next job, as its version
|
|
202
|
+
# must be higher than the PyPI version for pip to prefer the local version.
|
|
203
|
+
- name: Inject fallback version tag if not on a real tag
|
|
204
|
+
shell: bash
|
|
205
|
+
run: |
|
|
206
|
+
if ! git describe --tags --match "v*" --exact-match > /dev/null 2>&1; then
|
|
207
|
+
echo "Not on release tag — applying fallback 'v999.0.0'"
|
|
208
|
+
git tag v999.0.0
|
|
209
|
+
else
|
|
210
|
+
echo "On a valid tag"
|
|
211
|
+
fi
|
|
212
|
+
|
|
200
213
|
- name: Create Python package for the next job
|
|
201
214
|
shell: bash
|
|
202
215
|
run: python -m build --wheel --outdir dist
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.pixi
|
|
@@ -27,9 +27,14 @@ extra:
|
|
|
27
27
|
name: EasyDiffraction Library Source Code on GitHub
|
|
28
28
|
|
|
29
29
|
# Jupyter notebooks
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
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
|
##################
|
{easydiffraction-0.5.8 → easydiffraction-0.6.0}/docs/user-guide/analysis-workflow/experiment.md
RENAMED
|
@@ -132,7 +132,7 @@ which makes it easier to manage the experiment:
|
|
|
132
132
|
depends on the experiment type, but generally includes columns for 2θ angle
|
|
133
133
|
or TOF and intensity.
|
|
134
134
|
|
|
135
|
-
### 1. Instrument Category
|
|
135
|
+
### 1. Instrument Category { #instrument-category }
|
|
136
136
|
|
|
137
137
|
```python
|
|
138
138
|
# Modify the default instrument parameters
|
|
@@ -140,7 +140,15 @@ project.experiments['hrpt'].instrument.setup_wavelength = 1.494
|
|
|
140
140
|
project.experiments['hrpt'].instrument.calib_twotheta_offset = 0.6
|
|
141
141
|
```
|
|
142
142
|
|
|
143
|
-
### 2.
|
|
143
|
+
### 2. Excluded Regions Category { #excluded-regions-category }
|
|
144
|
+
|
|
145
|
+
```python
|
|
146
|
+
# Add excluded regions to the experiment
|
|
147
|
+
project.experiments['hrpt'].excluded_regions.add(start=0, end=10)
|
|
148
|
+
project.experiments['hrpt'].excluded_regions.add(start=160, end=180)
|
|
149
|
+
```
|
|
150
|
+
|
|
151
|
+
### 3. Peak Category { #peak-category }
|
|
144
152
|
|
|
145
153
|
```python
|
|
146
154
|
# Select the desired peak profile type
|
|
@@ -154,7 +162,7 @@ project.experiments['hrpt'].peak.broad_lorentz_x = 0
|
|
|
154
162
|
project.experiments['hrpt'].peak.broad_lorentz_y = 0.1
|
|
155
163
|
```
|
|
156
164
|
|
|
157
|
-
###
|
|
165
|
+
### 4. Background Category { #background-category }
|
|
158
166
|
|
|
159
167
|
```python
|
|
160
168
|
# Select the desired background type
|
|
@@ -168,14 +176,14 @@ project.experiments['hrpt'].background.add(x=110, y=170)
|
|
|
168
176
|
project.experiments['hrpt'].background.add(x=165, y=170)
|
|
169
177
|
```
|
|
170
178
|
|
|
171
|
-
###
|
|
179
|
+
### 5. Linked Phases Category { #linked-phases-category }
|
|
172
180
|
|
|
173
181
|
```python
|
|
174
182
|
# Link the sample model defined in the previous step to the experiment
|
|
175
183
|
project.experiments['hrpt'].linked_phases.add(id='lbco', scale=10.0)
|
|
176
184
|
```
|
|
177
185
|
|
|
178
|
-
###
|
|
186
|
+
### 6. Measured Data Category { #measured-data-category }
|
|
179
187
|
|
|
180
188
|
If you do not have a CIF file for your experiment, you can load measured data
|
|
181
189
|
from a file in a supported format. The measured data will be automatically
|
|
@@ -79,21 +79,21 @@ to manage the model:
|
|
|
79
79
|
3. **Atom Sites Category**: Describes the positions and properties of atoms
|
|
80
80
|
within the unit cell.
|
|
81
81
|
|
|
82
|
-
### 1. Space Group Category
|
|
82
|
+
### 1. Space Group Category { #space-group-category }
|
|
83
83
|
|
|
84
84
|
```python
|
|
85
85
|
# Set space group
|
|
86
86
|
project.sample_models['nacl'].space_group.name_h_m = 'F m -3 m'
|
|
87
87
|
```
|
|
88
88
|
|
|
89
|
-
### 2. Cell Category
|
|
89
|
+
### 2. Cell Category { #cell-category }
|
|
90
90
|
|
|
91
91
|
```python
|
|
92
92
|
# Define unit cell parameters
|
|
93
93
|
project.sample_models['nacl'].cell.length_a = 5.691694
|
|
94
94
|
```
|
|
95
95
|
|
|
96
|
-
### 3. Atom Sites Category
|
|
96
|
+
### 3. Atom Sites Category { #atom-sites-category }
|
|
97
97
|
|
|
98
98
|
```python
|
|
99
99
|
# Add atomic sites
|
|
@@ -87,8 +87,11 @@ example datasets without having to manually download them.
|
|
|
87
87
|
|
|
88
88
|
EasyDiffraction provides several helper methods to display supported engines for
|
|
89
89
|
calculation, minimization, and plotting. These methods can be called on the
|
|
90
|
-
`Project` instance to display the available options for
|
|
91
|
-
|
|
90
|
+
`Project` instance to display the available options for different categories.
|
|
91
|
+
|
|
92
|
+
### Supported calculators
|
|
93
|
+
|
|
94
|
+
For example, you can use the `show_supported_calculators()` method to see which
|
|
92
95
|
calculation engines are available for use in your project:
|
|
93
96
|
|
|
94
97
|
```python
|
|
@@ -105,8 +108,19 @@ An example of the output for the `show_supported_calculators()` method is:
|
|
|
105
108
|
| cryspy | CrysPy library for crystallographic calculations |
|
|
106
109
|
| pdffit | PDFfit2 library for pair distribution function calculations |
|
|
107
110
|
|
|
108
|
-
|
|
109
|
-
|
|
111
|
+
### Supported minimizers
|
|
112
|
+
|
|
113
|
+
You can also check the available minimizers using the
|
|
114
|
+
`show_available_minimizers()` method:
|
|
115
|
+
|
|
116
|
+
```python
|
|
117
|
+
project.show_available_minimizers()
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
### Available parameters
|
|
121
|
+
|
|
122
|
+
EasyDiffraction provides several methods for showing the available parameters
|
|
123
|
+
grouped in different categories. For example, you can use:
|
|
110
124
|
|
|
111
125
|
- `project.analysis.show_all_params()` – to display all available parameters for
|
|
112
126
|
the analysis step.
|
|
@@ -135,6 +149,22 @@ method is:
|
|
|
135
149
|
| 60 | project.experiments['hrpt'].peak.broad_gauss_v | hrpt.peak.broad_gauss_v |
|
|
136
150
|
| 61 | project.experiments['hrpt'].peak.broad_gauss_w | hrpt.peak.broad_gauss_w |
|
|
137
151
|
|
|
152
|
+
### Supported plotters
|
|
153
|
+
|
|
154
|
+
To see the available plotters, you can use the `show_available_plotters()`
|
|
155
|
+
method on the `plotter` attribute of the `Project` instance:
|
|
156
|
+
|
|
157
|
+
```python
|
|
158
|
+
project.plotter.show_supported_engines()
|
|
159
|
+
```
|
|
160
|
+
|
|
161
|
+
An example of the output is:
|
|
162
|
+
|
|
163
|
+
| Engine | Description |
|
|
164
|
+
| ------------ | ------------------------------------------ |
|
|
165
|
+
| asciichartpy | Console ASCII line charts |
|
|
166
|
+
| plotly | Interactive browser-based graphing library |
|
|
167
|
+
|
|
138
168
|
## Data analysis workflow
|
|
139
169
|
|
|
140
170
|
Once the EasyDiffraction package is imported, you can proceed with the **data
|
|
@@ -16,9 +16,9 @@ classifiers = [
|
|
|
16
16
|
'Operating System :: OS Independent',
|
|
17
17
|
'Programming Language :: Python :: 3 :: Only',
|
|
18
18
|
'Programming Language :: Python :: 3',
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
19
|
+
'Programming Language :: Python :: 3.11',
|
|
20
|
+
'Programming Language :: Python :: 3.12',
|
|
21
|
+
'Programming Language :: Python :: 3.13',
|
|
22
22
|
]
|
|
23
23
|
requires-python = '>=3.11,<3.14'
|
|
24
24
|
dependencies = [
|
|
@@ -113,10 +113,13 @@ source = 'versioningit' # Use versioningit to manage the version
|
|
|
113
113
|
# source code.
|
|
114
114
|
|
|
115
115
|
[tool.versioningit.format]
|
|
116
|
-
distance = '{base_version}
|
|
117
|
-
dirty = '{base_version}'
|
|
118
|
-
distance-dirty = '{base_version}
|
|
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
|
+
# Configure how versioningit detects versions from Git
|
|
121
|
+
# - 'match' ensures it only considers tags starting with 'v'
|
|
122
|
+
# - 'default-tag' is used as a fallback when no matching tag is found
|
|
120
123
|
[tool.versioningit.vcs]
|
|
121
124
|
method = 'git'
|
|
122
125
|
match = ['v*']
|
|
@@ -20,7 +20,8 @@ try:
|
|
|
20
20
|
|
|
21
21
|
print("✅ 'pycrysfml' calculation engine is successfully imported.")
|
|
22
22
|
except ImportError:
|
|
23
|
-
|
|
23
|
+
# TODO: Add the following print to debug mode
|
|
24
|
+
# print("⚠️ 'pycrysfml' module not found. This calculation engine will not be available.")
|
|
24
25
|
cfml_py_utilities = None
|
|
25
26
|
|
|
26
27
|
|
|
@@ -23,7 +23,8 @@ try:
|
|
|
23
23
|
|
|
24
24
|
print("✅ 'cryspy' calculation engine is successfully imported.")
|
|
25
25
|
except ImportError:
|
|
26
|
-
|
|
26
|
+
# TODO: Add the following print to debug mode
|
|
27
|
+
# print("⚠️ 'cryspy' module not found. This calculation engine will not be available.")
|
|
27
28
|
cryspy = None
|
|
28
29
|
|
|
29
30
|
|
|
@@ -19,7 +19,8 @@ try:
|
|
|
19
19
|
redirect_stdout(open(os.path.devnull, 'w')) # silence the C++ engine output
|
|
20
20
|
print("✅ 'pdffit' calculation engine is successfully imported.")
|
|
21
21
|
except ImportError:
|
|
22
|
-
|
|
22
|
+
# TODO: Add the following print to debug mode
|
|
23
|
+
# print("⚠️ 'pdffit' module not found. This calculation engine will not be available.")
|
|
23
24
|
pdffit = None
|
|
24
25
|
|
|
25
26
|
|
|
@@ -55,6 +55,9 @@ class MinimizerFactory:
|
|
|
55
55
|
|
|
56
56
|
@classmethod
|
|
57
57
|
def show_available_minimizers(cls) -> None:
|
|
58
|
+
# TODO: Rename this method to `show_supported_minimizers` for
|
|
59
|
+
# consistency with other methods in the library. E.g.
|
|
60
|
+
# `show_supported_calculators`, etc.
|
|
58
61
|
"""
|
|
59
62
|
Display a table of available minimizers and their descriptions.
|
|
60
63
|
"""
|
|
@@ -21,23 +21,23 @@ class ExcludedRegion(Component):
|
|
|
21
21
|
def cif_category_key(self) -> str:
|
|
22
22
|
return 'excluded_region'
|
|
23
23
|
|
|
24
|
-
def __init__(self,
|
|
24
|
+
def __init__(self, start: float, end: float):
|
|
25
25
|
super().__init__()
|
|
26
26
|
|
|
27
|
-
self.
|
|
28
|
-
value=
|
|
29
|
-
name='
|
|
30
|
-
cif_name='
|
|
27
|
+
self.start = Descriptor(
|
|
28
|
+
value=start,
|
|
29
|
+
name='start',
|
|
30
|
+
cif_name='start',
|
|
31
31
|
)
|
|
32
|
-
self.
|
|
33
|
-
value=
|
|
34
|
-
name='
|
|
35
|
-
cif_name='
|
|
32
|
+
self.end = Parameter(
|
|
33
|
+
value=end,
|
|
34
|
+
name='end',
|
|
35
|
+
cif_name='end',
|
|
36
36
|
)
|
|
37
37
|
|
|
38
38
|
# Select which of the input parameters is used for the
|
|
39
39
|
# as ID for the whole object
|
|
40
|
-
self._entry_id = f'{
|
|
40
|
+
self._entry_id = f'{start}-{end}'
|
|
41
41
|
|
|
42
42
|
# Lock further attribute additions to prevent
|
|
43
43
|
# accidental modifications by users
|
|
@@ -65,7 +65,7 @@ class ExcludedRegions(Collection):
|
|
|
65
65
|
pattern = experiment.datastore.pattern
|
|
66
66
|
|
|
67
67
|
# Boolean mask for points within the new excluded region
|
|
68
|
-
in_region = (pattern.full_x >= item.
|
|
68
|
+
in_region = (pattern.full_x >= item.start.value) & (pattern.full_x <= item.end.value)
|
|
69
69
|
|
|
70
70
|
# Update the exclusion mask
|
|
71
71
|
pattern.excluded[in_region] = True
|
|
@@ -79,13 +79,13 @@ class ExcludedRegions(Collection):
|
|
|
79
79
|
# TODO: Consider moving this to the base class
|
|
80
80
|
# to avoid code duplication with implementations in Background, etc.
|
|
81
81
|
# Consider using parameter names as column headers
|
|
82
|
-
columns_headers: List[str] = ['
|
|
82
|
+
columns_headers: List[str] = ['start', 'end']
|
|
83
83
|
columns_alignment = ['left', 'left']
|
|
84
84
|
columns_data: List[List[float]] = []
|
|
85
85
|
for region in self._items.values():
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
columns_data.append([
|
|
86
|
+
start = region.start.value
|
|
87
|
+
end = region.end.value
|
|
88
|
+
columns_data.append([start, end])
|
|
89
89
|
|
|
90
90
|
print(paragraph('Excluded regions'))
|
|
91
91
|
render_table(
|
|
@@ -7,9 +7,8 @@ from abc import abstractmethod
|
|
|
7
7
|
import numpy as np
|
|
8
8
|
|
|
9
9
|
from easydiffraction.utils.utils import is_notebook
|
|
10
|
-
from easydiffraction.utils.utils import is_pycharm
|
|
11
10
|
|
|
12
|
-
DEFAULT_ENGINE = 'plotly' if is_notebook()
|
|
11
|
+
DEFAULT_ENGINE = 'plotly' if is_notebook() else 'asciichartpy'
|
|
13
12
|
DEFAULT_HEIGHT = 9
|
|
14
13
|
DEFAULT_MIN = -np.inf
|
|
15
14
|
DEFAULT_MAX = np.inf
|
|
@@ -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
|
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
General utilities and helpers for easydiffraction.
|
|
6
6
|
"""
|
|
7
7
|
|
|
8
|
+
import importlib
|
|
8
9
|
import os
|
|
9
10
|
import re
|
|
10
11
|
from typing import List
|
|
@@ -79,14 +80,19 @@ def is_notebook() -> bool:
|
|
|
79
80
|
if IPython is None:
|
|
80
81
|
return False
|
|
81
82
|
|
|
83
|
+
if is_pycharm(): # Running inside PyCharm
|
|
84
|
+
return True
|
|
85
|
+
elif is_colab(): # Running inside Google Colab
|
|
86
|
+
return True
|
|
87
|
+
|
|
82
88
|
try:
|
|
83
89
|
shell = get_ipython().__class__.__name__ # noqa: F821
|
|
84
|
-
if shell == 'ZMQInteractiveShell':
|
|
85
|
-
return True
|
|
86
|
-
elif shell == 'TerminalInteractiveShell':
|
|
87
|
-
return False
|
|
88
|
-
else:
|
|
89
|
-
return False
|
|
90
|
+
if shell == 'ZMQInteractiveShell': # Jupyter notebook or qtconsole
|
|
91
|
+
return True
|
|
92
|
+
elif shell == 'TerminalInteractiveShell': # Terminal running IPython
|
|
93
|
+
return False
|
|
94
|
+
else: # Other type (unlikely)
|
|
95
|
+
return False
|
|
90
96
|
except NameError:
|
|
91
97
|
return False # Probably standard Python interpreter
|
|
92
98
|
|
|
@@ -101,6 +107,19 @@ def is_pycharm() -> bool:
|
|
|
101
107
|
return os.environ.get('PYCHARM_HOSTED') == '1'
|
|
102
108
|
|
|
103
109
|
|
|
110
|
+
def is_colab() -> bool:
|
|
111
|
+
"""
|
|
112
|
+
Determines if the current environment is Google Colab.
|
|
113
|
+
|
|
114
|
+
Returns:
|
|
115
|
+
bool: True if running in Google Colab PyCharm, False otherwise.
|
|
116
|
+
"""
|
|
117
|
+
try:
|
|
118
|
+
return importlib.util.find_spec('google.colab') is not None
|
|
119
|
+
except ModuleNotFoundError:
|
|
120
|
+
return False
|
|
121
|
+
|
|
122
|
+
|
|
104
123
|
def is_github_ci() -> bool:
|
|
105
124
|
"""
|
|
106
125
|
Determines if the current process is running in GitHub Actions CI.
|
|
@@ -56,7 +56,7 @@ def test_single_fit_neutron_pd_tof_mcstas_lbco_si() -> None:
|
|
|
56
56
|
project.experiments.add(expt)
|
|
57
57
|
|
|
58
58
|
# Exclude regions from fitting
|
|
59
|
-
project.experiments['mcstas'].excluded_regions.add(
|
|
59
|
+
project.experiments['mcstas'].excluded_regions.add(start=108000, end=200000)
|
|
60
60
|
|
|
61
61
|
# Prepare for fitting
|
|
62
62
|
project.analysis.current_calculator = 'cryspy'
|
|
@@ -79,6 +79,13 @@ def ensure_bootstrap(nb) -> bool:
|
|
|
79
79
|
|
|
80
80
|
def process_notebook(path: Path) -> int:
|
|
81
81
|
nb = nbformat.read(path, as_version=4)
|
|
82
|
+
|
|
83
|
+
# Remove all 'tags' metadata from cells
|
|
84
|
+
for cell in nb.cells:
|
|
85
|
+
if 'tags' in cell.metadata:
|
|
86
|
+
cell.metadata.pop('tags')
|
|
87
|
+
|
|
88
|
+
# Add the bootstrap cell if needed
|
|
82
89
|
changed = 0
|
|
83
90
|
if ensure_bootstrap(nb):
|
|
84
91
|
changed += 1
|
|
@@ -206,12 +206,12 @@ expt47.linked_phases.add('ncaf', scale=2.0)
|
|
|
206
206
|
# #### Set Excluded Regions
|
|
207
207
|
|
|
208
208
|
# %%
|
|
209
|
-
expt56.excluded_regions.add(
|
|
210
|
-
expt56.excluded_regions.add(
|
|
209
|
+
expt56.excluded_regions.add(start=0, end=10010)
|
|
210
|
+
expt56.excluded_regions.add(start=100010, end=200000)
|
|
211
211
|
|
|
212
212
|
# %%
|
|
213
|
-
expt47.excluded_regions.add(
|
|
214
|
-
expt47.excluded_regions.add(
|
|
213
|
+
expt47.excluded_regions.add(start=0, end=10006)
|
|
214
|
+
expt47.excluded_regions.add(start=100004, end=200000)
|
|
215
215
|
|
|
216
216
|
# %% [markdown]
|
|
217
217
|
# ## Define Project
|
|
@@ -240,8 +240,8 @@ project.plot_meas(expt_name='mcstas')
|
|
|
240
240
|
# Add excluded regions.
|
|
241
241
|
|
|
242
242
|
# %%
|
|
243
|
-
experiment.excluded_regions.add(
|
|
244
|
-
experiment.excluded_regions.add(
|
|
243
|
+
experiment.excluded_regions.add(start=0, end=40000)
|
|
244
|
+
experiment.excluded_regions.add(start=108000, end=200000)
|
|
245
245
|
|
|
246
246
|
# %% [markdown]
|
|
247
247
|
# Show excluded regions.
|