feat: stagger per-FOV min_start_time in apply_fov_batching#4
Closed
hinderling wants to merge 1 commit into
Closed
Conversation
apply_fov_batching gains offset_min_start_time (default True). FOVs in a batch are imaged sequentially, not simultaneously, so the k-th FOV of a batch only starts ~k * time_per_fov after the batch's first FOV. Encoding that offset into each event's min_start_time keeps the scheduled per-FOV frame interval consistent and makes lag measurement meaningful (lag is acquisition-start minus min_start_time). The first FOV of every batch gets a 0 within-batch offset; batches after the first still get their batch wall-clock offset on top.
Owner
Author
|
Recreated against the upstream repo pertzlab/faro: pertzlab#13 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
apply_fov_batchinggains anoffset_min_start_timeparameter (defaultTrue).When FOVs overflow a batch, they are split into batches imaged in sequence. But within a batch the FOVs are also imaged one after another, not simultaneously — the k-th FOV of a batch only begins ~
k * time_per_fovafter the batch's first FOV. Previously every FOV in a batch shared the samemin_start_time, which did not reflect that.offset_min_start_time=Truestaggers each event'smin_start_timeby(within-batch slot) * time_per_fov, where the within-batch slot is the FOV's sorted position modulon_parallel. The first FOV of each batch keeps a 0 within-batch offset; batches after the first still get their batch wall-clock offset on top.Why
acquisition-start − min_start_time. With every FOV in a batch sharing onemin_start_time, FOVs 2..k looked increasingly "late" simply because they were imaged later by design. Encoding the real schedule intomin_start_timeremoves that artifact, so lag reflects genuine drift rather than batch ordering.Behavior notes
True; passoffset_min_start_time=Falsefor the previous shared-min_start_timebehavior.n_fovs <= n_parallel) is no longer a strict no-op whenoffset_min_start_time=True— the within-batch stagger still applies. Withoffset_min_start_time=Falseit remains a no-op.Test plan
time_per_fov=3: p0 → +0, p1 → +3, p2 → +6.