Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
87aed74
Create and use load_numeric_block method in io/ascii.py
AndrewSazonov Mar 27, 2026
e50a687
Disable some rules for docs/
AndrewSazonov Mar 27, 2026
9573a56
Initial implementation of the new tutorial
AndrewSazonov Mar 27, 2026
d9e59d3
Add add_from_zip_path to Experiments collection
AndrewSazonov Mar 27, 2026
a7f0a10
Update data index hash
AndrewSazonov Mar 27, 2026
04699af
Use data from web repo
AndrewSazonov Mar 27, 2026
a6ea62f
Use another dataset
AndrewSazonov Mar 27, 2026
0e73369
Save project after every fit
AndrewSazonov Mar 27, 2026
171215f
Clean up
AndrewSazonov Mar 29, 2026
57e0b9f
Initial implementation of plotting parameter evolution
AndrewSazonov Mar 29, 2026
49d1cbe
Replace conditions category with diffrn using CIF naming
AndrewSazonov Mar 29, 2026
67739c0
Simplify extract_metadata API and make data loading explicit
AndrewSazonov Mar 30, 2026
13c6357
Fix fit_results to store snapshot parameters per experiment
AndrewSazonov Mar 30, 2026
8d27965
Clean up tutorial ed-17.py duplicate plot_param calls
AndrewSazonov Mar 30, 2026
323531c
Fix test to use save_as() matching current ProjectInfo.path default
AndrewSazonov Mar 30, 2026
752a12e
Add integer index support to CollectionBase.__getitem__
AndrewSazonov Mar 30, 2026
33d3714
Rename plot_param to plot_param_series with versus descriptor
AndrewSazonov Mar 30, 2026
8927fdf
Clean up tutorial
AndrewSazonov Mar 30, 2026
f31a6ab
Update docs with new notebook
AndrewSazonov Mar 30, 2026
e929afa
Simplify constraints API to single expression string
AndrewSazonov Mar 30, 2026
451c685
Fix docstring lint errors in CollectionBase.__getitem__
AndrewSazonov Mar 30, 2026
45d99f3
New dataset and update tutorials
AndrewSazonov Mar 30, 2026
94f32ec
Update T-scan notebook
AndrewSazonov Mar 30, 2026
36a6d25
Fix Windows CI UnicodeDecodeError in script test runner
AndrewSazonov Mar 30, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .github/copilot-instructions.md
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,13 @@
case.
- Don't add dependencies without asking.

## Tutorials

- Jupyter notebooks (`docs/docs/tutorials/*.ipynb`) are **generated
artifacts** — never edit them by hand. Edit only the corresponding
`*.py` script, then run `pixi run notebook-convert` followed by
`pixi run notebook-prepare` to regenerate the notebook.

## Changes

