Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
1f4c377
docs(tutorials): add maths tutorial
markbujehein Oct 13, 2026
cf2435b
docs(tutorials): split maths tutorial into topic notebooks (trial)
markbujehein Oct 13, 2026
b7df48d
chore(math): delete old tutorial notebook
markbujehein Oct 13, 2026
25af4b1
docs(tutorials): run exercise solutions and show their real output
claude Oct 13, 2026
ff80c0d
test(tutorials): cover the maths and fitting tutorial notebooks
claude Oct 13, 2026
4ab50a4
docs(tutorials): make uncertainties consistent and add an error vs un…
markbujehein Oct 13, 2026
d27ca99
docs(tutorials): style hints and solutions as Material admonitions
markbujehein Oct 13, 2026
57f2853
fix(docs): linting
markbujehein Oct 13, 2026
708102f
fix: clear nb outputs
markbujehein Oct 13, 2026
12969c1
docs(tutorials): add error propagation and correlation notebooks
claude Oct 13, 2026
083de31
docs(tutorials): clear stored execution state from the maths notebooks
claude Oct 14, 2026
124720f
docs(tutorials): show limits of operator error propagation in the exa…
markbujehein Oct 14, 2026
890921e
docs(tutorials): use plain wording in the error propagation printouts
markbujehein Oct 14, 2026
2ae7987
docs(tutorials): group the fitting tutorials and add updated fitting …
markbujehein Oct 14, 2026
0ad566d
docs: add an introduction example, an audience signpost and a concept…
markbujehein Oct 14, 2026
a08fff7
test(tutorials): warn when a navigation group has no hub page
markbujehein Oct 14, 2026
5f86911
docs(tutorials): use precise wording on uncertainty and move the fitt…
markbujehein Oct 14, 2026
06c6a75
docs(tutorials): refine the fitting notebooks
markbujehein Oct 14, 2026
03504de
docs(tutorials): call theta the Bragg angle and state that constants …
markbujehein Oct 14, 2026
d8c42f8
docs: link the tutorial categories and point between the Bayesian not…
markbujehein Oct 14, 2026
fb4dc5e
docs: linting
markbujehein Oct 14, 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
8 changes: 4 additions & 4 deletions docs/docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ Here is a brief overview of the main documentation sections:
– Guides users through system requirements, environment configuration,
and the installation process.
- [:material-book-open-variant: User Guide](user-guide/index.md) –
Covers core concepts, key terminology, workflow steps, and essential
parameters for effective use of EasyScience.
Explains the core concepts of EasyScience and how to control its log
output.
- [:material-school: Tutorials](tutorials/index.md) – Offers practical,
step-by-step examples demonstrating common workflows and data analysis
tasks.
step-by-step examples, from the basics of working with parameters and
maths functions to common workflows and data analysis tasks.
- [:material-code-braces-box: API Reference](api-reference/index.md) –
An auto-generated reference detailing the available functions and
modules in EasyScience.
47 changes: 47 additions & 0 deletions docs/docs/introduction/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,53 @@ making data analysis easier.
[EasyScience framework](https://easyscience.org).
-->

## Who is it for

**EasyScience** is the foundation for scientific libraries and
applications. It is for developers who build on its numbers, which carry
a **unit**, an **uncertainty** and **bounds**, and for scientists who
use them directly to analyse data. It provides:

- numbers (`Parameter`, `DescriptorNumber`) that know their unit,
uncertainty and bounds, with arithmetic and mathematical functions
that carry all three along,
- fitting of a model to data with several minimizers, and Bayesian
sampling of the posterior.

## A first example

Bragg's law gives the lattice spacing from a wavelength and the Bragg
angle. Each number has an uncertainty, and the result has one too:

```python
import easyscience as es
from easyscience import DescriptorNumber

wavelength = DescriptorNumber(name='wavelength', value=1.54, unit='angstrom', variance=0.01**2)
angle = DescriptorNumber(name='angle', value=22.5, unit='deg', variance=0.1**2)

d = wavelength / (2 * es.math.sin(angle))
d.convert_unit('nm')
print(f'd = {d.value:.4f} ± {d.error:.4f} {d.unit}')
```

```text
d = 0.2012 ± 0.0016 nm
```

## Where to start

- **New to EasyScience?** Follow the
[Installation & Setup](../installation-and-setup/index.md), then the
[Basics](../tutorials/basics/index.md) tutorials.
- **Want to fit data?** Continue with the
[Fitting](../tutorials/fitting/index.md) tutorials.
- **Building on EasyScience?** Read the
[Concepts](../user-guide/concepts.md) and the
[API Reference](../api-reference/index.md).
- **Following a workshop?** See
[Workshops & Schools](../tutorials/workshops/index.md).

## License

**EasyScience** library is released under the
Expand Down
16 changes: 16 additions & 0 deletions docs/docs/tutorials/advanced/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
---
icon: material/tune-vertical
---

# :material-tune-vertical: Advanced Topics

These notebooks go beyond a single least-squares fit. They assume that
you are familiar with the [Fitting](../fitting/index.md) notebooks.

- [Bayesian analysis](../fitting-bayesian.ipynb) – Run Bayesian MCMC
sampling on a model with EasyScience to obtain full posterior
distributions for the parameters. For derived quantities from the
posterior, see [Bayesian QENS](../fitting/bayesian-qens.ipynb).
- [Progress Callback](../progress-callback.ipynb) – Monitor fitting
progress across minimizer backends and update a notebook interface
while a fit is running.
59 changes: 59 additions & 0 deletions docs/docs/tutorials/basics/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
---
icon: material/calculator-variant
---

# :material-calculator-variant: Basics

These short notebooks show how to work with EasyScience numbers: values
that carry a **unit**, an **uncertainty** and, for fit parameters,
**bounds**. You need Python and a little NumPy; no earlier knowledge of
EasyScience is required.

Every notebook stands alone, so you can read them in any order. If you
are new, follow the path below.

## A suggested path

**1. Numbers with units and uncertainties**

- [Arithmetic](maths-arithmetic.ipynb) – Add, subtract, multiply and
divide numbers with units, uncertainties and bounds, and see how each
of them carries over to the result. _Start here._

**2. Functions**

Read the ones you need; each stands alone.

- [Exponential and logarithm](maths-exp-log.ipynb) – `exp`, `log`,
`log10`, `sqrt` and the error functions `erf` and `erfc`.
- [Trigonometric functions](maths-trigonometric.ipynb) – `sin`, `cos`,
`tan` and `sinc`, with Bragg's law as the running example.
- [Inverse trigonometric functions](maths-inverse-trigonometric.ipynb) –
`arcsin`, `arccos`, `arctan` and `arctan2`, and the values they
refuse.
- [Hyperbolic functions](maths-hyperbolic.ipynb) – `sinh`, `cosh`,
`tanh` and their inverses.

**3. Trusting a result**

- [Error propagation](maths-error-propagation.ipynb) – How the choice of
formula changes the uncertainty of a result, with the area of a table
as the running example. _A step further._
- [Correlation](maths-correlation.ipynb) – Correlated measurements and
fit parameters, and what ignoring the correlation costs. _A step
further._

When you are comfortable with these, continue with the
[Fitting introduction](../fitting/fitting-intro.ipynb), which uses the
same numbers on the result of a fit.

## How the notebooks work

- Each part ends with a few **exercises**. The hints and the solution
are folded away and open on a click, so you can read straight through
or try each exercise first.
- A solution is a worked answer: its code runs and the result is shown.
- The charts are interactive, and they need an internet connection to
load.
- Each notebook can be downloaded and run on your computer; see
[how to run the tutorials](../../installation-and-setup/index.md#how-to-run-tutorials).
Loading
Loading