{ "cells": [ { "cell_type": "code", "execution_count": 1, "id": "0", "metadata": { "execution": { "iopub.execute_input": "2026-04-14T15:03:18.543024Z", "iopub.status.busy": "2026-04-14T15:03:18.542806Z", "iopub.status.idle": "2026-04-14T15:03:18.547283Z", "shell.execute_reply": "2026-04-14T15:03:18.546452Z" }, "tags": [ "hide-in-docs" ] }, "outputs": [], "source": [ "# Check whether easydiffraction is installed; install it if needed.\n", "# Required for remote environments such as Google Colab.\n", "import importlib.util\n", "\n", "if importlib.util.find_spec('easydiffraction') is None:\n", " %pip install easydiffraction==0.13.1" ] }, { "cell_type": "markdown", "id": "1", "metadata": {}, "source": [ "# Structure Refinement: Co2SiO4, D20\n", "\n", "This example demonstrates a Rietveld refinement of Co2SiO4 crystal\n", "structure using constant wavelength neutron powder diffraction data\n", "from D20 at ILL." ] }, { "cell_type": "markdown", "id": "2", "metadata": {}, "source": [ "## Import Library" ] }, { "cell_type": "code", "execution_count": 2, "id": "3", "metadata": { "execution": { "iopub.execute_input": "2026-04-14T15:03:18.549340Z", "iopub.status.busy": "2026-04-14T15:03:18.549093Z", "iopub.status.idle": "2026-04-14T15:03:21.153033Z", "shell.execute_reply": "2026-04-14T15:03:21.152178Z" } }, "outputs": [], "source": [ "from easydiffraction import ExperimentFactory\n", "from easydiffraction import Project\n", "from easydiffraction import StructureFactory\n", "from easydiffraction import download_data" ] }, { "cell_type": "markdown", "id": "4", "metadata": {}, "source": [ "## Define Structure\n", "\n", "This section shows how to add structures and modify their\n", "parameters.\n", "\n", "#### Create Structure" ] }, { "cell_type": "code", "execution_count": 3, "id": "5", "metadata": { "execution": { "iopub.execute_input": "2026-04-14T15:03:21.154782Z", "iopub.status.busy": "2026-04-14T15:03:21.154485Z", "iopub.status.idle": "2026-04-14T15:03:21.158583Z", "shell.execute_reply": "2026-04-14T15:03:21.157711Z" } }, "outputs": [], "source": [ "structure = StructureFactory.from_scratch(name='cosio')" ] }, { "cell_type": "markdown", "id": "6", "metadata": {}, "source": [ "#### Set Space Group" ] }, { "cell_type": "code", "execution_count": 4, "id": "7", "metadata": { "execution": { "iopub.execute_input": "2026-04-14T15:03:21.160001Z", "iopub.status.busy": "2026-04-14T15:03:21.159843Z", "iopub.status.idle": "2026-04-14T15:03:21.163368Z", "shell.execute_reply": "2026-04-14T15:03:21.162594Z" } }, "outputs": [], "source": [ "structure.space_group.name_h_m = 'P n m a'\n", "structure.space_group.it_coordinate_system_code = 'abc'" ] }, { "cell_type": "markdown", "id": "8", "metadata": {}, "source": [ "#### Set Unit Cell" ] }, { "cell_type": "code", "execution_count": 5, "id": "9", "metadata": { "execution": { "iopub.execute_input": "2026-04-14T15:03:21.164938Z", "iopub.status.busy": "2026-04-14T15:03:21.164743Z", "iopub.status.idle": "2026-04-14T15:03:21.168877Z", "shell.execute_reply": "2026-04-14T15:03:21.167487Z" } }, "outputs": [], "source": [ "structure.cell.length_a = 10.3\n", "structure.cell.length_b = 6.0\n", "structure.cell.length_c = 4.8" ] }, { "cell_type": "markdown", "id": "10", "metadata": {}, "source": [ "#### Set Atom Sites" ] }, { "cell_type": "code", "execution_count": 6, "id": "11", "metadata": { "execution": { "iopub.execute_input": "2026-04-14T15:03:21.170559Z", "iopub.status.busy": "2026-04-14T15:03:21.170312Z", "iopub.status.idle": "2026-04-14T15:03:21.182766Z", "shell.execute_reply": "2026-04-14T15:03:21.181924Z" } }, "outputs": [], "source": [ "structure.atom_sites.create(\n", " label='Co1',\n", " type_symbol='Co',\n", " fract_x=0,\n", " fract_y=0,\n", " fract_z=0,\n", " wyckoff_letter='a',\n", " adp_iso=0.5,\n", ")\n", "structure.atom_sites.create(\n", " label='Co2',\n", " type_symbol='Co',\n", " fract_x=0.279,\n", " fract_y=0.25,\n", " fract_z=0.985,\n", " wyckoff_letter='c',\n", " adp_iso=0.5,\n", ")\n", "structure.atom_sites.create(\n", " label='Si',\n", " type_symbol='Si',\n", " fract_x=0.094,\n", " fract_y=0.25,\n", " fract_z=0.429,\n", " wyckoff_letter='c',\n", " adp_iso=0.5,\n", ")\n", "structure.atom_sites.create(\n", " label='O1',\n", " type_symbol='O',\n", " fract_x=0.091,\n", " fract_y=0.25,\n", " fract_z=0.771,\n", " wyckoff_letter='c',\n", " adp_iso=0.5,\n", ")\n", "structure.atom_sites.create(\n", " label='O2',\n", " type_symbol='O',\n", " fract_x=0.448,\n", " fract_y=0.25,\n", " fract_z=0.217,\n", " wyckoff_letter='c',\n", " adp_iso=0.5,\n", ")\n", "structure.atom_sites.create(\n", " label='O3',\n", " type_symbol='O',\n", " fract_x=0.164,\n", " fract_y=0.032,\n", " fract_z=0.28,\n", " wyckoff_letter='d',\n", " adp_iso=0.5,\n", ")" ] }, { "cell_type": "markdown", "id": "12", "metadata": {}, "source": [ "## Define Experiment\n", "\n", "This section shows how to add experiments, configure their parameters,\n", "and link the structures defined in the previous step.\n", "\n", "#### Download Measured Data" ] }, { "cell_type": "code", "execution_count": 7, "id": "13", "metadata": { "execution": { "iopub.execute_input": "2026-04-14T15:03:21.184356Z", "iopub.status.busy": "2026-04-14T15:03:21.184183Z", "iopub.status.idle": "2026-04-14T15:03:21.403037Z", "shell.execute_reply": "2026-04-14T15:03:21.402247Z" } }, "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;36m12\u001b[0m: Co2SiO4, D20 \u001b[1m(\u001b[0mILL\u001b[1m)\u001b[0m\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "✅ Data #\u001b[1;36m12\u001b[0m downloaded to \u001b[32m'data/ed-12.xye'\u001b[0m\n" ] } ], "source": [ "data_path = download_data(id=12, destination='data')" ] }, { "cell_type": "markdown", "id": "14", "metadata": {}, "source": [ "#### Create Experiment" ] }, { "cell_type": "code", "execution_count": 8, "id": "15", "metadata": { "execution": { "iopub.execute_input": "2026-04-14T15:03:21.404773Z", "iopub.status.busy": "2026-04-14T15:03:21.404610Z", "iopub.status.idle": "2026-04-14T15:03:21.521583Z", "shell.execute_reply": "2026-04-14T15:03:21.520684Z" } }, "outputs": [], "source": [ "expt = ExperimentFactory.from_data_path(name='d20', data_path=data_path)" ] }, { "cell_type": "markdown", "id": "16", "metadata": {}, "source": [ "#### Set Instrument" ] }, { "cell_type": "code", "execution_count": 9, "id": "17", "metadata": { "execution": { "iopub.execute_input": "2026-04-14T15:03:21.523327Z", "iopub.status.busy": "2026-04-14T15:03:21.523123Z", "iopub.status.idle": "2026-04-14T15:03:21.526276Z", "shell.execute_reply": "2026-04-14T15:03:21.525533Z" } }, "outputs": [], "source": [ "expt.instrument.setup_wavelength = 1.87\n", "expt.instrument.calib_twotheta_offset = 0.1" ] }, { "cell_type": "markdown", "id": "18", "metadata": {}, "source": [ "#### Set Peak Profile" ] }, { "cell_type": "code", "execution_count": 10, "id": "19", "metadata": { "execution": { "iopub.execute_input": "2026-04-14T15:03:21.528098Z", "iopub.status.busy": "2026-04-14T15:03:21.527931Z", "iopub.status.idle": "2026-04-14T15:03:21.849494Z", "shell.execute_reply": "2026-04-14T15:03:21.848709Z" } }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "\u001b[1;34mCurrent peak profile type\u001b[0m\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "pseudo-voigt\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "\u001b[1;34mSupported types\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", "
 TypeDescription
1pseudo-voigtPseudo-Voigt profile
2pseudo-voigt + empirical asymmetryPseudo-Voigt with empirical asymmetry correction
\n" ], "text/plain": [ "" ] }, "metadata": {}, "output_type": "display_data" }, { "name": "stdout", "output_type": "stream", "text": [ "⚠️ Switching peak profile type discards existing peak parameters. \n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "\u001b[1;34mPeak profile type for experiment \u001b[0m\u001b[32m'd20'\u001b[0m\u001b[1;34m changed to\u001b[0m\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "pseudo-voigt + empirical asymmetry\n" ] } ], "source": [ "expt.show_current_peak_profile_type()\n", "expt.show_supported_peak_profile_types()\n", "expt.peak_profile_type = 'pseudo-voigt + empirical asymmetry'\n", "expt.peak.broad_gauss_u = 0.3\n", "expt.peak.broad_gauss_v = -0.5\n", "expt.peak.broad_gauss_w = 0.4" ] }, { "cell_type": "markdown", "id": "20", "metadata": {}, "source": [ "#### Set Background" ] }, { "cell_type": "code", "execution_count": 11, "id": "21", "metadata": { "execution": { "iopub.execute_input": "2026-04-14T15:03:21.851341Z", "iopub.status.busy": "2026-04-14T15:03:21.851143Z", "iopub.status.idle": "2026-04-14T15:03:22.075878Z", "shell.execute_reply": "2026-04-14T15:03:22.075081Z" } }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "\u001b[1;34mCurrent background type\u001b[0m\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "line-segment\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "\u001b[1;34mSupported types\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", "
 TypeDescription
1chebyshevChebyshev polynomial background
2line-segmentLinear interpolation between points
\n" ], "text/plain": [ "" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "expt.show_current_background_type()\n", "expt.show_supported_background_types()\n", "expt.background.create(id='1', x=8, y=500)\n", "expt.background.create(id='2', x=9, y=500)\n", "expt.background.create(id='3', x=10, y=500)\n", "expt.background.create(id='4', x=11, y=500)\n", "expt.background.create(id='5', x=12, y=500)\n", "expt.background.create(id='6', x=15, y=500)\n", "expt.background.create(id='7', x=25, y=500)\n", "expt.background.create(id='8', x=30, y=500)\n", "expt.background.create(id='9', x=50, y=500)\n", "expt.background.create(id='10', x=70, y=500)\n", "expt.background.create(id='11', x=90, y=500)\n", "expt.background.create(id='12', x=110, y=500)\n", "expt.background.create(id='13', x=130, y=500)\n", "expt.background.create(id='14', x=150, y=500)" ] }, { "cell_type": "markdown", "id": "22", "metadata": {}, "source": [ "#### Set Linked Phases" ] }, { "cell_type": "code", "execution_count": 12, "id": "23", "metadata": { "execution": { "iopub.execute_input": "2026-04-14T15:03:22.077611Z", "iopub.status.busy": "2026-04-14T15:03:22.077429Z", "iopub.status.idle": "2026-04-14T15:03:22.080743Z", "shell.execute_reply": "2026-04-14T15:03:22.079934Z" } }, "outputs": [], "source": [ "expt.linked_phases.create(id='cosio', scale=1.0)" ] }, { "cell_type": "markdown", "id": "24", "metadata": {}, "source": [ "## Define Project\n", "\n", "The project object is used to manage the structure, experiment, and\n", "analysis.\n", "\n", "#### Create Project" ] }, { "cell_type": "code", "execution_count": 13, "id": "25", "metadata": { "execution": { "iopub.execute_input": "2026-04-14T15:03:22.082267Z", "iopub.status.busy": "2026-04-14T15:03:22.082059Z", "iopub.status.idle": "2026-04-14T15:03:22.636320Z", "shell.execute_reply": "2026-04-14T15:03:22.635260Z" } }, "outputs": [ { "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" } ], "source": [ "project = Project()" ] }, { "cell_type": "markdown", "id": "26", "metadata": {}, "source": [ "#### Add Structure" ] }, { "cell_type": "code", "execution_count": 14, "id": "27", "metadata": { "execution": { "iopub.execute_input": "2026-04-14T15:03:22.638118Z", "iopub.status.busy": "2026-04-14T15:03:22.637897Z", "iopub.status.idle": "2026-04-14T15:03:22.641301Z", "shell.execute_reply": "2026-04-14T15:03:22.640482Z" } }, "outputs": [], "source": [ "project.structures.add(structure)" ] }, { "cell_type": "markdown", "id": "28", "metadata": {}, "source": [ "#### Add Experiment" ] }, { "cell_type": "code", "execution_count": 15, "id": "29", "metadata": { "execution": { "iopub.execute_input": "2026-04-14T15:03:22.642848Z", "iopub.status.busy": "2026-04-14T15:03:22.642664Z", "iopub.status.idle": "2026-04-14T15:03:22.646169Z", "shell.execute_reply": "2026-04-14T15:03:22.645172Z" } }, "outputs": [], "source": [ "project.experiments.add(expt)" ] }, { "cell_type": "markdown", "id": "30", "metadata": {}, "source": [ "## Perform Analysis\n", "\n", "This section shows the analysis process, including how to set up\n", "calculation and fitting engines.\n", "\n", "#### Plot Measured vs Calculated" ] }, { "cell_type": "code", "execution_count": 16, "id": "31", "metadata": { "execution": { "iopub.execute_input": "2026-04-14T15:03:22.647617Z", "iopub.status.busy": "2026-04-14T15:03:22.647447Z", "iopub.status.idle": "2026-04-14T15:03:23.017438Z", "shell.execute_reply": "2026-04-14T15:03:23.016382Z" } }, "outputs": [ { "data": { "text/html": [ "
\n", "
" ], "text/plain": [ "" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "project.plotter.plot_meas_vs_calc(expt_name='d20', show_residual=True)" ] }, { "cell_type": "code", "execution_count": 17, "id": "32", "metadata": { "execution": { "iopub.execute_input": "2026-04-14T15:03:23.019513Z", "iopub.status.busy": "2026-04-14T15:03:23.019300Z", "iopub.status.idle": "2026-04-14T15:03:23.052718Z", "shell.execute_reply": "2026-04-14T15:03:23.051984Z" } }, "outputs": [ { "data": { "text/html": [ "
\n", "
" ], "text/plain": [ "" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "project.plotter.plot_meas_vs_calc(expt_name='d20', x_min=41, x_max=54, show_residual=True)" ] }, { "cell_type": "markdown", "id": "33", "metadata": {}, "source": [ "#### Set Free Parameters" ] }, { "cell_type": "code", "execution_count": 18, "id": "34", "metadata": { "execution": { "iopub.execute_input": "2026-04-14T15:03:23.054341Z", "iopub.status.busy": "2026-04-14T15:03:23.054144Z", "iopub.status.idle": "2026-04-14T15:03:23.060806Z", "shell.execute_reply": "2026-04-14T15:03:23.060086Z" } }, "outputs": [], "source": [ "structure.cell.length_a.free = True\n", "structure.cell.length_b.free = True\n", "structure.cell.length_c.free = True\n", "\n", "structure.atom_sites['Co2'].fract_x.free = True\n", "structure.atom_sites['Co2'].fract_z.free = True\n", "structure.atom_sites['Si'].fract_x.free = True\n", "structure.atom_sites['Si'].fract_z.free = True\n", "structure.atom_sites['O1'].fract_x.free = True\n", "structure.atom_sites['O1'].fract_z.free = True\n", "structure.atom_sites['O2'].fract_x.free = True\n", "structure.atom_sites['O2'].fract_z.free = True\n", "structure.atom_sites['O3'].fract_x.free = True\n", "structure.atom_sites['O3'].fract_y.free = True\n", "structure.atom_sites['O3'].fract_z.free = True\n", "\n", "structure.atom_sites['Co1'].adp_iso.free = True\n", "structure.atom_sites['Co2'].adp_iso.free = True\n", "structure.atom_sites['Si'].adp_iso.free = True\n", "structure.atom_sites['O1'].adp_iso.free = True\n", "structure.atom_sites['O2'].adp_iso.free = True\n", "structure.atom_sites['O3'].adp_iso.free = True" ] }, { "cell_type": "code", "execution_count": 19, "id": "35", "metadata": { "execution": { "iopub.execute_input": "2026-04-14T15:03:23.062591Z", "iopub.status.busy": "2026-04-14T15:03:23.062416Z", "iopub.status.idle": "2026-04-14T15:03:23.066652Z", "shell.execute_reply": "2026-04-14T15:03:23.065872Z" } }, "outputs": [], "source": [ "expt.linked_phases['cosio'].scale.free = True\n", "\n", "expt.instrument.calib_twotheta_offset.free = True\n", "\n", "expt.peak.broad_gauss_u.free = True\n", "expt.peak.broad_gauss_v.free = True\n", "expt.peak.broad_gauss_w.free = True\n", "expt.peak.broad_lorentz_y.free = True\n", "\n", "expt.peak.asym_empir_2.free = True\n", "\n", "for point in expt.background:\n", " point.y.free = True" ] }, { "cell_type": "markdown", "id": "36", "metadata": {}, "source": [ "#### Set Constraints\n", "\n", "Set aliases for parameters." ] }, { "cell_type": "code", "execution_count": 20, "id": "37", "metadata": { "execution": { "iopub.execute_input": "2026-04-14T15:03:23.068158Z", "iopub.status.busy": "2026-04-14T15:03:23.067976Z", "iopub.status.idle": "2026-04-14T15:03:23.071957Z", "shell.execute_reply": "2026-04-14T15:03:23.071086Z" } }, "outputs": [], "source": [ "project.analysis.aliases.create(\n", " label='biso_Co1',\n", " param=project.structures['cosio'].atom_sites['Co1'].adp_iso,\n", ")\n", "project.analysis.aliases.create(\n", " label='biso_Co2',\n", " param=project.structures['cosio'].atom_sites['Co2'].adp_iso,\n", ")" ] }, { "cell_type": "markdown", "id": "38", "metadata": {}, "source": [ "Set constraints." ] }, { "cell_type": "code", "execution_count": 21, "id": "39", "metadata": { "execution": { "iopub.execute_input": "2026-04-14T15:03:23.073577Z", "iopub.status.busy": "2026-04-14T15:03:23.073407Z", "iopub.status.idle": "2026-04-14T15:03:23.076414Z", "shell.execute_reply": "2026-04-14T15:03:23.075655Z" }, "lines_to_next_cell": 2 }, "outputs": [], "source": [ "project.analysis.constraints.create(expression='biso_Co2 = biso_Co1')" ] }, { "cell_type": "markdown", "id": "40", "metadata": {}, "source": [ "#### Run Fitting" ] }, { "cell_type": "code", "execution_count": 22, "id": "41", "metadata": { "execution": { "iopub.execute_input": "2026-04-14T15:03:23.078120Z", "iopub.status.busy": "2026-04-14T15:03:23.077968Z", "iopub.status.idle": "2026-04-14T15:03:53.720855Z", "shell.execute_reply": "2026-04-14T15:03:53.719930Z" } }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "\u001b[1;34mStandard fitting\u001b[0m\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "📋 Using experiment 🔬 \u001b[32m'd20'\u001b[0m for \u001b[32m'single'\u001b[0m fitting\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", "
 iterationχ²improvement [%]
11423.51
24473.6282.6% ↓
38538.6347.5% ↓
412718.7951.4% ↓
516815.7916.0% ↓
620910.4334.0% ↓
72507.9523.8% ↓
82914.8239.4% ↓
93324.506.6% ↓
105384.50
\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;36m4.50\u001b[0m at iteration \u001b[1;36m521\u001b[0m\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "✅ Fitting complete.\n" ] } ], "source": [ "project.analysis.fit()" ] }, { "cell_type": "code", "execution_count": 23, "id": "42", "metadata": { "execution": { "iopub.execute_input": "2026-04-14T15:03:53.722651Z", "iopub.status.busy": "2026-04-14T15:03:53.722480Z", "iopub.status.idle": "2026-04-14T15:03:54.334609Z", "shell.execute_reply": "2026-04-14T15:03:54.333845Z" } }, "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;36m30.19\u001b[0m seconds\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "📏 Goodness-of-fit \u001b[1m(\u001b[0mreduced χ²\u001b[1m)\u001b[0m: \u001b[1;36m4.50\u001b[0m\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "📏 R-factor \u001b[1m(\u001b[0mRf\u001b[1m)\u001b[0m: \u001b[1;36m3.02\u001b[0m%\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "📏 R-factor squared \u001b[1m(\u001b[0mRf²\u001b[1m)\u001b[0m: \u001b[1;36m4.50\u001b[0m%\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "📏 Weighted R-factor \u001b[1m(\u001b[0mwR\u001b[1m)\u001b[0m: \u001b[1;36m4.82\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", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \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
1cosiocelllength_a10.300010.30840.0003Å0.08 % ↑
2cosiocelllength_b6.00006.00360.0002Å0.06 % ↑
3cosiocelllength_c4.80004.78650.0001Å0.28 % ↓
4cosioatom_siteCo1adp_iso0.50000.28320.0795Ų43.37 % ↓
5cosioatom_siteCo2fract_x0.27900.27930.00070.11 % ↑
6cosioatom_siteCo2fract_z0.98500.98510.00140.01 % ↑
7cosioatom_siteSifract_x0.09400.09360.00040.43 % ↓
8cosioatom_siteSifract_z0.42900.42890.00080.01 % ↓
9cosioatom_siteSiadp_iso0.50000.36530.0622Ų26.93 % ↓
10cosioatom_siteO1fract_x0.09100.09110.00030.13 % ↑
11cosioatom_siteO1fract_z0.77100.77140.00060.05 % ↑
12cosioatom_siteO1adp_iso0.50000.65640.0577Ų31.29 % ↑
13cosioatom_siteO2fract_x0.44800.44820.00030.05 % ↑
14cosioatom_siteO2fract_z0.21700.21680.00070.08 % ↓
15cosioatom_siteO2adp_iso0.50000.58980.0578Ų17.96 % ↑
16cosioatom_siteO3fract_x0.16400.16360.00020.25 % ↓
17cosioatom_siteO3fract_y0.03200.03170.00031.09 % ↓
18cosioatom_siteO3fract_z0.28000.28010.00050.05 % ↑
19cosioatom_siteO3adp_iso0.50000.83570.0481Ų67.14 % ↑
20d20linked_phasescosioscale1.00001.19710.010619.71 % ↑
21d20peakasym_empir_20.0000-0.00880.0019N/A
22d20peakbroad_gauss_u0.30000.24340.0067deg²18.85 % ↓
23d20peakbroad_gauss_v-0.5000-0.53160.0145deg²6.32 % ↑
24d20peakbroad_gauss_w0.40000.38630.0090deg²3.43 % ↓
25d20peakbroad_lorentz_y0.00000.01510.0044degN/A
26d20instrumenttwotheta_offset0.10000.27660.0033deg176.58 % ↑
27d20background1y500.0000608.668714.433921.73 % ↑
28d20background2y500.0000580.65219.655916.13 % ↑
29d20background3y500.0000562.92629.173812.59 % ↑
30d20background4y500.0000540.30708.70478.06 % ↑
31d20background5y500.0000519.87616.00483.98 % ↑
32d20background6y500.0000507.36303.45881.47 % ↑
33d20background7y500.0000463.29073.16647.34 % ↓
34d20background8y500.0000434.20652.372713.16 % ↓
35d20background9y500.0000450.88112.23429.82 % ↓
36d20background10y500.0000430.42762.010213.91 % ↓
37d20background11y500.0000413.91302.243117.22 % ↓
38d20background12y500.0000361.40642.076327.72 % ↓
39d20background13y500.0000291.19021.951841.76 % ↓
40d20background14y500.0000238.92202.951652.22 % ↓
\n" ], "text/plain": [ "" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "project.analysis.display.fit_results()" ] }, { "cell_type": "code", "execution_count": 24, "id": "43", "metadata": { "execution": { "iopub.execute_input": "2026-04-14T15:03:54.336309Z", "iopub.status.busy": "2026-04-14T15:03:54.336097Z", "iopub.status.idle": "2026-04-14T15:03:54.780376Z", "shell.execute_reply": "2026-04-14T15:03:54.779607Z" } }, "outputs": [ { "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": { "text/html": [ "
\n", "
" ], "text/plain": [ "" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "project.plotter.plot_param_correlations()" ] }, { "cell_type": "markdown", "id": "44", "metadata": {}, "source": [ "#### Plot Measured vs Calculated" ] }, { "cell_type": "code", "execution_count": 25, "id": "45", "metadata": { "execution": { "iopub.execute_input": "2026-04-14T15:03:54.782078Z", "iopub.status.busy": "2026-04-14T15:03:54.781897Z", "iopub.status.idle": "2026-04-14T15:03:54.809865Z", "shell.execute_reply": "2026-04-14T15:03:54.808970Z" } }, "outputs": [ { "data": { "text/html": [ "
\n", "
" ], "text/plain": [ "" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "project.plotter.plot_meas_vs_calc(expt_name='d20', show_residual=True)" ] }, { "cell_type": "code", "execution_count": 26, "id": "46", "metadata": { "execution": { "iopub.execute_input": "2026-04-14T15:03:54.811575Z", "iopub.status.busy": "2026-04-14T15:03:54.811403Z", "iopub.status.idle": "2026-04-14T15:03:54.847042Z", "shell.execute_reply": "2026-04-14T15:03:54.846171Z" } }, "outputs": [ { "data": { "text/html": [ "
\n", "
" ], "text/plain": [ "" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "project.plotter.plot_meas_vs_calc(expt_name='d20', x_min=42, x_max=52, show_residual=True)" ] }, { "cell_type": "markdown", "id": "47", "metadata": {}, "source": [ "## Perform Analysis (ADP aniso)" ] }, { "cell_type": "code", "execution_count": 27, "id": "48", "metadata": { "execution": { "iopub.execute_input": "2026-04-14T15:03:54.848978Z", "iopub.status.busy": "2026-04-14T15:03:54.848787Z", "iopub.status.idle": "2026-04-14T15:03:54.852620Z", "shell.execute_reply": "2026-04-14T15:03:54.851651Z" } }, "outputs": [], "source": [ "for label in ('O1', 'O2', 'O3'):\n", " atom_site = structure.atom_sites[label]\n", " atom_site.occupancy.free = True" ] }, { "cell_type": "code", "execution_count": 28, "id": "49", "metadata": { "execution": { "iopub.execute_input": "2026-04-14T15:03:54.854503Z", "iopub.status.busy": "2026-04-14T15:03:54.854230Z", "iopub.status.idle": "2026-04-14T15:03:54.862968Z", "shell.execute_reply": "2026-04-14T15:03:54.861641Z" } }, "outputs": [], "source": [ "for label in ('O1', 'O2', 'O3'):\n", " atom_site = structure.atom_sites[label]\n", " atom_site.adp_type = 'Uani'\n", " atom_site_aniso = structure.atom_site_aniso[label]\n", " for component in ('adp_11', 'adp_22', 'adp_33', 'adp_12', 'adp_13', 'adp_23'):\n", " getattr(atom_site_aniso, component).free = True" ] }, { "cell_type": "code", "execution_count": 29, "id": "50", "metadata": { "execution": { "iopub.execute_input": "2026-04-14T15:03:54.864803Z", "iopub.status.busy": "2026-04-14T15:03:54.864588Z", "iopub.status.idle": "2026-04-14T15:03:55.098904Z", "shell.execute_reply": "2026-04-14T15:03:55.097956Z" } }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "\u001b[1;34mStructure 🧩 \u001b[0m\u001b[32m'cosio'\u001b[0m\u001b[1;34m as cif\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", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
 CIF
1data_cosio
2
3_cell.length_a 10.30842232(28061)
4_cell.length_b 6.00362684(16423)
5_cell.length_c 4.78645786(13344)
6_cell.angle_alpha 90.00000000
7_cell.angle_beta 90.00000000
8_cell.angle_gamma 90.00000000
9
10_space_group.name_H-M_alt \"P n m a\"
11_space_group.IT_coordinate_system_code abc
12
13loop_
14_atom_site.label
15_atom_site.type_symbol
16_atom_site.fract_x
17_atom_site.fract_y
18_atom_site.fract_z
19_atom_site.Wyckoff_letter
20_atom_site.occupancy
21_atom_site.U_iso_or_equiv
22_atom_site.adp_type
23Co1 Co 0.00000000 0.00000000 0.00000000 a 1.00000000 0.00358633(7951018) Uiso
24Co2 Co 0.27930486(68947) 0.25000000 0.98507511(144478) c 1.00000000 0.00358633 Uiso
25Si Si 0.09359828(38646) 0.25000000 0.42894964(82698) c 1.00000000 0.00462694(6224821) Uiso
26O1 O 0.09112237(29571) 0.25000000 0.77140447(64155) c 1.00000000() 0.00831378 Uani
27O2 O 0.44824292(25137) 0.25000000 0.21682903(67726) c 1.00000000() 0.00747013 Uani
28O3 O 0.16358488(22865) 0.03165250(32597) 0.28012709(48825) d 1.00000000() 0.01058419 Uani
29
30loop_
31_atom_site_aniso.label
32_atom_site_aniso.U_11
33_atom_site_aniso.U_22
34_atom_site_aniso.U_33
35_atom_site_aniso.U_12
36_atom_site_aniso.U_13
37_atom_site_aniso.U_23
38Co1 ? ? ? ? ? ?
39Co2 ? ? ? ? ? ?
40Si ? ? ? ? ? ?
41O1 0.00831378() 0.00831378() 0.00831378() 0.00000000 0.00000000() 0.00000000
42O2 0.00747013() 0.00747013() 0.00747013() 0.00000000 0.00000000() 0.00000000
43O3 0.01058419() 0.01058419() 0.01058419() 0.00000000() 0.00000000() 0.00000000()
\n" ], "text/plain": [ "" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "structure.show_as_cif()" ] }, { "cell_type": "code", "execution_count": 30, "id": "51", "metadata": { "execution": { "iopub.execute_input": "2026-04-14T15:03:55.100690Z", "iopub.status.busy": "2026-04-14T15:03:55.100456Z", "iopub.status.idle": "2026-04-14T15:03:55.354980Z", "shell.execute_reply": "2026-04-14T15:03:55.354005Z" } }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "\u001b[1;34mFree parameters for both structures \u001b[0m\u001b[1;34m(\u001b[0m\u001b[1;34m🧩 data blocks\u001b[0m\u001b[1;34m)\u001b[0m\u001b[1;34m and experiments \u001b[0m\u001b[1;34m(\u001b[0m\u001b[1;34m🔬 data blocks\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", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
 datablockcategoryentryparametervalueuncertaintyminmaxunits
1cosiocelllength_a10.308420.00028-infinfÅ
2cosiocelllength_b6.003630.00016-infinfÅ
3cosiocelllength_c4.786460.00013-infinfÅ
4cosioatom_siteCo1adp_iso0.003590.07951-infinfŲ
5cosioatom_siteCo2fract_x0.279300.00069-infinf
6cosioatom_siteCo2fract_z0.985080.00144-infinf
7cosioatom_siteSifract_x0.093600.00039-infinf
8cosioatom_siteSifract_z0.428950.00083-infinf
9cosioatom_siteSiadp_iso0.004630.06225-infinfŲ
10cosioatom_siteO1fract_x0.091120.00030-infinf
11cosioatom_siteO1fract_z0.771400.00064-infinf
12cosioatom_siteO1occupancy1.00000-infinf
13cosioatom_siteO2fract_x0.448240.00025-infinf
14cosioatom_siteO2fract_z0.216830.00068-infinf
15cosioatom_siteO2occupancy1.00000-infinf
16cosioatom_siteO3fract_x0.163580.00023-infinf
17cosioatom_siteO3fract_y0.031650.00033-infinf
18cosioatom_siteO3fract_z0.280130.00049-infinf
19cosioatom_siteO3occupancy1.00000-infinf
20cosioatom_site_anisoO1adp_110.00831-infinfŲ
21cosioatom_site_anisoO1adp_220.00831-infinfŲ
22cosioatom_site_anisoO1adp_330.00831-infinfŲ
23cosioatom_site_anisoO1adp_130.00000-infinfŲ
24cosioatom_site_anisoO2adp_110.00747-infinfŲ
25cosioatom_site_anisoO2adp_220.00747-infinfŲ
26cosioatom_site_anisoO2adp_330.00747-infinfŲ
27cosioatom_site_anisoO2adp_130.00000-infinfŲ
28cosioatom_site_anisoO3adp_110.01058-infinfŲ
29cosioatom_site_anisoO3adp_220.01058-infinfŲ
30cosioatom_site_anisoO3adp_330.01058-infinfŲ
31cosioatom_site_anisoO3adp_120.00000-infinfŲ
32cosioatom_site_anisoO3adp_130.00000-infinfŲ
33cosioatom_site_anisoO3adp_230.00000-infinfŲ
34d20linked_phasescosioscale1.197060.01058-infinf
35d20peakasym_empir_2-0.008820.00193-infinf
36d20peakbroad_gauss_u0.243450.00675-infinfdeg²
37d20peakbroad_gauss_v-0.531600.01450-infinfdeg²
38d20peakbroad_gauss_w0.386300.00904-infinfdeg²
39d20peakbroad_lorentz_y0.015070.00443-infinfdeg
40d20instrumenttwotheta_offset0.276580.00330-infinfdeg
41d20background1y608.6687214.43393-infinf
42d20background2y580.652149.65593-infinf
43d20background3y562.926169.17384-infinf
44d20background4y540.306978.70473-infinf
45d20background5y519.876136.00484-infinf
46d20background6y507.362983.45877-infinf
47d20background7y463.290723.16643-infinf
48d20background8y434.206492.37275-infinf
49d20background9y450.881132.23420-infinf
50d20background10y430.427582.01023-infinf
51d20background11y413.913002.24310-infinf
52d20background12y361.406382.07632-infinf
53d20background13y291.190171.95181-infinf
54d20background14y238.921972.95161-infinf
\n" ], "text/plain": [ "" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "project.analysis.display.free_params()" ] }, { "cell_type": "code", "execution_count": 31, "id": "52", "metadata": { "execution": { "iopub.execute_input": "2026-04-14T15:03:55.357042Z", "iopub.status.busy": "2026-04-14T15:03:55.356864Z", "iopub.status.idle": "2026-04-14T15:04:28.194974Z", "shell.execute_reply": "2026-04-14T15:04:28.194265Z" } }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "\u001b[1;34mStandard fitting\u001b[0m\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "📋 Using experiment 🔬 \u001b[32m'd20'\u001b[0m for \u001b[32m'single'\u001b[0m fitting\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", "
 iterationχ²improvement [%]
114.54
2584.158.7% ↓
34444.11
\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;36m4.11\u001b[0m at iteration \u001b[1;36m443\u001b[0m\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "✅ Fitting complete.\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "⚠️ Parameter 'cosio.atom_site_aniso.O1.adp_33' (-0.00334835) is below its physical lower limit (0.0). \n" ] } ], "source": [ "project.analysis.fit()" ] }, { "cell_type": "code", "execution_count": 32, "id": "53", "metadata": { "execution": { "iopub.execute_input": "2026-04-14T15:04:28.196815Z", "iopub.status.busy": "2026-04-14T15:04:28.196649Z", "iopub.status.idle": "2026-04-14T15:04:28.786934Z", "shell.execute_reply": "2026-04-14T15:04:28.785948Z" } }, "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;36m32.39\u001b[0m seconds\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "📏 Goodness-of-fit \u001b[1m(\u001b[0mreduced χ²\u001b[1m)\u001b[0m: \u001b[1;36m4.11\u001b[0m\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "📏 R-factor \u001b[1m(\u001b[0mRf\u001b[1m)\u001b[0m: \u001b[1;36m2.91\u001b[0m%\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "📏 R-factor squared \u001b[1m(\u001b[0mRf²\u001b[1m)\u001b[0m: \u001b[1;36m4.19\u001b[0m%\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "📏 Weighted R-factor \u001b[1m(\u001b[0mwR\u001b[1m)\u001b[0m: \u001b[1;36m4.42\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", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \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
1cosiocelllength_a10.308410.30820.0003Å0.00 % ↓
2cosiocelllength_b6.00366.00370.0002Å0.00 % ↑
3cosiocelllength_c4.78654.78640.0001Å0.00 % ↓
4cosioatom_siteCo1adp_iso0.00360.00910.0014Ų154.56 % ↑
5cosioatom_siteCo2fract_x0.27930.27870.00070.21 % ↓
6cosioatom_siteCo2fract_z0.98510.98810.00150.30 % ↑
7cosioatom_siteSifract_x0.09360.09450.00040.94 % ↑
8cosioatom_siteSifract_z0.42890.42940.00080.11 % ↑
9cosioatom_siteSiadp_iso0.00460.00770.0012Ų65.59 % ↑
10cosioatom_siteO1fract_x0.09110.09050.00030.65 % ↓
11cosioatom_siteO1fract_z0.77140.77130.00060.02 % ↓
12cosioatom_siteO1occupancy1.00000.91420.01368.58 % ↓
13cosioatom_siteO2fract_x0.44820.44750.00030.17 % ↓
14cosioatom_siteO2fract_z0.21680.21700.00070.09 % ↑
15cosioatom_siteO2occupancy1.00000.95970.01334.03 % ↓
16cosioatom_siteO3fract_x0.16360.16310.00020.33 % ↓
17cosioatom_siteO3fract_y0.03170.03120.00031.57 % ↓
18cosioatom_siteO3fract_z0.28010.28160.00050.52 % ↑
19cosioatom_siteO3occupancy1.00000.95050.01164.95 % ↓
20cosioatom_site_anisoO1adp_110.00830.00880.0017Ų6.18 % ↑
21cosioatom_site_anisoO1adp_220.00830.00700.0016Ų15.30 % ↓
22cosioatom_site_anisoO1adp_330.0083-0.00330.0021Ų140.27 % ↓
23cosioatom_site_anisoO1adp_130.00000.00530.0017ŲN/A
24cosioatom_site_anisoO2adp_110.00750.00530.0016Ų28.91 % ↓
25cosioatom_site_anisoO2adp_220.00750.01440.0016Ų93.17 % ↑
26cosioatom_site_anisoO2adp_330.00750.00280.0020Ų63.03 % ↓
27cosioatom_site_anisoO2adp_130.00000.00300.0013ŲN/A
28cosioatom_site_anisoO3adp_110.01060.01230.0013Ų16.63 % ↑
29cosioatom_site_anisoO3adp_220.01060.00680.0012Ų36.07 % ↓
30cosioatom_site_anisoO3adp_330.01060.01060.0014Ų0.43 % ↑
31cosioatom_site_anisoO3adp_120.00000.00080.0010ŲN/A
32cosioatom_site_anisoO3adp_130.00000.00140.0010ŲN/A
33cosioatom_site_anisoO3adp_230.0000-0.00410.0012ŲN/A
34d20linked_phasescosioscale1.19711.32710.028410.86 % ↑
35d20peakasym_empir_2-0.0088-0.00930.00195.16 % ↑
36d20peakbroad_gauss_u0.24340.23420.0065deg²3.78 % ↓
37d20peakbroad_gauss_v-0.5316-0.51100.0140deg²3.87 % ↓
38d20peakbroad_gauss_w0.38630.37430.0087deg²3.11 % ↓
39d20peakbroad_lorentz_y0.01510.01920.0043deg27.09 % ↑
40d20instrumenttwotheta_offset0.27660.27540.0032deg0.41 % ↓
41d20background1y608.6687608.481613.80460.03 % ↓
42d20background2y580.6521580.49969.23490.03 % ↓
43d20background3y562.9262562.79378.77390.02 % ↓
44d20background4y540.3070540.20548.32520.02 % ↓
45d20background5y519.8761519.73785.74330.03 % ↓
46d20background6y507.3630507.39203.31190.01 % ↑
47d20background7y463.2907462.32843.04960.21 % ↓
48d20background8y434.2065432.08292.35960.49 % ↓
49d20background9y450.8811451.25292.16420.08 % ↑
50d20background10y430.4276428.49641.94930.45 % ↓
51d20background11y413.9130410.13422.23160.91 % ↓
52d20background12y361.4064355.94752.17341.51 % ↓
53d20background13y291.1902292.32571.94170.39 % ↑
54d20background14y238.9220249.31803.03474.35 % ↑
\n" ], "text/plain": [ "" ] }, "metadata": {}, "output_type": "display_data" }, { "name": "stdout", "output_type": "stream", "text": [ "⚠️ \u001b[31mRed fitted value:\u001b[0m outside expected physical limits (consider adding constraints) \n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "⚠️ \u001b[31mRed uncertainty:\u001b[0m exceeds the fitted value (consider adding constraints) \n" ] } ], "source": [ "project.analysis.display.fit_results()" ] }, { "cell_type": "code", "execution_count": 33, "id": "54", "metadata": { "execution": { "iopub.execute_input": "2026-04-14T15:04:28.788515Z", "iopub.status.busy": "2026-04-14T15:04:28.788345Z", "iopub.status.idle": "2026-04-14T15:04:29.231854Z", "shell.execute_reply": "2026-04-14T15:04:29.230946Z" } }, "outputs": [ { "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": { "text/html": [ "
\n", "
" ], "text/plain": [ "" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "project.plotter.plot_param_correlations()" ] }, { "cell_type": "code", "execution_count": 34, "id": "55", "metadata": { "execution": { "iopub.execute_input": "2026-04-14T15:04:29.233454Z", "iopub.status.busy": "2026-04-14T15:04:29.233268Z", "iopub.status.idle": "2026-04-14T15:04:29.266987Z", "shell.execute_reply": "2026-04-14T15:04:29.266090Z" } }, "outputs": [ { "data": { "text/html": [ "
\n", "
" ], "text/plain": [ "" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "project.plotter.plot_meas_vs_calc(expt_name='d20', show_residual=True)" ] }, { "cell_type": "code", "execution_count": 35, "id": "56", "metadata": { "execution": { "iopub.execute_input": "2026-04-14T15:04:29.268755Z", "iopub.status.busy": "2026-04-14T15:04:29.268572Z", "iopub.status.idle": "2026-04-14T15:04:29.305772Z", "shell.execute_reply": "2026-04-14T15:04:29.305092Z" } }, "outputs": [ { "data": { "text/html": [ "
\n", "
" ], "text/plain": [ "" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "project.plotter.plot_meas_vs_calc(expt_name='d20', x_min=42, x_max=52, show_residual=True)" ] }, { "cell_type": "code", "execution_count": 36, "id": "57", "metadata": { "execution": { "iopub.execute_input": "2026-04-14T15:04:29.307911Z", "iopub.status.busy": "2026-04-14T15:04:29.307697Z", "iopub.status.idle": "2026-04-14T15:04:29.535735Z", "shell.execute_reply": "2026-04-14T15:04:29.534818Z" }, "lines_to_next_cell": 2 }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "\u001b[1;34mStructure 🧩 \u001b[0m\u001b[32m'cosio'\u001b[0m\u001b[1;34m as cif\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", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
 CIF
1data_cosio
2
3_cell.length_a 10.30818445(28090)
4_cell.length_b 6.00366390(16124)
5_cell.length_c 4.78642176(12809)
6_cell.angle_alpha 90.00000000
7_cell.angle_beta 90.00000000
8_cell.angle_gamma 90.00000000
9
10_space_group.name_H-M_alt \"P n m a\"
11_space_group.IT_coordinate_system_code abc
12
13loop_
14_atom_site.label
15_atom_site.type_symbol
16_atom_site.fract_x
17_atom_site.fract_y
18_atom_site.fract_z
19_atom_site.Wyckoff_letter
20_atom_site.occupancy
21_atom_site.U_iso_or_equiv
22_atom_site.adp_type
23Co1 Co 0.00000000 0.00000000 0.00000000 a 1.00000000 0.00912929(141124) Uiso
24Co2 Co 0.27871933(71268) 0.25000000 0.98807812(151327) c 1.00000000 0.00912929 Uiso
25Si Si 0.09447953(39330) 0.25000000 0.42943797(80938) c 1.00000000 0.00766171(117633) Uiso
26O1 O 0.09052637(30161) 0.25000000 0.77125812(61367) c 0.91421444(1359209) 0.00417369 Uani
27O2 O 0.44746798(26342) 0.25000000 0.21702885(66468) c 0.95968887(1325764) 0.00750094 Uani
28O3 O 0.16305125(22544) 0.03115682(33663) 0.28159153(48958) d 0.95053728(1161225) 0.00991363 Uani
29
30loop_
31_atom_site_aniso.label
32_atom_site_aniso.U_11
33_atom_site_aniso.U_22
34_atom_site_aniso.U_33
35_atom_site_aniso.U_12
36_atom_site_aniso.U_13
37_atom_site_aniso.U_23
38Co1 ? ? ? ? ? ?
39Co2 ? ? ? ? ? ?
40Si ? ? ? ? ? ?
41O1 0.00882757(166530) 0.00704186(160366) -0.00334835(207383) 0.00000000 0.00528321(173289) 0.00000000
42O2 0.00531076(158344) 0.01443034(163140) 0.00276172(195302) 0.00000000 0.00296717(130017) 0.00000000
43O3 0.01234440(131286) 0.00676666(115951) 0.01062983(136916) 0.00082005(95937) 0.00137755(104719) -0.00410052(122531)
\n" ], "text/plain": [ "" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "structure.show_as_cif()" ] }, { "cell_type": "markdown", "id": "58", "metadata": {}, "source": [ "## Summary\n", "\n", "This final section shows how to review the results of the analysis." ] }, { "cell_type": "markdown", "id": "59", "metadata": {}, "source": [ "#### Show Project Summary" ] }, { "cell_type": "code", "execution_count": 37, "id": "60", "metadata": { "execution": { "iopub.execute_input": "2026-04-14T15:04:29.537466Z", "iopub.status.busy": "2026-04-14T15:04:29.537284Z", "iopub.status.idle": "2026-04-14T15:04:30.844067Z", "shell.execute_reply": "2026-04-14T15:04:30.843196Z" } }, "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": [ "🧩 cosio\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "\u001b[1;34mSpace group\u001b[0m\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "P n m a\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", "
 ParameterValueUncertainty
1a10.308184450.00028090
2b10.308184450.00028090
3c10.308184450.00028090
4α90.00000000
5β90.00000000
6γ90.00000000
\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", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
 labeltypexyzoccBiso
1Co1Co0.000000000.000000000.000000001.000000000.00912929
2Co2Co0.278719330.250000000.988078121.000000000.00912929
3SiSi0.094479530.250000000.429437971.000000000.00766171
4O1O0.090526370.250000000.771258120.914214440.00417369
5O2O0.447467980.250000000.217028850.959688870.00750094
6O3O0.163051250.031156820.281591530.950537280.00991363
\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": [ "🔬 d20\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "\u001b[1;34mExperiment type\u001b[0m\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "powder, neutron, constant wavelength bragg\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;34mWavelength\u001b[0m\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "\u001b[1;36m1.87000\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.27544\u001b[0m\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "\u001b[1;34mProfile type\u001b[0m\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "pseudo-voigt + empirical asymmetry\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", " \n", " \n", " \n", " \n", "
 ParameterValueUncertainty
1U0.234243140.00646947
2V-0.511030150.01397355
3W0.374289830.00872317
\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", " \n", " \n", " \n", "
 ParameterValueUncertainty
1X0.00000000
2Y0.019156660.00431367
\n" ], "text/plain": [ "" ] }, "metadata": {}, "output_type": "display_data" }, { "name": "stdout", "output_type": "stream", "text": [ "\u001b[1;34mAsymmetry \u001b[0m\u001b[1;34m(\u001b[0m\u001b[1;34mEmpirical\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", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
 ParameterValueUncertainty
1p10.00000000
2p2-0.009272900.00187080
3p30.00000000
4p40.00000000
\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;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 χ²)4.11
\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.14.4" } }, "nbformat": 4, "nbformat_minor": 5 }