Skip to content

Fix/fast axis#818

Draft
wakonig wants to merge 4 commits into
mainfrom
fix/fast_axis
Draft

Fix/fast axis#818
wakonig wants to merge 4 commits into
mainfrom
fix/fast_axis

Conversation

@wakonig
Copy link
Copy Markdown
Member

@wakonig wakonig commented Apr 14, 2026

This PR fixes inconsistencies in BEC where the fast axis was not always the inner axis. Moreover, the trajectory optimization simply ignored the convention.

@wakonig wakonig force-pushed the fix/fast_axis branch 2 times, most recently from 3216ce4 to 570d892 Compare April 27, 2026 14:51
@wakonig wakonig marked this pull request as ready for review April 27, 2026 14:52
Copilot AI review requested due to automatic review settings April 27, 2026 14:52
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR standardizes the “fast axis is the inner axis” convention across scans and updates corridor trajectory optimization so it no longer ignores that convention, adding regression coverage to lock in the intended ordering/direction behavior.

Changes:

  • Update corridor optimization to use fast_axis, first_corridor_direction, and snaked to control ordering and traversal direction.
  • Adapt scan components (and Fermat/hex scans) to pass the new corridor-optimization parameters consistently with the fast-axis convention.
  • Add/adjust tests to verify fast-axis ordering and corridor snaking/direction behavior.

Reviewed changes

Copilot reviewed 10 out of 10 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
bec_server/bec_server/scan_server/path_optimization.py Refactors corridor optimizer API/logic to be fast-axis driven and adds Direction enum support.
bec_server/bec_server/scan_server/scans/scan_components.py Updates optimize_trajectory() corridor dispatch to the new corridor optimizer API.
bec_server/bec_server/scan_server/scans/position_generators.py Adjusts hex grid generation semantics to treat axis1 as the fast axis.
bec_server/bec_server/scan_server/scans/legacy_scans.py Aligns legacy corridor optimization call sites and hex grid docs/axis semantics; introduces first_direction on legacy Fermat scan.
bec_server/bec_server/scan_server/scans/fermat_scan.py Applies trajectory optimization in v4 Fermat scan using the new first-corridor direction convention.
bec_server/tests/tests_scan_server/test_path_optimization.py Adds regression test ensuring first_corridor_direction and snaked are respected.
bec_server/tests/tests_scan_server/test_legacy_scans.py Updates hex scan snaking test parameters to match axis semantics.
bec_server/tests/tests_scan_server/scans_v4/test_scan_components.py Updates corridor optimization expectations and adds coverage for new parameter passing.
bec_server/tests/tests_scan_server/scans_v4/test_hexagonal_scan.py Adds coverage asserting second axis is treated as fast axis.
bec_server/tests/tests_scan_server/scans_v4/test_fermat_scan.py Adds coverage for Fermat corridor first-direction selection based on fast-axis range.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread bec_server/bec_server/scan_server/scans/scan_components.py Outdated
Comment thread bec_server/bec_server/scan_server/scans/legacy_scans.py Outdated
Comment thread bec_server/bec_server/scan_server/path_optimization.py
Comment thread bec_server/bec_server/scan_server/path_optimization.py
@wakonig wakonig force-pushed the fix/fast_axis branch 4 times, most recently from b9effde to 54b492d Compare April 27, 2026 16:22
@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 27, 2026

Codecov Report

❌ Patch coverage is 93.75000% with 3 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
...server/bec_server/scan_server/path_optimization.py 84.61% 1 Missing and 1 partial ⚠️
...erver/bec_server/scan_server/scans/legacy_scans.py 92.30% 1 Missing ⚠️

📢 Thoughts on this report? Let us know!

@wakonig wakonig marked this pull request as draft April 28, 2026 08:11
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.

2 participants