Tutorial Notebooks
The examples/ directory in the repository contains seven runnable Jupyter notebooks,
numbered 01-07 in the order we’d suggest reading them. Each one is self-contained
(states its own imports and mock data) and ends with a “Next steps” pointer to the notebooks
that naturally follow it, so you can also jump straight to whichever topic matches your own
project.
Note
These pages are static documentation and do not execute the notebooks inline. Follow a link below to view (or download and run) the notebook on GitHub.
# |
Notebook |
What it covers |
Read this if… |
|---|---|---|---|
01 |
A full binned model and a full unbinned model, end to end, with real output. The runnable counterpart to Quick Start Guide. |
Start here. This is the on-ramp for a brand-new project – copy whichever of the two models matches your data. |
|
02 |
Scaling |
Your model has more than 2-3 free parameters. |
|
03 |
Passing arbitrarily-shaped, even non-contiguous (e.g. transposed), N-D binned |
Your histogram isn’t a plain 1D array, or you build it with a different axis order than PyFC expects. |
|
04 |
The |
You need to speed up a 2D scan, polish a plot, or your MC templates have limited statistics. |
|
05 |
Benchmarking |
You’re choosing an optimizer strategy, or you want a publication-quality figure beyond PyFC’s built-in plot. |
|
06 |
Reproducing and fixing the flat-gradient optimizer trap that comes from a joint (non-box) constraint like a simplex (\(f_e + f_\mu \leq 1\)), using |
Two or more of your parameters are linked by an inequality that a per-parameter |
|
07 |
A genuinely-running |
You’re running on a preemptible/walltime-limited cluster, or just want to see the checkpointing “Salient Feature” actually happen. |
01-03 build on each other and are worth reading in order for a first project;
04-07 are independent, narrower deep-dives you can read in any order once you need
that specific capability.
See Quick Start Guide for the non-notebook version of the basic workflow, and
Handling Joint/Simplex-Constrained Parameters for the reference documentation that notebook 06 walks
through hands-on.