{
"cells": [
{
"cell_type": "code",
"execution_count": 1,
"id": "80e773d5",
"metadata": {
"execution": {
"iopub.execute_input": "2026-01-06T13:54:32.790745Z",
"iopub.status.busy": "2026-01-06T13:54:32.790215Z",
"iopub.status.idle": "2026-01-06T13:54:32.798732Z",
"shell.execute_reply": "2026-01-06T13:54:32.798108Z"
},
"tags": [
"hide-in-docs"
]
},
"outputs": [],
"source": [
"# Check if the easydiffraction library is installed.\n",
"# If not, install it with the 'visualization' extras.\n",
"# Needed when running remotely (e.g. Colab) where the lib is absent.\n",
"import builtins\n",
"import importlib.util\n",
"\n",
"if (hasattr(builtins, '__IPYTHON__') and\n",
" importlib.util.find_spec('easydiffraction') is None):\n",
" !pip install 'easydiffraction[visualization]==0.10.1'"
]
},
{
"cell_type": "markdown",
"id": "0",
"metadata": {},
"source": [
"# Structure Refinement: 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": "1",
"metadata": {},
"source": [
"## Import Library"
]
},
{
"cell_type": "code",
"execution_count": 2,
"id": "2",
"metadata": {
"execution": {
"iopub.execute_input": "2026-01-06T13:54:32.800955Z",
"iopub.status.busy": "2026-01-06T13:54:32.800806Z",
"iopub.status.idle": "2026-01-06T13:54:35.531844Z",
"shell.execute_reply": "2026-01-06T13:54:35.529745Z"
}
},
"outputs": [],
"source": [
"from easydiffraction import ExperimentFactory\n",
"from easydiffraction import Project\n",
"from easydiffraction import SampleModelFactory\n",
"from easydiffraction import download_data"
]
},
{
"cell_type": "markdown",
"id": "3",
"metadata": {},
"source": [
"## Define Sample Model\n",
"\n",
"This section shows how to add sample models and modify their\n",
"parameters.\n",
"\n",
"#### Create Sample Model"
]
},
{
"cell_type": "code",
"execution_count": 3,
"id": "4",
"metadata": {
"execution": {
"iopub.execute_input": "2026-01-06T13:54:35.538281Z",
"iopub.status.busy": "2026-01-06T13:54:35.537319Z",
"iopub.status.idle": "2026-01-06T13:54:35.543409Z",
"shell.execute_reply": "2026-01-06T13:54:35.541960Z"
}
},
"outputs": [],
"source": [
"model = SampleModelFactory.create(name='cosio')"
]
},
{
"cell_type": "markdown",
"id": "5",
"metadata": {},
"source": [
"#### Set Space Group"
]
},
{
"cell_type": "code",
"execution_count": 4,
"id": "6",
"metadata": {
"execution": {
"iopub.execute_input": "2026-01-06T13:54:35.546190Z",
"iopub.status.busy": "2026-01-06T13:54:35.546000Z",
"iopub.status.idle": "2026-01-06T13:54:35.552919Z",
"shell.execute_reply": "2026-01-06T13:54:35.552266Z"
}
},
"outputs": [],
"source": [
"model.space_group.name_h_m = 'P n m a'\n",
"model.space_group.it_coordinate_system_code = 'abc'"
]
},
{
"cell_type": "markdown",
"id": "7",
"metadata": {},
"source": [
"#### Set Unit Cell"
]
},
{
"cell_type": "code",
"execution_count": 5,
"id": "8",
"metadata": {
"execution": {
"iopub.execute_input": "2026-01-06T13:54:35.556294Z",
"iopub.status.busy": "2026-01-06T13:54:35.556108Z",
"iopub.status.idle": "2026-01-06T13:54:35.559891Z",
"shell.execute_reply": "2026-01-06T13:54:35.558618Z"
}
},
"outputs": [],
"source": [
"model.cell.length_a = 10.3\n",
"model.cell.length_b = 6.0\n",
"model.cell.length_c = 4.8"
]
},
{
"cell_type": "markdown",
"id": "9",
"metadata": {},
"source": [
"#### Set Atom Sites"
]
},
{
"cell_type": "code",
"execution_count": 6,
"id": "10",
"metadata": {
"execution": {
"iopub.execute_input": "2026-01-06T13:54:35.563492Z",
"iopub.status.busy": "2026-01-06T13:54:35.562979Z",
"iopub.status.idle": "2026-01-06T13:54:35.575437Z",
"shell.execute_reply": "2026-01-06T13:54:35.574337Z"
}
},
"outputs": [],
"source": [
"model.atom_sites.add(\n",
" label='Co1',\n",
" type_symbol='Co',\n",
" fract_x=0,\n",
" fract_y=0,\n",
" fract_z=0,\n",
" wyckoff_letter='a',\n",
" b_iso=0.5,\n",
")\n",
"model.atom_sites.add(\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",
" b_iso=0.5,\n",
")\n",
"model.atom_sites.add(\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",
" b_iso=0.5,\n",
")\n",
"model.atom_sites.add(\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",
" b_iso=0.5,\n",
")\n",
"model.atom_sites.add(\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",
" b_iso=0.5,\n",
")\n",
"model.atom_sites.add(\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",
" b_iso=0.5,\n",
")"
]
},
{
"cell_type": "markdown",
"id": "11",
"metadata": {},
"source": [
"## Define Experiment\n",
"\n",
"This section shows how to add experiments, configure their parameters,\n",
"and link the sample models defined in the previous step.\n",
"\n",
"#### Download Measured Data"
]
},
{
"cell_type": "code",
"execution_count": 7,
"id": "12",
"metadata": {
"execution": {
"iopub.execute_input": "2026-01-06T13:54:35.577724Z",
"iopub.status.busy": "2026-01-06T13:54:35.577553Z",
"iopub.status.idle": "2026-01-06T13:54:35.761213Z",
"shell.execute_reply": "2026-01-06T13:54:35.760115Z"
}
},
"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": "13",
"metadata": {},
"source": [
"#### Create Experiment"
]
},
{
"cell_type": "code",
"execution_count": 8,
"id": "14",
"metadata": {
"execution": {
"iopub.execute_input": "2026-01-06T13:54:35.764888Z",
"iopub.status.busy": "2026-01-06T13:54:35.764478Z",
"iopub.status.idle": "2026-01-06T13:54:36.020230Z",
"shell.execute_reply": "2026-01-06T13:54:36.019886Z"
}
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"\u001b[1;34mData loaded successfully\u001b[0m\n"
]
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"Experiment 🔬 \u001b[32m'd20'\u001b[0m. Number of data points: \u001b[1;36m1418\u001b[0m\n"
]
}
],
"source": [
"expt = ExperimentFactory.create(name='d20', data_path=data_path)"
]
},
{
"cell_type": "markdown",
"id": "15",
"metadata": {},
"source": [
"#### Set Instrument"
]
},
{
"cell_type": "code",
"execution_count": 9,
"id": "16",
"metadata": {
"execution": {
"iopub.execute_input": "2026-01-06T13:54:36.023646Z",
"iopub.status.busy": "2026-01-06T13:54:36.023428Z",
"iopub.status.idle": "2026-01-06T13:54:36.029901Z",
"shell.execute_reply": "2026-01-06T13:54:36.029276Z"
}
},
"outputs": [],
"source": [
"expt.instrument.setup_wavelength = 1.87\n",
"expt.instrument.calib_twotheta_offset = 0.1"
]
},
{
"cell_type": "markdown",
"id": "17",
"metadata": {},
"source": [
"#### Set Peak Profile"
]
},
{
"cell_type": "code",
"execution_count": 10,
"id": "18",
"metadata": {
"execution": {
"iopub.execute_input": "2026-01-06T13:54:36.031572Z",
"iopub.status.busy": "2026-01-06T13:54:36.031450Z",
"iopub.status.idle": "2026-01-06T13:54:36.033693Z",
"shell.execute_reply": "2026-01-06T13:54:36.033328Z"
}
},
"outputs": [],
"source": [
"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": "19",
"metadata": {},
"source": [
"#### Set Background"
]
},
{
"cell_type": "code",
"execution_count": 11,
"id": "20",
"metadata": {
"execution": {
"iopub.execute_input": "2026-01-06T13:54:36.036298Z",
"iopub.status.busy": "2026-01-06T13:54:36.036139Z",
"iopub.status.idle": "2026-01-06T13:54:36.044645Z",
"shell.execute_reply": "2026-01-06T13:54:36.043956Z"
}
},
"outputs": [],
"source": [
"expt.background.add(id='1', x=8, y=500)\n",
"expt.background.add(id='2', x=9, y=500)\n",
"expt.background.add(id='3', x=10, y=500)\n",
"expt.background.add(id='4', x=11, y=500)\n",
"expt.background.add(id='5', x=12, y=500)\n",
"expt.background.add(id='6', x=15, y=500)\n",
"expt.background.add(id='7', x=25, y=500)\n",
"expt.background.add(id='8', x=30, y=500)\n",
"expt.background.add(id='9', x=50, y=500)\n",
"expt.background.add(id='10', x=70, y=500)\n",
"expt.background.add(id='11', x=90, y=500)\n",
"expt.background.add(id='12', x=110, y=500)\n",
"expt.background.add(id='13', x=130, y=500)\n",
"expt.background.add(id='14', x=150, y=500)"
]
},
{
"cell_type": "markdown",
"id": "21",
"metadata": {},
"source": [
"#### Set Linked Phases"
]
},
{
"cell_type": "code",
"execution_count": 12,
"id": "22",
"metadata": {
"execution": {
"iopub.execute_input": "2026-01-06T13:54:36.047045Z",
"iopub.status.busy": "2026-01-06T13:54:36.046921Z",
"iopub.status.idle": "2026-01-06T13:54:36.049958Z",
"shell.execute_reply": "2026-01-06T13:54:36.049128Z"
}
},
"outputs": [],
"source": [
"expt.linked_phases.add(id='cosio', scale=1.0)"
]
},
{
"cell_type": "markdown",
"id": "23",
"metadata": {},
"source": [
"## Define Project\n",
"\n",
"The project object is used to manage the sample model, experiment, and\n",
"analysis.\n",
"\n",
"#### Create Project"
]
},
{
"cell_type": "code",
"execution_count": 13,
"id": "24",
"metadata": {
"execution": {
"iopub.execute_input": "2026-01-06T13:54:36.053689Z",
"iopub.status.busy": "2026-01-06T13:54:36.053290Z",
"iopub.status.idle": "2026-01-06T13:54:36.219791Z",
"shell.execute_reply": "2026-01-06T13:54:36.219135Z"
}
},
"outputs": [],
"source": [
"project = Project()"
]
},
{
"cell_type": "markdown",
"id": "25",
"metadata": {},
"source": [
"#### Set Plotting Engine"
]
},
{
"cell_type": "code",
"execution_count": 14,
"id": "26",
"metadata": {
"execution": {
"iopub.execute_input": "2026-01-06T13:54:36.224158Z",
"iopub.status.busy": "2026-01-06T13:54:36.223799Z",
"iopub.status.idle": "2026-01-06T13:54:36.229011Z",
"shell.execute_reply": "2026-01-06T13:54:36.226507Z"
}
},
"outputs": [],
"source": [
"# Keep the auto-selected engine. Alternatively, you can uncomment the\n",
"# line below to explicitly set the engine to the required one.\n",
"# project.plotter.engine = 'plotly'"
]
},
{
"cell_type": "markdown",
"id": "27",
"metadata": {},
"source": [
"#### Add Sample Model"
]
},
{
"cell_type": "code",
"execution_count": 15,
"id": "28",
"metadata": {
"execution": {
"iopub.execute_input": "2026-01-06T13:54:36.232893Z",
"iopub.status.busy": "2026-01-06T13:54:36.232689Z",
"iopub.status.idle": "2026-01-06T13:54:36.235772Z",
"shell.execute_reply": "2026-01-06T13:54:36.235149Z"
}
},
"outputs": [],
"source": [
"project.sample_models.add(sample_model=model)"
]
},
{
"cell_type": "markdown",
"id": "29",
"metadata": {},
"source": [
"#### Add Experiment"
]
},
{
"cell_type": "code",
"execution_count": 16,
"id": "30",
"metadata": {
"execution": {
"iopub.execute_input": "2026-01-06T13:54:36.243051Z",
"iopub.status.busy": "2026-01-06T13:54:36.242726Z",
"iopub.status.idle": "2026-01-06T13:54:36.261967Z",
"shell.execute_reply": "2026-01-06T13:54:36.249671Z"
}
},
"outputs": [],
"source": [
"project.experiments.add(experiment=expt)"
]
},
{
"cell_type": "markdown",
"id": "31",
"metadata": {},
"source": [
"## Perform Analysis\n",
"\n",
"This section shows the analysis process, including how to set up\n",
"calculation and fitting engines.\n",
"\n",
"#### Set Calculator"
]
},
{
"cell_type": "code",
"execution_count": 17,
"id": "32",
"metadata": {
"execution": {
"iopub.execute_input": "2026-01-06T13:54:36.296891Z",
"iopub.status.busy": "2026-01-06T13:54:36.293460Z",
"iopub.status.idle": "2026-01-06T13:54:36.331109Z",
"shell.execute_reply": "2026-01-06T13:54:36.328364Z"
}
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"\u001b[1;34mCurrent calculator changed to\u001b[0m\n"
]
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"cryspy\n"
]
}
],
"source": [
"project.analysis.current_calculator = 'cryspy'"
]
},
{
"cell_type": "markdown",
"id": "33",
"metadata": {},
"source": [
"#### Set Minimizer"
]
},
{
"cell_type": "code",
"execution_count": 18,
"id": "34",
"metadata": {
"execution": {
"iopub.execute_input": "2026-01-06T13:54:36.337292Z",
"iopub.status.busy": "2026-01-06T13:54:36.336175Z",
"iopub.status.idle": "2026-01-06T13:54:36.347619Z",
"shell.execute_reply": "2026-01-06T13:54:36.346816Z"
}
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"\u001b[1;34mCurrent minimizer changed to\u001b[0m\n"
]
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"lmfit \u001b[1m(\u001b[0mleastsq\u001b[1m)\u001b[0m\n"
]
}
],
"source": [
"project.analysis.current_minimizer = 'lmfit (leastsq)'"
]
},
{
"cell_type": "markdown",
"id": "35",
"metadata": {},
"source": [
"#### Plot Measured vs Calculated"
]
},
{
"cell_type": "code",
"execution_count": 19,
"id": "36",
"metadata": {
"execution": {
"iopub.execute_input": "2026-01-06T13:54:36.351820Z",
"iopub.status.busy": "2026-01-06T13:54:36.351622Z",
"iopub.status.idle": "2026-01-06T13:54:36.707132Z",
"shell.execute_reply": "2026-01-06T13:54:36.706177Z"
}
},
"outputs": [
{
"data": {
"text/html": [
"
"
],
"text/plain": [
""
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"project.plot_meas_vs_calc(expt_name='d20', show_residual=True)"
]
},
{
"cell_type": "code",
"execution_count": 20,
"id": "37",
"metadata": {
"execution": {
"iopub.execute_input": "2026-01-06T13:54:36.710287Z",
"iopub.status.busy": "2026-01-06T13:54:36.709781Z",
"iopub.status.idle": "2026-01-06T13:54:37.021591Z",
"shell.execute_reply": "2026-01-06T13:54:37.021012Z"
}
},
"outputs": [
{
"data": {
"text/html": [
""
],
"text/plain": [
""
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"project.plot_meas_vs_calc(expt_name='d20', x_min=41, x_max=54, show_residual=True)"
]
},
{
"cell_type": "markdown",
"id": "38",
"metadata": {},
"source": [
"#### Set Free Parameters"
]
},
{
"cell_type": "code",
"execution_count": 21,
"id": "39",
"metadata": {
"execution": {
"iopub.execute_input": "2026-01-06T13:54:37.023576Z",
"iopub.status.busy": "2026-01-06T13:54:37.023459Z",
"iopub.status.idle": "2026-01-06T13:54:37.030815Z",
"shell.execute_reply": "2026-01-06T13:54:37.030297Z"
}
},
"outputs": [],
"source": [
"model.cell.length_a.free = True\n",
"model.cell.length_b.free = True\n",
"model.cell.length_c.free = True\n",
"\n",
"model.atom_sites['Co2'].fract_x.free = True\n",
"model.atom_sites['Co2'].fract_z.free = True\n",
"model.atom_sites['Si'].fract_x.free = True\n",
"model.atom_sites['Si'].fract_z.free = True\n",
"model.atom_sites['O1'].fract_x.free = True\n",
"model.atom_sites['O1'].fract_z.free = True\n",
"model.atom_sites['O2'].fract_x.free = True\n",
"model.atom_sites['O2'].fract_z.free = True\n",
"model.atom_sites['O3'].fract_x.free = True\n",
"model.atom_sites['O3'].fract_y.free = True\n",
"model.atom_sites['O3'].fract_z.free = True\n",
"\n",
"model.atom_sites['Co1'].b_iso.free = True\n",
"model.atom_sites['Co2'].b_iso.free = True\n",
"model.atom_sites['Si'].b_iso.free = True\n",
"model.atom_sites['O1'].b_iso.free = True\n",
"model.atom_sites['O2'].b_iso.free = True\n",
"model.atom_sites['O3'].b_iso.free = True"
]
},
{
"cell_type": "code",
"execution_count": 22,
"id": "40",
"metadata": {
"execution": {
"iopub.execute_input": "2026-01-06T13:54:37.032822Z",
"iopub.status.busy": "2026-01-06T13:54:37.032705Z",
"iopub.status.idle": "2026-01-06T13:54:37.035659Z",
"shell.execute_reply": "2026-01-06T13:54:37.035326Z"
}
},
"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",
"for point in expt.background:\n",
" point.y.free = True"
]
},
{
"cell_type": "markdown",
"id": "41",
"metadata": {},
"source": [
"#### Set Constraints\n",
"\n",
"Set aliases for parameters."
]
},
{
"cell_type": "code",
"execution_count": 23,
"id": "42",
"metadata": {
"execution": {
"iopub.execute_input": "2026-01-06T13:54:37.037487Z",
"iopub.status.busy": "2026-01-06T13:54:37.037318Z",
"iopub.status.idle": "2026-01-06T13:54:37.045006Z",
"shell.execute_reply": "2026-01-06T13:54:37.044379Z"
}
},
"outputs": [],
"source": [
"project.analysis.aliases.add(\n",
" label='biso_Co1',\n",
" param_uid=project.sample_models['cosio'].atom_sites['Co1'].b_iso.uid,\n",
")\n",
"project.analysis.aliases.add(\n",
" label='biso_Co2',\n",
" param_uid=project.sample_models['cosio'].atom_sites['Co2'].b_iso.uid,\n",
")"
]
},