Closed fdrgsp closed 1 year ago
Patch coverage: 100.00
% and no project coverage change.
Comparison is base (
5652f37
) 96.40% compared to head (49324cc
) 96.40%.:exclamation: Current head 49324cc differs from pull request most recent head e3a0625. Consider uploading reports for the commit e3a0625 to get more accurate results
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.
can you try to do this with
sub_seq = position.sequence
# if the sub-sequence doe not have an autofocus plan, we override it
# with the parent sequence's autofocus plan
if not sub_seq.autofocus_plan:
sub_seq = sub_seq.replace(autofocus_plan=sequence.autofocus_plan)
# recurse into the sub-sequence
yield from iter_sequence(
sub_seq,
...
shouldn't that do the same thing?
can you try to do this with
sub_seq = position.sequence # if the sub-sequence doe not have an autofocus plan, we override it # with the parent sequence's autofocus plan if not sub_seq.autofocus_plan: sub_seq = sub_seq.copy(update={'autofocus_plan':sequence.autofocus_plan}) # recurse into the sub-sequence yield from iter_sequence( sub_seq, ...
shouldn't that do the same thing?
yeah works... but you need to use copy()
not replace
... so as to maintain the internal state of the should_autofocus function. see https://github.com/fdrgsp/useq-schema/pull/4
I found an
autofocus_plan
bug in theMDASequence
iter_sequence
method and this PR is a possible fix (also related to #97 ).If we have a
MDASequence
with a position sub-sequence (like the one below) where theautofocus_plan
is only specified in the main sequence, theautofocus_plan
should be also inherited by the position sub-sequence. However at the moment this does not happen.by printing index and action type
we get
indicating that the auto shutter is never used. While we should instead autofocus performed at every z planes like so