Skip to content

Module C: exercise notebooks with holes and data files - #15

Merged
seb5g merged 2 commits into
mainfrom
exercices-module-c
Nov 18, 2026
Merged

seb5g merged 2 commits into
mainfrom
exercices-module-c

Conversation

@seb5g

@seb5g seb5g commented Nov 18, 2026

Copy link
Copy Markdown
Contributor

Summary

  • notebooks/01_data_objects.ipynb, 02_saving_loading.ipynb, 03_analysis.ipynb: the notebooks of the module C with holes ... (same names as the corrected ones in correction-module-c, which the handout cites). Imports, paths, plots and checks are given; the holes are on the PyMoDAQ steps: Axis/DataRaw, navigation and signal axes, units (Q_, units_as), slicing (vsig/isig/vnav, nav_indexes), H5SaverLowLevel/DataToExportSaver/DataLoader, curve_fit and DataWithAxes.fit, errors.
  • The holes get larger along the day: 01 starts with a minimal example written in full, then only arguments are missing; 03 asks for whole lines; it ends with an open part (drift model, three lines at once, fit as a DataCalculated, slicing a spread recording, own scan) for the fastest trainees.
  • New step in 03 compared to the corrected notebook, asked by the handout: fit the whole scan without cropping. The file scan_photodiode.h5 has one missing point (NaN at 491 nm in the 7th repetition of Scan001), so the trainees must mask it before curve_fit.
  • data/: the three measurement files of correction-module-c (identical), needed by the trainees on main. matplotlib added to the dependencies.
  • tests/test_notebooks_exercises_module_c.py: the cells with a hole are tagged exercise, every cell is valid Python, the given cells run, the data files exist. It also passes on the corrected notebooks (no exercise tag: all cells run).

Checks

  • The notebooks with the holes filled with the corrected code (generated, not committed) run headless against the data files; the open-part items were tried (drift: period 37.3, depth 0.20).
  • pytest: 33 passed, 1 skipped (PyMoDAQ 5.3.11, PyQt5, offscreen).

When main is merged again into correction-module-c, the three notebooks conflict (added on both sides): keep the corrected version.


Generated by Claude Code

The three notebooks of the module C with holes `...` on the PyMoDAQ steps (data objects, axes and
units, slicing, saving and loading, fits, errors). The holes get larger along the day: arguments
in the notebook 01, whole lines in the notebook 03, and an open part without holes at the end.
The cells with a hole are tagged `exercise`; a test checks the tags, that every cell is valid
Python and that the given cells run. The data files are the same as in correction-module-c.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RKuN833EwRkwYgUKwN8sKq
@seb5g
seb5g merged commit fec7d06 into main Nov 18, 2026
7 checks passed
@seb5g
seb5g deleted the exercices-module-c branch November 18, 2026 12:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants