Skip to content

Particle Statistics: AdStat integration, ingress/export, opt-in ordering, docs#44

Merged
jacobson30-bot merged 2 commits into
mainfrom
feature/particle-statistics-adstat
Jun 24, 2026
Merged

Particle Statistics: AdStat integration, ingress/export, opt-in ordering, docs#44
jacobson30-bot merged 2 commits into
mainfrom
feature/particle-statistics-adstat

Conversation

@jacobson30-bot

Copy link
Copy Markdown
Contributor

Brings the Particle Statistics tool (AdStat-powered) to a committable, well-tested state.

Highlights

  • Backend / correctness (adstat_adapter.py): density-aware nearest-neighbour scale; warn on heterogeneous pooled regions; hardened sandbox-preview reach into an AdStat internal.
  • Data ingress → one shared, poolable feature-set store: app-level FeatureSetStore shared 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-strands feature_counting_to_particle_table and FeatureSetStore.load/save.
  • Result export: per-statistic curve CSVs + verdicts CSV + full JSON via a top Export menu.
  • Opt-in local-order statistics (ψ4/ψ6, angular g(r,θ)) — 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; fixed exit/landing leaving the dialog behind Browse.
  • Definitions: a Particle Statistics tab in the shared ProbeFlow Definitions document — a rigorous, defensible reference (null models, statistics, the ERL envelope test, honest caveats); the dialog's Definitions menu opens it. Removed the isolated in-dialog tab.
  • Tidy: removed the redundant standalone AdStat sandbox dialog; pointed the Model simulations command at the sandbox mode; documented the mode vocabulary; docs + an honest maturity note throughout.

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

  • Single comprehensive commit; it bundles the pre-existing (previously uncommitted) AdStat adapter work with this round, since they interleave across shared files.
  • Particle Statistics is the newest, least user-tested area — the docs and in-app reference say so. A real visual pass over the new tutorial drawer and Definitions tab is still worth doing.

🤖 Generated with Claude Code

jacobson30-bot and others added 2 commits June 24, 2026 11:31
…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>
@jacobson30-bot jacobson30-bot merged commit f0262cc into main Jun 24, 2026
3 checks passed
@jacobson30-bot jacobson30-bot deleted the feature/particle-statistics-adstat branch June 24, 2026 02:03
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.

1 participant