- Before implementing any structural or design change (new categories,
Expand Down
6 changes: 6 additions & 0 deletions docs/architecture/architecture.md
Original file line number Diff line number Diff line change
Expand Up @@ -727,6 +727,12 @@ project_dir/

All examples below are drawn from the actual tutorials (`tutorials/`).

> **Notebook workflow:** Jupyter notebooks (`*.ipynb`) in
> `docs/docs/tutorials/` are generated artifacts. Edit only the
> corresponding `*.py` script, then run `pixi run notebook-convert`
> followed by `pixi run notebook-prepare` to regenerate the notebook.
> Never edit `*.ipynb` files by hand.

### 8.1 Project Setup

```python
Expand Down
18 changes: 9 additions & 9 deletions docs/docs/tutorials/ed-13.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -396,7 +396,7 @@
"TOF, respectively.\n",
"\n",
"You can set them manually, but it is more convenient to use the\n",
"`get_value_from_xye_header` function from the EasyDiffraction library."
"`extract_metadata` function from the EasyDiffraction library."
]
},
{
Expand All @@ -420,11 +420,11 @@
"metadata": {},
"outputs": [],
"source": [
"project_1.experiments['sim_si'].instrument.setup_twotheta_bank = ed.get_value_from_xye_header(\n",
" si_xye_path, 'two_theta'\n",
"project_1.experiments['sim_si'].instrument.setup_twotheta_bank = ed.extract_metadata(\n",
" si_xye_path, r'two_theta\\s*=\\s*([-+]?\\d*\\.?\\d+(?:[eE][-+]?\\d+)?)'\n",
")\n",
"project_1.experiments['sim_si'].instrument.calib_d_to_tof_linear = ed.get_value_from_xye_header(\n",
" si_xye_path, 'DIFC'\n",
"project_1.experiments['sim_si'].instrument.calib_d_to_tof_linear = ed.extract_metadata(\n",
" si_xye_path, r'DIFC\\s*=\\s*([-+]?\\d*\\.?\\d+(?:[eE][-+]?\\d+)?)'\n",
")"
]
},
Expand Down Expand Up @@ -1485,11 +1485,11 @@
},
"outputs": [],
"source": [
"project_2.experiments['sim_lbco'].instrument.setup_twotheta_bank = ed.get_value_from_xye_header(\n",
" lbco_xye_path, 'two_theta'\n",
"project_2.experiments['sim_lbco'].instrument.setup_twotheta_bank = ed.extract_metadata(\n",
" lbco_xye_path, r'two_theta\\s*=\\s*([-+]?\\d*\\.?\\d+(?:[eE][-+]?\\d+)?)'\n",
")\n",
"project_2.experiments['sim_lbco'].instrument.calib_d_to_tof_linear = ed.get_value_from_xye_header(\n",
" lbco_xye_path, 'DIFC'\n",
"project_2.experiments['sim_lbco'].instrument.calib_d_to_tof_linear = ed.extract_metadata(\n",
" lbco_xye_path, r'DIFC\\s*=\\s*([-+]?\\d*\\.?\\d+(?:[eE][-+]?\\d+)?)'\n",
")"
]
},
Expand Down
18 changes: 9 additions & 9 deletions docs/docs/tutorials/ed-13.py
Original file line number Diff line number Diff line change
Expand Up @@ -212,19 +212,19 @@
# TOF, respectively.
#
# You can set them manually, but it is more convenient to use the
# `get_value_from_xye_header` function from the EasyDiffraction library.
# `extract_metadata` function from the EasyDiffraction library.

# %% [markdown] tags=["doc-link"]
# 📖 See
# [documentation](https://docs.easydiffraction.org/lib/user-guide/analysis-workflow/experiment/#instrument-category)
# for more details about the instrument parameters.

# %%
project_1.experiments['sim_si'].instrument.setup_twotheta_bank = ed.get_value_from_xye_header(
si_xye_path, 'two_theta'
project_1.experiments['sim_si'].instrument.setup_twotheta_bank = ed.extract_metadata(
si_xye_path, r'two_theta\s*=\s*([-+]?\d*\.?\d+(?:[eE][-+]?\d+)?)'
)
project_1.experiments['sim_si'].instrument.calib_d_to_tof_linear = ed.get_value_from_xye_header(
si_xye_path, 'DIFC'
project_1.experiments['sim_si'].instrument.calib_d_to_tof_linear = ed.extract_metadata(
si_xye_path, r'DIFC\s*=\s*([-+]?\d*\.?\d+(?:[eE][-+]?\d+)?)'
)

# %% [markdown]
Expand Down Expand Up @@ -804,11 +804,11 @@
# **Solution:**

# %% tags=["solution", "hide-input"]
project_2.experiments['sim_lbco'].instrument.setup_twotheta_bank = ed.get_value_from_xye_header(
lbco_xye_path, 'two_theta'
project_2.experiments['sim_lbco'].instrument.setup_twotheta_bank = ed.extract_metadata(
lbco_xye_path, r'two_theta\s*=\s*([-+]?\d*\.?\d+(?:[eE][-+]?\d+)?)'
)
project_2.experiments['sim_lbco'].instrument.calib_d_to_tof_linear = ed.get_value_from_xye_header(
lbco_xye_path, 'DIFC'
project_2.experiments['sim_lbco'].instrument.calib_d_to_tof_linear = ed.extract_metadata(
lbco_xye_path, r'DIFC\s*=\s*([-+]?\d*\.?\d+(?:[eE][-+]?\d+)?)'
)

# %% [markdown]
Expand Down
Loading
Loading