Updates to inspector plot: add rectangle mode and remove operation arg#528
Draft
Updates to inspector plot: add rectangle mode and remove operation arg#528
operation arg#528Conversation
Member
Author
|
TODO: still need to write some tests |
operation arg
nvaytet
commented
Feb 14, 2026
| y = _coord_to_centers(da, ydim) | ||
| vx = poly['x']['value'].to(unit=x.unit).values | ||
| vy = poly['y']['value'].to(unit=y.unit).values | ||
| vx = poly['x']['value'].values |
Member
Author
There was a problem hiding this comment.
I don't think we need to convert the unit here? By construction, the xy locations returned by the polygon info are in the correct canvas units.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Some updates to the inspector plot:
A question arose while implementing this: there is an
operationargument that decides which reduction operation to apply along the 3rd dimension into the paper. This is asumby default, but can be amin,maxormean.Now, when we select a region inside a rectangle or a polygon, we need to also reduce that along the x and y dimensions before sending to the 1d plot along z. The operation there is currently always a sum, and I don't think it would make sense to do anything else than sum?
So the question is: does it even make sense to have other operations along the z dimension?
Update: I decided to remove the operation in the end.