{ "cells": [ { "cell_type": "code", "execution_count": 1, "id": "93371318", "metadata": { "execution": { "iopub.execute_input": "2026-01-06T13:53:07.714262Z", "iopub.status.busy": "2026-01-06T13:53:07.714156Z", "iopub.status.idle": "2026-01-06T13:53:07.718600Z", "shell.execute_reply": "2026-01-06T13:53:07.718109Z" }, "tags": [ "hide-in-docs" ] }, "outputs": [], "source": [ "# Check if the easydiffraction library is installed.\n", "# If not, install it with the 'visualization' extras.\n", "# Needed when running remotely (e.g. Colab) where the lib is absent.\n", "import builtins\n", "import importlib.util\n", "\n", "if (hasattr(builtins, '__IPYTHON__') and\n", " importlib.util.find_spec('easydiffraction') is None):\n", " !pip install 'easydiffraction[visualization]==0.10.1'" ] }, { "cell_type": "markdown", "id": "0", "metadata": {}, "source": [ "# Structure Refinement: LBCO, HRPT\n", "\n", "This minimalistic example is designed to show how Rietveld refinement\n", "of a crystal structure can be performed when both the sample model and\n", "experiment are defined using CIF files.\n", "\n", "For this example, constant-wavelength neutron powder diffraction data\n", "for La0.5Ba0.5CoO3 from HRPT at PSI is used.\n", "\n", "It does not contain any advanced features or options, and includes no\n", "comments or explanationsβ€”these can be found in the other tutorials.\n", "Default values are used for all parameters if not specified. Only\n", "essential and self-explanatory code is provided.\n", "\n", "The example is intended for users who are already familiar with the\n", "EasyDiffraction library and want to quickly get started with a simple\n", "refinement. It is also useful for those who want to see what a\n", "refinement might look like in code. For a more detailed explanation of\n", "the code, please refer to the other tutorials." ] }, { "cell_type": "markdown", "id": "1", "metadata": {}, "source": [ "## Import Library" ] }, { "cell_type": "code", "execution_count": 2, "id": "2", "metadata": { "execution": { "iopub.execute_input": "2026-01-06T13:53:07.721736Z", "iopub.status.busy": "2026-01-06T13:53:07.721561Z", "iopub.status.idle": "2026-01-06T13:53:11.630681Z", "shell.execute_reply": "2026-01-06T13:53:11.629814Z" } }, "outputs": [], "source": [ "import easydiffraction as ed" ] }, { "cell_type": "markdown", "id": "3", "metadata": {}, "source": [ "## Step 1: Define Project" ] }, { "cell_type": "code", "execution_count": 3, "id": "4", "metadata": { "execution": { "iopub.execute_input": "2026-01-06T13:53:11.637562Z", "iopub.status.busy": "2026-01-06T13:53:11.635311Z", "iopub.status.idle": "2026-01-06T13:53:11.906510Z", "shell.execute_reply": "2026-01-06T13:53:11.905400Z" } }, "outputs": [], "source": [ "# Create minimal project without name and description\n", "project = ed.Project()" ] }, { "cell_type": "markdown", "id": "5", "metadata": {}, "source": [ "## Step 2: Define Sample Model" ] }, { "cell_type": "code", "execution_count": 4, "id": "6", "metadata": { "execution": { "iopub.execute_input": "2026-01-06T13:53:11.910901Z", "iopub.status.busy": "2026-01-06T13:53:11.910220Z", "iopub.status.idle": "2026-01-06T13:53:12.401588Z", "shell.execute_reply": "2026-01-06T13:53:12.388318Z" } }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "\u001b[1;34mGetting data\u001b[0m\u001b[1;34m...\u001b[0m\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "Data #\u001b[1;36m1\u001b[0m: La0.5Ba0.5CoO3 \u001b[1m(\u001b[0mcrystal structure\u001b[1m)\u001b[0m\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "βœ… Data #\u001b[1;36m1\u001b[0m downloaded to \u001b[32m'data/ed-1.cif'\u001b[0m\n" ] } ], "source": [ "# Download CIF file from repository\n", "model_path = ed.download_data(id=1, destination='data')" ] }, { "cell_type": "code", "execution_count": 5, "id": "7", "metadata": { "execution": { "iopub.execute_input": "2026-01-06T13:53:12.413373Z", "iopub.status.busy": "2026-01-06T13:53:12.412764Z", "iopub.status.idle": "2026-01-06T13:53:12.483109Z", "shell.execute_reply": "2026-01-06T13:53:12.482621Z" } }, "outputs": [], "source": [ "project.sample_models.add(cif_path=model_path)" ] }, { "cell_type": "markdown", "id": "8", "metadata": {}, "source": [ "## Step 3: Define Experiment" ] }, { "cell_type": "code", "execution_count": 6, "id": "9", "metadata": { "execution": { "iopub.execute_input": "2026-01-06T13:53:12.501580Z", "iopub.status.busy": "2026-01-06T13:53:12.501424Z", "iopub.status.idle": "2026-01-06T13:53:12.657024Z", "shell.execute_reply": "2026-01-06T13:53:12.656201Z" } }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "\u001b[1;34mGetting data\u001b[0m\u001b[1;34m...\u001b[0m\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "Data #\u001b[1;36m2\u001b[0m: La0.5Ba0.5CoO3, HRPT \u001b[1m(\u001b[0mPSI\u001b[1m)\u001b[0m, \u001b[1;36m300\u001b[0m K\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "βœ… Data #\u001b[1;36m2\u001b[0m downloaded to \u001b[32m'data/ed-2.cif'\u001b[0m\n" ] } ], "source": [ "# Download CIF file from repository\n", "expt_path = ed.download_data(id=2, destination='data')" ] }, { "cell_type": "code", "execution_count": 7, "id": "10", "metadata": { "execution": { "iopub.execute_input": "2026-01-06T13:53:12.660384Z", "iopub.status.busy": "2026-01-06T13:53:12.659967Z", "iopub.status.idle": "2026-01-06T13:53:13.957779Z", "shell.execute_reply": "2026-01-06T13:53:13.956865Z" } }, "outputs": [], "source": [ "project.experiments.add(cif_path=expt_path)" ] }, { "cell_type": "markdown", "id": "11", "metadata": {}, "source": [ "## Step 4: Perform Analysis" ] }, { "cell_type": "code", "execution_count": 8, "id": "12", "metadata": { "execution": { "iopub.execute_input": "2026-01-06T13:53:13.960387Z", "iopub.status.busy": "2026-01-06T13:53:13.960220Z", "iopub.status.idle": "2026-01-06T13:53:30.191253Z", "shell.execute_reply": "2026-01-06T13:53:30.190415Z" } }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "\u001b[1;34mUsing experiment πŸ”¬ \u001b[0m\u001b[32m'hrpt'\u001b[0m\u001b[1;34m for \u001b[0m\u001b[32m'single'\u001b[0m\u001b[1;34m fitting\u001b[0m\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "πŸš€ Starting fit process with \u001b[32m'lmfit \u001b[0m\u001b[32m(\u001b[0m\u001b[32mleastsq\u001b[0m\u001b[32m)\u001b[0m\u001b[32m'\u001b[0m\u001b[33m...\u001b[0m\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "πŸ“ˆ Goodness-of-fit \u001b[1m(\u001b[0mreduced χ²\u001b[1m)\u001b[0m change:\n" ] }, { "data": { "text/html": [ "\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
 iterationχ²improvement [%]
11165.50
22833.6779.7% ↓
34510.8567.8% ↓
4636.4340.7% ↓
5813.3348.2% ↓
6982.2333.2% ↓
71161.9114.5% ↓
81331.5021.1% ↓
91501.453.6% ↓
101671.347.7% ↓
111851.293.4% ↓
122761.29
\n" ], "text/plain": [ "" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "application/javascript": [ "\n", " (function() {\n", " var isDark = false;\n", "\n", " // Check JupyterLab theme\n", " if (document.body.classList.contains('jp-mod-dark') || \n", " document.body.classList.contains('theme-dark') ||\n", " document.body.classList.contains('vscode-dark')) {\n", " isDark = true;\n", " }\n", "\n", " // Check theme attribute\n", " var themeAttr = document.body.getAttribute('data-jp-theme-name');\n", " if (themeAttr && themeAttr.includes('dark')) {\n", " isDark = true;\n", " }\n", "\n", " // Check computed background color\n", " var notebookEl = document.querySelector('.jp-Notebook') || \n", " document.querySelector('.notebook_app') ||\n", " document.body;\n", " if (notebookEl) {\n", " var bgColor = window.getComputedStyle(notebookEl).backgroundColor;\n", " var rgb = bgColor.match(/\\d+/g);\n", " if (rgb && rgb.length >= 3) {\n", " var brightness = (parseInt(rgb[0]) + parseInt(rgb[1]) + parseInt(rgb[2])) / 3;\n", " if (brightness < 128) {\n", " isDark = true;\n", " }\n", " }\n", " }\n", "\n", " // Store result\n", " if (typeof IPython !== 'undefined' && IPython.notebook && IPython.notebook.kernel) {\n", " IPython.notebook.kernel.execute('_jupyter_dark_detect_result = ' + isDark);\n", " }\n", " })();\n", " " ], "text/plain": [ "" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "application/javascript": [ "\n", " if (typeof IPython !== 'undefined' && IPython.notebook) {\n", " IPython.notebook.kernel.execute(\"_jupyter_dark_detect_result = \" + \n", " (document.body.classList.contains('theme-dark') || \n", " document.body.classList.contains('jp-mod-dark') ||\n", " (document.body.getAttribute('data-jp-theme-name') && \n", " document.body.getAttribute('data-jp-theme-name').includes('dark'))));\n", " }\n", " " ], "text/plain": [ "" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "application/javascript": [ "\n", " (function() {\n", " var isDark = false;\n", "\n", " // Check JupyterLab theme\n", " if (document.body.classList.contains('jp-mod-dark') || \n", " document.body.classList.contains('theme-dark') ||\n", " document.body.classList.contains('vscode-dark')) {\n", " isDark = true;\n", " }\n", "\n", " // Check theme attribute\n", " var themeAttr = document.body.getAttribute('data-jp-theme-name');\n", " if (themeAttr && themeAttr.includes('dark')) {\n", " isDark = true;\n", " }\n", "\n", " // Check computed background color\n", " var notebookEl = document.querySelector('.jp-Notebook') || \n", " document.querySelector('.notebook_app') ||\n", " document.body;\n", " if (notebookEl) {\n", " var bgColor = window.getComputedStyle(notebookEl).backgroundColor;\n", " var rgb = bgColor.match(/\\d+/g);\n", " if (rgb && rgb.length >= 3) {\n", " var brightness = (parseInt(rgb[0]) + parseInt(rgb[1]) + parseInt(rgb[2])) / 3;\n", " if (brightness < 128) {\n", " isDark = true;\n", " }\n", " }\n", " }\n", "\n", " // Store result\n", " if (typeof IPython !== 'undefined' && IPython.notebook && IPython.notebook.kernel) {\n", " IPython.notebook.kernel.execute('_jupyter_dark_detect_result = ' + isDark);\n", " }\n", " })();\n", " " ], "text/plain": [ "" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "application/javascript": [ "\n", " if (typeof IPython !== 'undefined' && IPython.notebook) {\n", " IPython.notebook.kernel.execute(\"_jupyter_dark_detect_result = \" + \n", " (document.body.classList.contains('theme-dark') || \n", " document.body.classList.contains('jp-mod-dark') ||\n", " (document.body.getAttribute('data-jp-theme-name') && \n", " document.body.getAttribute('data-jp-theme-name').includes('dark'))));\n", " }\n", " " ], "text/plain": [ "" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "application/javascript": [ "\n", " (function() {\n", " var isDark = false;\n", "\n", " // Check JupyterLab theme\n", " if (document.body.classList.contains('jp-mod-dark') || \n", " document.body.classList.contains('theme-dark') ||\n", " document.body.classList.contains('vscode-dark')) {\n", " isDark = true;\n", " }\n", "\n", " // Check theme attribute\n", " var themeAttr = document.body.getAttribute('data-jp-theme-name');\n", " if (themeAttr && themeAttr.includes('dark')) {\n", " isDark = true;\n", " }\n", "\n", " // Check computed background color\n", " var notebookEl = document.querySelector('.jp-Notebook') || \n", " document.querySelector('.notebook_app') ||\n", " document.body;\n", " if (notebookEl) {\n", " var bgColor = window.getComputedStyle(notebookEl).backgroundColor;\n", " var rgb = bgColor.match(/\\d+/g);\n", " if (rgb && rgb.length >= 3) {\n", " var brightness = (parseInt(rgb[0]) + parseInt(rgb[1]) + parseInt(rgb[2])) / 3;\n", " if (brightness < 128) {\n", " isDark = true;\n", " }\n", " }\n", " }\n", "\n", " // Store result\n", " if (typeof IPython !== 'undefined' && IPython.notebook && IPython.notebook.kernel) {\n", " IPython.notebook.kernel.execute('_jupyter_dark_detect_result = ' + isDark);\n", " }\n", " })();\n", " " ], "text/plain": [ "" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "application/javascript": [ "\n", " if (typeof IPython !== 'undefined' && IPython.notebook) {\n", " IPython.notebook.kernel.execute(\"_jupyter_dark_detect_result = \" + \n", " (document.body.classList.contains('theme-dark') || \n", " document.body.classList.contains('jp-mod-dark') ||\n", " (document.body.getAttribute('data-jp-theme-name') && \n", " document.body.getAttribute('data-jp-theme-name').includes('dark'))));\n", " }\n", " " ], "text/plain": [ "" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "application/javascript": [ "\n", " (function() {\n", " var isDark = false;\n", "\n", " // Check JupyterLab theme\n", " if (document.body.classList.contains('jp-mod-dark') || \n", " document.body.classList.contains('theme-dark') ||\n", " document.body.classList.contains('vscode-dark')) {\n", " isDark = true;\n", " }\n", "\n", " // Check theme attribute\n", " var themeAttr = document.body.getAttribute('data-jp-theme-name');\n", " if (themeAttr && themeAttr.includes('dark')) {\n", " isDark = true;\n", " }\n", "\n", " // Check computed background color\n", " var notebookEl = document.querySelector('.jp-Notebook') || \n", " document.querySelector('.notebook_app') ||\n", " document.body;\n", " if (notebookEl) {\n", " var bgColor = window.getComputedStyle(notebookEl).backgroundColor;\n", " var rgb = bgColor.match(/\\d+/g);\n", " if (rgb && rgb.length >= 3) {\n", " var brightness = (parseInt(rgb[0]) + parseInt(rgb[1]) + parseInt(rgb[2])) / 3;\n", " if (brightness < 128) {\n", " isDark = true;\n", " }\n", " }\n", " }\n", "\n", " // Store result\n", " if (typeof IPython !== 'undefined' && IPython.notebook && IPython.notebook.kernel) {\n", " IPython.notebook.kernel.execute('_jupyter_dark_detect_result = ' + isDark);\n", " }\n", " })();\n", " " ], "text/plain": [ "" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "application/javascript": [ "\n", " if (typeof IPython !== 'undefined' && IPython.notebook) {\n", " IPython.notebook.kernel.execute(\"_jupyter_dark_detect_result = \" + \n", " (document.body.classList.contains('theme-dark') || \n", " document.body.classList.contains('jp-mod-dark') ||\n", " (document.body.getAttribute('data-jp-theme-name') && \n", " document.body.getAttribute('data-jp-theme-name').includes('dark'))));\n", " }\n", " " ], "text/plain": [ "" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "application/javascript": [ "\n", " (function() {\n", " var isDark = false;\n", "\n", " // Check JupyterLab theme\n", " if (document.body.classList.contains('jp-mod-dark') || \n", " document.body.classList.contains('theme-dark') ||\n", " document.body.classList.contains('vscode-dark')) {\n", " isDark = true;\n", " }\n", "\n", " // Check theme attribute\n", " var themeAttr = document.body.getAttribute('data-jp-theme-name');\n", " if (themeAttr && themeAttr.includes('dark')) {\n", " isDark = true;\n", " }\n", "\n", " // Check computed background color\n", " var notebookEl = document.querySelector('.jp-Notebook') || \n", " document.querySelector('.notebook_app') ||\n", " document.body;\n", " if (notebookEl) {\n", " var bgColor = window.getComputedStyle(notebookEl).backgroundColor;\n", " var rgb = bgColor.match(/\\d+/g);\n", " if (rgb && rgb.length >= 3) {\n", " var brightness = (parseInt(rgb[0]) + parseInt(rgb[1]) + parseInt(rgb[2])) / 3;\n", " if (brightness < 128) {\n", " isDark = true;\n", " }\n", " }\n", " }\n", "\n", " // Store result\n", " if (typeof IPython !== 'undefined' && IPython.notebook && IPython.notebook.kernel) {\n", " IPython.notebook.kernel.execute('_jupyter_dark_detect_result = ' + isDark);\n", " }\n", " })();\n", " " ], "text/plain": [ "" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "application/javascript": [ "\n", " if (typeof IPython !== 'undefined' && IPython.notebook) {\n", " IPython.notebook.kernel.execute(\"_jupyter_dark_detect_result = \" + \n", " (document.body.classList.contains('theme-dark') || \n", " document.body.classList.contains('jp-mod-dark') ||\n", " (document.body.getAttribute('data-jp-theme-name') && \n", " document.body.getAttribute('data-jp-theme-name').includes('dark'))));\n", " }\n", " " ], "text/plain": [ "" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "application/javascript": [ "\n", " (function() {\n", " var isDark = false;\n", "\n", " // Check JupyterLab theme\n", " if (document.body.classList.contains('jp-mod-dark') || \n", " document.body.classList.contains('theme-dark') ||\n", " document.body.classList.contains('vscode-dark')) {\n", " isDark = true;\n", " }\n", "\n", " // Check theme attribute\n", " var themeAttr = document.body.getAttribute('data-jp-theme-name');\n", " if (themeAttr && themeAttr.includes('dark')) {\n", " isDark = true;\n", " }\n", "\n", " // Check computed background color\n", " var notebookEl = document.querySelector('.jp-Notebook') || \n", " document.querySelector('.notebook_app') ||\n", " document.body;\n", " if (notebookEl) {\n", " var bgColor = window.getComputedStyle(notebookEl).backgroundColor;\n", " var rgb = bgColor.match(/\\d+/g);\n", " if (rgb && rgb.length >= 3) {\n", " var brightness = (parseInt(rgb[0]) + parseInt(rgb[1]) + parseInt(rgb[2])) / 3;\n", " if (brightness < 128) {\n", " isDark = true;\n", " }\n", " }\n", " }\n", "\n", " // Store result\n", " if (typeof IPython !== 'undefined' && IPython.notebook && IPython.notebook.kernel) {\n", " IPython.notebook.kernel.execute('_jupyter_dark_detect_result = ' + isDark);\n", " }\n", " })();\n", " " ], "text/plain": [ "" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "application/javascript": [ "\n", " if (typeof IPython !== 'undefined' && IPython.notebook) {\n", " IPython.notebook.kernel.execute(\"_jupyter_dark_detect_result = \" + \n", " (document.body.classList.contains('theme-dark') || \n", " document.body.classList.contains('jp-mod-dark') ||\n", " (document.body.getAttribute('data-jp-theme-name') && \n", " document.body.getAttribute('data-jp-theme-name').includes('dark'))));\n", " }\n", " " ], "text/plain": [ "" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "application/javascript": [ "\n", " (function() {\n", " var isDark = false;\n", "\n", " // Check JupyterLab theme\n", " if (document.body.classList.contains('jp-mod-dark') || \n", " document.body.classList.contains('theme-dark') ||\n", " document.body.classList.contains('vscode-dark')) {\n", " isDark = true;\n", " }\n", "\n", " // Check theme attribute\n", " var themeAttr = document.body.getAttribute('data-jp-theme-name');\n", " if (themeAttr && themeAttr.includes('dark')) {\n", " isDark = true;\n", " }\n", "\n", " // Check computed background color\n", " var notebookEl = document.querySelector('.jp-Notebook') || \n", " document.querySelector('.notebook_app') ||\n", " document.body;\n", " if (notebookEl) {\n", " var bgColor = window.getComputedStyle(notebookEl).backgroundColor;\n", " var rgb = bgColor.match(/\\d+/g);\n", " if (rgb && rgb.length >= 3) {\n", " var brightness = (parseInt(rgb[0]) + parseInt(rgb[1]) + parseInt(rgb[2])) / 3;\n", " if (brightness < 128) {\n", " isDark = true;\n", " }\n", " }\n", " }\n", "\n", " // Store result\n", " if (typeof IPython !== 'undefined' && IPython.notebook && IPython.notebook.kernel) {\n", " IPython.notebook.kernel.execute('_jupyter_dark_detect_result = ' + isDark);\n", " }\n", " })();\n", " " ], "text/plain": [ "" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "application/javascript": [ "\n", " if (typeof IPython !== 'undefined' && IPython.notebook) {\n", " IPython.notebook.kernel.execute(\"_jupyter_dark_detect_result = \" + \n", " (document.body.classList.contains('theme-dark') || \n", " document.body.classList.contains('jp-mod-dark') ||\n", " (document.body.getAttribute('data-jp-theme-name') && \n", " document.body.getAttribute('data-jp-theme-name').includes('dark'))));\n", " }\n", " " ], "text/plain": [ "" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "application/javascript": [ "\n", " (function() {\n", " var isDark = false;\n", "\n", " // Check JupyterLab theme\n", " if (document.body.classList.contains('jp-mod-dark') || \n", " document.body.classList.contains('theme-dark') ||\n", " document.body.classList.contains('vscode-dark')) {\n", " isDark = true;\n", " }\n", "\n", " // Check theme attribute\n", " var themeAttr = document.body.getAttribute('data-jp-theme-name');\n", " if (themeAttr && themeAttr.includes('dark')) {\n", " isDark = true;\n", " }\n", "\n", " // Check computed background color\n", " var notebookEl = document.querySelector('.jp-Notebook') || \n", " document.querySelector('.notebook_app') ||\n", " document.body;\n", " if (notebookEl) {\n", " var bgColor = window.getComputedStyle(notebookEl).backgroundColor;\n", " var rgb = bgColor.match(/\\d+/g);\n", " if (rgb && rgb.length >= 3) {\n", " var brightness = (parseInt(rgb[0]) + parseInt(rgb[1]) + parseInt(rgb[2])) / 3;\n", " if (brightness < 128) {\n", " isDark = true;\n", " }\n", " }\n", " }\n", "\n", " // Store result\n", " if (typeof IPython !== 'undefined' && IPython.notebook && IPython.notebook.kernel) {\n", " IPython.notebook.kernel.execute('_jupyter_dark_detect_result = ' + isDark);\n", " }\n", " })();\n", " " ], "text/plain": [ "" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "application/javascript": [ "\n", " if (typeof IPython !== 'undefined' && IPython.notebook) {\n", " IPython.notebook.kernel.execute(\"_jupyter_dark_detect_result = \" + \n", " (document.body.classList.contains('theme-dark') || \n", " document.body.classList.contains('jp-mod-dark') ||\n", " (document.body.getAttribute('data-jp-theme-name') && \n", " document.body.getAttribute('data-jp-theme-name').includes('dark'))));\n", " }\n", " " ], "text/plain": [ "" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "application/javascript": [ "\n", " (function() {\n", " var isDark = false;\n", "\n", " // Check JupyterLab theme\n", " if (document.body.classList.contains('jp-mod-dark') || \n", " document.body.classList.contains('theme-dark') ||\n", " document.body.classList.contains('vscode-dark')) {\n", " isDark = true;\n", " }\n", "\n", " // Check theme attribute\n", " var themeAttr = document.body.getAttribute('data-jp-theme-name');\n", " if (themeAttr && themeAttr.includes('dark')) {\n", " isDark = true;\n", " }\n", "\n", " // Check computed background color\n", " var notebookEl = document.querySelector('.jp-Notebook') || \n", " document.querySelector('.notebook_app') ||\n", " document.body;\n", " if (notebookEl) {\n", " var bgColor = window.getComputedStyle(notebookEl).backgroundColor;\n", " var rgb = bgColor.match(/\\d+/g);\n", " if (rgb && rgb.length >= 3) {\n", " var brightness = (parseInt(rgb[0]) + parseInt(rgb[1]) + parseInt(rgb[2])) / 3;\n", " if (brightness < 128) {\n", " isDark = true;\n", " }\n", " }\n", " }\n", "\n", " // Store result\n", " if (typeof IPython !== 'undefined' && IPython.notebook && IPython.notebook.kernel) {\n", " IPython.notebook.kernel.execute('_jupyter_dark_detect_result = ' + isDark);\n", " }\n", " })();\n", " " ], "text/plain": [ "" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "application/javascript": [ "\n", " if (typeof IPython !== 'undefined' && IPython.notebook) {\n", " IPython.notebook.kernel.execute(\"_jupyter_dark_detect_result = \" + \n", " (document.body.classList.contains('theme-dark') || \n", " document.body.classList.contains('jp-mod-dark') ||\n", " (document.body.getAttribute('data-jp-theme-name') && \n", " document.body.getAttribute('data-jp-theme-name').includes('dark'))));\n", " }\n", " " ], "text/plain": [ "" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "application/javascript": [ "\n", " (function() {\n", " var isDark = false;\n", "\n", " // Check JupyterLab theme\n", " if (document.body.classList.contains('jp-mod-dark') || \n", " document.body.classList.contains('theme-dark') ||\n", " document.body.classList.contains('vscode-dark')) {\n", " isDark = true;\n", " }\n", "\n", " // Check theme attribute\n", " var themeAttr = document.body.getAttribute('data-jp-theme-name');\n", " if (themeAttr && themeAttr.includes('dark')) {\n", " isDark = true;\n", " }\n", "\n", " // Check computed background color\n", " var notebookEl = document.querySelector('.jp-Notebook') || \n", " document.querySelector('.notebook_app') ||\n", " document.body;\n", " if (notebookEl) {\n", " var bgColor = window.getComputedStyle(notebookEl).backgroundColor;\n", " var rgb = bgColor.match(/\\d+/g);\n", " if (rgb && rgb.length >= 3) {\n", " var brightness = (parseInt(rgb[0]) + parseInt(rgb[1]) + parseInt(rgb[2])) / 3;\n", " if (brightness < 128) {\n", " isDark = true;\n", " }\n", " }\n", " }\n", "\n", " // Store result\n", " if (typeof IPython !== 'undefined' && IPython.notebook && IPython.notebook.kernel) {\n", " IPython.notebook.kernel.execute('_jupyter_dark_detect_result = ' + isDark);\n", " }\n", " })();\n", " " ], "text/plain": [ "" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "application/javascript": [ "\n", " if (typeof IPython !== 'undefined' && IPython.notebook) {\n", " IPython.notebook.kernel.execute(\"_jupyter_dark_detect_result = \" + \n", " (document.body.classList.contains('theme-dark') || \n", " document.body.classList.contains('jp-mod-dark') ||\n", " (document.body.getAttribute('data-jp-theme-name') && \n", " document.body.getAttribute('data-jp-theme-name').includes('dark'))));\n", " }\n", " " ], "text/plain": [ "" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "application/javascript": [ "\n", " (function() {\n", " var isDark = false;\n", "\n", " // Check JupyterLab theme\n", " if (document.body.classList.contains('jp-mod-dark') || \n", " document.body.classList.contains('theme-dark') ||\n", " document.body.classList.contains('vscode-dark')) {\n", " isDark = true;\n", " }\n", "\n", " // Check theme attribute\n", " var themeAttr = document.body.getAttribute('data-jp-theme-name');\n", " if (themeAttr && themeAttr.includes('dark')) {\n", " isDark = true;\n", " }\n", "\n", " // Check computed background color\n", " var notebookEl = document.querySelector('.jp-Notebook') || \n", " document.querySelector('.notebook_app') ||\n", " document.body;\n", " if (notebookEl) {\n", " var bgColor = window.getComputedStyle(notebookEl).backgroundColor;\n", " var rgb = bgColor.match(/\\d+/g);\n", " if (rgb && rgb.length >= 3) {\n", " var brightness = (parseInt(rgb[0]) + parseInt(rgb[1]) + parseInt(rgb[2])) / 3;\n", " if (brightness < 128) {\n", " isDark = true;\n", " }\n", " }\n", " }\n", "\n", " // Store result\n", " if (typeof IPython !== 'undefined' && IPython.notebook && IPython.notebook.kernel) {\n", " IPython.notebook.kernel.execute('_jupyter_dark_detect_result = ' + isDark);\n", " }\n", " })();\n", " " ], "text/plain": [ "" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "application/javascript": [ "\n", " if (typeof IPython !== 'undefined' && IPython.notebook) {\n", " IPython.notebook.kernel.execute(\"_jupyter_dark_detect_result = \" + \n", " (document.body.classList.contains('theme-dark') || \n", " document.body.classList.contains('jp-mod-dark') ||\n", " (document.body.getAttribute('data-jp-theme-name') && \n", " document.body.getAttribute('data-jp-theme-name').includes('dark'))));\n", " }\n", " " ], "text/plain": [ "" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "application/javascript": [ "\n", " (function() {\n", " var isDark = false;\n", "\n", " // Check JupyterLab theme\n", " if (document.body.classList.contains('jp-mod-dark') || \n", " document.body.classList.contains('theme-dark') ||\n", " document.body.classList.contains('vscode-dark')) {\n", " isDark = true;\n", " }\n", "\n", " // Check theme attribute\n", " var themeAttr = document.body.getAttribute('data-jp-theme-name');\n", " if (themeAttr && themeAttr.includes('dark')) {\n", " isDark = true;\n", " }\n", "\n", " // Check computed background color\n", " var notebookEl = document.querySelector('.jp-Notebook') || \n", " document.querySelector('.notebook_app') ||\n", " document.body;\n", " if (notebookEl) {\n", " var bgColor = window.getComputedStyle(notebookEl).backgroundColor;\n", " var rgb = bgColor.match(/\\d+/g);\n", " if (rgb && rgb.length >= 3) {\n", " var brightness = (parseInt(rgb[0]) + parseInt(rgb[1]) + parseInt(rgb[2])) / 3;\n", " if (brightness < 128) {\n", " isDark = true;\n", " }\n", " }\n", " }\n", "\n", " // Store result\n", " if (typeof IPython !== 'undefined' && IPython.notebook && IPython.notebook.kernel) {\n", " IPython.notebook.kernel.execute('_jupyter_dark_detect_result = ' + isDark);\n", " }\n", " })();\n", " " ], "text/plain": [ "" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "application/javascript": [ "\n", " if (typeof IPython !== 'undefined' && IPython.notebook) {\n", " IPython.notebook.kernel.execute(\"_jupyter_dark_detect_result = \" + \n", " (document.body.classList.contains('theme-dark') || \n", " document.body.classList.contains('jp-mod-dark') ||\n", " (document.body.getAttribute('data-jp-theme-name') && \n", " document.body.getAttribute('data-jp-theme-name').includes('dark'))));\n", " }\n", " " ], "text/plain": [ "" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "application/javascript": [ "\n", " (function() {\n", " var isDark = false;\n", "\n", " // Check JupyterLab theme\n", " if (document.body.classList.contains('jp-mod-dark') || \n", " document.body.classList.contains('theme-dark') ||\n", " document.body.classList.contains('vscode-dark')) {\n", " isDark = true;\n", " }\n", "\n", " // Check theme attribute\n", " var themeAttr = document.body.getAttribute('data-jp-theme-name');\n", " if (themeAttr && themeAttr.includes('dark')) {\n", " isDark = true;\n", " }\n", "\n", " // Check computed background color\n", " var notebookEl = document.querySelector('.jp-Notebook') || \n", " document.querySelector('.notebook_app') ||\n", " document.body;\n", " if (notebookEl) {\n", " var bgColor = window.getComputedStyle(notebookEl).backgroundColor;\n", " var rgb = bgColor.match(/\\d+/g);\n", " if (rgb && rgb.length >= 3) {\n", " var brightness = (parseInt(rgb[0]) + parseInt(rgb[1]) + parseInt(rgb[2])) / 3;\n", " if (brightness < 128) {\n", " isDark = true;\n", " }\n", " }\n", " }\n", "\n", " // Store result\n", " if (typeof IPython !== 'undefined' && IPython.notebook && IPython.notebook.kernel) {\n", " IPython.notebook.kernel.execute('_jupyter_dark_detect_result = ' + isDark);\n", " }\n", " })();\n", " " ], "text/plain": [ "" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "application/javascript": [ "\n", " if (typeof IPython !== 'undefined' && IPython.notebook) {\n", " IPython.notebook.kernel.execute(\"_jupyter_dark_detect_result = \" + \n", " (document.body.classList.contains('theme-dark') || \n", " document.body.classList.contains('jp-mod-dark') ||\n", " (document.body.getAttribute('data-jp-theme-name') && \n", " document.body.getAttribute('data-jp-theme-name').includes('dark'))));\n", " }\n", " " ], "text/plain": [ "" ] }, "metadata": {}, "output_type": "display_data" }, { "name": "stdout", "output_type": "stream", "text": [ "πŸ† Best goodness-of-fit \u001b[1m(\u001b[0mreduced χ²\u001b[1m)\u001b[0m is \u001b[1;36m1.29\u001b[0m at iteration \u001b[1;36m261\u001b[0m\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "βœ… Fitting complete.\n" ] } ], "source": [ "# Start refinement. All parameters, which have standard uncertainties\n", "# in the input CIF files, are refined by default.\n", "project.analysis.fit()" ] }, { "cell_type": "code", "execution_count": 9, "id": "13", "metadata": { "execution": { "iopub.execute_input": "2026-01-06T13:53:30.196825Z", "iopub.status.busy": "2026-01-06T13:53:30.196173Z", "iopub.status.idle": "2026-01-06T13:53:30.985800Z", "shell.execute_reply": "2026-01-06T13:53:30.985215Z" } }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "\u001b[1;34mFit results\u001b[0m\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "βœ… Success: \u001b[3;92mTrue\u001b[0m\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "⏱️ Fitting time: \u001b[1;36m15.41\u001b[0m seconds\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "πŸ“ Goodness-of-fit \u001b[1m(\u001b[0mreduced χ²\u001b[1m)\u001b[0m: \u001b[1;36m1.29\u001b[0m\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "πŸ“ R-factor \u001b[1m(\u001b[0mRf\u001b[1m)\u001b[0m: \u001b[1;36m5.64\u001b[0m%\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "πŸ“ R-factor squared \u001b[1m(\u001b[0mRfΒ²\u001b[1m)\u001b[0m: \u001b[1;36m5.29\u001b[0m%\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "πŸ“ Weighted R-factor \u001b[1m(\u001b[0mwR\u001b[1m)\u001b[0m: \u001b[1;36m4.45\u001b[0m%\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "πŸ“ˆ Fitted parameters:\n" ] }, { "data": { "application/javascript": [ "\n", " (function() {\n", " var isDark = false;\n", "\n", " // Check JupyterLab theme\n", " if (document.body.classList.contains('jp-mod-dark') || \n", " document.body.classList.contains('theme-dark') ||\n", " document.body.classList.contains('vscode-dark')) {\n", " isDark = true;\n", " }\n", "\n", " // Check theme attribute\n", " var themeAttr = document.body.getAttribute('data-jp-theme-name');\n", " if (themeAttr && themeAttr.includes('dark')) {\n", " isDark = true;\n", " }\n", "\n", " // Check computed background color\n", " var notebookEl = document.querySelector('.jp-Notebook') || \n", " document.querySelector('.notebook_app') ||\n", " document.body;\n", " if (notebookEl) {\n", " var bgColor = window.getComputedStyle(notebookEl).backgroundColor;\n", " var rgb = bgColor.match(/\\d+/g);\n", " if (rgb && rgb.length >= 3) {\n", " var brightness = (parseInt(rgb[0]) + parseInt(rgb[1]) + parseInt(rgb[2])) / 3;\n", " if (brightness < 128) {\n", " isDark = true;\n", " }\n", " }\n", " }\n", "\n", " // Store result\n", " if (typeof IPython !== 'undefined' && IPython.notebook && IPython.notebook.kernel) {\n", " IPython.notebook.kernel.execute('_jupyter_dark_detect_result = ' + isDark);\n", " }\n", " })();\n", " " ], "text/plain": [ "" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "application/javascript": [ "\n", " if (typeof IPython !== 'undefined' && IPython.notebook) {\n", " IPython.notebook.kernel.execute(\"_jupyter_dark_detect_result = \" + \n", " (document.body.classList.contains('theme-dark') || \n", " document.body.classList.contains('jp-mod-dark') ||\n", " (document.body.getAttribute('data-jp-theme-name') && \n", " document.body.getAttribute('data-jp-theme-name').includes('dark'))));\n", " }\n", " " ], "text/plain": [ "" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/html": [ "\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
 datablockcategoryentryparameterstartfitteduncertaintyunitschange
1lbcocelllength_a3.88003.89090.0000Γ…0.28 % ↑
2lbcoatom_siteLab_iso0.50000.50516011.6004Γ…Β²1.02 % ↑
3lbcoatom_siteBab_iso0.50000.50529770.5350Γ…Β²1.04 % ↑
4lbcoatom_siteCob_iso0.50000.23710.0611Γ…Β²52.59 % ↓
5lbcoatom_siteOb_iso0.50001.39350.0168Γ…Β²178.70 % ↑
6hrptlinked_phaseslbcoscale10.00009.13490.06438.65 % ↓
7hrptpeakbroad_gauss_u0.10000.08160.0031degΒ²18.44 % ↓
8hrptpeakbroad_gauss_v-0.1000-0.11590.0067degΒ²15.90 % ↑
9hrptpeakbroad_gauss_w0.10000.12040.0033degΒ²20.45 % ↑
10hrptpeakbroad_lorentz_y0.10000.08440.0021deg15.57 % ↓
11hrptinstrumenttwotheta_offset0.60000.62260.0010deg3.76 % ↑
12hrptbackground1y170.0000168.42421.39770.93 % ↓
13hrptbackground2y170.0000164.37151.00253.31 % ↓
14hrptbackground3y170.0000166.88700.73911.83 % ↓
15hrptbackground4y170.0000175.39770.65863.18 % ↑
16hrptbackground5y170.0000174.30270.91132.53 % ↑
\n" ], "text/plain": [ "" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "# Show fit results summary\n", "project.analysis.show_fit_results()" ] }, { "cell_type": "code", "execution_count": 10, "id": "14", "metadata": { "execution": { "iopub.execute_input": "2026-01-06T13:53:30.987950Z", "iopub.status.busy": "2026-01-06T13:53:30.987832Z", "iopub.status.idle": "2026-01-06T13:53:30.993206Z", "shell.execute_reply": "2026-01-06T13:53:30.992039Z" } }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "\u001b[1;34mDefined experiments πŸ”¬\u001b[0m\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "\u001b[1m[\u001b[0m\u001b[32m'hrpt'\u001b[0m\u001b[1m]\u001b[0m\n" ] } ], "source": [ "project.experiments.show_names()" ] }, { "cell_type": "code", "execution_count": 11, "id": "15", "metadata": { "execution": { "iopub.execute_input": "2026-01-06T13:53:30.995561Z", "iopub.status.busy": "2026-01-06T13:53:30.995409Z", "iopub.status.idle": "2026-01-06T13:53:31.330789Z", "shell.execute_reply": "2026-01-06T13:53:31.330352Z" } }, "outputs": [ { "data": { "text/html": [ "
\n", "
" ], "text/plain": [ "" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "project.plot_meas_vs_calc(expt_name='hrpt', show_residual=True)" ] }, { "cell_type": "markdown", "id": "16", "metadata": {}, "source": [ "## Step 5: Show Project Summary" ] }, { "cell_type": "code", "execution_count": 12, "id": "17", "metadata": { "execution": { "iopub.execute_input": "2026-01-06T13:53:31.332377Z", "iopub.status.busy": "2026-01-06T13:53:31.332268Z", "iopub.status.idle": "2026-01-06T13:53:33.103651Z", "shell.execute_reply": "2026-01-06T13:53:33.103199Z" } }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "\u001b[1;32mβ€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”\u001b[0m\n", "\u001b[1;32mPROJECT INFO\u001b[0m\n", "\u001b[1;32mβ€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”\u001b[0m\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "\u001b[1;34mTitle\u001b[0m\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "Untitled Project\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "\u001b[1;32mβ€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”\u001b[0m\n", "\u001b[1;32mCRYSTALLOGRAPHIC DATA\u001b[0m\n", "\u001b[1;32mβ€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”\u001b[0m\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "\u001b[1;34mPhase datablock\u001b[0m\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "🧩 lbco\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "\u001b[1;34mSpace group\u001b[0m\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "P m \u001b[1;36m-3\u001b[0m m\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "\u001b[1;34mCell parameters\u001b[0m\n" ] }, { "data": { "application/javascript": [ "\n", " (function() {\n", " var isDark = false;\n", "\n", " // Check JupyterLab theme\n", " if (document.body.classList.contains('jp-mod-dark') || \n", " document.body.classList.contains('theme-dark') ||\n", " document.body.classList.contains('vscode-dark')) {\n", " isDark = true;\n", " }\n", "\n", " // Check theme attribute\n", " var themeAttr = document.body.getAttribute('data-jp-theme-name');\n", " if (themeAttr && themeAttr.includes('dark')) {\n", " isDark = true;\n", " }\n", "\n", " // Check computed background color\n", " var notebookEl = document.querySelector('.jp-Notebook') || \n", " document.querySelector('.notebook_app') ||\n", " document.body;\n", " if (notebookEl) {\n", " var bgColor = window.getComputedStyle(notebookEl).backgroundColor;\n", " var rgb = bgColor.match(/\\d+/g);\n", " if (rgb && rgb.length >= 3) {\n", " var brightness = (parseInt(rgb[0]) + parseInt(rgb[1]) + parseInt(rgb[2])) / 3;\n", " if (brightness < 128) {\n", " isDark = true;\n", " }\n", " }\n", " }\n", "\n", " // Store result\n", " if (typeof IPython !== 'undefined' && IPython.notebook && IPython.notebook.kernel) {\n", " IPython.notebook.kernel.execute('_jupyter_dark_detect_result = ' + isDark);\n", " }\n", " })();\n", " " ], "text/plain": [ "" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "application/javascript": [ "\n", " if (typeof IPython !== 'undefined' && IPython.notebook) {\n", " IPython.notebook.kernel.execute(\"_jupyter_dark_detect_result = \" + \n", " (document.body.classList.contains('theme-dark') || \n", " document.body.classList.contains('jp-mod-dark') ||\n", " (document.body.getAttribute('data-jp-theme-name') && \n", " document.body.getAttribute('data-jp-theme-name').includes('dark'))));\n", " }\n", " " ], "text/plain": [ "" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/html": [ "\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
 ParameterValue
1a3.89087
2b3.89087
3c3.89087
4alpha90.00000
5beta90.00000
6gamma90.00000
\n" ], "text/plain": [ "" ] }, "metadata": {}, "output_type": "display_data" }, { "name": "stdout", "output_type": "stream", "text": [ "\u001b[1;34mAtom sites\u001b[0m\n" ] }, { "data": { "application/javascript": [ "\n", " (function() {\n", " var isDark = false;\n", "\n", " // Check JupyterLab theme\n", " if (document.body.classList.contains('jp-mod-dark') || \n", " document.body.classList.contains('theme-dark') ||\n", " document.body.classList.contains('vscode-dark')) {\n", " isDark = true;\n", " }\n", "\n", " // Check theme attribute\n", " var themeAttr = document.body.getAttribute('data-jp-theme-name');\n", " if (themeAttr && themeAttr.includes('dark')) {\n", " isDark = true;\n", " }\n", "\n", " // Check computed background color\n", " var notebookEl = document.querySelector('.jp-Notebook') || \n", " document.querySelector('.notebook_app') ||\n", " document.body;\n", " if (notebookEl) {\n", " var bgColor = window.getComputedStyle(notebookEl).backgroundColor;\n", " var rgb = bgColor.match(/\\d+/g);\n", " if (rgb && rgb.length >= 3) {\n", " var brightness = (parseInt(rgb[0]) + parseInt(rgb[1]) + parseInt(rgb[2])) / 3;\n", " if (brightness < 128) {\n", " isDark = true;\n", " }\n", " }\n", " }\n", "\n", " // Store result\n", " if (typeof IPython !== 'undefined' && IPython.notebook && IPython.notebook.kernel) {\n", " IPython.notebook.kernel.execute('_jupyter_dark_detect_result = ' + isDark);\n", " }\n", " })();\n", " " ], "text/plain": [ "" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "application/javascript": [ "\n", " if (typeof IPython !== 'undefined' && IPython.notebook) {\n", " IPython.notebook.kernel.execute(\"_jupyter_dark_detect_result = \" + \n", " (document.body.classList.contains('theme-dark') || \n", " document.body.classList.contains('jp-mod-dark') ||\n", " (document.body.getAttribute('data-jp-theme-name') && \n", " document.body.getAttribute('data-jp-theme-name').includes('dark'))));\n", " }\n", " " ], "text/plain": [ "" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/html": [ "\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
 labeltypexyzoccBiso
1LaLa0.000000.000000.000000.500000.50512
2BaBa0.000000.000000.000000.500000.50518
3CoCo0.500000.500000.500001.000000.23706
4OO0.000000.500000.500001.000001.39351
\n" ], "text/plain": [ "" ] }, "metadata": {}, "output_type": "display_data" }, { "name": "stdout", "output_type": "stream", "text": [ "\u001b[1;32mβ€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”\u001b[0m\n", "\u001b[1;32mEXPERIMENTS\u001b[0m\n", "\u001b[1;32mβ€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”\u001b[0m\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "\u001b[1;34mExperiment datablock\u001b[0m\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "πŸ”¬ hrpt\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "\u001b[1;34mExperiment type\u001b[0m\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "powder, neutron, constant wavelength\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "\u001b[1;34mWavelength\u001b[0m\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "\u001b[1;36m1.49400\u001b[0m\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "\u001b[1;34m2ΞΈ offset\u001b[0m\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "\u001b[1;36m0.62258\u001b[0m\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "\u001b[1;34mProfile type\u001b[0m\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "PeakProfileTypeEnum.PSEUDO_VOIGT\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "\u001b[1;34mPeak broadening \u001b[0m\u001b[1;34m(\u001b[0m\u001b[1;34mGaussian\u001b[0m\u001b[1;34m)\u001b[0m\n" ] }, { "data": { "application/javascript": [ "\n", " (function() {\n", " var isDark = false;\n", "\n", " // Check JupyterLab theme\n", " if (document.body.classList.contains('jp-mod-dark') || \n", " document.body.classList.contains('theme-dark') ||\n", " document.body.classList.contains('vscode-dark')) {\n", " isDark = true;\n", " }\n", "\n", " // Check theme attribute\n", " var themeAttr = document.body.getAttribute('data-jp-theme-name');\n", " if (themeAttr && themeAttr.includes('dark')) {\n", " isDark = true;\n", " }\n", "\n", " // Check computed background color\n", " var notebookEl = document.querySelector('.jp-Notebook') || \n", " document.querySelector('.notebook_app') ||\n", " document.body;\n", " if (notebookEl) {\n", " var bgColor = window.getComputedStyle(notebookEl).backgroundColor;\n", " var rgb = bgColor.match(/\\d+/g);\n", " if (rgb && rgb.length >= 3) {\n", " var brightness = (parseInt(rgb[0]) + parseInt(rgb[1]) + parseInt(rgb[2])) / 3;\n", " if (brightness < 128) {\n", " isDark = true;\n", " }\n", " }\n", " }\n", "\n", " // Store result\n", " if (typeof IPython !== 'undefined' && IPython.notebook && IPython.notebook.kernel) {\n", " IPython.notebook.kernel.execute('_jupyter_dark_detect_result = ' + isDark);\n", " }\n", " })();\n", " " ], "text/plain": [ "" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "application/javascript": [ "\n", " if (typeof IPython !== 'undefined' && IPython.notebook) {\n", " IPython.notebook.kernel.execute(\"_jupyter_dark_detect_result = \" + \n", " (document.body.classList.contains('theme-dark') || \n", " document.body.classList.contains('jp-mod-dark') ||\n", " (document.body.getAttribute('data-jp-theme-name') && \n", " document.body.getAttribute('data-jp-theme-name').includes('dark'))));\n", " }\n", " " ], "text/plain": [ "" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/html": [ "\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
 ParameterValue
1U0.08156
2V-0.11590
3W0.12045
\n" ], "text/plain": [ "" ] }, "metadata": {}, "output_type": "display_data" }, { "name": "stdout", "output_type": "stream", "text": [ "\u001b[1;34mPeak broadening \u001b[0m\u001b[1;34m(\u001b[0m\u001b[1;34mLorentzian\u001b[0m\u001b[1;34m)\u001b[0m\n" ] }, { "data": { "application/javascript": [ "\n", " (function() {\n", " var isDark = false;\n", "\n", " // Check JupyterLab theme\n", " if (document.body.classList.contains('jp-mod-dark') || \n", " document.body.classList.contains('theme-dark') ||\n", " document.body.classList.contains('vscode-dark')) {\n", " isDark = true;\n", " }\n", "\n", " // Check theme attribute\n", " var themeAttr = document.body.getAttribute('data-jp-theme-name');\n", " if (themeAttr && themeAttr.includes('dark')) {\n", " isDark = true;\n", " }\n", "\n", " // Check computed background color\n", " var notebookEl = document.querySelector('.jp-Notebook') || \n", " document.querySelector('.notebook_app') ||\n", " document.body;\n", " if (notebookEl) {\n", " var bgColor = window.getComputedStyle(notebookEl).backgroundColor;\n", " var rgb = bgColor.match(/\\d+/g);\n", " if (rgb && rgb.length >= 3) {\n", " var brightness = (parseInt(rgb[0]) + parseInt(rgb[1]) + parseInt(rgb[2])) / 3;\n", " if (brightness < 128) {\n", " isDark = true;\n", " }\n", " }\n", " }\n", "\n", " // Store result\n", " if (typeof IPython !== 'undefined' && IPython.notebook && IPython.notebook.kernel) {\n", " IPython.notebook.kernel.execute('_jupyter_dark_detect_result = ' + isDark);\n", " }\n", " })();\n", " " ], "text/plain": [ "" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "application/javascript": [ "\n", " if (typeof IPython !== 'undefined' && IPython.notebook) {\n", " IPython.notebook.kernel.execute(\"_jupyter_dark_detect_result = \" + \n", " (document.body.classList.contains('theme-dark') || \n", " document.body.classList.contains('jp-mod-dark') ||\n", " (document.body.getAttribute('data-jp-theme-name') && \n", " document.body.getAttribute('data-jp-theme-name').includes('dark'))));\n", " }\n", " " ], "text/plain": [ "" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/html": [ "\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
 ParameterValue
1X0.00000
2Y0.08443
\n" ], "text/plain": [ "" ] }, "metadata": {}, "output_type": "display_data" }, { "name": "stdout", "output_type": "stream", "text": [ "\u001b[1;32mβ€”β€”β€”β€”β€”β€”β€”\u001b[0m\n", "\u001b[1;32mFITTING\u001b[0m\n", "\u001b[1;32mβ€”β€”β€”β€”β€”β€”β€”\u001b[0m\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "\u001b[1;34mCalculation engine\u001b[0m\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "cryspy\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "\u001b[1;34mMinimization engine\u001b[0m\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "lmfit \u001b[1m(\u001b[0mleastsq\u001b[1m)\u001b[0m\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "\u001b[1;34mFit quality\u001b[0m\n" ] }, { "data": { "application/javascript": [ "\n", " (function() {\n", " var isDark = false;\n", "\n", " // Check JupyterLab theme\n", " if (document.body.classList.contains('jp-mod-dark') || \n", " document.body.classList.contains('theme-dark') ||\n", " document.body.classList.contains('vscode-dark')) {\n", " isDark = true;\n", " }\n", "\n", " // Check theme attribute\n", " var themeAttr = document.body.getAttribute('data-jp-theme-name');\n", " if (themeAttr && themeAttr.includes('dark')) {\n", " isDark = true;\n", " }\n", "\n", " // Check computed background color\n", " var notebookEl = document.querySelector('.jp-Notebook') || \n", " document.querySelector('.notebook_app') ||\n", " document.body;\n", " if (notebookEl) {\n", " var bgColor = window.getComputedStyle(notebookEl).backgroundColor;\n", " var rgb = bgColor.match(/\\d+/g);\n", " if (rgb && rgb.length >= 3) {\n", " var brightness = (parseInt(rgb[0]) + parseInt(rgb[1]) + parseInt(rgb[2])) / 3;\n", " if (brightness < 128) {\n", " isDark = true;\n", " }\n", " }\n", " }\n", "\n", " // Store result\n", " if (typeof IPython !== 'undefined' && IPython.notebook && IPython.notebook.kernel) {\n", " IPython.notebook.kernel.execute('_jupyter_dark_detect_result = ' + isDark);\n", " }\n", " })();\n", " " ], "text/plain": [ "" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "application/javascript": [ "\n", " if (typeof IPython !== 'undefined' && IPython.notebook) {\n", " IPython.notebook.kernel.execute(\"_jupyter_dark_detect_result = \" + \n", " (document.body.classList.contains('theme-dark') || \n", " document.body.classList.contains('jp-mod-dark') ||\n", " (document.body.getAttribute('data-jp-theme-name') && \n", " document.body.getAttribute('data-jp-theme-name').includes('dark'))));\n", " }\n", " " ], "text/plain": [ "" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/html": [ "\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
 metricvalue
1Goodness-of-fit (reduced χ²)1.29
\n" ], "text/plain": [ "" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "project.summary.show_report()" ] } ], "metadata": { "jupytext": { "cell_metadata_filter": "-all", "main_language": "python", "notebook_metadata_filter": "-all" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.13.11" } }, "nbformat": 4, "nbformat_minor": 5 }