Skip to content

Module C notebooks: DataLoader as a context manager, Continuous Save button - #19

Merged
seb5g merged 3 commits into
mainfrom
dataloader-with-module-c
Nov 18, 2026
Merged

seb5g merged 3 commits into
mainfrom
dataloader-with-module-c

Conversation

@seb5g

@seb5g seb5g commented Nov 18, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • notebooks/02_saving_loading.ipynb, 03_analysis.ipynb: DataLoader is used as a context manager (with DataLoader(path) as loader:, __enter__/__exit__ of DataLoader close the file), no more loader.close_file(). The holes follow the same shape, for instance with ... as loader: # (hint: DataLoader ...; the file is closed at the end of the block).
  • 02_saving_loading.ipynb, part 3: the recording of the DAQ_Viewer is made with the Continuous Save button of its toolbar (no do_save setting any more).
  • DataWithAxes.mean_with_errors(0) replaces the hand-made std(axis=0, ddof=1) in 02 (part 4) and 03 (parts 6 and 9): the standard error of the mean goes directly in errors.
  • The corrected notebooks of correction-module-c get the same cells, filled.

Checks

  • Every cell of the corrected notebooks runs offscreen (PyQt5, PyMoDAQ 5.3.11).
  • pytest tests/test_notebooks_exercises_module_c.py: 10 passed.

Generated by Claude Code

…Save button

DataLoader closes the file when leaving the with block, so the notebooks no longer call
close_file by hand. The recording of the DAQ_Viewer is made with the Continuous Save button of
its toolbar (there is no do_save setting to tick any more).

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RKuN833EwRkwYgUKwN8sKq
seb5g pushed a commit that referenced this pull request Nov 18, 2026
… Continuous Save button

Same cells as the notebooks with holes of main (PR #19), filled.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RKuN833EwRkwYgUKwN8sKq
@seb5g
seb5g merged commit 4ac2d1a into main Nov 18, 2026
7 checks passed
@seb5g
seb5g deleted the dataloader-with-module-c branch November 18, 2026 13:04
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