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

Fix histogram sampling for tiny datasets #5458

Merged
merged 2 commits into from
May 11, 2021
Merged

Fix histogram sampling for tiny datasets #5458

merged 2 commits into from
May 11, 2021

Conversation

fm3
Copy link
Member

@fm3 fm3 commented May 5, 2021

The position sampling for histogram and find data roughly works like a menger sponge, with a stopping criterion when the distance between the sampling points becomes too close. For tiny datasets, the first iteration already runs into the stopping criterion.

The fix is to always add the 32vx³ bucket at 0,0,0 to the position list. This way, the data from this corner (which tends to exist for tiny datasets) is included.

URL of deployed dev instance (used for testing):

Steps to test:

  • open a very small dataset (tested with 50 × 50 × 30 voxel³)
  • sidebar should show valid histogram

Issues:


@fm3 fm3 requested a review from youri-k May 5, 2021 08:43
@fm3 fm3 self-assigned this May 5, 2021
Copy link
Contributor

@youri-k youri-k left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice idea 🎉

@fm3 fm3 merged commit 77f59ed into master May 11, 2021
@fm3 fm3 deleted the tiny-histogram branch May 11, 2021 05:55
@philippotto
Copy link
Member

Awesome to see this fixed!

The fix is to always add the 32vx³ bucket at 0,0,0 to the position list.

Is this relative to the datasource's bounding box?

@fm3
Copy link
Member Author

fm3 commented May 11, 2021

Is this relative to the datasource's bounding box?

It will be in the next version 🙈 😆 good idea

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Histogram request fails for tiny datasets
3 participants