Repository navigation
feat(v0.3.0): multi-scan gap closing, lazy HDF5 streaming, 4D HTML explorer, ImageD11/NeXus exports, and DINOv2 benchmarks - #18
Merged
Conversation
…plorer, ImageD11/NeXus exports, and DINOv2 benchmarks
jameslehoux
changed the base branch from
feat/v0.2-fracture-tracking-and-pipeline
to
main
November 17, 2026 22:11
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.
Summary
Stacked on #17 (
feat/v0.2-fracture-tracking-and-pipeline), BraggTrackv0.3.0adds beamline-scale lazy HDF5 streaming, multi-scan beam-dropout gap closing, crystallographic scattering geometry +ImageD11/ NeXusNXprocessexports, a publication visualization & zero-CDN interactive 4D HTML explorer (braggtrack.viz+braggtrack-report), and a reproducible 5-scenario benchmark suite + ESRF-ID03 case study with real pretrainedfacebook/dinov2-small.Phase 1 — Beamline Scale, Gap-Closing & Crystallographic Interoperability
braggtrack.tracking.gap_closing):GapClosingConfig,GapCloseRecord, andresolve_track_gapswith diffusive displacement scaling (--max-gapacrosstrack_dataset,detect_events, andrun_pipeline).braggtrack.io.lazy): Context-managedLazyVolume(open_lazy_volume,read_roi,iter_z_chunks) and exact two-passotsu_threshold_chunkedwired into Pass-1 cross-scan Otsu smoothing and ROI spot cropping.braggtrack.io.crystallography,braggtrack.io.export):DetectorGeometry(spot_to_scattering,annotate_crystallographic_columns) computingImageD11.fltexport/round-trip parsing (export_imaged11_flt,read_imaged11_flt), and NeXusNXprocessHDF5 archival (export_nexus_process).Phase 2 — Publication Visualization & Offline Interactive HTML 4D Explorer
braggtrack.viz&braggtrack-report(9th CLI):plot_spot_mip_card,plot_scan_projection_overlay,plot_lineage_dag,plot_kinematics_dashboard,plot_precursor_timeline, and zero-CDN offlinegenerate_html_report(report.htmlwith stdlib-encoded base64 MIP strips, pan/zoom SVG Lineage DAG, filter pills, and synchronized grain inspector), plus--reportonbraggtrack-run.Phase 3 — Pretrained
facebook/dinov2-smallBenchmarks & ESRF-ID03 Case Studyscripts/benchmark_suite.py,docs/benchmarks.md):crossing_morphology: Pretrainedfacebook/dinov2-smalleliminates the25.0%Geometry-Only ID-switch failure (0.0%ID-switch rate,0.9035cosine stability).intensity_jitter&mosaic_broadening: Maintains0.9908and0.9899cosine stability vs~0.00random hash decorrelation.beam_dropout_gap2: Recovers100%of staggered dropouts (0.0%fragmentation,2.0gap closures) whereMockDinoEncoder(cos = 0.0048) fails cosine gating (50%fragmentation).chemomechanical_fracture:1.001 -> 2split recall,1.002 -> 1merge recall, and1.00top-1 precursor precision (+0.56contrast above isotropic controls).facebook/dinov2-smallCPU run completes in55.17 s, identifying21 -> 2split candidates (Track 6 -> 32;34, cos0.7561;Track 21 -> 36;44, cos0.6837) and4persistent precursor candidates led byTrack 14(persistence=3,peak_score=0.8789).dino_segment.py,dino.py): Fixed resized ViT16x16patch-grid alignment on non-multiple slice shapes (e.g.250x250 -> 224x224) and honoredBRAGGTRACK_DINO_BACKENDwhenbackend="auto".Phase 4 — JOSS Paper Figures, Metadata Sync & 9th CI Gate
docs/figures/benchmark_comparison.png,docs/figures/fracture_lineage_and_precursors.png) inpaper.md&README.md; fixed@Finegan2017and added@Jaqaman2008inpaper.bib; syncedCITATION.cff,CONTRIBUTING.md,docs/architecture.md, andCHANGELOG.mdto0.3.0.scripts/check_report_and_export_acceptance.py) intoscripts/ci_report.py.Verification
ruff check braggtrack/ tests/ scripts/&ruff format --check braggtrack/ tests/ scripts/— cleanpython scripts/pre_pr_check.py— passedBRAGGTRACK_DINO_BACKEND=mock python scripts/ci_report.py—229unit tests + all9acceptance gatesPASS(overall=PASS)jupyter nbconvert --to notebook --execute— bothbraggtrack_demo.ipynbanddino_segmentation_comparison.ipynbexecuted cleanly