Particle Statistics: AdStat integration, ingress/export, opt-in ordering, docs#44
Merged
Merged
Conversation
…ing, docs Bring the Particle Statistics tool to a committable state on top of the existing AdStat adapter work. Backend / correctness (probeflow/analysis/adstat_adapter.py): - Density-aware nearest-neighbour scale so sparse fields aren't clipped. - Warn when pooled images span very different region areas / pixel sizes. - Harden the sandbox-preview reach into an AdStat internal. Data ingress -> one shared, poolable feature-set store: - App-level FeatureSetStore shared by image viewers and Feature Counting. - Feature Counting "Send to Particle Statistics" (routes through the adapter). - "Load points from disk..." importer (point_table_io) for CSV position tables and ProbeFlow JSON, with a prefilled calibration dialog; plus "Save feature sets...". Un-strands feature_counting_to_particle_table and FeatureSetStore.load/save. Result export (measurements/adstat_export.py): per-statistic curve CSVs + verdicts CSV + full JSON, via a top Export menu. Local-order statistics (psi4/psi6, angular g(r,theta)) are now opt-in (off by default) with a known-answer validation suite proving they reject true lattices while random data stays consistent. Tutorial drawer redesign: 3-panel Previous | current lesson | Next navigation that never dead-ends; fix exit/landing leaving the dialog behind Browse. Definitions: a Particle Statistics tab in the shared ProbeFlow Definitions document with a rigorous, defensible reference (null models, statistics, the ERL envelope test, and honest caveats); the dialog's Definitions menu opens it. Removed the isolated in-dialog definitions tab. Tidy: removed the redundant standalone AdStat sandbox dialog; pointed the "Model simulations" command at the sandbox mode; documented the mode vocabulary. Docs and an honest maturity note throughout. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
CI runs the main pytest step without the optional AdStat extra installed.
test_adstat_export and test_adstat_validation called the adapter directly
(ImportError instead of skipping), and one workbench-dialog export test built
a real view spec without guarding. Add pytest.importorskip("adstat") to the
two modules and that one test, matching test_adstat_adapter.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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.
Brings the Particle Statistics tool (AdStat-powered) to a committable, well-tested state.
Highlights
adstat_adapter.py): density-aware nearest-neighbour scale; warn on heterogeneous pooled regions; hardened sandbox-preview reach into an AdStat internal.FeatureSetStoreshared by image viewers + Feature Counting; Feature Counting Send to Particle Statistics; Load points from disk… importer (CSV position tables + ProbeFlow JSON) with a prefilled calibration dialog; Save feature sets…. Un-strandsfeature_counting_to_particle_tableandFeatureSetStore.load/save.Testing
Full repo suite green with a Qt-enabled offscreen environment: 2604 passed, 3 skipped, ruff clean. New GUI-free suites:
test_point_table_io,test_adstat_export,test_adstat_validation.Notes
🤖 Generated with Claude Code