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

VTKPlots.plotVectors points/attributes length mismatch #712

Closed
allisonvacanti opened this Issue Sep 26, 2014 · 15 comments

Comments

Projects
None yet
5 participants
@allisonvacanti
Contributor

allisonvacanti commented Sep 26, 2014

Some of the randomly oriented vectors in the vector plots were the result of using differently sized arrays for the points and vector point data in plotVectors.

I've patched VTK to fail in these cases, and added a hack to plotVectors that resizes the vector array to match the number of points. @doutriaux1, can you take a look at this when you return? It seems the problem is in vtk2vcs.genGrid.

Currently the code will print out a warning when this happens to alert the user that the image will not reliable. This is not ideal, but at least we can continue working on rendering issues and stop the spurious dashboard failures due to random glyphs.

allisonvacanti added a commit that referenced this issue Sep 26, 2014

Resize vector array to match number of points.
Refs #700, #712.

Not ideal, but at least we can continue on to other rendering bugs.
@doutriaux1

This comment has been minimized.

Member

doutriaux1 commented Oct 1, 2014

@dlonie I added a bunch of tests for this in branch issue_712_vectors_add_tests
angles seem to work ok, scaling too.

NOW the big issue is that as @painter1 noted, there doesn't seem to be any correlation between amplitude and arrows length, also the location where this is drawn seems to be a huge mystery.

The "interesting test to look at is the 45 angle/scaling 2/amplitude"on" (picture attached), which can be ran as follow:

python "/git/uvcdat/testing/vcs/test_vcs_basic_vectors.py" "--scale=2" "--angle=45" "--amplitude" "--source=/git/uvcdat/testing/vcs/test_vcs_basic_vectors_45_2_amplitude.png"

In "theory"/"ideally" the arrows should be drawn at the center of each "box" and "its length should be proportional to the color of the box. The arrow seem to be more at the "corners" also I get:

23: !!! Warning during vector plotting: Number of points does not match the number of vectors to be glyphed (3358 points vs 3240 vectors). The vectors will be padded/truncated to match for rendering purposes, but the resulting image should not be trusted.

I'm not sure what this message is about but I think that it is what @dlonie tried to fix. I have the correct number of point (1 per box) and no missing vlaues (although some zeros values)
test_vcs_basic_vectors_45_2_amplitude

@aashish24

This comment has been minimized.

Contributor

aashish24 commented Oct 2, 2014

@doutriaux1 please contact us today. It will be hard to explain things over here ( we can try ). The issue is that genGrid (in vcs2vtk) does not produce same number of vectors as points. Which resutled in gargabe arrows most of the time (as you can see on the dashboards as well). David added message so that we know its bad but made sure we avoid any crash because of empty data.

@allisonvacanti

This comment has been minimized.

Contributor

allisonvacanti commented Oct 2, 2014

The number of points and vectors match because I added some code to resize the vector array to match the points and print that warning. If you're seeing the warning, it means the bug is still there. See 6325cbb, which was just a hack so we could move on to work on rendering.

@williams13

This comment has been minimized.

Contributor

williams13 commented Oct 2, 2014

When I used the vector plot for diagnostics I get the warnings:

!!! Warning during vector plotting: Number of points does not match the number of vectors to be glyphed (7938 points vs 7760 vectors). The vectors will be padded/truncated to match for rendering purposes, but the resulting image should not be trusted.
!!! Warning during vector plotting: Number of points does not match the number of vectors to be glyphed (7938 points vs 7760 vectors). The vectors will be padded/truncated to match for rendering purposes, but the resulting image should not be trusted.
!!! Warning during vector plotting: Number of points does not match the number of vectors to be glyphed (7938 points vs 7760 vectors). The vectors will be padded/truncated to match for rendering purposes, but the resulting image should not be trusted.
!!! Warning during vector plotting: Number of points does not match the number of vectors to be glyphed (7938 points vs 7760 vectors). The vectors will be padded/truncated to match for rendering purposes, but the resulting image should not be trusted.
!!! Warning during vector plotting: Number of points does not match the number of vectors to be glyphed (7938 points vs 7760 vectors). The vectors will be padded/truncated to match for rendering purposes, but the resulting image should not be trusted.
!!! Warning during vector plotting: Number of points does not match the number of vectors to be glyphed (7938 points vs 7760 vectors). The vectors will be padded/truncated to match for rendering purposes, but the resulting image should not be trusted.

