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 all_scalars usage in threshold #2670

Merged
merged 4 commits into from
May 20, 2022
Merged

Fix all_scalars usage in threshold #2670

merged 4 commits into from
May 20, 2022

Conversation

MatthewFlamm
Copy link
Contributor

Overview

In the tests, it is shown that all_scalars=True does not use all the scalars but rather all the points in a cell for the threshold filter. This can also be seen when using cell data where there is only 1 value per cell therefore all_scalars=True does not have an effect even when having multiple cell data scalars.

Details

There was a discussion of this in #1488 (comment), where @adeak wished to have all_scalars to mean 'all points' match rather than 'all scalars' match. In my testing, this is indeed what this argument does.

I'm not sure if this would suggest a name change from all_scalars to all_points.

@github-actions github-actions bot added the bug Uh-oh! Something isn't working as expected. label May 18, 2022
@adeak
Copy link
Member

adeak commented May 18, 2022

I can say with certainty that I had no clear idea back then that thresholding is a cell-only operation, so I was working with multiple levels of confusion 😄 These parts of the docs were certainly unclear to me when I looked at them the other day.

@MatthewFlamm
Copy link
Contributor Author

My comment was not meant to disparage any understanding, but rather that your intuition of what would be useful was a good pointer that the pyvista implementation and description was off.

@codecov
Copy link

codecov bot commented May 18, 2022

Codecov Report

Merging #2670 (0e29475) into main (608c592) will decrease coverage by 0.00%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##             main    #2670      +/-   ##
==========================================
- Coverage   93.70%   93.70%   -0.01%     
==========================================
  Files          75       75              
  Lines       16180    16178       -2     
==========================================
- Hits        15162    15160       -2     
  Misses       1018     1018              

Copy link
Member

@akaszynski akaszynski left a comment

Choose a reason for hiding this comment

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

Thanks for clearing this up @MatthewFlamm.

@MatthewFlamm MatthewFlamm merged commit 77a3d98 into main May 20, 2022
@MatthewFlamm MatthewFlamm deleted the fix-all-scalars branch May 20, 2022 00:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Uh-oh! Something isn't working as expected.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants