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
15 stars 5 forks source link

feat: add `keep_shutter_open_across` to MDASequence #119

Closed tlambert03 closed 1 year ago

tlambert03 commented 1 year ago

This is alternative to #97, that adds a keep_shutter_open logic to the MDA sequence. The logic is described in the docstring:

A tuple of axes str across which the illumination shutter should be kept open. Resulting events will have keep_shutter_open set to True if and only if ALL axes whose indices are changing are in this tuple. For example, if keep_shutter_open_across=('z',), then the shutter would be kept open between events axes {'t': 0, 'z: 0} and {'t': 0, 'z': 1}, but not between {'t': 0, 'z': 0} and {'t': 1, 'z': 0}.

closes #97 closes #3

sidenote: this also opens up a possibility for a generalization of both this and autofocus plan, which would be general functions that take in the current event and (optionally) the upcoming event, and return either a modified current event, a new event or sequence of events to insert, or block yielding of the current event

codecov[bot] commented 1 year ago

Codecov Report

Patch coverage: 100.00% and project coverage change: +0.08% :tada:

Comparison is base (6585cb4) 96.41% compared to head (cae32a4) 96.49%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #119 +/- ## ========================================== + Coverage 96.41% 96.49% +0.08% ========================================== Files 14 14 Lines 808 827 +19 ========================================== + Hits 779 798 +19 Misses 29 29 ``` | [Files Changed](https://app.codecov.io/gh/pymmcore-plus/useq-schema/pull/119?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pymmcore-plus) | Coverage Δ | | |---|---|---| | [src/useq/\_iter\_sequence.py](https://app.codecov.io/gh/pymmcore-plus/useq-schema/pull/119?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pymmcore-plus#diff-c3JjL3VzZXEvX2l0ZXJfc2VxdWVuY2UucHk=) | `100.00% <100.00%> (ø)` | | | [src/useq/\_mda\_sequence.py](https://app.codecov.io/gh/pymmcore-plus/useq-schema/pull/119?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pymmcore-plus#diff-c3JjL3VzZXEvX21kYV9zZXF1ZW5jZS5weQ==) | `98.46% <100.00%> (+0.10%)` | :arrow_up: |

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