From: David Lonie <notifications@github.commailto:notifications@github.com>
Reply-To: UV-CDAT/uvcdat <reply@reply.github.commailto:reply@reply.github.com>
Date: Thursday, October 2, 2014 5:08 AM
To: UV-CDAT/uvcdat <uvcdat@noreply.github.commailto:uvcdat@noreply.github.com>
Subject: Re: [uvcdat] VTKPlots.plotVectors points/attributes length mismatch (#712)

The number of points and vectors match because I added some code to resize the vector array to match the points and print that warning. If you're seeing the warning, it means the bug is still there. See 6325cbbhttps://github.com/UV-CDAT/uvcdat/commit/6325cbbcf4ac29d2e5dc6280d87e3e340aae3f29, which was just a hack so we could move on to work on rendering.


Reply to this email directly or view it on GitHubhttps://github.com//issues/712#issuecomment-57620468.

@allisonvacanti

This comment has been minimized.

Contributor

allisonvacanti commented Oct 2, 2014

Yes. Those warnings will be seen for every vector plot made until this bug is fixed.

@doutriaux1

This comment has been minimized.

Member

doutriaux1 commented Oct 3, 2014

i think I got a fix in in issue_712_vectors_add_tests need to have Jeff test it

@williams13

This comment has been minimized.

Contributor

williams13 commented Oct 3, 2014

This is great! Jeff can you test?

From: Charles <notifications@github.commailto:notifications@github.com>
Reply-To: UV-CDAT/uvcdat <reply@reply.github.commailto:reply@reply.github.com>
Date: Thursday, October 2, 2014 5:49 PM
To: UV-CDAT/uvcdat <uvcdat@noreply.github.commailto:uvcdat@noreply.github.com>
Cc: Dean Williams <williams13@llnl.govmailto:williams13@llnl.gov>
Subject: Re: [uvcdat] VTKPlots.plotVectors points/attributes length mismatch (#712)

i think I got a fix in in issue_712_vectors_add_tests need to have Jeff test it


Reply to this email directly or view it on GitHubhttps://github.com//issues/712#issuecomment-57733892.

@doutriaux1

This comment has been minimized.

Member

doutriaux1 commented Oct 3, 2014

@painter1 is gone for the day but we will test it tomorrow morning, hopefully that is what we want!

@aashish24

This comment has been minimized.

Contributor

aashish24 commented Oct 3, 2014

Can you make a pull request? @dlonie can test as well.

@allisonvacanti

This comment has been minimized.

Contributor

allisonvacanti commented Oct 3, 2014

Ran some tests on the branch, no more warnings! 👍

@aashish24

This comment has been minimized.

Contributor

aashish24 commented Oct 3, 2014

Nice.. but does it fixes the real issue?Is the plot fixed?

Thanks,

@allisonvacanti

This comment has been minimized.

Contributor

allisonvacanti commented Oct 3, 2014

As far as I can tell.

@painter1

This comment has been minimized.

Contributor

painter1 commented Oct 3, 2014

I'll pull it and test it in the next few minutes.
- Jeff
On 10/2/14, 6:11 PM, Dean N. Williams wrote:


  This is great! Jeff can you test?

  From: Charles
  <notifications@github.com<mailto:notifications@github.com>>

  Reply-To: UV-CDAT/uvcdat
  <reply@reply.github.com<mailto:reply@reply.github.com>>

  Date: Thursday, October 2, 2014 5:49 PM

  To: UV-CDAT/uvcdat

<uvcdat@noreply.github.commailto:uvcdat@noreply.github.com>
Cc: Dean Williams
<williams13@llnl.govmailto:williams13@llnl.gov>

  Subject: Re: [uvcdat] VTKPlots.plotVectors points/attributes
  length mismatch (#712)

  i think I got a fix in in issue_712_vectors_add_tests need to have
  Jeff test it

  —

  Reply to this email directly or view it on

GitHubhttps://github.com//issues/712#issuecomment-57733892.

Reply to this email directly or view
it on GitHub.
{"@context":"http://schema.org","@type":"EmailMessage","description":"View this Issue on GitHub","action":{"@type":"ViewAction","url":"#712 (comment)","name":"View Issue"}}

@williams13

This comment has been minimized.

Contributor

williams13 commented Oct 3, 2014

Thanks Jeff, let us know so that we can do a rebuild once David gives the okay.

From: Jeffrey Painter <notifications@github.commailto:notifications@github.com>
Reply-To: UV-CDAT/uvcdat <reply@reply.github.commailto:reply@reply.github.com>
Date: Friday, October 3, 2014 8:15 AM
To: UV-CDAT/uvcdat <uvcdat@noreply.github.commailto:uvcdat@noreply.github.com>
Cc: Dean Williams <williams13@llnl.govmailto:williams13@llnl.gov>
Subject: Re: [uvcdat] VTKPlots.plotVectors points/attributes length mismatch (#712)

I'll pull it and test it in the next few minutes.

  • Jeff
    On 10/2/14, 6:11 PM, Dean N. Williams wrote:

This is great! Jeff can you test?

From: Charles
<notifications@github.commailto:notifications@github.commailto:notifications@github.com>

Reply-To: UV-CDAT/uvcdat
<reply@reply.github.commailto:reply@reply.github.commailto:reply@reply.github.com>

Date: Thursday, October 2, 2014 5:49 PM

To: UV-CDAT/uvcdat
<uvcdat@noreply.github.commailto:uvcdat@noreply.github.commailto:uvcdat@noreply.github.com>
Cc: Dean Williams
<williams13@llnl.govmailto:williams13@llnl.govmailto:williams13@llnl.gov>

Subject: Re: [uvcdat] VTKPlots.plotVectors points/attributes
length mismatch (#712)

i think I got a fix in in issue_712_vectors_add_tests need to have
Jeff test it

Reply to this email directly or view it on
GitHubhttps://github.com//issues/712#issuecomment-57733892.

Reply to this email directly or view
it on GitHub.
{"@context":"http://schema.org","@type":"EmailMessage","description":"View this Issue on GitHub","action":{"@type":"ViewAction","url":"#712 (comment)","name":"View Issue"}}


Reply to this email directly or view it on GitHubhttps://github.com//issues/712#issuecomment-57809959.

@painter1

This comment has been minimized.

Contributor

painter1 commented Oct 3, 2014

With Charles' fix, the vector plots look very much better now.
There's still something to do.  I think that Charles completely
fixed something, but there's another problem.
There remains a problem with spurious large arrows at edges of
continents (continents are missing data in my test problem).
It's obvious in obs and model-obs plots, which have a low
resolution.  But in the higher-resolution model plot there are a few
arrows which I'm suspicious of.  The plots are attached.  I'll look
into this some more later.
BTW, the problems you see with titles, continent outlines, etc. are
because this doesn't have the latest templates from Dean.
- Jeff
On 10/3/14, 8:15 AM, Jeffrey F. Painter wrote:


  I'll pull it and test it in the next few minutes.
  - Jeff
  On 10/2/14, 6:11 PM, Dean N. Williams wrote:


    This is great! Jeff can you test? 
    From: Charles <notifications@github.com<mailto:notifications@github.com>>


    Reply-To: UV-CDAT/uvcdat <reply@reply.github.com<mailto:reply@reply.github.com>>


    Date: Thursday, October 2, 2014 5:49 PM 
    To: UV-CDAT/uvcdat
    <uvcdat@noreply.github.com<mailto:uvcdat@noreply.github.com>>
    Cc: Dean Williams <williams13@llnl.gov<mailto:williams13@llnl.gov>>


    Subject: Re: [uvcdat] VTKPlots.plotVectors points/attributes
    length mismatch (#712) 
    i think I got a fix in in issue_712_vectors_add_tests need to
    have Jeff test it 
    — 
    Reply to this email directly or view it on
    GitHub<https://github.com/UV-CDAT/uvcdat/issues/712#issuecomment-57733892>.
    —
      Reply to this email directly or view

        it on GitHub.
    {"@context":<a class="moz-txt-link-rfc2396E" href="http://schema.org">"http://schema.org"</a>,"@type":"EmailMessage","description":"View this Issue on GitHub","action":{"@type":"ViewAction","url":<a class="moz-txt-link-rfc2396E" href="https://github.com/UV-CDAT/uvcdat/issues/712#issuecomment-57736774">"https://github.com/UV-CDAT/uvcdat/issues/712#issuecomment-57736774"</a>,"name":"View Issue"}}

@doutriaux1 doutriaux1 added VCS Bug labels Oct 3, 2014

@doutriaux1 doutriaux1 added this to the 2.0.0 milestone Oct 3, 2014

@doutriaux1 doutriaux1 closed this Oct 4, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment