{"id":50801151,"url":"https://github.com/deeplearnphysics/spine-npc-ddas","last_synced_at":"2026-06-12T20:01:55.096Z","repository":{"id":357241917,"uuid":"1234381889","full_name":"DeepLearnPhysics/spine-npc-ddas","owner":"DeepLearnPhysics","description":"SPINE tutorial material for the NPC DUNE Data Analysis School","archived":false,"fork":false,"pushed_at":"2026-05-12T00:54:11.000Z","size":26,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-05-12T01:28:29.428Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Jupyter Notebook","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/DeepLearnPhysics.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-05-10T05:31:50.000Z","updated_at":"2026-05-12T00:54:16.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/DeepLearnPhysics/spine-npc-ddas","commit_stats":null,"previous_names":["deeplearnphysics/spine-npc-ddas"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/DeepLearnPhysics/spine-npc-ddas","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DeepLearnPhysics%2Fspine-npc-ddas","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DeepLearnPhysics%2Fspine-npc-ddas/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DeepLearnPhysics%2Fspine-npc-ddas/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DeepLearnPhysics%2Fspine-npc-ddas/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/DeepLearnPhysics","download_url":"https://codeload.github.com/DeepLearnPhysics/spine-npc-ddas/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DeepLearnPhysics%2Fspine-npc-ddas/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34260310,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-12T02:00:06.859Z","response_time":109,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-06-12T20:01:54.046Z","updated_at":"2026-06-12T20:01:55.080Z","avatar_url":"https://github.com/DeepLearnPhysics.png","language":"Jupyter Notebook","funding_links":[],"categories":[],"sub_categories":[],"readme":"# SPINE NPC/DDAS Tutorial Materials\n\nThis is a compact tutorial sequence for a 3 hour SPINE session: a 45 minute lecture plus 2 hours and 15 minutes of hands-on work. It is distilled from `DeepLearnPhysics/spine-workshop-2026`, especially the HDF5 readback, PID, primary/vertex, and validation material, with a new production/configuration tutorial based on `DeepLearnPhysics/spine-prod`.\n\n## Runtime\n\nExpected container:\n\n```bash\nghcr.io/deeplearnphysics/spine:latest\n```\n\nThe notebooks assume reconstructed SPINE HDF5 files and companion LArCV files are available under a common tutorial directory. At FNAL/EAF the defaults are:\n\n```python\nLARCV_DATA_DIR = Path(\"/exp/dune/data/users/drielsma/npc-ddas/larcv\")\nHDF5_DATA_DIR = Path(\"/exp/dune/data/users/drielsma/npc-ddas/reco\")\nDETECTOR = \"generic\"\nSAMPLE_NAME = \"generic_test\"\n```\n\nThe expected structure is:\n\n```text\nLARCV_DATA_DIR/generic_test.root\nHDF5_DATA_DIR/DETECTOR/SAMPLE_NAME_spine.h5\n```\n\nThis is intentionally notebook-local rather than hidden in the Jupyter kernel launch script. It makes the EAF/Apptainer setup easier to inspect and lets students switch detector/tag/geometry explicitly.\n\nFull inference production is intentionally not part of the timed exercise. The agenda includes one small `spine-prod` example on `/exp/dune/data/users/drielsma/npc-ddas/larcv/generic/generic_test.root` so students see where reconstructed HDF5 files come from before the notebooks switch to object inspection and pre-produced outputs.\n\n## Recommended Agenda\n\nThe lecture slides are here: https://docs.google.com/presentation/d/1ddDAj8LcYOIF1xPD5DhmeozyJ2q7fRmwE1Bbrzekbrs/edit?usp=sharing\n\nSetup is pre-work: students should complete [`00_eaf_setup.md`](tutorials/00_eaf_setup.md) before 11:00 and arrive with the SPINE Apptainer kernel ready.\n\n| Time | Segment | Material |\n| --- | --- | --- |\n| 11:00-11:45 | Lecture | SPINE object hierarchy, DUNE use cases, performance benchmarks, production context |\n| 11:45-11:50 | One-file production | [`01_production_and_config.md`](tutorials/01_production_and_config.md) required path only |\n| 11:50-12:20 | Output inspection | [`02_read_spine_output.ipynb`](tutorials/notebooks/02_read_spine_output.ipynb) |\n| 12:20-12:30 | Spinal Tap / buffer | Open the same output visually, absorb setup drift |\n| 12:30-13:30 | Break | Lunch / reset |\n| 13:30-14:15 | Matching and validation | [`03_event_selection.ipynb`](tutorials/notebooks/03_event_selection.ipynb) |\n| 14:15-15:00 | Michel mini-analysis / closeout | [`04_analysis_selection.ipynb`](tutorials/notebooks/04_analysis_selection.ipynb) |\n\nThis keeps the lecture inside the first 90 minute block and leaves 2 hours and 15 minutes for hands-on work. `00_eaf_setup.md` is pre-work, not a live agenda item. If the session runs long, drop or sharply compress Notebook 3 first, then use Notebook 4 as the analysis-oriented closeout. Threshold scans, Spinal Tap galleries, and deeper `spine-prod` configuration details are offline work.\n\n## Material Scope\n\n0. [`00_eaf_setup.md`](tutorials/00_eaf_setup.md)\n   Pre-session EAF login, SPINE Apptainer Jupyter kernel setup, import check, shared tutorial data layout, and optional Spinal Tap setup.\n\n1. [`01_production_and_config.md`](tutorials/01_production_and_config.md)\n   Run one `spine-prod` example from the pre-installed EAF checkout at `/exp/dune/app/users/drielsma/spine-prod` on `/exp/dune/data/users/drielsma/npc-ddas/larcv/generic/generic_test.root`. EAF GPU requests, NERSC execution, and `spine.config` composition are optional reference sections.\n\n2. [`02_read_spine_output.ipynb`](tutorials/notebooks/02_read_spine_output.ipynb)\n   Opens a reconstructed HDF5 file with `spine.driver.Driver`, inspects `RecoParticle`, `TruthParticle`, `RecoInteraction`, and `TruthInteraction` objects, and builds small tables of object fields.\n\n3. [`03_event_selection.ipynb`](tutorials/notebooks/03_event_selection.ipynb)\n   Uses SPINE truth-matching products to study the ingredients of neutrino event selection by building PID and primary-ID confusion matrices plus a vertex-resolution diagnostic for a small number of entries.\n\n4. [`04_analysis_selection.ipynb`](tutorials/notebooks/04_analysis_selection.ipynb)\n   Builds a detector-agnostic Michel-electron candidate table from reconstructed particles using semantic shape, interaction membership, closest-track attachment, and truth matching when available.\n\n## Source Material Reused\n\n- `spine-workshop-2026/basics/inference/Inference_storage.ipynb`\n- `spine-workshop-2026/reconstruction/michel/michel.ipynb`\n- `spine-workshop-2026/reconstruction/PID/ParticleIdentification.ipynb`\n- `spine-workshop-2026/reconstruction/vertex/Primary_and_Vertex.ipynb`\n- `spine-prod/README.md`\n- `spine-prod/QUICKREF.md`\n- `spine-prod/config/infer/*`\n- SPINE config documentation from the packaged/runtime SPINE release\n\nThe original workshop covers a week of material. This sequence deliberately leaves out training, detailed calorimetry, shower dE/dx, and full-chain inference so the session stays focused on reading and using SPINE analysis objects.\n\n## Live vs Offline Work\n\nEach notebook contains short live exercises that can be solved together in a few minutes. Longer adjacent-project prompts are explicitly marked as offline extensions. The intended live goal is competence with object inspection, simple selections, event-display debugging, and production config literacy, not statistical closure on reconstruction performance.\n\nFor an instructor-facing list of prompts, see [`EXERCISES.md`](tutorials/EXERCISES.md).\n\n## API Exploration\n\nWhen a class, field, or helper is unfamiliar, use:\n\n- the SPINE API browser: https://spine.readthedocs.io\n- Python introspection: `help(obj)`, `dir(obj)`, `obj.as_dict().keys()`\n- production examples in `spine-prod/config/infer`\n\nThe notebooks intentionally include cells that are worth reading line by line. The intended teaching style is interactive: predict what one line does, run it, inspect the object/table it returns, then decide what analysis question it enables.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdeeplearnphysics%2Fspine-npc-ddas","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdeeplearnphysics%2Fspine-npc-ddas","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdeeplearnphysics%2Fspine-npc-ddas/lists"}