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

Query timestamps from all planes when C or Z dimensions are not filled #486

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

Tom-TBT
Copy link

@Tom-TBT Tom-TBT commented Oct 11, 2024

Hello,
we found a bug on the timestamps display. We have data where the channel at index 0 was acquired only for the first and last frames.

Because the query to get timestamps was restricted to Z=0 and C=0, most timestamps were missing: we only got a list of two (instead of ~400).
-> Consequently, the last timepoint was assigned to the frame n°2, while all other frames had NaN values for timestamps.

To fix it, I added a condition that if the number of timestamps returned from the query is smaller than the number of frames, we do a second query. As such, it will impact performance (and results) only for images requiring it.

Return one arbitrary plane per theT. It does not ensure that it's the lowest theC/theZ, but seems acceptable for those edge cases.

FROM PlaneInfo Info WHERE Info.pixels.id = :pid 
AND Info.id IN (
    SELECT min(subInfo.id) FROM PlaneInfo subInfo
    WHERE subInfo.pixels.id = :pid GROUP BY subInfo.theT
)

(ensuring here that the minimum possible theC/theZ combination is returned increases the complexity of the query by a lot, because min(theC) is not always the same plane as min(theZ))

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.

1 participant