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

Labnotebook querying: Fix querying the NaN sweep with unknown mode #2289

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

t-b
Copy link
Collaborator

@t-b t-b commented Oct 25, 2024

Found while working on #2184. No backport as that is an edgy-edge case.

Will merge once CI passes.

When preparing the labnotebooks for incorporation into Basic.pxp we remove
unneeded rows to save space. But we also forgot to update the NOTE_INDEX.

So let's fix it up in the preparation routine.
We don't have the NOTE_INDEX since forever so we actually should add an
upgrade path for it.

While at it, also add some tests.
When we look for data in the NaN sweep, these are the labnotebook entries
before the very first sweep and don't care about the entry source type
(UNKNOWN_MODE) we did not find anything.

The reason is that we are searching from the back for a continous range of
entries with the given source type and sweep number.

But if we have empty entries at the back of the labnotebook, which is very
likely, we always only search in these. But as these are empty rows, we
don't find anything.

For finite sweep numbers this is an optimization at the FindIndizes call
only.

The check for non-finite endRow is needed as we don't upgrade labnotebooks
from the analysis browser.
@t-b t-b self-assigned this Oct 25, 2024
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