Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add keep_shutter_open_across to MDASequence #119

Merged
merged 6 commits into from
Jul 30, 2023

Conversation

tlambert03
Copy link
Member

@tlambert03 tlambert03 commented Jul 30, 2023

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
Copy link

codecov bot commented Jul 30, 2023

Codecov Report

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

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

Additional details and impacted files
@@            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 Coverage Δ
src/useq/_iter_sequence.py 100.00% <100.00%> (ø)
src/useq/_mda_sequence.py 98.46% <100.00%> (+0.10%) ⬆️

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

@tlambert03 tlambert03 requested a review from fdrgsp July 30, 2023 17:41
Copy link
Contributor

@fdrgsp fdrgsp left a comment

Choose a reason for hiding this comment

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

I like it, better approach than #97.

tests/test_sequence.py Show resolved Hide resolved
tlambert03 and others added 2 commits July 30, 2023 19:40
Co-authored-by: federico gasparoli <70725613+fdrgsp@users.noreply.github.com>
@tlambert03 tlambert03 enabled auto-merge (squash) July 30, 2023 23:46
@tlambert03 tlambert03 merged commit 9e60030 into pymmcore-plus:main Jul 30, 2023
18 checks passed
@tlambert03 tlambert03 deleted the keep-shutter branch July 30, 2023 23:47
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.

keep shutter open
2 participants