GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Figure_shape in imagewidget and related histogram widget bug fix by apasarkar · Pull Request #555 · fastplotlib/fastplotlib

Conversation

@apasarkar

@apasarkar apasarkar commented Jul 15, 2024 •
edited by kushalkolar
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Collaborator

closes #553, closes #554

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

kushalkolar reacted with heart emoji
All reactions
  • ❤️ 1 reaction
@apasarkar
Updates LUT to deal with divide by zero errors and updates figure sha…
e79e5fa
…pe logic in imagewidget to deal with multiple shape values in constructor
@apasarkar
apasarkar requested review from clewis7 and kushalkolar as code owners July 15, 2024 18:22
@apasarkar
apasarkar marked this pull request as draft July 15, 2024 18:23
@apasarkar
Includes formatting on imagewidget code
aad4996
clewis7
clewis7 reviewed Jul 15, 2024
View reviewed changes
Comment thread fastplotlib/widgets/histogram_lut.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

@apasarkar
Updates docstring for histogram_lut
c207167
kushalkolar
kushalkolar requested changes Jul 16, 2024
View reviewed changes
Comment thread fastplotlib/widgets/histogram_lut.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread fastplotlib/widgets/histogram_lut.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread fastplotlib/widgets/image.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

@kushalkolar

kushalkolar commented Jul 16, 2024

Copy link
Copy Markdown
Member

Thanks! Is the histogram calc the only thing that was causing issues on your end?

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@apasarkar
Changes when figure_kwargs is defined for cleaner conditional logic
90af0d4
@apasarkar

apasarkar commented Jul 16, 2024 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Collaborator Author

@kushalkolar I think one thing to note is that the histogram computation right now is nice if the user's data is loaded into RAM. If otoh the user is using ImageWidge to visualize on-the-fly motion correction, things get trickier because the image array object is doing the extra work of loading from disk. In this case, the histogram computations will involve a lot of extra work (loading a large chunk of data into memory just to estimate a histogram of the data). Maybe in that case the user should be able to just specify "absolute" vmin and vmax values without a histogram. I find that knowing the range of the data (via some scale bars) is very useful, even if there is no histogram.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@kushalkolar

kushalkolar commented Jul 17, 2024 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member

@kushalkolar I think one thing to note is that the histogram computation right now is nice if the user's data is loaded into RAM. If otoh the user is using ImageWidge to visualize on-the-fly motion correction, things get trickier because the image array object is doing the extra work of loading from disk. In this case, the histogram computations will involve a lot of extra work (loading a large chunk of data into memory just to estimate a histogram of the data). Maybe in that case the user should be able to just specify "absolute" vmin and vmax values without a histogram. I find that knowing the range of the data (via some scale bars) is very useful, even if there is no histogram.

Ah so you mean like the lazy arrays you have? What about allowing HistogramLUTWidget to take a pre-computed histogram?

What about data that can be lazy loaded, such as memmaps? We only use a max of 500 x 100 x 100 pixels for computing the histogram, data is subsampled to meet that max number of pixels:

https://github.com/apasarkar/fastplotlib/blob/90af0d4a136d918f99551b3fead28773693e40cf/fastplotlib/widgets/histogram_lut.py#L140-L152

We could benchmark this.

If we add a kwarg to pass in a pre-computed histogram, we can just pass an "empty" histogram with all zero bins, but have a vmin and vmax so that it can be interacted with. Or a histogram=False kwarg that will not compute the histogram and just make a "vmin-vmax" widget, i.e. exactly same thing but it just makes all bins zero without you having to pass in a precomputed one.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@kushalkolar

kushalkolar commented Jul 18, 2024

Copy link
Copy Markdown
Member

is this good to go? LGTM. The other points, such as just operating as a vmin-vmax widget can be done in a later PR

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@kushalkolar
kushalkolar marked this pull request as ready for review July 18, 2024 02:43
kushalkolar
kushalkolar approved these changes Jul 18, 2024
View reviewed changes
@apasarkar

apasarkar commented Jul 18, 2024

Copy link
Copy Markdown
Collaborator Author

@kushalkolar Missed your comment about the vmin/vmax. Strongly agree we need something like that -- I will submit a pull for it.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@apasarkar
apasarkar merged commit 5458316 into fastplotlib:main Jul 18, 2024
@apasarkar
apasarkar deleted the iw_hist_and_kwargs branch July 18, 2024 13:24
@apasarkar apasarkar mentioned this pull request Jul 18, 2024
Histogram widget functionality, vmin, vmap, etc. #557
Open
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@clewis7 clewis7 clewis7 left review comments
@kushalkolar kushalkolar kushalkolar approved these changes

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Figure_shape inconsistency in ImageWidget Histogram zero values

Uh oh!

There was an error while loading. Please reload this page.

3 participants

@apasarkar @kushalkolar @clewis7
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.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.