Conversation
mkuehbach
requested changes
Mar 16, 2026
Collaborator
mkuehbach
left a comment
There was a problem hiding this comment.
Good body of work and useful a deep tutorial.
The workshop branch of the nexus definitions adds NXsimple, used as the tutorial target for the pynxtools reader workshop.
Step-by-step tutorial for participants to implement a MultiFormatReader from scratch using NXsimple and mock data files. Covers: - Setup with the workshop plugin template - HDF5 and YAML data exploration - 5 reader method exercises (handle_hdf5_file, handle_eln_file, get_attr, get_eln_data, get_data), each with ??? collapsible solution - Config file mapping exercise with full solution - Running the converter and inspecting output Also adds tutorial/build-a-reader.md to mkdocs.yaml nav and extends cspell dictionary with the example reader name.
Day 1 (build-a-reader.md): - Add architecture flow diagram at the top - Explicit ~time estimates per section - Part 0: explain NeXus purpose before any code - Part 1: data exploration with expected output shown - Each exercise: goal, steps, check-your-work snippet, solution - Checkpoint section after callbacks (Ex 3–5) with runnable test - Part 8: running tests with the test framework - Bonus exercises: post_process, second format, plot output - Troubleshooting table with 8 common errors - Summary table mapping each step to its key concept Day 2 (bring-your-own-data.md): - Rewritten for diverse data formats - Format detective script for unknown files - Format coverage: HDF5, CSV/TSV, VAMAS, SpecsLab XML, SpecsLab SQLite, Igor Pro IBW, Scienta TXT, NetCDF, TIFF/detector images, JSON/YAML, arbitrary binary (fallback pattern) - Adapter pattern: always flatten to self.data dict, rest is identical - Multiple entries / spectra per file - Unit conversion in callbacks - Derived quantities in post_process - Writing a minimal NXDL appdef when none exists - 9-point checklist before leaving - Comprehensive error/fix table mkdocs.yaml: Workshop subsection under Tutorials with both days cspell: 20 new words added
Co-authored-by: Markus Kühbach <mkuehbach@users.noreply.github.com>
Co-authored-by: Markus Kühbach <mkuehbach@users.noreply.github.com>
Co-authored-by: Markus Kühbach <mkuehbach@users.noreply.github.com>
Co-authored-by: Markus Kühbach <mkuehbach@users.noreply.github.com>
mkuehbach
approved these changes
Mar 17, 2026
Collaborator
|
height and material in NXslit not found but that can be added also later in a consolidation feature branch where add definitions for all those concepts for which there is currently neither an explicit nor an inherited docstring. |
Collaborator
|
Go ahead merging this @lukaspie but check if updating with master is required. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is in preparation for the datathon at BESSY II on March 23/24.
Adds:
NXdouble_slitNXdouble_slitas well, but aimed at more experienced userspynxtools-plugin-template(Part 1)