
{
"cell_type": "markdown",
"id": "43",
"metadata": {},
"source": [
"Set constraints."
]
},
{
"cell_type": "code",
"execution_count": 24,
"id": "44",
"metadata": {
"execution": {
"iopub.execute_input": "2026-01-06T13:54:37.049155Z",
"iopub.status.busy": "2026-01-06T13:54:37.048965Z",
"iopub.status.idle": "2026-01-06T13:54:37.054839Z",
"shell.execute_reply": "2026-01-06T13:54:37.054379Z"
}
},
"outputs": [],
"source": [
"project.analysis.constraints.add(\n",
" lhs_alias='biso_Co2',\n",
" rhs_expr='biso_Co1',\n",
")"
]
},
{
"cell_type": "markdown",
"id": "45",
"metadata": {},
"source": [
"Apply constraints."
]
},
{
"cell_type": "code",
"execution_count": 25,
"id": "46",
"metadata": {
"execution": {
"iopub.execute_input": "2026-01-06T13:54:37.056683Z",
"iopub.status.busy": "2026-01-06T13:54:37.056579Z",
"iopub.status.idle": "2026-01-06T13:54:37.058876Z",
"shell.execute_reply": "2026-01-06T13:54:37.058419Z"
}
},
"outputs": [],
"source": [
"project.analysis.apply_constraints()"
]
},
{
"cell_type": "markdown",
"id": "47",
"metadata": {},
"source": [
"#### Run Fitting"
]
},
{
"cell_type": "code",
"execution_count": 26,
"id": "48",
"metadata": {
"execution": {
"iopub.execute_input": "2026-01-06T13:54:37.060510Z",
"iopub.status.busy": "2026-01-06T13:54:37.060403Z",
"iopub.status.idle": "2026-01-06T13:55:13.444285Z",
"shell.execute_reply": "2026-01-06T13:55:13.443581Z"
}
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"\u001b[1;34mUsing experiment 🔬 \u001b[0m\u001b[32m'd20'\u001b[0m\u001b[1;34m for \u001b[0m\u001b[32m'single'\u001b[0m\u001b[1;34m fitting\u001b[0m\n"
]
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"🚀 Starting fit process with \u001b[32m'lmfit \u001b[0m\u001b[32m(\u001b[0m\u001b[32mleastsq\u001b[0m\u001b[32m)\u001b[0m\u001b[32m'\u001b[0m\u001b[33m...\u001b[0m\n"
]
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"📈 Goodness-of-fit \u001b[1m(\u001b[0mreduced χ²\u001b[1m)\u001b[0m change:\n"
]
},
{
"data": {
"text/html": [
"\n",
"\n",
" \n",
" \n",
" | | \n",
" iteration | \n",
" χ² | \n",
" improvement [%] | \n",
"
\n",
" \n",
" \n",
" \n",
" | 1 | \n",
" 1 | \n",
" 423.20 | \n",
" | \n",
"
\n",
" \n",
" | 2 | \n",
" 43 | \n",
" 71.71 | \n",
" 83.1% ↓ | \n",
"
\n",
" \n",
" | 3 | \n",
" 83 | \n",
" 40.43 | \n",
" 43.6% ↓ | \n",
"
\n",
" \n",
" | 4 | \n",
" 123 | \n",
" 17.05 | \n",
" 57.8% ↓ | \n",
"
\n",
" \n",
" | 5 | \n",
" 163 | \n",
" 10.78 | \n",
" 36.8% ↓ | \n",
"
\n",
" \n",
" | 6 | \n",
" 203 | \n",
" 9.26 | \n",
" 14.1% ↓ | \n",
"
\n",
" \n",
" | 7 | \n",
" 243 | \n",
" 8.08 | \n",
" 12.7% ↓ | \n",
"
\n",
" \n",
" | 8 | \n",
" 283 | \n",
" 5.66 | \n",
" 30.0% ↓ | \n",
"
\n",
" \n",
" | 9 | \n",
" 323 | \n",
" 4.67 | \n",
" 17.4% ↓ | \n",
"
\n",
" \n",
" | 10 | \n",
" 363 | \n",
" 4.57 | \n",
" 2.3% ↓ | \n",
"
\n",
" \n",
" | 11 | \n",
" 564 | \n",
" 4.56 | \n",
" | \n",
"
\n",
" \n",
"
\n"
],
"text/plain": [
""
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"application/javascript": [
"\n",
" (function() {\n",
" var isDark = false;\n",
"\n",
" // Check JupyterLab theme\n",
" if (document.body.classList.contains('jp-mod-dark') || \n",
" document.body.classList.contains('theme-dark') ||\n",
" document.body.classList.contains('vscode-dark')) {\n",
" isDark = true;\n",
" }\n",
"\n",
" // Check theme attribute\n",
" var themeAttr = document.body.getAttribute('data-jp-theme-name');\n",
" if (themeAttr && themeAttr.includes('dark')) {\n",
" isDark = true;\n",
" }\n",
"\n",
" // Check computed background color\n",
" var notebookEl = document.querySelector('.jp-Notebook') || \n",
" document.querySelector('.notebook_app') ||\n",
" document.body;\n",
" if (notebookEl) {\n",
" var bgColor = window.getComputedStyle(notebookEl).backgroundColor;\n",
" var rgb = bgColor.match(/\\d+/g);\n",
" if (rgb && rgb.length >= 3) {\n",
" var brightness = (parseInt(rgb[0]) + parseInt(rgb[1]) + parseInt(rgb[2])) / 3;\n",
" if (brightness < 128) {\n",
" isDark = true;\n",
" }\n",
" }\n",
" }\n",
"\n",
" // Store result\n",
" if (typeof IPython !== 'undefined' && IPython.notebook && IPython.notebook.kernel) {\n",
" IPython.notebook.kernel.execute('_jupyter_dark_detect_result = ' + isDark);\n",
" }\n",
" })();\n",
" "
],
"text/plain": [
""
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"application/javascript": [
"\n",
" if (typeof IPython !== 'undefined' && IPython.notebook) {\n",
" IPython.notebook.kernel.execute(\"_jupyter_dark_detect_result = \" + \n",
" (document.body.classList.contains('theme-dark') || \n",
" document.body.classList.contains('jp-mod-dark') ||\n",
" (document.body.getAttribute('data-jp-theme-name') && \n",
" document.body.getAttribute('data-jp-theme-name').includes('dark'))));\n",
" }\n",
" "
],
"text/plain": [
""
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"application/javascript": [
"\n",
" (function() {\n",
" var isDark = false;\n",
"\n",
" // Check JupyterLab theme\n",
" if (document.body.classList.contains('jp-mod-dark') || \n",
" document.body.classList.contains('theme-dark') ||\n",
" document.body.classList.contains('vscode-dark')) {\n",
" isDark = true;\n",
" }\n",
"\n",
" // Check theme attribute\n",
" var themeAttr = document.body.getAttribute('data-jp-theme-name');\n",
" if (themeAttr && themeAttr.includes('dark')) {\n",
" isDark = true;\n",
" }\n",
"\n",
" // Check computed background color\n",
" var notebookEl = document.querySelector('.jp-Notebook') || \n",
" document.querySelector('.notebook_app') ||\n",
" document.body;\n",
" if (notebookEl) {\n",
" var bgColor = window.getComputedStyle(notebookEl).backgroundColor;\n",
" var rgb = bgColor.match(/\\d+/g);\n",
" if (rgb && rgb.length >= 3) {\n",
" var brightness = (parseInt(rgb[0]) + parseInt(rgb[1]) + parseInt(rgb[2])) / 3;\n",
" if (brightness < 128) {\n",
" isDark = true;\n",
" }\n",
" }\n",
" }\n",
"\n",
" // Store result\n",
" if (typeof IPython !== 'undefined' && IPython.notebook && IPython.notebook.kernel) {\n",
" IPython.notebook.kernel.execute('_jupyter_dark_detect_result = ' + isDark);\n",
" }\n",
" })();\n",
" "
],
"text/plain": [
""
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"application/javascript": [
"\n",
" if (typeof IPython !== 'undefined' && IPython.notebook) {\n",
" IPython.notebook.kernel.execute(\"_jupyter_dark_detect_result = \" + \n",
" (document.body.classList.contains('theme-dark') || \n",
" document.body.classList.contains('jp-mod-dark') ||\n",
" (document.body.getAttribute('data-jp-theme-name') && \n",
" document.body.getAttribute('data-jp-theme-name').includes('dark'))));\n",
" }\n",
" "
],
"text/plain": [
""
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"application/javascript": [
"\n",
" (function() {\n",
" var isDark = false;\n",
"\n",
" // Check JupyterLab theme\n",
" if (document.body.classList.contains('jp-mod-dark') || \n",
" document.body.classList.contains('theme-dark') ||\n",
" document.body.classList.contains('vscode-dark')) {\n",
" isDark = true;\n",
" }\n",
"\n",
" // Check theme attribute\n",
" var themeAttr = document.body.getAttribute('data-jp-theme-name');\n",
" if (themeAttr && themeAttr.includes('dark')) {\n",
" isDark = true;\n",
" }\n",
"\n",
" // Check computed background color\n",
" var notebookEl = document.querySelector('.jp-Notebook') || \n",
" document.querySelector('.notebook_app') ||\n",
" document.body;\n",
" if (notebookEl) {\n",
" var bgColor = window.getComputedStyle(notebookEl).backgroundColor;\n",
" var rgb = bgColor.match(/\\d+/g);\n",
" if (rgb && rgb.length >= 3) {\n",
" var brightness = (parseInt(rgb[0]) + parseInt(rgb[1]) + parseInt(rgb[2])) / 3;\n",
" if (brightness < 128) {\n",
" isDark = true;\n",
" }\n",
" }\n",
" }\n",
"\n",
" // Store result\n",
" if (typeof IPython !== 'undefined' && IPython.notebook && IPython.notebook.kernel) {\n",
" IPython.notebook.kernel.execute('_jupyter_dark_detect_result = ' + isDark);\n",
" }\n",
" })();\n",
" "
],
"text/plain": [
""
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"application/javascript": [
"\n",
" if (typeof IPython !== 'undefined' && IPython.notebook) {\n",
" IPython.notebook.kernel.execute(\"_jupyter_dark_detect_result = \" + \n",
" (document.body.classList.contains('theme-dark') || \n",
" document.body.classList.contains('jp-mod-dark') ||\n",
" (document.body.getAttribute('data-jp-theme-name') && \n",
" document.body.getAttribute('data-jp-theme-name').includes('dark'))));\n",
" }\n",
" "
],
"text/plain": [
""
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"application/javascript": [
"\n",
" (function() {\n",
" var isDark = false;\n",
"\n",
" // Check JupyterLab theme\n",
" if (document.body.classList.contains('jp-mod-dark') || \n",
" document.body.classList.contains('theme-dark') ||\n",
" document.body.classList.contains('vscode-dark')) {\n",
" isDark = true;\n",
" }\n",
"\n",
" // Check theme attribute\n",
" var themeAttr = document.body.getAttribute('data-jp-theme-name');\n",
" if (themeAttr && themeAttr.includes('dark')) {\n",
" isDark = true;\n",
" }\n",
"\n",
" // Check computed background color\n",
" var notebookEl = document.querySelector('.jp-Notebook') || \n",
" document.querySelector('.notebook_app') ||\n",
" document.body;\n",
" if (notebookEl) {\n",
" var bgColor = window.getComputedStyle(notebookEl).backgroundColor;\n",
" var rgb = bgColor.match(/\\d+/g);\n",
" if (rgb && rgb.length >= 3) {\n",
" var brightness = (parseInt(rgb[0]) + parseInt(rgb[1]) + parseInt(rgb[2])) / 3;\n",
" if (brightness < 128) {\n",
" isDark = true;\n",
" }\n",
" }\n",
" }\n",
"\n",
" // Store result\n",
" if (typeof IPython !== 'undefined' && IPython.notebook && IPython.notebook.kernel) {\n",
" IPython.notebook.kernel.execute('_jupyter_dark_detect_result = ' + isDark);\n",
" }\n",
" })();\n",
" "
],
"text/plain": [
""
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"application/javascript": [
"\n",
" if (typeof IPython !== 'undefined' && IPython.notebook) {\n",
" IPython.notebook.kernel.execute(\"_jupyter_dark_detect_result = \" + \n",
" (document.body.classList.contains('theme-dark') || \n",
" document.body.classList.contains('jp-mod-dark') ||\n",
" (document.body.getAttribute('data-jp-theme-name') && \n",
" document.body.getAttribute('data-jp-theme-name').includes('dark'))));\n",
" }\n",
" "
],
"text/plain": [
""
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"application/javascript": [
"\n",
" (function() {\n",
" var isDark = false;\n",
"\n",
" // Check JupyterLab theme\n",
" if (document.body.classList.contains('jp-mod-dark') || \n",
" document.body.classList.contains('theme-dark') ||\n",
" document.body.classList.contains('vscode-dark')) {\n",
" isDark = true;\n",
" }\n",
"\n",
" // Check theme attribute\n",
" var themeAttr = document.body.getAttribute('data-jp-theme-name');\n",
" if (themeAttr && themeAttr.includes('dark')) {\n",
" isDark = true;\n",
" }\n",
"\n",
" // Check computed background color\n",
" var notebookEl = document.querySelector('.jp-Notebook') || \n",
" document.querySelector('.notebook_app') ||\n",
" document.body;\n",
" if (notebookEl) {\n",
" var bgColor = window.getComputedStyle(notebookEl).backgroundColor;\n",
" var rgb = bgColor.match(/\\d+/g);\n",
" if (rgb && rgb.length >= 3) {\n",
" var brightness = (parseInt(rgb[0]) + parseInt(rgb[1]) + parseInt(rgb[2])) / 3;\n",
" if (brightness < 128) {\n",
" isDark = true;\n",
" }\n",
" }\n",
" }\n",
"\n",
" // Store result\n",
" if (typeof IPython !== 'undefined' && IPython.notebook && IPython.notebook.kernel) {\n",
" IPython.notebook.kernel.execute('_jupyter_dark_detect_result = ' + isDark);\n",
" }\n",
" })();\n",
" "
],
"text/plain": [
""
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"application/javascript": [
"\n",
" if (typeof IPython !== 'undefined' && IPython.notebook) {\n",
" IPython.notebook.kernel.execute(\"_jupyter_dark_detect_result = \" + \n",
" (document.body.classList.contains('theme-dark') || \n",
" document.body.classList.contains('jp-mod-dark') ||\n",
" (document.body.getAttribute('data-jp-theme-name') && \n",
" document.body.getAttribute('data-jp-theme-name').includes('dark'))));\n",
" }\n",
" "
],
"text/plain": [
""
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"application/javascript": [
"\n",
" (function() {\n",
" var isDark = false;\n",
"\n",
" // Check JupyterLab theme\n",
" if (document.body.classList.contains('jp-mod-dark') || \n",
" document.body.classList.contains('theme-dark') ||\n",
" document.body.classList.contains('vscode-dark')) {\n",
" isDark = true;\n",
" }\n",
"\n",
" // Check theme attribute\n",
" var themeAttr = document.body.getAttribute('data-jp-theme-name');\n",
" if (themeAttr && themeAttr.includes('dark')) {\n",
" isDark = true;\n",
" }\n",
"\n",
" // Check computed background color\n",
" var notebookEl = document.querySelector('.jp-Notebook') || \n",
" document.querySelector('.notebook_app') ||\n",
" document.body;\n",
" if (notebookEl) {\n",
" var bgColor = window.getComputedStyle(notebookEl).backgroundColor;\n",
" var rgb = bgColor.match(/\\d+/g);\n",
" if (rgb && rgb.length >= 3) {\n",
" var brightness = (parseInt(rgb[0]) + parseInt(rgb[1]) + parseInt(rgb[2])) / 3;\n",
" if (brightness < 128) {\n",
" isDark = true;\n",
" }\n",
" }\n",
" }\n",
"\n",
" // Store result\n",
" if (typeof IPython !== 'undefined' && IPython.notebook && IPython.notebook.kernel) {\n",
" IPython.notebook.kernel.execute('_jupyter_dark_detect_result = ' + isDark);\n",
" }\n",
" })();\n",
" "
],
"text/plain": [
""
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"application/javascript": [
"\n",
" if (typeof IPython !== 'undefined' && IPython.notebook) {\n",
" IPython.notebook.kernel.execute(\"_jupyter_dark_detect_result = \" + \n",
" (document.body.classList.contains('theme-dark') || \n",
" document.body.classList.contains('jp-mod-dark') ||\n",
" (document.body.getAttribute('data-jp-theme-name') && \n",
" document.body.getAttribute('data-jp-theme-name').includes('dark'))));\n",
" }\n",
" "
],
"text/plain": [
""
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"application/javascript": [
"\n",
" (function() {\n",
" var isDark = false;\n",
"\n",
" // Check JupyterLab theme\n",
" if (document.body.classList.contains('jp-mod-dark') || \n",
" document.body.classList.contains('theme-dark') ||\n",
" document.body.classList.contains('vscode-dark')) {\n",
" isDark = true;\n",
" }\n",
"\n",
" // Check theme attribute\n",
" var themeAttr = document.body.getAttribute('data-jp-theme-name');\n",
" if (themeAttr && themeAttr.includes('dark')) {\n",
" isDark = true;\n",
" }\n",
"\n",
" // Check computed background color\n",
" var notebookEl = document.querySelector('.jp-Notebook') || \n",
" document.querySelector('.notebook_app') ||\n",
" document.body;\n",
" if (notebookEl) {\n",
" var bgColor = window.getComputedStyle(notebookEl).backgroundColor;\n",
" var rgb = bgColor.match(/\\d+/g);\n",
" if (rgb && rgb.length >= 3) {\n",
" var brightness = (parseInt(rgb[0]) + parseInt(rgb[1]) + parseInt(rgb[2])) / 3;\n",
" if (brightness < 128) {\n",
" isDark = true;\n",
" }\n",
" }\n",
" }\n",
"\n",
" // Store result\n",
" if (typeof IPython !== 'undefined' && IPython.notebook && IPython.notebook.kernel) {\n",
" IPython.notebook.kernel.execute('_jupyter_dark_detect_result = ' + isDark);\n",
" }\n",
" })();\n",
" "
],
"text/plain": [
""
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"application/javascript": [
"\n",
" if (typeof IPython !== 'undefined' && IPython.notebook) {\n",
" IPython.notebook.kernel.execute(\"_jupyter_dark_detect_result = \" + \n",
" (document.body.classList.contains('theme-dark') || \n",
" document.body.classList.contains('jp-mod-dark') ||\n",
" (document.body.getAttribute('data-jp-theme-name') && \n",
" document.body.getAttribute('data-jp-theme-name').includes('dark'))));\n",
" }\n",
" "
],
"text/plain": [
""
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"application/javascript": [
"\n",
" (function() {\n",
" var isDark = false;\n",
"\n",
" // Check JupyterLab theme\n",
" if (document.body.classList.contains('jp-mod-dark') || \n",
" document.body.classList.contains('theme-dark') ||\n",
" document.body.classList.contains('vscode-dark')) {\n",
" isDark = true;\n",
" }\n",
"\n",
" // Check theme attribute\n",
" var themeAttr = document.body.getAttribute('data-jp-theme-name');\n",
" if (themeAttr && themeAttr.includes('dark')) {\n",
" isDark = true;\n",
" }\n",
"\n",
" // Check computed background color\n",
" var notebookEl = document.querySelector('.jp-Notebook') || \n",
" document.querySelector('.notebook_app') ||\n",
" document.body;\n",
" if (notebookEl) {\n",
" var bgColor = window.getComputedStyle(notebookEl).backgroundColor;\n",
" var rgb = bgColor.match(/\\d+/g);\n",
" if (rgb && rgb.length >= 3) {\n",
" var brightness = (parseInt(rgb[0]) + parseInt(rgb[1]) + parseInt(rgb[2])) / 3;\n",
" if (brightness < 128) {\n",
" isDark = true;\n",
" }\n",
" }\n",
" }\n",
"\n",
" // Store result\n",
" if (typeof IPython !== 'undefined' && IPython.notebook && IPython.notebook.kernel) {\n",
" IPython.notebook.kernel.execute('_jupyter_dark_detect_result = ' + isDark);\n",
" }\n",
" })();\n",
" "
],
"text/plain": [
""
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"application/javascript": [
"\n",
" if (typeof IPython !== 'undefined' && IPython.notebook) {\n",
" IPython.notebook.kernel.execute(\"_jupyter_dark_detect_result = \" + \n",
" (document.body.classList.contains('theme-dark') || \n",
" document.body.classList.contains('jp-mod-dark') ||\n",
" (document.body.getAttribute('data-jp-theme-name') && \n",
" document.body.getAttribute('data-jp-theme-name').includes('dark'))));\n",
" }\n",
" "
],
"text/plain": [
""
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"application/javascript": [
"\n",
" (function() {\n",
" var isDark = false;\n",
"\n",
" // Check JupyterLab theme\n",
" if (document.body.classList.contains('jp-mod-dark') || \n",
" document.body.classList.contains('theme-dark') ||\n",
" document.body.classList.contains('vscode-dark')) {\n",
" isDark = true;\n",
" }\n",
"\n",
" // Check theme attribute\n",
" var themeAttr = document.body.getAttribute('data-jp-theme-name');\n",
" if (themeAttr && themeAttr.includes('dark')) {\n",
" isDark = true;\n",
" }\n",
"\n",
" // Check computed background color\n",
" var notebookEl = document.querySelector('.jp-Notebook') || \n",
" document.querySelector('.notebook_app') ||\n",
" document.body;\n",
" if (notebookEl) {\n",
" var bgColor = window.getComputedStyle(notebookEl).backgroundColor;\n",
" var rgb = bgColor.match(/\\d+/g);\n",
" if (rgb && rgb.length >= 3) {\n",
" var brightness = (parseInt(rgb[0]) + parseInt(rgb[1]) + parseInt(rgb[2])) / 3;\n",
" if (brightness < 128) {\n",
" isDark = true;\n",
" }\n",
" }\n",
" }\n",
"\n",
" // Store result\n",
" if (typeof IPython !== 'undefined' && IPython.notebook && IPython.notebook.kernel) {\n",
" IPython.notebook.kernel.execute('_jupyter_dark_detect_result = ' + isDark);\n",
" }\n",
" })();\n",
" "
],
"text/plain": [
""
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"application/javascript": [
"\n",
" if (typeof IPython !== 'undefined' && IPython.notebook) {\n",
" IPython.notebook.kernel.execute(\"_jupyter_dark_detect_result = \" + \n",
" (document.body.classList.contains('theme-dark') || \n",
" document.body.classList.contains('jp-mod-dark') ||\n",
" (document.body.getAttribute('data-jp-theme-name') && \n",
" document.body.getAttribute('data-jp-theme-name').includes('dark'))));\n",
" }\n",
" "
],
"text/plain": [
""
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"application/javascript": [
"\n",
" (function() {\n",
" var isDark = false;\n",
"\n",
" // Check JupyterLab theme\n",
" if (document.body.classList.contains('jp-mod-dark') || \n",
" document.body.classList.contains('theme-dark') ||\n",
" document.body.classList.contains('vscode-dark')) {\n",
" isDark = true;\n",
" }\n",
"\n",
" // Check theme attribute\n",
" var themeAttr = document.body.getAttribute('data-jp-theme-name');\n",
" if (themeAttr && themeAttr.includes('dark')) {\n",
" isDark = true;\n",
" }\n",
"\n",
" // Check computed background color\n",
" var notebookEl = document.querySelector('.jp-Notebook') || \n",
" document.querySelector('.notebook_app') ||\n",
" document.body;\n",
" if (notebookEl) {\n",
" var bgColor = window.getComputedStyle(notebookEl).backgroundColor;\n",
" var rgb = bgColor.match(/\\d+/g);\n",
" if (rgb && rgb.length >= 3) {\n",
" var brightness = (parseInt(rgb[0]) + parseInt(rgb[1]) + parseInt(rgb[2])) / 3;\n",
" if (brightness < 128) {\n",
" isDark = true;\n",
" }\n",
" }\n",
" }\n",
"\n",
" // Store result\n",
" if (typeof IPython !== 'undefined' && IPython.notebook && IPython.notebook.kernel) {\n",
" IPython.notebook.kernel.execute('_jupyter_dark_detect_result = ' + isDark);\n",
" }\n",
" })();\n",
" "
],
"text/plain": [
""
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"application/javascript": [
"\n",
" if (typeof IPython !== 'undefined' && IPython.notebook) {\n",
" IPython.notebook.kernel.execute(\"_jupyter_dark_detect_result = \" + \n",
" (document.body.classList.contains('theme-dark') || \n",
" document.body.classList.contains('jp-mod-dark') ||\n",
" (document.body.getAttribute('data-jp-theme-name') && \n",
" document.body.getAttribute('data-jp-theme-name').includes('dark'))));\n",
" }\n",
" "
],
"text/plain": [
""
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"application/javascript": [
"\n",
" (function() {\n",
" var isDark = false;\n",
"\n",
" // Check JupyterLab theme\n",
" if (document.body.classList.contains('jp-mod-dark') || \n",
" document.body.classList.contains('theme-dark') ||\n",
" document.body.classList.contains('vscode-dark')) {\n",
" isDark = true;\n",
" }\n",
"\n",
" // Check theme attribute\n",
" var themeAttr = document.body.getAttribute('data-jp-theme-name');\n",
" if (themeAttr && themeAttr.includes('dark')) {\n",
" isDark = true;\n",
" }\n",
"\n",
" // Check computed background color\n",
" var notebookEl = document.querySelector('.jp-Notebook') || \n",
" document.querySelector('.notebook_app') ||\n",
" document.body;\n",
" if (notebookEl) {\n",
" var bgColor = window.getComputedStyle(notebookEl).backgroundColor;\n",
" var rgb = bgColor.match(/\\d+/g);\n",
" if (rgb && rgb.length >= 3) {\n",
" var brightness = (parseInt(rgb[0]) + parseInt(rgb[1]) + parseInt(rgb[2])) / 3;\n",
" if (brightness < 128) {\n",
" isDark = true;\n",
" }\n",
" }\n",
" }\n",
"\n",
" // Store result\n",
" if (typeof IPython !== 'undefined' && IPython.notebook && IPython.notebook.kernel) {\n",
" IPython.notebook.kernel.execute('_jupyter_dark_detect_result = ' + isDark);\n",
" }\n",
" })();\n",
" "
],
"text/plain": [
""
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"application/javascript": [
"\n",
" if (typeof IPython !== 'undefined' && IPython.notebook) {\n",
" IPython.notebook.kernel.execute(\"_jupyter_dark_detect_result = \" + \n",
" (document.body.classList.contains('theme-dark') || \n",
" document.body.classList.contains('jp-mod-dark') ||\n",
" (document.body.getAttribute('data-jp-theme-name') && \n",
" document.body.getAttribute('data-jp-theme-name').includes('dark'))));\n",
" }\n",
" "
],
"text/plain": [
""
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"application/javascript": [
"\n",
" (function() {\n",
" var isDark = false;\n",
"\n",
" // Check JupyterLab theme\n",
" if (document.body.classList.contains('jp-mod-dark') || \n",
" document.body.classList.contains('theme-dark') ||\n",
" document.body.classList.contains('vscode-dark')) {\n",
" isDark = true;\n",
" }\n",
"\n",
" // Check theme attribute\n",
" var themeAttr = document.body.getAttribute('data-jp-theme-name');\n",
" if (themeAttr && themeAttr.includes('dark')) {\n",
" isDark = true;\n",
" }\n",
"\n",
" // Check computed background color\n",
" var notebookEl = document.querySelector('.jp-Notebook') || \n",
" document.querySelector('.notebook_app') ||\n",
" document.body;\n",
" if (notebookEl) {\n",
" var bgColor = window.getComputedStyle(notebookEl).backgroundColor;\n",
" var rgb = bgColor.match(/\\d+/g);\n",
" if (rgb && rgb.length >= 3) {\n",
" var brightness = (parseInt(rgb[0]) + parseInt(rgb[1]) + parseInt(rgb[2])) / 3;\n",
" if (brightness < 128) {\n",
" isDark = true;\n",
" }\n",
" }\n",
" }\n",
"\n",
" // Store result\n",
" if (typeof IPython !== 'undefined' && IPython.notebook && IPython.notebook.kernel) {\n",
" IPython.notebook.kernel.execute('_jupyter_dark_detect_result = ' + isDark);\n",
" }\n",
" })();\n",
" "
],
"text/plain": [
""
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"application/javascript": [
"\n",
" if (typeof IPython !== 'undefined' && IPython.notebook) {\n",
" IPython.notebook.kernel.execute(\"_jupyter_dark_detect_result = \" + \n",
" (document.body.classList.contains('theme-dark') || \n",
" document.body.classList.contains('jp-mod-dark') ||\n",
" (document.body.getAttribute('data-jp-theme-name') && \n",
" document.body.getAttribute('data-jp-theme-name').includes('dark'))));\n",
" }\n",
" "
],
"text/plain": [
""
]
},
"metadata": {},
"output_type": "display_data"
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"🏆 Best goodness-of-fit \u001b[1m(\u001b[0mreduced χ²\u001b[1m)\u001b[0m is \u001b[1;36m4.56\u001b[0m at iteration \u001b[1;36m547\u001b[0m\n"
]
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"✅ Fitting complete.\n"
]
},
{
"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;36m34.91\u001b[0m seconds\n"
]
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"📏 Goodness-of-fit \u001b[1m(\u001b[0mreduced χ²\u001b[1m)\u001b[0m: \u001b[1;36m4.56\u001b[0m\n"
]
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"📏 R-factor \u001b[1m(\u001b[0mRf\u001b[1m)\u001b[0m: \u001b[1;36m3.03\u001b[0m%\n"
]
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"📏 R-factor squared \u001b[1m(\u001b[0mRf²\u001b[1m)\u001b[0m: \u001b[1;36m4.54\u001b[0m%\n"
]
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"📏 Weighted R-factor \u001b[1m(\u001b[0mwR\u001b[1m)\u001b[0m: \u001b[1;36m4.87\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",
" datablock | \n",
" category | \n",
" entry | \n",
" parameter | \n",
" start | \n",
" fitted | \n",
" uncertainty | \n",
" units | \n",
" change | \n",
"
\n",
" \n",
" \n",
" \n",
" | 1 | \n",
" cosio | \n",
" cell | \n",
" | \n",
" length_a | \n",
" 10.3000 | \n",
" 10.3090 | \n",
" 0.0003 | \n",
" Å | \n",
" 0.09 % ↑ | \n",
"
\n",
" \n",
" | 2 | \n",
" cosio | \n",
" cell | \n",
" | \n",
" length_b | \n",
" 6.0000 | \n",
" 6.0039 | \n",
" 0.0002 | \n",
" Å | \n",
" 0.07 % ↑ | \n",
"
\n",
" \n",
" | 3 | \n",
" cosio | \n",
" cell | \n",
" | \n",
" length_c | \n",
" 4.8000 | \n",
" 4.7868 | \n",
" 0.0001 | \n",
" Å | \n",
" 0.28 % ↓ | \n",
"
\n",
" \n",
" | 4 | \n",
" cosio | \n",
" atom_site | \n",
" Co1 | \n",
" b_iso | \n",
" 0.5000 | \n",
" 0.2770 | \n",
" 0.0802 | \n",
" Ų | \n",
" 44.59 % ↓ | \n",
"
\n",
" \n",
" | 5 | \n",
" cosio | \n",
" atom_site | \n",
" Co2 | \n",
" fract_x | \n",
" 0.2790 | \n",
" 0.2794 | \n",
" 0.0007 | \n",
" | \n",
" 0.14 % ↑ | \n",
"
\n",
" \n",
" | 6 | \n",
" cosio | \n",
" atom_site | \n",
" Co2 | \n",
" fract_z | \n",
" 0.9850 | \n",
" 0.9847 | \n",
" 0.0015 | \n",
" | \n",
" 0.03 % ↓ | \n",
"
\n",
" \n",
" | 7 | \n",
" cosio | \n",
" atom_site | \n",
" Si | \n",
" fract_x | \n",
" 0.0940 | \n",
" 0.0937 | \n",
" 0.0004 | \n",
" | \n",
" 0.31 % ↓ | \n",
"
\n",
" \n",
" | 8 | \n",
" cosio | \n",
" atom_site | \n",
" Si | \n",
" fract_z | \n",
" 0.4290 | \n",
" 0.4290 | \n",
" 0.0008 | \n",
" | \n",
" 0.01 % ↑ | \n",
"
\n",
" \n",
" | 9 | \n",
" cosio | \n",
" atom_site | \n",
" Si | \n",
" b_iso | \n",
" 0.5000 | \n",
" 0.3519 | \n",
" 0.0625 | \n",
" Ų | \n",
" 29.62 % ↓ | \n",
"
\n",
" \n",
" | 10 | \n",
" cosio | \n",
" atom_site | \n",
" O1 | \n",
" fract_x | \n",
" 0.0910 | \n",
" 0.0911 | \n",
" 0.0003 | \n",
" | \n",
" 0.08 % ↑ | \n",
"
\n",
" \n",
" | 11 | \n",
" cosio | \n",
" atom_site | \n",
" O1 | \n",
" fract_z | \n",
" 0.7710 | \n",
" 0.7714 | \n",
" 0.0006 | \n",
" | \n",
" 0.05 % ↑ | \n",
"
\n",
" \n",
" | 12 | \n",
" cosio | \n",
" atom_site | \n",
" O1 | \n",
" b_iso | \n",
" 0.5000 | \n",
" 0.6457 | \n",
" 0.0581 | \n",
" Ų | \n",
" 29.14 % ↑ | \n",
"
\n",
" \n",
" | 13 | \n",
" cosio | \n",
" atom_site | \n",
" O2 | \n",
" fract_x | \n",
" 0.4480 | \n",
" 0.4482 | \n",
" 0.0003 | \n",
" | \n",
" 0.06 % ↑ | \n",
"
\n",
" \n",
" | 14 | \n",
" cosio | \n",
" atom_site | \n",
" O2 | \n",
" fract_z | \n",
" 0.2170 | \n",
" 0.2167 | \n",
" 0.0007 | \n",
" | \n",
" 0.14 % ↓ | \n",
"
\n",
" \n",
" | 15 | \n",
" cosio | \n",
" atom_site | \n",
" O2 | \n",
" b_iso | \n",
" 0.5000 | \n",
" 0.5778 | \n",
" 0.0582 | \n",
" Ų | \n",
" 15.57 % ↑ | \n",
"
\n",
" \n",
" | 16 | \n",
" cosio | \n",
" atom_site | \n",
" O3 | \n",
" fract_x | \n",
" 0.1640 | \n",
" 0.1636 | \n",
" 0.0002 | \n",
" | \n",
" 0.26 % ↓ | \n",
"
\n",
" \n",
" | 17 | \n",
" cosio | \n",
" atom_site | \n",
" O3 | \n",
" fract_y | \n",
" 0.0320 | \n",
" 0.0317 | \n",
" 0.0003 | \n",
" | \n",
" 1.08 % ↓ | \n",
"
\n",
" \n",
" | 18 | \n",
" cosio | \n",
" atom_site | \n",
" O3 | \n",
" fract_z | \n",
" 0.2800 | \n",
" 0.2800 | \n",
" 0.0005 | \n",
" | \n",
" 0.02 % ↑ | \n",
"
\n",
" \n",
" | 19 | \n",
" cosio | \n",
" atom_site | \n",
" O3 | \n",
" b_iso | \n",
" 0.5000 | \n",
" 0.8389 | \n",
" 0.0485 | \n",
" Ų | \n",
" 67.79 % ↑ | \n",
"
\n",
" \n",
" | 20 | \n",
" d20 | \n",
" linked_phases | \n",
" cosio | \n",
" scale | \n",
" 1.0000 | \n",
" 1.1957 | \n",
" 0.0106 | \n",
" | \n",
" 19.57 % ↑ | \n",
"
\n",
" \n",
" | 21 | \n",
" d20 | \n",
" peak | \n",
" | \n",
" broad_gauss_u | \n",
" 0.3000 | \n",
" 0.2423 | \n",
" 0.0068 | \n",
" deg² | \n",
" 19.22 % ↓ | \n",
"
\n",
" \n",
" | 22 | \n",
" d20 | \n",
" peak | \n",
" | \n",
" broad_gauss_v | \n",
" -0.5000 | \n",
" -0.5288 | \n",
" 0.0145 | \n",
" deg² | \n",
" 5.76 % ↑ | \n",
"
\n",
" \n",
" | 23 | \n",
" d20 | \n",
" peak | \n",
" | \n",
" broad_gauss_w | \n",
" 0.4000 | \n",
" 0.3840 | \n",
" 0.0090 | \n",
" deg² | \n",
" 4.01 % ↓ | \n",
"
\n",
" \n",
" | 24 | \n",
" d20 | \n",
" peak | \n",
" | \n",
" broad_lorentz_y | \n",
" 0.0000 | \n",
" 0.0159 | \n",
" 0.0045 | \n",
" deg | \n",
" N/A | \n",
"
\n",
" \n",
" | 25 | \n",
" d20 | \n",
" instrument | \n",
" | \n",
" twotheta_offset | \n",
" 0.1000 | \n",
" 0.2884 | \n",
" 0.0020 | \n",
" deg | \n",
" 188.44 % ↑ | \n",
"
\n",
" \n",
" | 26 | \n",
" d20 | \n",
" background | \n",
" 1 | \n",
" y | \n",
" 500.0000 | \n",
" 608.6305 | \n",
" 14.5414 | \n",
" | \n",
" 21.73 % ↑ | \n",
"
\n",
" \n",
" | 27 | \n",
" d20 | \n",
" background | \n",
" 2 | \n",
" y | \n",
" 500.0000 | \n",
" 580.6214 | \n",
" 9.7278 | \n",
" | \n",
" 16.12 % ↑ | \n",
"
\n",
" \n",
" | 28 | \n",
" d20 | \n",
" background | \n",
" 3 | \n",
" y | \n",
" 500.0000 | \n",
" 562.8991 | \n",
" 9.2422 | \n",
" | \n",
" 12.58 % ↑ | \n",
"
\n",
" \n",
" | 29 | \n",
" d20 | \n",
" background | \n",
" 4 | \n",
" y | \n",
" 500.0000 | \n",
" 540.2882 | \n",
" 8.7695 | \n",
" | \n",
" 8.06 % ↑ | \n",
"
\n",
" \n",
" | 30 | \n",
" d20 | \n",
" background | \n",
" 5 | \n",
" y | \n",
" 500.0000 | \n",
" 519.8428 | \n",
" 6.0496 | \n",
" | \n",
" 3.97 % ↑ | \n",
"
\n",
" \n",
" | 31 | \n",
" d20 | \n",
" background | \n",
" 6 | \n",
" y | \n",
" 500.0000 | \n",
" 507.3838 | \n",
" 3.4846 | \n",
" | \n",
" 1.48 % ↑ | \n",
"
\n",
" \n",
" | 32 | \n",
" d20 | \n",
" background | \n",
" 7 | \n",
" y | \n",
" 500.0000 | \n",
" 463.0794 | \n",
" 3.1898 | \n",
" | \n",
" 7.38 % ↓ | \n",
"
\n",
" \n",
" | 33 | \n",
" d20 | \n",
" background | \n",
" 8 | \n",
" y | \n",
" 500.0000 | \n",
" 434.2455 | \n",
" 2.3904 | \n",
" | \n",
" 13.15 % ↓ | \n",
"
\n",
" \n",
" | 34 | \n",
" d20 | \n",
" background | \n",
" 9 | \n",
" y | \n",
" 500.0000 | \n",
" 450.8166 | \n",
" 2.2505 | \n",
" | \n",
" 9.84 % ↓ | \n",
"
\n",
" \n",
" | 35 | \n",
" d20 | \n",
" background | \n",
" 10 | \n",
" y | \n",
" 500.0000 | \n",
" 430.3828 | \n",
" 2.0250 | \n",
" | \n",
" 13.92 % ↓ | \n",
"
\n",
" \n",
" | 36 | \n",
" d20 | \n",
" background | \n",
" 11 | \n",
" y | \n",
" 500.0000 | \n",
" 413.7132 | \n",
" 2.2594 | \n",
" | \n",
" 17.26 % ↓ | \n",
"
\n",
" \n",
" | 37 | \n",
" d20 | \n",
" background | \n",
" 12 | \n",
" y | \n",
" 500.0000 | \n",
" 361.2599 | \n",
" 2.0915 | \n",
" | \n",
" 27.75 % ↓ | \n",
"
\n",
" \n",
" | 38 | \n",
" d20 | \n",
" background | \n",
" 13 | \n",
" y | \n",
" 500.0000 | \n",
" 291.0612 | \n",
" 1.9671 | \n",
" | \n",
" 41.79 % ↓ | \n",
"
\n",
" \n",
" | 39 | \n",
" d20 | \n",
" background | \n",
" 14 | \n",
" y | \n",
" 500.0000 | \n",
" 238.7749 | \n",
" 2.9764 | \n",
" | \n",
" 52.25 % ↓ | \n",
"
\n",
" \n",
"
\n"
],
"text/plain": [
""
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"project.analysis.fit()\n",
"project.analysis.show_fit_results()"
]
},