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

Newest VTK breaks some tests #155

Closed
doutriaux1 opened this issue Mar 28, 2017 · 30 comments
Closed

Newest VTK breaks some tests #155

doutriaux1 opened this issue Mar 28, 2017 · 30 comments
Milestone

Comments

@doutriaux1
Copy link
Contributor

vtk_ui test do not show lines anymore
opacity seems broken according to @durack1
will add more as we encounter them

@danlipsa
Copy link
Contributor

danlipsa commented Mar 28, 2017

@doutriaux1 @aashish24 All vtk_ui tests pass on my machine. @doutriaux1 Can you add a generated image to compare it with the baseline. Maybe will give us an idea of what is wrong. Can you give us your machine relevant details (OS, OpenGL, ...)

@doutriaux1
Copy link
Contributor Author

will do. it's with both mac and linux (nox) using a nightly vtk-cdat. 2.8 vtk-cdat passes the tests

@danlipsa
Copy link
Contributor

I see. It is with mesa (nox). How do I install a nox version of cdat? How do I build a nox version of VTK? I assume that overwriting vcs and VTK should be the same. Thanks!

@danlipsa
Copy link
Contributor

My tests pass with the OpenGL hardware driver not with mesa.

@durack1
Copy link
Member

durack1 commented Mar 28, 2017

@danlipsa this should get you there with my opacity issue (#138), if you drop the infile name into the blank space in line 51 (infile = '') then it should just work.. Let me know..
make_paperplots.py.txt

@doutriaux1
Copy link
Contributor Author

@danlipsa on the mac i get:

Traceback (most recent call last):
  File "make_paperplots.py", line 102, in <module>
    put_png(canvas, bg_image, template=t) ; # Place png
  File "make_paperplots.py", line 43, in put_png
    canvas.backend.put_img_on_canvas(png_path,zoom=yscale,xOffset=xOffset,yOffset=-dist,units="pixels",fitToHeight=False)
  File "/Users/doutriaux1/anaconda2/envs/nightly/lib/python2.7/site-packages/vcs/VTKPlots.py", line 975, in put_img_on_canvas
    reader.SetFileName(filename)
AttributeError: 'NoneType' object has no attribute 'SetFileName'

using vcs master and vtk with your sha1

@danlipsa
Copy link
Contributor

@durack1 I get the following image. Is it right?
bluemarble_siconc_satellite_view_daytimeview_boxfill

@danlipsa
Copy link
Contributor

@doutriaux1 I think you need to set Blue_marble_download = True so that the image is downloaded.

@durack1
Copy link
Member

durack1 commented Mar 29, 2017

@danlipsa yep, that's it.. The figure itself needs some work (needs better alignment, clean up axis labels, set overlay to be the same size at the canvas etc etc), but you've reproduced what I have.. In my understanding both panels should show opacity with low/zero values

@doutriaux1
Copy link
Contributor Author

@danlipsa I thin k what happens here is that the first (top) plot is done right, then when the second plot is executed (bottom) somehow the priorities get messed up during update by VTK and the png gets back on top. Just a wild guess here.

@danlipsa
Copy link
Contributor

@durack1 @doutriaux1 So what is the correct output here? Both images should look like the bottom one?

@danlipsa
Copy link
Contributor

@durack1 @doutriaux1 Or, rather they should like the top, isn't it? @doutriaux1 You may be right, I'll look into that.

@doutriaux1
Copy link
Contributor Author

@danlipsa thre bottom one looks better.

@danlipsa
Copy link
Contributor

danlipsa commented Mar 30, 2017

@durack1 @doutriaux1 In the first image I removed the background png and changed the colors
The white areas are masked.
bluemarble_siconc_satellite_view_daytimeview_boxfill-nobg
In the second image I added back the background.
bluemarble_siconc_satellite_view_daytimeview_boxfill
So I think in the top plot, the background image completely covers the plot, in the bottom plot, you have z-fighting because both the plot and the background png end up on the same layer. How is this suppose to work?
What should the layers of the two plots and two background images be?

@danlipsa
Copy link
Contributor

@doutriaux1 @durack1 Maybe I am wrong in the second case, maybe you see things through because of transparency. Anyway, the problem seems to be in the first case that the background image ends up on top of the plot. The background image should always be underneath the plot isn't it?

@durack1
Copy link
Member

durack1 commented Mar 30, 2017

@danlipsa the image that we're aiming for here is (the boxfill version of the isofill image below, it's a two panel follow on from #121):
bluemarble_siconc_satellite_view_daytimeview
So transparent where there is no data (land, and warm oceans), with the the sea-ice overplotting in the high latitudes..
This functionality would be great to have as a cleaner function, if there is a way to generalize the example and make things easy for a user to generate such plots
The plan I had here is for sea-ice to be plotted on the upper image, and sea surface temps to be plotted on the lower image, with land showing through on the lower/SST image, and also using another color palette (blue to red, rather than the dark blue to white for sea-ice). If you wanted me to send through the SST data so you have both I can also do that

@doutriaux1
Copy link
Contributor Author

@danlipsa layers are supposed to come from template priority. In case of same priority it's supposed to be last one plotted gets on top (there's a mecanism in vcs to emulate this, I think I take priority*100 + number of plot calls on that layer)
BUT yesterday i tried to plot png first then up layer priority of data to 10 (vs default of 1). Still no luck.

@danlipsa
Copy link
Contributor

danlipsa commented Apr 4, 2017

@doutriaux1 @durack1 @aashish24 The "VTK opacity" bug turned out to be a vcs bug. There were two problems:

  1. the computation for put_png was incorrect. So, the first png ended up on the second row.
  2. the plot that "did not have opacity" ended up with the png on top because the colorbar had higher priority and that increased its layer.
    See the following PR:
    Fix put png on canvas #167
    This is the fixed image:
    bluemarble_siconc_satellite_view_daytimeview_boxfill

@durack1
Copy link
Member

durack1 commented Apr 4, 2017

@danlipsa great, thanks for sleuthing this.. I'm looking forward to taking a test drive of the PR for #162 when it's available..

@doutriaux1
Copy link
Contributor Author

thanks @danlipsa that is great!

@danlipsa
Copy link
Contributor

danlipsa commented Apr 5, 2017

@doutriaux1 @durack1 @aashish24 I'll close this as we have all tests pass on both @doutriaux1 and my machines. If there are specific issues with certain platforms lets open more specific issues.

@danlipsa danlipsa closed this as completed Apr 5, 2017
@durack1
Copy link
Member

durack1 commented Apr 5, 2017

@doutriaux1 will the following get me what I want?

conda create -n uvcdatNightlynox -c conda-forge -c uvcdat/label/nightly -c uvcdat uvcdat-nox
vcs-nox: 2017.4.4.c22e1d924a0145ef526b56a8ca123484adfd660a-0 uvcdat/label/nightly
vcsaddons-nox: 2.8-py27_2 uvcdat
vtk-cdat-nox: 7.1.0.2.8-py27_2 uvcdat

I'm guessing I also need the latest vtk-cdat-nox which isn't the v2.8 above. It should be, but this doesn't appear to be selected

linux-64/vtk-cdat-nox-7.1.0.2017.3.23.73fb094d17ccdd594a6abf9ff8732149c88dc2e6-py27_0.tar.bz2

@durack1
Copy link
Member

durack1 commented Apr 5, 2017

@danlipsa do you have the script that generated the figure above? it'd be great if you can drop that here so I can start from where you left off..

@danlipsa
Copy link
Contributor

danlipsa commented Apr 6, 2017

@durack1 Here you are.

make_paperplots.zip

@durack1
Copy link
Member

durack1 commented Apr 6, 2017

@danlipsa great, thanks!

@durack1
Copy link
Member

durack1 commented Apr 6, 2017

@danlipsa it seems the updated vcs/vtk also plots the continent outlines.. Was this the case in the previous version or is it something that has changed? I'm also curious as to how easy it is to turn that off (continent outlines)

@durack1
Copy link
Member

durack1 commented Apr 6, 2017

@danlipsa I wonder whether there is another bug in vcs as the axis labels (y-axis) appear off the png output.. It wasn't obvious to me that the alignment of the subplots on the canvas are being manipulated by the script.. So just querying this..?

@danlipsa
Copy link
Contributor

danlipsa commented Apr 7, 2017

@durack1 What do you mean 'continents outlines'?

Indeed, probably there is something related to templates and the area returned by the EZ-template. If I remember correctly, we do not compute to make sure labels fit. We always fit the plot in the specified area and then draw the labels on the outside - this means the labels can be cut.

@danlipsa
Copy link
Contributor

danlipsa commented Apr 7, 2017

@durack1 Do you mind if you file another bug report for fixing EZ-template. We might want to reconsider how we draw a plot (see my previous post) but this might be difficult as it will break backward compatibility.

@durack1
Copy link
Member

durack1 commented Apr 7, 2017

@danlipsa good call, I'll generate a new issue for the EzTemplate stuff..

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants