pymmcore-plus / useq-schema

An implementation agnostic schema for describing a sequence of events during a multi-dimensional imaging acquisition.
https://pymmcore-plus.github.io/useq-schema/
BSD 3-Clause "New" or "Revised" License
14 stars 5 forks source link

feat: formalizing point-visiting strategies #177

Closed tlambert03 closed 1 week ago

tlambert03 commented 1 week ago

adds

import useq

pp = useq.RandomPoints(
    num_points=100,
    max_height=6000,
    max_width=6000,
    order=useq.TraversalOrder.TWO_OPT,
    random_seed=1,
    shape="rectangle",
    start_at=10,
    fov_height=300,
    fov_width=300,
    allow_overlap=False,
)
pp.plot()

two-opt:

Screenshot 2024-07-08 at 4 01 09 PM

nearest neighbor:

Screenshot 2024-07-08 at 4 01 34 PM
codecov[bot] commented 1 week ago

Codecov Report

Attention: Patch coverage is 74.07407% with 49 lines in your changes missing coverage. Please review.

Project coverage is 94.05%. Comparing base (19cc774) to head (1caaf46).

Files Patch % Lines
src/useq/_plot.py 0.00% 43 Missing :warning:
src/useq/_grid.py 95.00% 2 Missing :warning:
src/useq/_plate.py 0.00% 2 Missing :warning:
src/useq/_position.py 33.33% 2 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #177 +/- ## ========================================== - Coverage 95.90% 94.05% -1.86% ========================================== Files 16 18 +2 Lines 1075 1177 +102 ========================================== + Hits 1031 1107 +76 - Misses 44 70 +26 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

tlambert03 commented 1 week ago

this is going to temporarily break one of the new point plan selectors in pymmcore-widgets, because requires a max_width > 0