
{
"cell_type": "markdown",
"id": "49",
"metadata": {},
"source": [
"#### Plot Measured vs Calculated"
]
},
{
"cell_type": "code",
"execution_count": 27,
"id": "50",
"metadata": {
"execution": {
"iopub.execute_input": "2026-01-06T13:55:13.454763Z",
"iopub.status.busy": "2026-01-06T13:55:13.450601Z",
"iopub.status.idle": "2026-01-06T13:55:13.799032Z",
"shell.execute_reply": "2026-01-06T13:55:13.797169Z"
}
},
"outputs": [
{
"data": {
"text/html": [
""
],
"text/plain": [
""
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"project.plot_meas_vs_calc(expt_name='d20', show_residual=True)"
]
},
{
"cell_type": "code",
"execution_count": 28,
"id": "51",
"metadata": {
"execution": {
"iopub.execute_input": "2026-01-06T13:55:13.802252Z",
"iopub.status.busy": "2026-01-06T13:55:13.802028Z",
"iopub.status.idle": "2026-01-06T13:55:14.162610Z",
"shell.execute_reply": "2026-01-06T13:55:14.162052Z"
}
},
"outputs": [
{
"data": {
"text/html": [
""
],
"text/plain": [
""
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"project.plot_meas_vs_calc(expt_name='d20', x_min=41, x_max=54, show_residual=True)"
]
},