-
Notifications
You must be signed in to change notification settings - Fork 68
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
BUG #1849: Re-enable datawc for linear projection. #1855
Conversation
@danlipsa why so many baselines changed? It seems to me that we are back to half cell on most of them? |
@@ -690,14 +692,13 @@ def onClosing(self, cell): | |||
if hasattr(plot, 'onClosing'): | |||
plot.onClosing(cell) | |||
|
|||
def plotContinents(self, x1, x2, y1, y2, projection, wrap, vp, priority, **kargs): | |||
def plotContinents(self, wc, projection, wrap, vp, priority, **kargs): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good idea!
@danlipsa looks good, let's add a quick test to make sure we don' break this again. |
@aashish24 @doutriaux1 It is true that we are back to half cell - this is what vcs.utils.getworldcoordinate tells us to do - to zoom into the dataset. We can try to get rid of vcs.utils.getworldcoordinate and only follow datawc. getworldcoordinates sets zooming based on the datawc or if that is not set it sets it based on the data (without bounds). Note there is still no cutting or misalignment so we did not loose that. |
@aashish24 where do you see a half cell? worldcoordinate uses your axes values, we can try to tweak it to use the axes bounds rather than the just the axes. I'm opened to that. |
@doutriaux1 Look for instance at https://github.com/UV-CDAT/uvcdat-testdata/pull/112/files. Instead of showing the whole dataset we zoom in and cut the cells on the margine in half. |
Ok I found a few ones finally. Thanks. Let's try to have getworldcoordinate return the bounds. Historically it use to be just the axes and originally I wanted to preserve this, to help users feel more confident with the VTK transition. At this point I don't think we need to do this anymore. Let's have getworldcoordinate return the real world coordinates of the data, i..e with axes bounds. |
@doutriaux1 @aashish24 The problem with modifying getworldcoordinates is that coordinates depend on the type of plot we have: boxfill uses bounds, isofill, isoline and vector do not. I already started passing backend.dataset_bounds using **kargs mechanism. I would use that instead and maybe get rid of getworldcoordinates alltogether as some point. Maybe we do this in two steps. 1. Try to show the full dataset if datawc is not set. I will use dataset_bounds for this 2. get rid of getworldcoordinates all together as a separate issue. |
@danlipsa the worldcoordinates for all graphic method should come from bounds, in the case of meshfill there are no axes so use data.getMashfill().min/max() |
@doutriaux1 I was thinking that always using cell data would make the code more consistent and simplify it. If we need point data in certain plots we can easily convert cell data to point data. So, we always create the data that is specified in the file, regardless of what a specific plot needs. Note that vtkCellDataToPointData works by averaging cells used by every point, which will give you the same bounds as for the cell data which is a nice thing to have when doing several plots in the same image. |
@danlipsa that's fine with me. I thought isofill was requiring point data (filter) if it doesn't then it's ok with me. Although point data is nice for unstructured grid since we don't always have the whole cell information. Anyhow let's do this in a separate PR. |
@doutriaux1 Definitely a separate PR. |
f968591
to
c36c952
Compare
@aashish24 @doutriaux1 Note there are missing triangles when zooming into mesh data: |
@doutriaux1 besides that problem it should be ready to merge. I think it is worth trying to see if it fixes PCMDI/pcmdi_metrics#296. @aashish24 We decided to leave the half cells in as this was the original behavior of uvcdat and we'll be faster in fixing the issue at hand. We can enable showing the whole dataset as a separate PR. |
@danlipsa yes! It does fix this issue: |
@doutriaux1 Great! |
@doutriaux1 Interesting plot by the way. |
@doutriaux1 What does the plot mean? For each cell, it shows 4 things? What are those? I am curious. :-) |
Each cell is basically a score skill for a model/variable. The cell itself is broken into N (4 in this case) references. That is to make sure your score does not depend on the set set of observation you used. |
For datasets using a geographic projection, datawc is only used to specify wrapping (translation of the origin, for instance from 0:360 to -180:180) and flipping.
c36c952
to
0578299
Compare
BUG #1849: Re-enable datawc for linear projection.
@danlipsa, @gleckler1 will be delighted that you think the |
@durack1 Indeed, I think the plot looks good - it draw me in even without knowing what it means. |
For datasets using a geographic projection, datawc
is only used to specify wrapping (translation of the origin,
for instance from 0:360 to -180:180) and flipping.