From 37baac7adb1a7e03acc5fd6b9ac759eb727bce7b Mon Sep 17 00:00:00 2001 From: Andrew Sazonov Date: Tue, 29 Oct 2024 14:27:34 +0100 Subject: [PATCH 01/24] Add urls to the experimental parameters --- easydiffraction/Profiles/P1D.py | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/easydiffraction/Profiles/P1D.py b/easydiffraction/Profiles/P1D.py index d7bd8d79..fa4b2a45 100644 --- a/easydiffraction/Profiles/P1D.py +++ b/easydiffraction/Profiles/P1D.py @@ -73,12 +73,14 @@ class Powder1DParameters(BaseObj): _defaults = { "zero_shift": { "name": "zero_shift", + "url": "https://docs.easydiffraction.org/lib/project/dictionaries/_pd_instr/", "units": "degree", "value": 0.0, "fixed": True, }, "scale": { "name": "scale", + "url": "https://docs.easydiffraction.org/lib/project/dictionaries/_pd_phase/", "value": 1, "fixed": True, "enabled": False, @@ -296,72 +298,83 @@ class Instrument1DTOFParameters(BaseObj): _defaults = { "ttheta_bank": { "name": "ttheta_bank", + "url": "https://docs.easydiffraction.org/lib/project/dictionaries/_pd_instr/", "units": "deg", "value": 145.00, "fixed": True, }, "dtt1": { "name": "dtt1", - "units": "deg", + "url": "https://docs.easydiffraction.org/lib/project/dictionaries/_pd_instr/", "value": 6167.24700, "fixed": True, }, "dtt2": { "name": "dtt2", - "units": "deg", + "url": "https://docs.easydiffraction.org/lib/project/dictionaries/_pd_instr/", "value": -2.28000, "fixed": True, }, "sigma0": { "name": "sigma0", + "url": "https://docs.easydiffraction.org/lib/project/dictionaries/_pd_instr/", "value": 0.409, "fixed": True, }, "sigma1": { "name": "sigma1", + "url": "https://docs.easydiffraction.org/lib/project/dictionaries/_pd_instr/", "value": 8.118, "fixed": True, }, "sigma2": { "name": "sigma2", + "url": "https://docs.easydiffraction.org/lib/project/dictionaries/_pd_instr/", "value": 0.0, "fixed": True, }, "gamma0": { "name": "gamma0", + "url": "https://docs.easydiffraction.org/lib/project/dictionaries/_pd_instr/", "value": 0.0, "fixed": True, "enabled": False, }, "gamma1": { "name": "gamma1", + "url": "https://docs.easydiffraction.org/lib/project/dictionaries/_pd_instr/", "value": 0.0, "fixed": True, "enabled": False, }, "gamma2": { "name": "gamma2", + "url": "https://docs.easydiffraction.org/lib/project/dictionaries/_pd_instr/", "value": 0.0, "fixed": True, "enabled": False, }, "alpha0": { "name": "alpha0", + "url": "https://docs.easydiffraction.org/lib/project/dictionaries/_pd_instr/", "value": 0.0, "fixed": True, }, "alpha1": { "name": "alpha1", + "url": "https://docs.easydiffraction.org/lib/project/dictionaries/_pd_instr/", "value": 0.29710, "fixed": True, }, "beta0": { "name": "beta0", + "url": "https://docs.easydiffraction.org/lib/project/dictionaries/_pd_instr/", "value": 0.04182, "fixed": True, }, "beta1": { "name": "beta1", + "url": "https://docs.easydiffraction.org/lib/project/dictionaries/_pd_instr/", "value": 0.00224, "fixed": True, }, From 07080661d6295b8554776700404c9e4a063121b5 Mon Sep 17 00:00:00 2001 From: Andrew Sazonov Date: Tue, 29 Oct 2024 14:32:52 +0100 Subject: [PATCH 02/24] Fix units for dtt1 and dtt2 --- easydiffraction/Profiles/P1D.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/easydiffraction/Profiles/P1D.py b/easydiffraction/Profiles/P1D.py index fa4b2a45..30b753f5 100644 --- a/easydiffraction/Profiles/P1D.py +++ b/easydiffraction/Profiles/P1D.py @@ -306,12 +306,14 @@ class Instrument1DTOFParameters(BaseObj): "dtt1": { "name": "dtt1", "url": "https://docs.easydiffraction.org/lib/project/dictionaries/_pd_instr/", + "units": "microsec/angstrom", "value": 6167.24700, "fixed": True, }, "dtt2": { "name": "dtt2", "url": "https://docs.easydiffraction.org/lib/project/dictionaries/_pd_instr/", + "units": "microsec/angstrom**2", "value": -2.28000, "fixed": True, }, From 67371f1085822849bac38fa21d24a1d3a721e7cf Mon Sep 17 00:00:00 2001 From: Andrew Sazonov Date: Tue, 29 Oct 2024 14:44:11 +0100 Subject: [PATCH 03/24] Add units for sigma1, sigma2, sigma3 --- easydiffraction/Profiles/P1D.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/easydiffraction/Profiles/P1D.py b/easydiffraction/Profiles/P1D.py index 30b753f5..e917218a 100644 --- a/easydiffraction/Profiles/P1D.py +++ b/easydiffraction/Profiles/P1D.py @@ -320,18 +320,21 @@ class Instrument1DTOFParameters(BaseObj): "sigma0": { "name": "sigma0", "url": "https://docs.easydiffraction.org/lib/project/dictionaries/_pd_instr/", + "units": "microsec**2", "value": 0.409, "fixed": True, }, "sigma1": { "name": "sigma1", "url": "https://docs.easydiffraction.org/lib/project/dictionaries/_pd_instr/", + "units": "microsec**2/angstrom**2", "value": 8.118, "fixed": True, }, "sigma2": { "name": "sigma2", "url": "https://docs.easydiffraction.org/lib/project/dictionaries/_pd_instr/", + "units": "microsec**2/angstrom**4", "value": 0.0, "fixed": True, }, From 22ce7bb282a6500ef16b90aefd4c36ab1daafba1 Mon Sep 17 00:00:00 2001 From: Andrew Sazonov Date: Tue, 29 Oct 2024 14:46:08 +0100 Subject: [PATCH 04/24] Update dependencies --- pyproject.toml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index a44ec464..78e87311 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -24,8 +24,8 @@ classifiers = [ requires-python = '>=3.9,<3.13' dependencies = [ 'cryspy>=0.7.7', - 'easyscience @ git+https://github.com/EasyScience/EasyScience.git@free-params', - 'easycrystallography @ git+https://github.com/EasyScience/EasyCrystallography.git@develop', + 'easyscience @ git+https://github.com/EasyScience/EasyScience.git@develop', + 'easycrystallography @ git+https://github.com/EasyScience/EasyCrystallography.git@change_urls_to_edl_docs', ] [project.optional-dependencies] From 946b59c1b438622fe1236ee21171caa6edcb821e Mon Sep 17 00:00:00 2001 From: Andrew Sazonov Date: Tue, 29 Oct 2024 14:55:05 +0100 Subject: [PATCH 05/24] Add urls to CW experimental parameters --- easydiffraction/Profiles/P1D.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/easydiffraction/Profiles/P1D.py b/easydiffraction/Profiles/P1D.py index e917218a..a0cc22a9 100644 --- a/easydiffraction/Profiles/P1D.py +++ b/easydiffraction/Profiles/P1D.py @@ -186,52 +186,62 @@ class Instrument1DCWParameters(BaseObj): _defaults = { "wavelength": { "name": "wavelength", + "url": "https://docs.easydiffraction.org/lib/project/dictionaries/_diffrn_radiation_wavelength/", "units": "angstrom", "value": 1.54056, "fixed": True, }, "resolution_u": { "name": "resolution_u", + "url": "https://docs.easydiffraction.org/lib/project/dictionaries/_pd_instr/", "value": 0.0002, "fixed": True, }, "resolution_v": { "name": "resolution_v", + "url": "https://docs.easydiffraction.org/lib/project/dictionaries/_pd_instr/", "value": -0.0002, "fixed": True, }, "resolution_w": { "name": "resolution_w", + "url": "https://docs.easydiffraction.org/lib/project/dictionaries/_pd_instr/", "value": 0.012, "fixed": True, }, "resolution_x": { "name": "resolution_x", + "url": "https://docs.easydiffraction.org/lib/project/dictionaries/_pd_instr/", "value": 0.0, "fixed": True, }, "resolution_y": { "name": "resolution_y", + "url": "https://docs.easydiffraction.org/lib/project/dictionaries/_pd_instr/", "value": 0.0, "fixed": True, }, "reflex_asymmetry_p1": { "name": "reflex_asymmetry_p1", + "url": "https://docs.easydiffraction.org/lib/project/dictionaries/_pd_instr/", "value": 0.0, "fixed": True, }, "reflex_asymmetry_p2": { "name": "reflex_asymmetry_p2", + "url": "https://docs.easydiffraction.org/lib/project/dictionaries/_pd_instr/", "value": 0.0, "fixed": True, }, "reflex_asymmetry_p3": { "name": "reflex_asymmetry_p3", + "url": "https://docs.easydiffraction.org/lib/project/dictionaries/_pd_instr/", "value": 0.0, "fixed": True, }, "reflex_asymmetry_p4": { "name": "reflex_asymmetry_p4", + "url": "https://docs.easydiffraction.org/lib/project/dictionaries/_pd_instr/", "value": 0.0, "fixed": True, } From cddc501777ae17b3fab6e37df74df925d95bc92e Mon Sep 17 00:00:00 2001 From: Andrew Sazonov Date: Tue, 29 Oct 2024 14:55:59 +0100 Subject: [PATCH 06/24] Update notebooks --- examples/Change_minimizer.ipynb | 530 ++--- examples/Fitting_PD-NEUT-CW_LBCO-HRPT.ipynb | 2011 +++++++++--------- examples/Fitting_PD-NEUT-TOF_NCAF-WISH.ipynb | 1564 +++++++------- examples/Fitting_PD-NEUT-TOF_Si-SEPD.ipynb | 620 +++--- 4 files changed, 2375 insertions(+), 2350 deletions(-) diff --git a/examples/Change_minimizer.ipynb b/examples/Change_minimizer.ipynb index a6ac2352..128c30fd 100644 --- a/examples/Change_minimizer.ipynb +++ b/examples/Change_minimizer.ipynb @@ -38,8 +38,8 @@ "colab" ], "ExecuteTime": { - "end_time": "2024-10-28T10:50:40.979466Z", - "start_time": "2024-10-28T10:50:40.968260Z" + "end_time": "2024-10-29T13:54:11.999796Z", + "start_time": "2024-10-29T13:54:11.981259Z" } }, "source": [ @@ -70,8 +70,8 @@ "id": "33934041eaae166f", "metadata": { "ExecuteTime": { - "end_time": "2024-10-28T10:50:43.753157Z", - "start_time": "2024-10-28T10:50:40.981477Z" + "end_time": "2024-10-29T13:54:15.009394Z", + "start_time": "2024-10-29T13:54:12.001884Z" } }, "source": "import easydiffraction as ed", @@ -97,8 +97,8 @@ "id": "180e216d55b3f144", "metadata": { "ExecuteTime": { - "end_time": "2024-10-28T10:50:43.808239Z", - "start_time": "2024-10-28T10:50:43.797566Z" + "end_time": "2024-10-29T13:54:15.061398Z", + "start_time": "2024-10-29T13:54:15.051828Z" } }, "source": "job = ed.Job()", @@ -122,8 +122,8 @@ { "metadata": { "ExecuteTime": { - "end_time": "2024-10-28T10:50:44.202597Z", - "start_time": "2024-10-28T10:50:43.912369Z" + "end_time": "2024-10-29T13:54:15.482457Z", + "start_time": "2024-10-29T13:54:15.190001Z" } }, "cell_type": "code", @@ -154,8 +154,8 @@ "id": "5184de9d741bddb4", "metadata": { "ExecuteTime": { - "end_time": "2024-10-28T10:50:44.213165Z", - "start_time": "2024-10-28T10:50:44.206742Z" + "end_time": "2024-10-29T13:54:15.493021Z", + "start_time": "2024-10-29T13:54:15.486730Z" } }, "source": [ @@ -205,18 +205,18 @@ "id": "238c54cda578c7e7", "metadata": { "ExecuteTime": { - "end_time": "2024-10-28T10:50:44.245274Z", - "start_time": "2024-10-28T10:50:44.238070Z" + "end_time": "2024-10-29T13:54:15.503865Z", + "start_time": "2024-10-29T13:54:15.496848Z" } }, "source": "job.show_crystal_structure(id='lbco')", "outputs": [ { "data": { - "application/3dmoljs_load.v0": "
\n

You appear to be running in JupyterLab (or JavaScript failed to load for some other reason). You need to install the 3dmol extension:
\n jupyter labextension install jupyterlab_3dmol

\n
\n", + "application/3dmoljs_load.v0": "
\n

You appear to be running in JupyterLab (or JavaScript failed to load for some other reason). You need to install the 3dmol extension:
\n jupyter labextension install jupyterlab_3dmol

\n
\n", "text/html": [ - "
\n", - "

You appear to be running in JupyterLab (or JavaScript failed to load for some other reason). You need to install the 3dmol extension:
\n", + "

\n", + "

You appear to be running in JupyterLab (or JavaScript failed to load for some other reason). You need to install the 3dmol extension:
\n", " jupyter labextension install jupyterlab_3dmol

\n", "
\n", "" ] @@ -292,8 +292,8 @@ "id": "8a1823930f0346e5", "metadata": { "ExecuteTime": { - "end_time": "2024-10-28T10:50:44.328229Z", - "start_time": "2024-10-28T10:50:44.255314Z" + "end_time": "2024-10-29T13:54:15.598545Z", + "start_time": "2024-10-29T13:54:15.507558Z" } }, "source": "job.add_experiment_from_file('data/hrpt.xye')", @@ -311,8 +311,8 @@ "id": "f1dfee8a4bee7672", "metadata": { "ExecuteTime": { - "end_time": "2024-10-28T10:50:44.450097Z", - "start_time": "2024-10-28T10:50:44.332384Z" + "end_time": "2024-10-29T13:54:15.761608Z", + "start_time": "2024-10-29T13:54:15.602677Z" } }, "source": [ @@ -26047,16 +26047,17 @@ "style": "dark" } } - } + }, + "showlegend": true }, "config": { "plotlyServerURL": "https://plot.ly" } }, "text/html": [ - "
", + "application/3dmoljs_load.v0": "
\n

You appear to be running in JupyterLab (or JavaScript failed to load for some other reason). You need to install the 3dmol extension:
\n jupyter labextension install jupyterlab_3dmol

\n
\n", "text/html": [ - "
\n", - "

You appear to be running in JupyterLab (or JavaScript failed to load for some other reason). You need to install the 3dmol extension:
\n", + "

\n", + "

You appear to be running in JupyterLab (or JavaScript failed to load for some other reason). You need to install the 3dmol extension:
\n", " jupyter labextension install jupyterlab_3dmol

\n", "
\n", "" ] @@ -309,8 +309,8 @@ "id": "8a1823930f0346e5", "metadata": { "ExecuteTime": { - "end_time": "2024-10-28T10:47:38.771405Z", - "start_time": "2024-10-28T10:47:38.677653Z" + "end_time": "2024-10-29T13:54:21.878427Z", + "start_time": "2024-10-29T13:54:21.768040Z" } }, "source": [ @@ -332,8 +332,8 @@ "id": "f1dfee8a4bee7672", "metadata": { "ExecuteTime": { - "end_time": "2024-10-28T10:47:38.921506Z", - "start_time": "2024-10-28T10:47:38.781150Z" + "end_time": "2024-10-29T13:54:22.034253Z", + "start_time": "2024-10-29T13:54:21.883334Z" } }, "source": [ @@ -26068,16 +26068,17 @@ "style": "dark" } } - } + }, + "showlegend": true }, "config": { "plotlyServerURL": "https://plot.ly" } }, "text/html": [ - "
", + "application/3dmoljs_load.v0": "
\n

You appear to be running in JupyterLab (or JavaScript failed to load for some other reason). You need to install the 3dmol extension:
\n jupyter labextension install jupyterlab_3dmol

\n
\n", "text/html": [ - "
\n", - "

You appear to be running in JupyterLab (or JavaScript failed to load for some other reason). You need to install the 3dmol extension:
\n", + "

\n", + "

You appear to be running in JupyterLab (or JavaScript failed to load for some other reason). You need to install the 3dmol extension:
\n", " jupyter labextension install jupyterlab_3dmol

\n", "
\n", "" ] @@ -294,8 +294,8 @@ "id": "8a1823930f0346e5", "metadata": { "ExecuteTime": { - "end_time": "2024-10-28T10:50:41.623113Z", - "start_time": "2024-10-28T10:50:41.506845Z" + "end_time": "2024-10-29T13:54:27.996976Z", + "start_time": "2024-10-29T13:54:27.871875Z" } }, "source": "job.add_experiment_from_file('data/wish.xye')", @@ -313,8 +313,8 @@ "id": "f1dfee8a4bee7672", "metadata": { "ExecuteTime": { - "end_time": "2024-10-28T10:50:42.003456Z", - "start_time": "2024-10-28T10:50:41.848993Z" + "end_time": "2024-10-29T13:54:28.190874Z", + "start_time": "2024-10-29T13:54:28.001227Z" } }, "source": [ @@ -31169,16 +31169,17 @@ "style": "dark" } } - } + }, + "showlegend": true }, "config": { "plotlyServerURL": "https://plot.ly" } }, "text/html": [ - "
", + "application/3dmoljs_load.v0": "
\n

You appear to be running in JupyterLab (or JavaScript failed to load for some other reason). You need to install the 3dmol extension:
\n jupyter labextension install jupyterlab_3dmol

\n
\n", "text/html": [ - "
\n", - "

You appear to be running in JupyterLab (or JavaScript failed to load for some other reason). You need to install the 3dmol extension:
\n", + "

\n", + "

You appear to be running in JupyterLab (or JavaScript failed to load for some other reason). You need to install the 3dmol extension:
\n", " jupyter labextension install jupyterlab_3dmol

\n", "
\n", "" ] @@ -380,8 +380,8 @@ "id": "8a1823930f0346e5", "metadata": { "ExecuteTime": { - "end_time": "2024-10-28T12:19:43.910726Z", - "start_time": "2024-10-28T12:19:43.769946Z" + "end_time": "2024-10-29T13:54:35.309082Z", + "start_time": "2024-10-29T13:54:35.151756Z" } }, "source": "job.add_experiment_from_file('data/sepd.xye')", @@ -399,8 +399,8 @@ "id": "f1dfee8a4bee7672", "metadata": { "ExecuteTime": { - "end_time": "2024-10-28T12:19:44.135261Z", - "start_time": "2024-10-28T12:19:43.914956Z" + "end_time": "2024-10-29T13:54:35.548920Z", + "start_time": "2024-10-29T13:54:35.314412Z" } }, "source": "job.show_experiment_chart(show_legend=False)", @@ -46157,9 +46157,9 @@ } }, "text/html": [ - "