easydiffraction 0.1.3__tar.gz → 0.1.5__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.1.5/.github/workflows/release-drafter.yml +37 -0
- {easydiffraction-0.1.3 → easydiffraction-0.1.5}/.github/workflows/test-ipynb.yml +2 -1
- {easydiffraction-0.1.3 → easydiffraction-0.1.5}/.github/workflows/test-package.yaml +2 -1
- {easydiffraction-0.1.3 → easydiffraction-0.1.5}/PKG-INFO +3 -5
- {easydiffraction-0.1.3 → easydiffraction-0.1.5}/easydiffraction/Job.py +104 -20
- {easydiffraction-0.1.3 → easydiffraction-0.1.5}/easydiffraction/Profiles/P1D.py +67 -0
- {easydiffraction-0.1.3 → easydiffraction-0.1.5}/easydiffraction/__init__.py +2 -1
- easydiffraction-0.1.5/easydiffraction/io/download.py +24 -0
- easydiffraction-0.1.3/examples/Change_minimizer.ipynb → easydiffraction-0.1.5/examples/Change-minimizer.ipynb +161 -180
- easydiffraction-0.1.5/examples/Define-experiment.ipynb +247 -0
- easydiffraction-0.1.5/examples/Define-model.ipynb +304 -0
- easydiffraction-0.1.5/examples/Fitting-emcee_pd-neut-cwl_LBCO-HRPT.ipynb +840 -0
- easydiffraction-0.1.3/examples/Fitting_PD-NEUT-CW_LBCO-HRPT.ipynb → easydiffraction-0.1.5/examples/Fitting_pd-neut-cwl_LBCO-HRPT.ipynb +214 -202
- easydiffraction-0.1.3/examples/Fitting_PD-NEUT-TOF_NCAF-WISH.ipynb → easydiffraction-0.1.5/examples/Fitting_pd-neut-tof_NCAF-WISH.ipynb +153 -264
- easydiffraction-0.1.3/examples/Fitting_PD-NEUT-TOF_Si-SEPD.ipynb → easydiffraction-0.1.5/examples/Fitting_pd-neut-tof_Si-SEPD.ipynb +132 -142
- easydiffraction-0.1.5/examples/Simulation_pd-xray_NaCl.ipynb +431 -0
- easydiffraction-0.1.5/examples/data/lbco_adp.cif +25 -0
- easydiffraction-0.1.5/examples_old/Simulation_xray.ipynb +414 -0
- easydiffraction-0.1.5/examples_old/advanced/refinement_bumps_dream.ipynb +752 -0
- easydiffraction-0.1.5/examples_old/advanced/refinement_emcee.ipynb +892 -0
- {easydiffraction-0.1.3 → easydiffraction-0.1.5}/pyproject.toml +4 -5
- easydiffraction-0.1.5/tests/resources/d1a.cif +2950 -0
- easydiffraction-0.1.3/.github/workflows/release-drafter.yml +0 -18
- {easydiffraction-0.1.3 → easydiffraction-0.1.5}/.github/dependabot.yml +0 -0
- {easydiffraction-0.1.3 → easydiffraction-0.1.5}/.github/release-drafter.yml +0 -0
- {easydiffraction-0.1.3 → easydiffraction-0.1.5}/.github/workflows/delete-old-runs.yml +0 -0
- {easydiffraction-0.1.3 → easydiffraction-0.1.5}/.github/workflows/ossar-analysis.yml +0 -0
- {easydiffraction-0.1.3 → easydiffraction-0.1.5}/.github/workflows/pypi-publish.yml +0 -0
- {easydiffraction-0.1.3 → easydiffraction-0.1.5}/.github/workflows/test-code.yaml +0 -0
- {easydiffraction-0.1.3 → easydiffraction-0.1.5}/.github/workflows/verify-pr-labels.yml +0 -0
- {easydiffraction-0.1.3 → easydiffraction-0.1.5}/.gitignore +0 -0
- {easydiffraction-0.1.3 → easydiffraction-0.1.5}/CONTRIBUTING.md +0 -0
- {easydiffraction-0.1.3 → easydiffraction-0.1.5}/DEVELOPMENT.md +0 -0
- {easydiffraction-0.1.3 → easydiffraction-0.1.5}/LICENSE +0 -0
- {easydiffraction-0.1.3 → easydiffraction-0.1.5}/README.md +0 -0
- {easydiffraction-0.1.3 → easydiffraction-0.1.5}/easydiffraction/Interfaces/CFML.py +0 -0
- {easydiffraction-0.1.3 → easydiffraction-0.1.5}/easydiffraction/Interfaces/GSASII.py +0 -0
- {easydiffraction-0.1.3 → easydiffraction-0.1.5}/easydiffraction/Interfaces/__init__.py +0 -0
- {easydiffraction-0.1.3 → easydiffraction-0.1.5}/easydiffraction/Interfaces/cryspy.py +0 -0
- {easydiffraction-0.1.3 → easydiffraction-0.1.5}/easydiffraction/Interfaces/cryspyV2.py +0 -0
- {easydiffraction-0.1.3 → easydiffraction-0.1.5}/easydiffraction/Interfaces/interfaceTemplate.py +0 -0
- {easydiffraction-0.1.3 → easydiffraction-0.1.5}/easydiffraction/Interfaces/pdffit2.py +0 -0
- {easydiffraction-0.1.3 → easydiffraction-0.1.5}/easydiffraction/Interfaces/types.py +0 -0
- {easydiffraction-0.1.3 → easydiffraction-0.1.5}/easydiffraction/Jobs.py +0 -0
- {easydiffraction-0.1.3 → easydiffraction-0.1.5}/easydiffraction/Profiles/Analysis.py +0 -0
- {easydiffraction-0.1.3 → easydiffraction-0.1.5}/easydiffraction/Profiles/Container.py +0 -0
- {easydiffraction-0.1.3 → easydiffraction-0.1.5}/easydiffraction/Profiles/Experiment.py +0 -0
- {easydiffraction-0.1.3 → easydiffraction-0.1.5}/easydiffraction/Profiles/JobType.py +0 -0
- {easydiffraction-0.1.3 → easydiffraction-0.1.5}/easydiffraction/Profiles/Sample.py +0 -0
- {easydiffraction-0.1.3 → easydiffraction-0.1.5}/easydiffraction/Profiles/__init__.py +0 -0
- {easydiffraction-0.1.3 → easydiffraction-0.1.5}/easydiffraction/Profiles/common.py +0 -0
- {easydiffraction-0.1.3 → easydiffraction-0.1.5}/easydiffraction/Runner.py +0 -0
- {easydiffraction-0.1.3 → easydiffraction-0.1.5}/easydiffraction/calculators/CFML.py +0 -0
- {easydiffraction-0.1.3 → easydiffraction-0.1.5}/easydiffraction/calculators/GSASII.py +0 -0
- {easydiffraction-0.1.3 → easydiffraction-0.1.5}/easydiffraction/calculators/__init__.py +0 -0
- {easydiffraction-0.1.3 → easydiffraction-0.1.5}/easydiffraction/calculators/cryspy.py +0 -0
- {easydiffraction-0.1.3 → easydiffraction-0.1.5}/easydiffraction/calculators/pdffit2.py +0 -0
- {easydiffraction-0.1.3 → easydiffraction-0.1.5}/easydiffraction/components/__init__.py +0 -0
- {easydiffraction-0.1.3 → easydiffraction-0.1.5}/easydiffraction/components/phase.py +0 -0
- {easydiffraction-0.1.3 → easydiffraction-0.1.5}/easydiffraction/components/polarization.py +0 -0
- {easydiffraction-0.1.3 → easydiffraction-0.1.5}/easydiffraction/components/site.py +0 -0
- {easydiffraction-0.1.3 → easydiffraction-0.1.5}/easydiffraction/elements/Backgrounds/Background.py +0 -0
- {easydiffraction-0.1.3 → easydiffraction-0.1.5}/easydiffraction/elements/Backgrounds/Factorial.py +0 -0
- {easydiffraction-0.1.3 → easydiffraction-0.1.5}/easydiffraction/elements/Backgrounds/Point.py +0 -0
- {easydiffraction-0.1.3 → easydiffraction-0.1.5}/easydiffraction/elements/Backgrounds/__init__.py +0 -0
- {easydiffraction-0.1.3 → easydiffraction-0.1.5}/easydiffraction/elements/Experiments/Experiment.py +0 -0
- {easydiffraction-0.1.3 → easydiffraction-0.1.5}/easydiffraction/elements/Experiments/Pattern.py +0 -0
- {easydiffraction-0.1.3 → easydiffraction-0.1.5}/easydiffraction/elements/Experiments/__init__.py +0 -0
- {easydiffraction-0.1.3 → easydiffraction-0.1.5}/easydiffraction/elements/__init__.py +0 -0
- {easydiffraction-0.1.3 → easydiffraction-0.1.5}/easydiffraction/interface.py +0 -0
- {easydiffraction-0.1.3 → easydiffraction-0.1.5}/easydiffraction/io/__init__.py +0 -0
- {easydiffraction-0.1.3 → easydiffraction-0.1.5}/easydiffraction/io/cif.py +0 -0
- {easydiffraction-0.1.3 → easydiffraction-0.1.5}/easydiffraction/io/cif_reader.py +0 -0
- {easydiffraction-0.1.3 → easydiffraction-0.1.5}/easydiffraction/io/cryspy_parser.py +0 -0
- {easydiffraction-0.1.3 → easydiffraction-0.1.5}/easydiffraction/io/helpers.py +0 -0
- {easydiffraction-0.1.3 → easydiffraction-0.1.5}/easydiffraction/main.py +0 -0
- {easydiffraction-0.1.3 → easydiffraction-0.1.5}/easydiffraction/sample.py +0 -0
- {easydiffraction-0.1.3/examples_old → easydiffraction-0.1.5/examples/data}/d1a.cif +0 -0
- {easydiffraction-0.1.3 → easydiffraction-0.1.5}/examples/data/hrpt.xye +0 -0
- {easydiffraction-0.1.3 → easydiffraction-0.1.5}/examples/data/lbco.cif +0 -0
- {easydiffraction-0.1.3 → easydiffraction-0.1.5}/examples/data/ncaf.cif +0 -0
- {easydiffraction-0.1.3 → easydiffraction-0.1.5}/examples/data/sepd.xye +0 -0
- {easydiffraction-0.1.3 → easydiffraction-0.1.5}/examples/data/si.cif +0 -0
- {easydiffraction-0.1.3 → easydiffraction-0.1.5}/examples/data/wish.xye +0 -0
- {easydiffraction-0.1.3 → easydiffraction-0.1.5}/examples_old/3T2@LLB.xye +0 -0
- {easydiffraction-0.1.3 → easydiffraction-0.1.5}/examples_old/D1A@ILL.xye +0 -0
- {easydiffraction-0.1.3 → easydiffraction-0.1.5}/examples_old/Fitting.ipynb +0 -0
- {easydiffraction-0.1.3 → easydiffraction-0.1.5}/examples_old/Fitting_PD-CW_La0.5Ba0.5CoO3-HRPT@PSI/fitting.ipynb +0 -0
- {easydiffraction-0.1.3 → easydiffraction-0.1.5}/examples_old/Fitting_PD-CW_La0.5Ba0.5CoO3-HRPT@PSI/fitting.py +0 -0
- {easydiffraction-0.1.3 → easydiffraction-0.1.5}/examples_old/Fitting_PD-CW_La0.5Ba0.5CoO3-HRPT@PSI/hrpt.xye +0 -0
- {easydiffraction-0.1.3 → easydiffraction-0.1.5}/examples_old/Fitting_PD-TOF_Si-SEPD@Argonne/fitting copy.py +0 -0
- {easydiffraction-0.1.3 → easydiffraction-0.1.5}/examples_old/Fitting_PD-TOF_Si-SEPD@Argonne/fitting.ipynb +0 -0
- {easydiffraction-0.1.3 → easydiffraction-0.1.5}/examples_old/Fitting_PD-TOF_Si-SEPD@Argonne/fitting.py +0 -0
- {easydiffraction-0.1.3 → easydiffraction-0.1.5}/examples_old/Fitting_PD-TOF_Si-SEPD@Argonne/sepd.xye +0 -0
- {easydiffraction-0.1.3 → easydiffraction-0.1.5}/examples_old/Fitting_PD-TOF_Si-SEPD@Argonne/si.cif +0 -0
- {easydiffraction-0.1.3 → easydiffraction-0.1.5}/examples_old/Fitting_TOF.ipynb +0 -0
- {easydiffraction-0.1.3 → easydiffraction-0.1.5}/examples_old/Fitting_TOF_xye.ipynb +0 -0
- {easydiffraction-0.1.3 → easydiffraction-0.1.5}/examples_old/Fitting_multiphase.ipynb +0 -0
- {easydiffraction-0.1.3 → easydiffraction-0.1.5}/examples_old/PDF/Calculate_PDF_Profile_Ni.ipynb +0 -0
- {easydiffraction-0.1.3 → easydiffraction-0.1.5}/examples_old/PDF/Fitting_PDF_Profile_Ni.ipynb +0 -0
- {easydiffraction-0.1.3 → easydiffraction-0.1.5}/examples_old/PDF/Fitting_PDF_Profile_Si.ipynb +0 -0
- {easydiffraction-0.1.3 → easydiffraction-0.1.5}/examples_old/PDF/data/4507226.cif +0 -0
- {easydiffraction-0.1.3 → easydiffraction-0.1.5}/examples_old/PDF/data/Ni-xray.gr +0 -0
- {easydiffraction-0.1.3 → easydiffraction-0.1.5}/examples_old/PDF/data/Ni.cif +0 -0
- {easydiffraction-0.1.3 → easydiffraction-0.1.5}/examples_old/PDF/data/Si_calibration_cryostat_100A.fgr +0 -0
- {easydiffraction-0.1.3 → easydiffraction-0.1.5}/examples_old/PDF/data/Si_calibration_cryostat_20A.fgr +0 -0
- {easydiffraction-0.1.3 → easydiffraction-0.1.5}/examples_old/PDF/data/Si_calibration_cryostat_20A_01Rmin.fgr +0 -0
- {easydiffraction-0.1.3 → easydiffraction-0.1.5}/examples_old/PDF/data/Si_calibration_cryostat_50A.fgr +0 -0
- {easydiffraction-0.1.3 → easydiffraction-0.1.5}/examples_old/PDF/data/Si_calibration_cryostat_50A_01Rmin.fgr +0 -0
- {easydiffraction-0.1.3 → easydiffraction-0.1.5}/examples_old/PDF2/Calculate_PDF_Profile.ipynb +0 -0
- {easydiffraction-0.1.3 → easydiffraction-0.1.5}/examples_old/PDF2/Fitting_PDF_Profile.ipynb +0 -0
- {easydiffraction-0.1.3 → easydiffraction-0.1.5}/examples_old/PDF2/Ni-xray.gr +0 -0
- {easydiffraction-0.1.3 → easydiffraction-0.1.5}/examples_old/PDF2/Ni.cif +0 -0
- {easydiffraction-0.1.3 → easydiffraction-0.1.5}/examples_old/PDF2/Ni_fitting.py +0 -0
- {easydiffraction-0.1.3 → easydiffraction-0.1.5}/examples_old/PDF2/Ni_profile.py +0 -0
- {easydiffraction-0.1.3 → easydiffraction-0.1.5}/examples_old/PbSO4.cif +0 -0
- {easydiffraction-0.1.3 → easydiffraction-0.1.5}/examples_old/PolNPD5T.cif +0 -0
- {easydiffraction-0.1.3 → easydiffraction-0.1.5}/examples_old/Polarized.ipynb +0 -0
- {easydiffraction-0.1.3 → easydiffraction-0.1.5}/examples_old/Simulation.ipynb +0 -0
- {easydiffraction-0.1.3 → easydiffraction-0.1.5}/examples_old/TestingAPI/CrysPy/rhochi_unpolarized_tof_powder_Si/calc_chisq.py +0 -0
- {easydiffraction-0.1.3 → easydiffraction-0.1.5}/examples_old/TestingAPI/CrysPy/rhochi_unpolarized_tof_powder_Si/cryspy_PbSO4-D1A@ILL.rcif +0 -0
- {easydiffraction-0.1.3 → easydiffraction-0.1.5}/examples_old/TestingAPI/CrysPy/rhochi_unpolarized_tof_powder_Si/cryspy_unpolarized_tof_powder_Si.rcif +0 -0
- {easydiffraction-0.1.3 → easydiffraction-0.1.5}/examples_old/TestingAPI/CrysPy/rhochi_unpolarized_tof_powder_Si/refinement.py +0 -0
- {easydiffraction-0.1.3 → easydiffraction-0.1.5}/examples_old/TestingAPI/CrysPy/rhochi_unpolarized_tof_powder_Si/rhochi_unpolarized_tof_powder_CeCuAl.rcif +0 -0
- {easydiffraction-0.1.3 → easydiffraction-0.1.5}/examples_old/TestingAPI/EDB/experiments/d1a.cif +0 -0
- {easydiffraction-0.1.3 → easydiffraction-0.1.5}/examples_old/TestingAPI/EDB/models/pbso4.cif +0 -0
- {easydiffraction-0.1.3 → easydiffraction-0.1.5}/examples_old/TestingAPI/EDB/models/pbso4_dark.png +0 -0
- {easydiffraction-0.1.3 → easydiffraction-0.1.5}/examples_old/TestingAPI/EDB/project.cif +0 -0
- {easydiffraction-0.1.3 → easydiffraction-0.1.5}/examples_old/TestingAPI/EDB/summary/report.cif +0 -0
- {easydiffraction-0.1.3 → easydiffraction-0.1.5}/examples_old/TestingAPI/EDL/D1A@ILL.xye +0 -0
- {easydiffraction-0.1.3 → easydiffraction-0.1.5}/examples_old/TestingAPI/EDL/PbSO4.cif +0 -0
- {easydiffraction-0.1.3 → easydiffraction-0.1.5}/examples_old/TestingAPI/EDL/TestingAPI.py +0 -0
- {easydiffraction-0.1.3/tests/resources → easydiffraction-0.1.5/examples_old}/d1a.cif +0 -0
- {easydiffraction-0.1.3 → easydiffraction-0.1.5}/examples_old/diamond_exp.xye +0 -0
- {easydiffraction-0.1.3 → easydiffraction-0.1.5}/examples_old/diamond_phase.cif +0 -0
- {easydiffraction-0.1.3 → easydiffraction-0.1.5}/examples_old/experiment_polarized.xye +0 -0
- {easydiffraction-0.1.3 → easydiffraction-0.1.5}/examples_old/multiphase.cif +0 -0
- {easydiffraction-0.1.3 → easydiffraction-0.1.5}/examples_old/ncaf.cif +0 -0
- {easydiffraction-0.1.3 → easydiffraction-0.1.5}/examples_old/structure_polarized.cif +0 -0
- {easydiffraction-0.1.3 → easydiffraction-0.1.5}/examples_old/wish.cif +0 -0
- {easydiffraction-0.1.3 → easydiffraction-0.1.5}/tests/__init__.py +0 -0
- {easydiffraction-0.1.3 → easydiffraction-0.1.5}/tests/integration_tests/CFML_Cryspy.png +0 -0
- {easydiffraction-0.1.3 → easydiffraction-0.1.5}/tests/integration_tests/FittingData.ipynb +0 -0
- {easydiffraction-0.1.3 → easydiffraction-0.1.5}/tests/integration_tests/FittingData_CFML-xarrays.ipynb +0 -0
- {easydiffraction-0.1.3 → easydiffraction-0.1.5}/tests/integration_tests/FittingData_CFML.ipynb +0 -0
- {easydiffraction-0.1.3 → easydiffraction-0.1.5}/tests/integration_tests/PbSO4.cif +0 -0
- {easydiffraction-0.1.3 → easydiffraction-0.1.5}/tests/integration_tests/PbSO4_neutrons_short.xye +0 -0
- {easydiffraction-0.1.3 → easydiffraction-0.1.5}/tests/integration_tests/PbSO4_xrays_short.xye +0 -0
- {easydiffraction-0.1.3 → easydiffraction-0.1.5}/tests/integration_tests/SrTiO3.cif +0 -0
- {easydiffraction-0.1.3 → easydiffraction-0.1.5}/tests/integration_tests/WorkedExample2.ipynb +0 -0
- {easydiffraction-0.1.3 → easydiffraction-0.1.5}/tests/integration_tests/fit_script.py +0 -0
- {easydiffraction-0.1.3 → easydiffraction-0.1.5}/tests/integration_tests/test1.py +0 -0
- {easydiffraction-0.1.3 → easydiffraction-0.1.5}/tests/integration_tests/test3.py +0 -0
- {easydiffraction-0.1.3 → easydiffraction-0.1.5}/tests/integration_tests/workedExample1.ipynb +0 -0
- {easydiffraction-0.1.3 → easydiffraction-0.1.5}/tests/integration_tests/xarray_test.ipynb +0 -0
- {easydiffraction-0.1.3 → easydiffraction-0.1.5}/tests/resources/PbSO4.cif +0 -0
- {easydiffraction-0.1.3 → easydiffraction-0.1.5}/tests/resources/PolNPD5T.cif +0 -0
- {easydiffraction-0.1.3 → easydiffraction-0.1.5}/tests/unit_tests/Calculators/__init__.py +0 -0
- {easydiffraction-0.1.3 → easydiffraction-0.1.5}/tests/unit_tests/Elements/__init__.py +0 -0
- {easydiffraction-0.1.3 → easydiffraction-0.1.5}/tests/unit_tests/Interfaces/__init__.py +0 -0
- {easydiffraction-0.1.3 → easydiffraction-0.1.5}/tests/unit_tests/Profiles/__init__.py +0 -0
- {easydiffraction-0.1.3 → easydiffraction-0.1.5}/tests/unit_tests/Profiles/test_Experiment.py +0 -0
- {easydiffraction-0.1.3 → easydiffraction-0.1.5}/tests/unit_tests/Profiles/test_JobType.py +0 -0
- {easydiffraction-0.1.3 → easydiffraction-0.1.5}/tests/unit_tests/__init__.py +0 -0
- {easydiffraction-0.1.3 → easydiffraction-0.1.5}/tests/unit_tests/test_Job.py +0 -0
- {easydiffraction-0.1.3 → easydiffraction-0.1.5}/tests/unit_tests/test_Jobs.py +0 -0
- {easydiffraction-0.1.3 → easydiffraction-0.1.5}/tests/unit_tests/test_Runner.py +0 -0
- {easydiffraction-0.1.3 → easydiffraction-0.1.5}/tests/unit_tests/test_interface.py +0 -0
- {easydiffraction-0.1.3 → easydiffraction-0.1.5}/tests/unit_tests/test_sample.py +0 -0
- {easydiffraction-0.1.3 → easydiffraction-0.1.5}/tools/Scripts/generate_html.py +0 -0
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
# Drafts your next Release notes as pull requests are merged into default branch
|
|
2
|
+
|
|
3
|
+
name: Update release draft
|
|
4
|
+
|
|
5
|
+
on:
|
|
6
|
+
# Runs on pushes targeting the default branch
|
|
7
|
+
push:
|
|
8
|
+
branches: [master]
|
|
9
|
+
|
|
10
|
+
jobs:
|
|
11
|
+
update-release-draft:
|
|
12
|
+
|
|
13
|
+
runs-on: ubuntu-latest
|
|
14
|
+
|
|
15
|
+
steps:
|
|
16
|
+
- uses: release-drafter/release-drafter@v6
|
|
17
|
+
id: create_release
|
|
18
|
+
env:
|
|
19
|
+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
20
|
+
|
|
21
|
+
- name: Check-out repository
|
|
22
|
+
uses: actions/checkout@v4
|
|
23
|
+
|
|
24
|
+
# Zips the examples directory
|
|
25
|
+
- name: Zip examples directory
|
|
26
|
+
run: zip -r examples.zip examples/
|
|
27
|
+
|
|
28
|
+
# Uploads the zipped examples directory to the release draft
|
|
29
|
+
- name: Upload zipped examples directory
|
|
30
|
+
uses: actions/upload-release-asset@v1
|
|
31
|
+
env:
|
|
32
|
+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
33
|
+
with:
|
|
34
|
+
upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the create_release step above
|
|
35
|
+
asset_path: ./examples.zip
|
|
36
|
+
asset_name: examples.zip
|
|
37
|
+
asset_content_type: application/zip
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
Metadata-Version: 2.3
|
|
2
2
|
Name: easydiffraction
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.5
|
|
4
4
|
Summary: Making diffraction data analysis and modelling easy
|
|
5
5
|
Project-URL: homepage, https://easydiffraction.org
|
|
6
6
|
Project-URL: documentation, https://docs.easydiffraction.org/lib
|
|
7
7
|
Project-URL: source, https://github.com/EasyScience/EasyDiffractionLib
|
|
8
8
|
Project-URL: tracker, https://github.com/EasyScience/EasyDiffractionLib/issues
|
|
9
|
-
Author:
|
|
9
|
+
Author-email: EasyDiffraction contributors <support@easydiffraction.org>
|
|
10
10
|
License: BSD 3-Clause License
|
|
11
11
|
|
|
12
12
|
Copyright (c) 2024, EasyDiffractionLib contributors (https://github.com/EasyScience/EasyDiffractionLib)
|
|
@@ -36,7 +36,6 @@ License: BSD 3-Clause License
|
|
|
36
36
|
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
|
37
37
|
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
38
38
|
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
39
|
-
License-File: LICENSE
|
|
40
39
|
Classifier: Development Status :: 4 - Beta
|
|
41
40
|
Classifier: License :: OSI Approved :: BSD License
|
|
42
41
|
Classifier: Operating System :: OS Independent
|
|
@@ -51,18 +50,17 @@ Requires-Python: <3.13,>=3.9
|
|
|
51
50
|
Requires-Dist: cryspy
|
|
52
51
|
Requires-Dist: easycrystallography
|
|
53
52
|
Requires-Dist: easyscience
|
|
53
|
+
Requires-Dist: pooch
|
|
54
54
|
Provides-Extra: charts
|
|
55
55
|
Requires-Dist: darkdetect; extra == 'charts'
|
|
56
56
|
Requires-Dist: pandas; extra == 'charts'
|
|
57
57
|
Requires-Dist: plotly; extra == 'charts'
|
|
58
|
-
Requires-Dist: pooch; extra == 'charts'
|
|
59
58
|
Requires-Dist: py3dmol; extra == 'charts'
|
|
60
59
|
Provides-Extra: dev
|
|
61
60
|
Requires-Dist: build; extra == 'dev'
|
|
62
61
|
Requires-Dist: jinja2; extra == 'dev'
|
|
63
62
|
Requires-Dist: nbmake; extra == 'dev'
|
|
64
63
|
Requires-Dist: nbqa; extra == 'dev'
|
|
65
|
-
Requires-Dist: pooch; extra == 'dev'
|
|
66
64
|
Requires-Dist: pytest; extra == 'dev'
|
|
67
65
|
Requires-Dist: pytest-cov; extra == 'dev'
|
|
68
66
|
Requires-Dist: pytest-xdist; extra == 'dev'
|
|
@@ -63,6 +63,7 @@ except ImportError:
|
|
|
63
63
|
print("pandas not installed")
|
|
64
64
|
|
|
65
65
|
try:
|
|
66
|
+
from IPython.display import HTML
|
|
66
67
|
from IPython.display import display
|
|
67
68
|
except ImportError:
|
|
68
69
|
pass
|
|
@@ -139,6 +140,7 @@ class DiffractionJob(JobBase):
|
|
|
139
140
|
self.sample = sample # container for phases
|
|
140
141
|
self.interface = self.sample._interface
|
|
141
142
|
self.analysis = analysis
|
|
143
|
+
self.update_job_type()
|
|
142
144
|
# necessary for the fitter
|
|
143
145
|
# TODO: remove the dependency on kwargs
|
|
144
146
|
self._kwargs = {}
|
|
@@ -328,7 +330,14 @@ class DiffractionJob(JobBase):
|
|
|
328
330
|
self.type.is_tof = self.experiment.is_tof
|
|
329
331
|
self.type.is_sc = self.experiment.is_single_crystal
|
|
330
332
|
self.type.is_2d = self.experiment.is_2d
|
|
331
|
-
|
|
333
|
+
# radiation
|
|
334
|
+
if hasattr(self.sample, 'pattern') and self.sample.pattern is not None:
|
|
335
|
+
if self.type.is_xray:
|
|
336
|
+
self.sample.pattern.radiation = "x-ray"
|
|
337
|
+
elif self.type.is_neut:
|
|
338
|
+
self.sample.pattern.radiation = "neutron"
|
|
339
|
+
|
|
340
|
+
# axis
|
|
332
341
|
if self.type.is_tof:
|
|
333
342
|
self._x_axis_name = "time"
|
|
334
343
|
if self.pattern is not None:
|
|
@@ -586,16 +595,27 @@ class DiffractionJob(JobBase):
|
|
|
586
595
|
if result is None:
|
|
587
596
|
raise ValueError("Fitting failed")
|
|
588
597
|
|
|
598
|
+
# Print fitting result. If in a notebook, use emojis.
|
|
599
|
+
success_msg = "Success"
|
|
600
|
+
failure_msg = "Failure"
|
|
601
|
+
duration_msg = f"{end - start:.2f} s"
|
|
602
|
+
if self.is_notebook():
|
|
603
|
+
success_msg = f'🥳 {success_msg}'
|
|
604
|
+
failure_msg = f'😩 {failure_msg}'
|
|
605
|
+
duration_msg = f'⌛ {duration_msg}'
|
|
606
|
+
print("Fitting result")
|
|
589
607
|
if result.success:
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
608
|
+
reduced_chi_msg = f"{result.reduced_chi:.2f}"
|
|
609
|
+
if self.is_notebook():
|
|
610
|
+
reduced_chi_msg = f'👍 {reduced_chi_msg}'
|
|
611
|
+
print(f'Status: {success_msg}')
|
|
612
|
+
print(f'Duration: {duration_msg}')
|
|
613
|
+
print(f'Reduced χ²: {reduced_chi_msg}')
|
|
593
614
|
else:
|
|
594
|
-
print(
|
|
615
|
+
print(f'Status: {failure_msg}')
|
|
595
616
|
|
|
596
617
|
self.fitting_results = result
|
|
597
618
|
|
|
598
|
-
|
|
599
619
|
###### UTILITY METHODS ######
|
|
600
620
|
def add_datastore(self, datastore: xr.Dataset):
|
|
601
621
|
'''
|
|
@@ -631,7 +651,7 @@ class DiffractionJob(JobBase):
|
|
|
631
651
|
phase = self.phases[id]
|
|
632
652
|
cif = phase.cif
|
|
633
653
|
|
|
634
|
-
structure_view = py3Dmol.view(linked=False)
|
|
654
|
+
structure_view = py3Dmol.view(width=540, height=480, linked=False)
|
|
635
655
|
structure_view.addModel(cif, 'cif')
|
|
636
656
|
structure_view.setStyle({'sphere': {'colorscheme': 'Jmol', 'scale': .2},
|
|
637
657
|
'stick': {'colorscheme': 'Jmol', 'radius': 0.1}})
|
|
@@ -639,8 +659,8 @@ class DiffractionJob(JobBase):
|
|
|
639
659
|
structure_view.setBackgroundColor('#111')
|
|
640
660
|
structure_view.addUnitCell()
|
|
641
661
|
structure_view.replicateUnitCell(2, 2, 2)
|
|
642
|
-
structure_view.zoomTo()
|
|
643
|
-
structure_view.show()
|
|
662
|
+
structure_view.zoomTo() # To zoom in to the center of the structure
|
|
663
|
+
structure_view.show() # To display the contents of the view object on Jupyter notebook.
|
|
644
664
|
|
|
645
665
|
def print_data(self):
|
|
646
666
|
'''
|
|
@@ -727,6 +747,62 @@ class DiffractionJob(JobBase):
|
|
|
727
747
|
|
|
728
748
|
fig.show()
|
|
729
749
|
|
|
750
|
+
def show_simulation_chart(self, show_legend=True):
|
|
751
|
+
'''
|
|
752
|
+
Show the simulation chart.
|
|
753
|
+
'''
|
|
754
|
+
if importlib.util.find_spec("plotly") is None:
|
|
755
|
+
print("Warning: Plotly not installed. Try `pip install plotly`.")
|
|
756
|
+
return
|
|
757
|
+
|
|
758
|
+
if self.type.is_pd and self.type.is_cwl:
|
|
759
|
+
x_axis_title = '2θ (degree)'
|
|
760
|
+
x = np.arange(self.instrument.twotheta_range_min.raw_value,
|
|
761
|
+
self.instrument.twotheta_range_max.raw_value + self.instrument.twotheta_range_inc.raw_value,
|
|
762
|
+
self.instrument.twotheta_range_inc.raw_value)
|
|
763
|
+
elif self.type.is_pd and self.type.is_tof:
|
|
764
|
+
x_axis_title = 'TOF (µs)'
|
|
765
|
+
x = np.arange(self.instrument.tof_range_min.raw_value,
|
|
766
|
+
self.instrument.tof_range_max.raw_value + self.instrument.tof_range_inc.raw_value,
|
|
767
|
+
self.instrument.tof_range_inc.raw_value)
|
|
768
|
+
else:
|
|
769
|
+
print(f"Warning: Simulation chart not available for this type of job '{self.type}'")
|
|
770
|
+
print("Supported types: 'pd-cwl' and 'pd-tof'")
|
|
771
|
+
|
|
772
|
+
y_calc = self.calculate_profile(x)
|
|
773
|
+
|
|
774
|
+
main_y_range = y_calc.max() - y_calc.min()
|
|
775
|
+
main_y_min = y_calc.min() - main_y_range / 10
|
|
776
|
+
main_y_max = y_calc.max() + main_y_range / 10
|
|
777
|
+
|
|
778
|
+
trace_calc = go.Scatter(
|
|
779
|
+
x=x,
|
|
780
|
+
y=y_calc,
|
|
781
|
+
line=dict(color='rgb(214, 39, 40)'),
|
|
782
|
+
mode='lines',
|
|
783
|
+
name='Total calculated (Icalc)'
|
|
784
|
+
)
|
|
785
|
+
|
|
786
|
+
data = [trace_calc]
|
|
787
|
+
|
|
788
|
+
layout = go.Layout(
|
|
789
|
+
autosize=True,
|
|
790
|
+
margin=dict(autoexpand=True,
|
|
791
|
+
r=30, t=30, b=45),
|
|
792
|
+
legend=dict(yanchor="top", y=1.0,
|
|
793
|
+
xanchor="right", x=1.0),
|
|
794
|
+
xaxis=dict(title_text=x_axis_title),
|
|
795
|
+
yaxis=dict(title_text='Icalc', range=[main_y_min, main_y_max]),
|
|
796
|
+
)
|
|
797
|
+
|
|
798
|
+
fig = go.Figure(data=data, layout=layout)
|
|
799
|
+
|
|
800
|
+
fig.update_xaxes(showline=True, mirror=True, zeroline=False)
|
|
801
|
+
fig.update_yaxes(showline=True, mirror=True, zeroline=False)
|
|
802
|
+
fig.update_layout(showlegend=show_legend)
|
|
803
|
+
|
|
804
|
+
fig.show()
|
|
805
|
+
|
|
730
806
|
def show_analysis_chart(self, show_legend=True):
|
|
731
807
|
'''
|
|
732
808
|
Show the analysis chart.
|
|
@@ -939,27 +1015,27 @@ class DiffractionJob(JobBase):
|
|
|
939
1015
|
return f'{parent_name}.{display_name}'
|
|
940
1016
|
|
|
941
1017
|
def _parameters(self):
|
|
942
|
-
parameters = {'name': [], 'value': [], '
|
|
1018
|
+
parameters = {'name': [], 'value': [], 'unit': [], 'error': [], 'min': [], 'max': [], 'vary': []}
|
|
943
1019
|
for parameter in self.get_parameters():
|
|
944
1020
|
if parameter.enabled:
|
|
945
1021
|
name = self.get_full_parameter_name(parameter.unique_name, parameter.display_name, parameter.url)
|
|
946
|
-
parameters['name'].append(name)
|
|
1022
|
+
parameters['name'].append(f'<name>{name}</name>')
|
|
947
1023
|
parameters['value'].append(parameter.raw_value)
|
|
1024
|
+
parameters['unit'].append(f'<unit>{parameter.unit:~P}</unit>')
|
|
948
1025
|
parameters['error'].append(parameter.error) if parameter.error else parameters['error'].append('')
|
|
949
|
-
parameters['unit'].append(f'{parameter.unit:~P}')
|
|
950
1026
|
parameters['min'].append(parameter.min)
|
|
951
1027
|
parameters['max'].append(parameter.max)
|
|
952
1028
|
parameters['vary'].append(parameter.free) if parameter.free else parameters['vary'].append('')
|
|
953
1029
|
return parameters
|
|
954
1030
|
|
|
955
1031
|
def _free_parameters(self):
|
|
956
|
-
parameters = {'name': [], 'value': [], '
|
|
1032
|
+
parameters = {'name': [], 'value': [], 'unit': [], 'error': []}
|
|
957
1033
|
for parameter in self.get_fit_parameters():
|
|
958
1034
|
name = self.get_full_parameter_name(parameter.unique_name, parameter.display_name, parameter.url)
|
|
959
|
-
parameters['name'].append(name)
|
|
1035
|
+
parameters['name'].append(f'<name>{name}</name>')
|
|
960
1036
|
parameters['value'].append(parameter.raw_value)
|
|
1037
|
+
parameters['unit'].append(f'<unit>{parameter.unit:~P}</unit>')
|
|
961
1038
|
parameters['error'].append(parameter.error)
|
|
962
|
-
parameters['unit'].append(f'{parameter.unit:~P}')
|
|
963
1039
|
return parameters
|
|
964
1040
|
|
|
965
1041
|
def _show_parameters(self, parameters):
|
|
@@ -970,11 +1046,19 @@ class DiffractionJob(JobBase):
|
|
|
970
1046
|
df = pd.DataFrame(parameters)
|
|
971
1047
|
df.index += 1
|
|
972
1048
|
if self.is_notebook():
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
1049
|
+
# convert the DataFrame to HTML
|
|
1050
|
+
html = df.to_html(escape=False)
|
|
1051
|
+
# align the header of the column 'name' to the left
|
|
1052
|
+
html = html.replace('<th>name', '<th style="text-align: left;">name')
|
|
1053
|
+
# remove the header of the column 'unit'
|
|
1054
|
+
html = html.replace('<th>unit', '<th>')
|
|
1055
|
+
# align the cells in the column 'name' to the left
|
|
1056
|
+
html = html.replace('<td><name>', '<td style="text-align: left;">')
|
|
1057
|
+
html = html.replace('</name></td>', '</td>')
|
|
1058
|
+
# align the cells in the column 'unit' to the left and remove the left padding
|
|
1059
|
+
html = html.replace('<td><unit>', '<td style="text-align: left; padding-left: 0px">')
|
|
1060
|
+
html = html.replace('</unit></td>', '</td>')
|
|
1061
|
+
display(HTML(html))
|
|
978
1062
|
else:
|
|
979
1063
|
print(df)
|
|
980
1064
|
else:
|
|
@@ -14,6 +14,7 @@ from typing import Union
|
|
|
14
14
|
|
|
15
15
|
from easyscience.Datasets.xarray import xr
|
|
16
16
|
from easyscience.Objects.ObjectClasses import BaseObj
|
|
17
|
+
from easyscience.Objects.ObjectClasses import Descriptor
|
|
17
18
|
from easyscience.Objects.ObjectClasses import Parameter
|
|
18
19
|
|
|
19
20
|
from easydiffraction.components.polarization import PolarizedBeam
|
|
@@ -244,6 +245,48 @@ class Instrument1DCWParameters(BaseObj):
|
|
|
244
245
|
"url": "https://docs.easydiffraction.org/lib/project/dictionaries/_pd_instr/",
|
|
245
246
|
"value": 0.0,
|
|
246
247
|
"fixed": True,
|
|
248
|
+
},
|
|
249
|
+
"twotheta_range_min": {
|
|
250
|
+
"name": "twotheta_range_min",
|
|
251
|
+
"url": "https://docs.easydiffraction.org/lib/project/dictionaries/_pd_meas/",
|
|
252
|
+
"value": 10.0,
|
|
253
|
+
"fixed": True,
|
|
254
|
+
"enabled": False,
|
|
255
|
+
},
|
|
256
|
+
"twotheta_range_max": {
|
|
257
|
+
"name": "twotheta_range_max",
|
|
258
|
+
"url": "https://docs.easydiffraction.org/lib/project/dictionaries/_pd_meas/",
|
|
259
|
+
"value": 170.0,
|
|
260
|
+
"fixed": True,
|
|
261
|
+
"enabled": False,
|
|
262
|
+
},
|
|
263
|
+
"twotheta_range_inc": {
|
|
264
|
+
"name": "twotheta_range_inc",
|
|
265
|
+
"url": "https://docs.easydiffraction.org/lib/project/dictionaries/_pd_meas/",
|
|
266
|
+
"value": 0.1,
|
|
267
|
+
"fixed": True,
|
|
268
|
+
"enabled": False,
|
|
269
|
+
},
|
|
270
|
+
"tof_range_min": {
|
|
271
|
+
"name": "tof_range_min",
|
|
272
|
+
"url": "https://docs.easydiffraction.org/lib/project/dictionaries/_pd_meas/",
|
|
273
|
+
"value": 10000.0,
|
|
274
|
+
"fixed": True,
|
|
275
|
+
"enabled": False,
|
|
276
|
+
},
|
|
277
|
+
"tof_range_max": {
|
|
278
|
+
"name": "tof_range_max",
|
|
279
|
+
"url": "https://docs.easydiffraction.org/lib/project/dictionaries/_pd_meas/",
|
|
280
|
+
"value": 100000.0,
|
|
281
|
+
"fixed": True,
|
|
282
|
+
"enabled": False,
|
|
283
|
+
},
|
|
284
|
+
"tof_range_inc": {
|
|
285
|
+
"name": "tof_range_inc",
|
|
286
|
+
"url": "https://docs.easydiffraction.org/lib/project/dictionaries/_pd_meas/",
|
|
287
|
+
"value": 5.0,
|
|
288
|
+
"fixed": True,
|
|
289
|
+
"enabled": False,
|
|
247
290
|
}
|
|
248
291
|
}
|
|
249
292
|
|
|
@@ -257,6 +300,12 @@ class Instrument1DCWParameters(BaseObj):
|
|
|
257
300
|
reflex_asymmetry_p2: ClassVar[Parameter]
|
|
258
301
|
reflex_asymmetry_p3: ClassVar[Parameter]
|
|
259
302
|
reflex_asymmetry_p4: ClassVar[Parameter]
|
|
303
|
+
twotheta_range_min: ClassVar[Descriptor]
|
|
304
|
+
twotheta_range_max: ClassVar[Descriptor]
|
|
305
|
+
twotheta_range_inc: ClassVar[Descriptor]
|
|
306
|
+
tof_range_min: ClassVar[Descriptor]
|
|
307
|
+
tof_range_max: ClassVar[Descriptor]
|
|
308
|
+
tof_range_inc: ClassVar[Descriptor]
|
|
260
309
|
|
|
261
310
|
def __init__(
|
|
262
311
|
self,
|
|
@@ -270,6 +319,12 @@ class Instrument1DCWParameters(BaseObj):
|
|
|
270
319
|
reflex_asymmetry_p2: Optional[Union[Parameter, float]] = None,
|
|
271
320
|
reflex_asymmetry_p3: Optional[Union[Parameter, float]] = None,
|
|
272
321
|
reflex_asymmetry_p4: Optional[Union[Parameter, float]] = None,
|
|
322
|
+
twotheta_range_min: Optional[Union[Descriptor, float]] = None,
|
|
323
|
+
twotheta_range_max: Optional[Union[Descriptor, float]] = None,
|
|
324
|
+
twotheta_range_inc: Optional[Union[Descriptor, float]] = None,
|
|
325
|
+
tof_range_min: Optional[Union[Descriptor, float]] = None,
|
|
326
|
+
tof_range_max: Optional[Union[Descriptor, float]] = None,
|
|
327
|
+
tof_range_inc: Optional[Union[Descriptor, float]] = None,
|
|
273
328
|
interface: Optional[iF] = None,
|
|
274
329
|
):
|
|
275
330
|
super(Instrument1DCWParameters, self).__init__(
|
|
@@ -299,6 +354,18 @@ class Instrument1DCWParameters(BaseObj):
|
|
|
299
354
|
self.reflex_asymmetry_p3 = reflex_asymmetry_p3
|
|
300
355
|
if reflex_asymmetry_p4 is not None:
|
|
301
356
|
self.reflex_asymmetry_p4 = reflex_asymmetry_p4
|
|
357
|
+
if twotheta_range_min is not None:
|
|
358
|
+
self.twotheta_range_min = twotheta_range_min
|
|
359
|
+
if twotheta_range_max is not None:
|
|
360
|
+
self.twotheta_range_max = twotheta_range_max
|
|
361
|
+
if twotheta_range_inc is not None:
|
|
362
|
+
self.twotheta_range_inc = twotheta_range_inc
|
|
363
|
+
if tof_range_min is not None:
|
|
364
|
+
self.tof_range_min = tof_range_min
|
|
365
|
+
if tof_range_max is not None:
|
|
366
|
+
self.tof_range_max = tof_range_max
|
|
367
|
+
if tof_range_inc is not None:
|
|
368
|
+
self.tof_range_inc = tof_range_inc
|
|
302
369
|
self.name = self._name
|
|
303
370
|
self.interface = interface
|
|
304
371
|
|
|
@@ -9,6 +9,7 @@ from .components.phase import Phase as Phase
|
|
|
9
9
|
from .components.phase import Phases as Phases
|
|
10
10
|
from .components.site import Atoms as Atoms
|
|
11
11
|
from .components.site import Site as Site
|
|
12
|
+
from .io.download import download_from_repository
|
|
12
13
|
from .Job import DiffractionJob as Job
|
|
13
14
|
|
|
14
|
-
__all__ = ['Job']
|
|
15
|
+
__all__ = ['Job', 'download_from_repository']
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# SPDX-FileCopyrightText: 2024 EasyDiffraction contributors
|
|
2
|
+
# SPDX-License-Identifier: BSD-3-Clause
|
|
3
|
+
# © 2021-2024 Contributors to the EasyDiffraction project <https://github.com/easyscience/EasyDiffraction
|
|
4
|
+
|
|
5
|
+
import pooch
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
def download_from_repository(fname : str, branch : str = 'master', destination : str = 'data'):
|
|
9
|
+
'''
|
|
10
|
+
This function downloads a file from the EasyDiffraction repository on GitHub.
|
|
11
|
+
:param fname: The name of the file to download
|
|
12
|
+
:param destination: The destination folder to save the file
|
|
13
|
+
:return: None
|
|
14
|
+
'''
|
|
15
|
+
organisation = 'EasyScience'
|
|
16
|
+
repository = 'EasyDiffractionLib'
|
|
17
|
+
source = 'examples/data'
|
|
18
|
+
url = f'https://raw.githubusercontent.com/{organisation}/{repository}/refs/heads/{branch}/{source}/{fname}'
|
|
19
|
+
pooch.retrieve(
|
|
20
|
+
url=url,
|
|
21
|
+
known_hash=None,
|
|
22
|
+
fname=fname,
|
|
23
|
+
path=destination,
|
|
24
|
+
)
|