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 estimate of MDASequence duration, without iterating #117

Closed tlambert03 closed 1 year ago

tlambert03 commented 1 year ago

adds an estimate of total_duration, per-timepoint duration, and whether the prescribed time plan interval is exceeded by the per-timepoint duration.

Could be used by pymmcore-widgets (or anyone). For large (hundreds of timepoints) MDA sequences, this method is upwards of 1,000,000 times faster than the _update_time() method currently used by MDAWidget

codecov[bot] commented 1 year ago

Codecov Report

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

Comparison is base (81f52a1) 96.86% compared to head (3d24b61) 96.94%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #117 +/- ## ========================================== + Coverage 96.86% 96.94% +0.08% ========================================== Files 13 13 Lines 734 786 +52 ========================================== + Hits 711 762 +51 - Misses 23 24 +1 ``` | [Files Changed](https://app.codecov.io/gh/pymmcore-plus/useq-schema/pull/117?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pymmcore-plus) | Coverage Δ | | |---|---|---| | [src/useq/\_utils.py](https://app.codecov.io/gh/pymmcore-plus/useq-schema/pull/117?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pymmcore-plus#diff-c3JjL3VzZXEvX3V0aWxzLnB5) | `98.38% <98.03%> (-1.62%)` | :arrow_down: | | [src/useq/\_iter\_sequence.py](https://app.codecov.io/gh/pymmcore-plus/useq-schema/pull/117?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/117?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pymmcore-plus#diff-c3JjL3VzZXEvX21kYV9zZXF1ZW5jZS5weQ==) | `98.30% <100.00%> (+0.02%)` | :arrow_up: | | [src/useq/\_time.py](https://app.codecov.io/gh/pymmcore-plus/useq-schema/pull/117?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pymmcore-plus#diff-c3JjL3VzZXEvX3RpbWUucHk=) | `100.00% <100.00%> (ø)` | | | [src/useq/\_z.py](https://app.codecov.io/gh/pymmcore-plus/useq-schema/pull/117?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pymmcore-plus#diff-c3JjL3VzZXEvX3oucHk=) | `98.36% <100.00%> (+0.14%)` | :arrow_up: |

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