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

Add the ability to specify a random subset size for computing histogram #2478

Merged
merged 4 commits into from
Apr 16, 2024

Conversation

astrofrog
Copy link
Member

@astrofrog astrofrog commented Mar 19, 2024

This is to provide a long-term solution for issues such as spacetelescope/jdaviz#2735 where a histogram doesn't have to be exact.

…ams, and expose as a viewer state property in the histogram viewer
pllim added a commit to pllim/jdaviz that referenced this pull request Mar 20, 2024
but does not seem to work [ci skip]

with NumpyRNGContext(12345):

data = Data(x=np.random.uniform(0, 10, 1024**2), y=np.ones(1024 ** 2))
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't see a test for 2D image like how Jdaviz would store it. We have a 2D array under one component. Here, you store each dimension as a separate component. I don't think it is equivalent?

Since we do not use histogram viewer directly in Jdaviz, I am trying to emulate this calculation directly over at spacetelescope/jdaviz#2763 but without success. There must be some subtlety I am missing. Are you able to have a look over there and tell me if I went down the wrong rabbit hole?

Cami has a 8GB test image if you need one, if she is willing to share with you.

…e for some arrays (e.g. a cutout of a larger image) this causes a copy
@astrofrog astrofrog merged commit b9ca12f into glue-viz:main Apr 16, 2024
24 checks passed
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.

2 participants