
{
"cell_type": "markdown",
"id": "52",
"metadata": {},
"source": [
"## Summary\n",
"\n",
"This final section shows how to review the results of the analysis."
]
},
{
"cell_type": "markdown",
"id": "53",
"metadata": {},
"source": [
"#### Show Project Summary"
]
},
{
"cell_type": "code",
"execution_count": 29,
"id": "54",
"metadata": {
"execution": {
"iopub.execute_input": "2026-01-06T13:55:14.164861Z",
"iopub.status.busy": "2026-01-06T13:55:14.164732Z",
"iopub.status.idle": "2026-01-06T13:55:15.725237Z",
"shell.execute_reply": "2026-01-06T13:55:15.724679Z"
}
},
"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"
]
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"\u001b[1;34mCell parameters\u001b[0m\n"
]
},
{
"data": {
"application/javascript": [
"\n",
" (function() {\n",
" var isDark = false;\n",
"\n",
" // Check JupyterLab theme\n",
" if (document.body.classList.contains('jp-mod-dark') || \n",
" document.body.classList.contains('theme-dark') ||\n",
" document.body.classList.contains('vscode-dark')) {\n",
" isDark = true;\n",
" }\n",
"\n",
" // Check theme attribute\n",
" var themeAttr = document.body.getAttribute('data-jp-theme-name');\n",
" if (themeAttr && themeAttr.includes('dark')) {\n",
" isDark = true;\n",
" }\n",
"\n",
" // Check computed background color\n",
" var notebookEl = document.querySelector('.jp-Notebook') || \n",
" document.querySelector('.notebook_app') ||\n",
" document.body;\n",
" if (notebookEl) {\n",
" var bgColor = window.getComputedStyle(notebookEl).backgroundColor;\n",
" var rgb = bgColor.match(/\\d+/g);\n",
" if (rgb && rgb.length >= 3) {\n",
" var brightness = (parseInt(rgb[0]) + parseInt(rgb[1]) + parseInt(rgb[2])) / 3;\n",
" if (brightness < 128) {\n",
" isDark = true;\n",
" }\n",
" }\n",
" }\n",
"\n",
" // Store result\n",
" if (typeof IPython !== 'undefined' && IPython.notebook && IPython.notebook.kernel) {\n",
" IPython.notebook.kernel.execute('_jupyter_dark_detect_result = ' + isDark);\n",
" }\n",
" })();\n",
" "
],
"text/plain": [
""
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"application/javascript": [
"\n",
" if (typeof IPython !== 'undefined' && IPython.notebook) {\n",
" IPython.notebook.kernel.execute(\"_jupyter_dark_detect_result = \" + \n",
" (document.body.classList.contains('theme-dark') || \n",
" document.body.classList.contains('jp-mod-dark') ||\n",
" (document.body.getAttribute('data-jp-theme-name') && \n",
" document.body.getAttribute('data-jp-theme-name').includes('dark'))));\n",
" }\n",
" "
],
"text/plain": [
""
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/html": [
"\n",
"\n",
" \n",
" \n",
" | | \n",
" Parameter | \n",
" Value | \n",
"
\n",
" \n",
" \n",
" \n",
" | 1 | \n",
" a | \n",
" 10.30896 | \n",
"
\n",
" \n",
" | 2 | \n",
" b | \n",
" 6.00391 | \n",
"
\n",
" \n",
" | 3 | \n",
" c | \n",
" 4.78675 | \n",
"
\n",
" \n",
" | 4 | \n",
" alpha | \n",
" 90.00000 | \n",
"
\n",
" \n",
" | 5 | \n",
" beta | \n",
" 90.00000 | \n",
"
\n",
" \n",
" | 6 | \n",
" gamma | \n",
" 90.00000 | \n",
"
\n",
" \n",
"
\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",
" label | \n",
" type | \n",
" x | \n",
" y | \n",
" z | \n",
" occ | \n",
" Biso | \n",
"
\n",
" \n",
" \n",
" \n",
" | 1 | \n",
" Co1 | \n",
" Co | \n",
" 0.00000 | \n",
" 0.00000 | \n",
" 0.00000 | \n",
" 1.00000 | \n",
" 0.27703 | \n",
"
\n",
" \n",
" | 2 | \n",
" Co2 | \n",
" Co | \n",
" 0.27938 | \n",
" 0.25000 | \n",
" 0.98470 | \n",
" 1.00000 | \n",
" 0.27703 | \n",
"
\n",
" \n",
" | 3 | \n",
" Si | \n",
" Si | \n",
" 0.09371 | \n",
" 0.25000 | \n",
" 0.42904 | \n",
" 1.00000 | \n",
" 0.35192 | \n",
"
\n",
" \n",
" | 4 | \n",
" O1 | \n",
" O | \n",
" 0.09107 | \n",
" 0.25000 | \n",
" 0.77140 | \n",
" 1.00000 | \n",
" 0.64570 | \n",
"
\n",
" \n",
" | 5 | \n",
" O2 | \n",
" O | \n",
" 0.44825 | \n",
" 0.25000 | \n",
" 0.21671 | \n",
" 1.00000 | \n",
" 0.57784 | \n",
"
\n",
" \n",
" | 6 | \n",
" O3 | \n",
" O | \n",
" 0.16358 | \n",
" 0.03165 | \n",
" 0.28005 | \n",
" 1.00000 | \n",
" 0.83894 | \n",
"
\n",
" \n",
"
\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\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.28844\u001b[0m\n"
]
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"\u001b[1;34mProfile type\u001b[0m\n"
]
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"PeakProfileTypeEnum.PSEUDO_VOIGT\n"
]
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"\u001b[1;34mPeak broadening \u001b[0m\u001b[1;34m(\u001b[0m\u001b[1;34mGaussian\u001b[0m\u001b[1;34m)\u001b[0m\n"
]
},
{
"data": {
"application/javascript": [
"\n",
" (function() {\n",
" var isDark = false;\n",
"\n",
" // Check JupyterLab theme\n",
" if (document.body.classList.contains('jp-mod-dark') || \n",
" document.body.classList.contains('theme-dark') ||\n",
" document.body.classList.contains('vscode-dark')) {\n",
" isDark = true;\n",
" }\n",
"\n",
" // Check theme attribute\n",
" var themeAttr = document.body.getAttribute('data-jp-theme-name');\n",
" if (themeAttr && themeAttr.includes('dark')) {\n",
" isDark = true;\n",
" }\n",
"\n",
" // Check computed background color\n",
" var notebookEl = document.querySelector('.jp-Notebook') || \n",
" document.querySelector('.notebook_app') ||\n",
" document.body;\n",
" if (notebookEl) {\n",
" var bgColor = window.getComputedStyle(notebookEl).backgroundColor;\n",
" var rgb = bgColor.match(/\\d+/g);\n",
" if (rgb && rgb.length >= 3) {\n",
" var brightness = (parseInt(rgb[0]) + parseInt(rgb[1]) + parseInt(rgb[2])) / 3;\n",
" if (brightness < 128) {\n",
" isDark = true;\n",
" }\n",
" }\n",
" }\n",
"\n",
" // Store result\n",
" if (typeof IPython !== 'undefined' && IPython.notebook && IPython.notebook.kernel) {\n",
" IPython.notebook.kernel.execute('_jupyter_dark_detect_result = ' + isDark);\n",
" }\n",
" })();\n",
" "
],
"text/plain": [
""
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"application/javascript": [
"\n",
" if (typeof IPython !== 'undefined' && IPython.notebook) {\n",
" IPython.notebook.kernel.execute(\"_jupyter_dark_detect_result = \" + \n",
" (document.body.classList.contains('theme-dark') || \n",
" document.body.classList.contains('jp-mod-dark') ||\n",
" (document.body.getAttribute('data-jp-theme-name') && \n",
" document.body.getAttribute('data-jp-theme-name').includes('dark'))));\n",
" }\n",
" "
],
"text/plain": [
""
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/html": [
"\n",
"\n",
" \n",
" \n",
" | | \n",
" Parameter | \n",
" Value | \n",
"
\n",
" \n",
" \n",
" \n",
" | 1 | \n",
" U | \n",
" 0.24233 | \n",
"
\n",
" \n",
" | 2 | \n",
" V | \n",
" -0.52880 | \n",
"
\n",
" \n",
" | 3 | \n",
" W | \n",
" 0.38395 | \n",
"
\n",
" \n",
"
\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",
" Parameter | \n",
" Value | \n",
"
\n",
" \n",
" \n",
" \n",
" | 1 | \n",
" X | \n",
" 0.00000 | \n",
"
\n",
" \n",
" | 2 | \n",
" Y | \n",
" 0.01591 | \n",
"
\n",
" \n",
"
\n"
],
"text/plain": [
""
]
},
"metadata": {},
"output_type": "display_data"
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"\u001b[1;32m———————\u001b[0m\n",
"\u001b[1;32mFITTING\u001b[0m\n",
"\u001b[1;32m———————\u001b[0m\n"
]
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"\u001b[1;34mCalculation engine\u001b[0m\n"
]
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"cryspy\n"
]
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"\u001b[1;34mMinimization engine\u001b[0m\n"
]
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"lmfit \u001b[1m(\u001b[0mleastsq\u001b[1m)\u001b[0m\n"
]
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"\u001b[1;34mFit quality\u001b[0m\n"
]
},
{
"data": {
"application/javascript": [
"\n",
" (function() {\n",
" var isDark = false;\n",
"\n",
" // Check JupyterLab theme\n",
" if (document.body.classList.contains('jp-mod-dark') || \n",
" document.body.classList.contains('theme-dark') ||\n",
" document.body.classList.contains('vscode-dark')) {\n",
" isDark = true;\n",
" }\n",
"\n",
" // Check theme attribute\n",
" var themeAttr = document.body.getAttribute('data-jp-theme-name');\n",
" if (themeAttr && themeAttr.includes('dark')) {\n",
" isDark = true;\n",
" }\n",
"\n",
" // Check computed background color\n",
" var notebookEl = document.querySelector('.jp-Notebook') || \n",
" document.querySelector('.notebook_app') ||\n",
" document.body;\n",
" if (notebookEl) {\n",
" var bgColor = window.getComputedStyle(notebookEl).backgroundColor;\n",
" var rgb = bgColor.match(/\\d+/g);\n",
" if (rgb && rgb.length >= 3) {\n",
" var brightness = (parseInt(rgb[0]) + parseInt(rgb[1]) + parseInt(rgb[2])) / 3;\n",
" if (brightness < 128) {\n",
" isDark = true;\n",
" }\n",
" }\n",
" }\n",
"\n",
" // Store result\n",
" if (typeof IPython !== 'undefined' && IPython.notebook && IPython.notebook.kernel) {\n",
" IPython.notebook.kernel.execute('_jupyter_dark_detect_result = ' + isDark);\n",
" }\n",
" })();\n",
" "
],
"text/plain": [
""
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"application/javascript": [
"\n",
" if (typeof IPython !== 'undefined' && IPython.notebook) {\n",
" IPython.notebook.kernel.execute(\"_jupyter_dark_detect_result = \" + \n",
" (document.body.classList.contains('theme-dark') || \n",
" document.body.classList.contains('jp-mod-dark') ||\n",
" (document.body.getAttribute('data-jp-theme-name') && \n",
" document.body.getAttribute('data-jp-theme-name').includes('dark'))));\n",
" }\n",
" "
],
"text/plain": [
""
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/html": [
"\n",
"\n",
" \n",
" \n",
" | | \n",
" metric | \n",
" value | \n",
"
\n",
" \n",
" \n",
" \n",
" | 1 | \n",
" Goodness-of-fit (reduced χ²) | \n",
" 4.56 | \n",
"
\n",
" \n",
"
\n"
],
"text/plain": [
""
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"project.summary.show_report()"
]
}
],
"metadata": {
"jupytext": {
"cell_metadata_filter": "-all",
"main_language": "python",
"notebook_metadata_filter": "-all"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.13.11"
}
},
"nbformat": 4,
"nbformat_minor": 5
}