Skip to content

Tomography testing - #55

Draft
tomkane-dls wants to merge 13 commits into
diodesfrom
tomography-testing
Draft

tomkane-dls wants to merge 13 commits into
diodesfrom
tomography-testing

Conversation

@tomkane-dls

@tomkane-dls tomkane-dls commented Nov 3, 2026 •

Copy link
Copy Markdown
Contributor

Frontend changes to form -> atlas

General

Spectroscopy renames (spectroscopy_plans.py, plans.py)

  • Arguments shortened: spectroscopy_detector → detector, sample_stage → stage, spectroscopy_diodes → diodes.
  • Unsupported scan types now raise ValueError.
  • sample_stage_baseline.yaml is renamed to spectroscopy_stage_baseline.yaml.

Tomography plan

  • tomography() now takes darks, then flats, then projections in a single plan. The old separate darks_flats() plan is gone.
  • before each set of images, the plan moves the sample on stage.x (H) and the two flip mirrors. The spectroscopy mirror is always flipped out. The tomography mirror is off for darks and on for flats and projections.
  • New metadata: image_key (dark, flat or projection), a shared tomography_group uuid, and darks_uid/flats_uid on the projections run.
  • Stage: now an XThetaStage instead of a plain Motor, so the scan runs over stage.theta. Keys in tomography_stage_baseline.yaml gain a theta. prefix to match the new stage.
  • LightSource: deprecated and ignored. demo_tomography still accepts it so its signature doesn't change for now.
  • Tidy-ups: the plan is split into helpers (_move_for, _collect_calibration, collect_projections, wind_back). MAKO* constants are renamed to ALVIUM*. Unsupported scan types now raise ValueError.

Tests

  • Updated for the renamed arguments.
  • New mock fixtures for the tomography detector, stage and both mirrors.
  • New test checking the darks → flats → projections order, the metadata links, and the moves before each run.
  • Detector mock now resets num_captured when a new file starts.

@codecov

codecov Bot commented Nov 3, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 81.25000% with 15 lines in your changes missing coverage. Please review.
✅ Project coverage is 78.57%. Comparing base (eace3a3) to head (fcb148f).

Files with missing lines Patch % Lines
src/test_rig_bluesky/plans.py 28.57% 10 Missing ⚠️
src/test_rig_bluesky/tomography_plans.py 91.11% 4 Missing ⚠️
src/test_rig_bluesky/spectroscopy_plans.py 95.23% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##             main      #55       +/-   ##
===========================================
+ Coverage   50.70%   78.57%   +27.86%     
===========================================
  Files           5        5               
  Lines         213      252       +39     
===========================================
+ Hits          108      198       +90     
+ Misses        105       54       -51     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@tomkane-dls
tomkane-dls changed the base branch from main to diodes November 4, 2026 14:35
@tomkane-dls
tomkane-dls changed the base branch from diodes to main November 9, 2026 13:47
@tomkane-dls
tomkane-dls changed the base branch from main to diodes November 10, 2026 15:09
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