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

Test cdms_load_and_plot_axis_variable fails #689

Closed
rexissimus opened this Issue Sep 22, 2014 · 8 comments

Comments

Projects
None yet
4 participants
@rexissimus
Member

rexissimus commented Sep 22, 2014

It can be reproduced by using a VCS/Boxfill and plot an axis variable like this one:
"${cdat_SOURCE_DIR}/libcdms/src/cdunif/test/testnc.nc:latitude_4x5”
Which gives the error below, and the spreadsheet breaks.

It looks like the result should be a Yxvsx plot. So the Boxfill plots a Yxvsx plot when given an axis variable? But this is now broken, and I am not sure where to look.

If this behavior is not intended this test can probably be removed, but the error should be better handled.

/Users/tommy/git/uvcdat-build/install/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/vcs/manageElements.py:735: UserWarning: the createyxvsx method is now obsolete, 1D graphics method have been unified,to avoid your code breaking in the future please change it to use: createoneD
  warnings.warn("the createyxvsx method is now obsolete, 1D graphics method have been unified,to avoid your code breaking in the future please change it to use: createoneD")
Traceback (most recent call last):
  File "/Users/tommy/git/uvcdat-build/install/vistrails/vistrails/core/modules/vistrails_module.py", line 327, in update
    self.compute()
  File "/Users/tommy/git/uvcdat-build/install/vistrails/vistrails/packages/uvcdat_cdms/init.py", line 1276, in compute
    self.cellWidget = self.displayAndWait(QCDATWidget, input_ports)
  File "/Users/tommy/git/uvcdat-build/install/vistrails/vistrails/packages/spreadsheet/basic_widgets.py", line 247, in displayAndWait
    return spreadsheetWindow.displayCellEvent(e)
  File "/Users/tommy/git/uvcdat-build/install/vistrails/vistrails/packages/spreadsheet/spreadsheet_window.py", line 491, in displayCellEvent
    sheet.setCellByType(row, col, e.cellType, e.inputPorts)
  File "/Users/tommy/git/uvcdat-build/install/vistrails/vistrails/packages/spreadsheet/spreadsheet_tab.py", line 320, in setCellByType
    newCell.updateContents(inputPorts)
  File "/Users/tommy/git/uvcdat-build/install/vistrails/vistrails/packages/uvcdat_cdms/init.py", line 1448, in updateContents
    self.canvas.plot(cgm,*args,**kwargs)
  File "/Users/tommy/git/uvcdat-build/install/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/vcs/Canvas.py", line 2549, in plot
    a = self.__plot( arglist, keyargs )
  File "/Users/tommy/git/uvcdat-build/install/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/vcs/Canvas.py", line 3485, in __plot
    gm=vcs.elements[tp][arglist[4]]
KeyError: ‘__yxvsx_86648776939766_yxvsx_'
@aashish24

This comment has been minimized.

Contributor

aashish24 commented Sep 22, 2014

Can you post the branch name as well here?

@williams13

This comment has been minimized.

Contributor

williams13 commented Sep 22, 2014

No, this is the intended solution. That is, if given a 1D variable for a 2D plot such as Boxfill, Isofill, or Isoline, it will revert to a 1D Yxvsx plot. We still want this behavior and should be fixed.

From: Tommy Ellqvist <notifications@github.commailto:notifications@github.com>
Reply-To: UV-CDAT/uvcdat <reply@reply.github.commailto:reply@reply.github.com>
Date: Monday, September 22, 2014 9:30 AM
To: UV-CDAT/uvcdat <uvcdat@noreply.github.commailto:uvcdat@noreply.github.com>
Subject: [uvcdat] Test cdms_load_and_plot_axis_variable fails (#689)

It can be reproduced by using a VCS/Boxfill and plot an axis variable like this one:
"${cdat_SOURCE_DIR}/libcdms/src/cdunif/test/testnc.nc:latitude_4x5”
Which gives the error below, and the spreadsheet breaks.

It looks like the result should be a Yxvsx plot. So the Boxfill plots a Yxvsx plot when given an axis variable? But this is now broken, and I am not sure where to look.

If this behavior is not intended this test can probably be removed, but the error should be better handled.

/Users/tommy/git/uvcdat-build/install/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/vcs/manageElements.py:735: UserWarning: the createyxvsx method is now obsolete, 1D graphics method have been unified,to avoid your code breaking in the future please change it to use: createoneD
warnings.warn("the createyxvsx method is now obsolete, 1D graphics method have been unified,to avoid your code breaking in the future please change it to use: createoneD")
Traceback (most recent call last):
File "/Users/tommy/git/uvcdat-build/install/vistrails/vistrails/core/modules/vistrails_module.py", line 327, in update
self.compute()
File "/Users/tommy/git/uvcdat-build/install/vistrails/vistrails/packages/uvcdat_cdms/init.py", line 1276, in compute
self.cellWidget = self.displayAndWait(QCDATWidget, input_ports)
File "/Users/tommy/git/uvcdat-build/install/vistrails/vistrails/packages/spreadsheet/basic_widgets.py", line 247, in displayAndWait
return spreadsheetWindow.displayCellEvent(e)
File "/Users/tommy/git/uvcdat-build/install/vistrails/vistrails/packages/spreadsheet/spreadsheet_window.py", line 491, in displayCellEvent
sheet.setCellByType(row, col, e.cellType, e.inputPorts)
File "/Users/tommy/git/uvcdat-build/install/vistrails/vistrails/packages/spreadsheet/spreadsheet_tab.py", line 320, in setCellByType
newCell.updateContents(inputPorts)
File "/Users/tommy/git/uvcdat-build/install/vistrails/vistrails/packages/uvcdat_cdms/init.py", line 1448, in updateContents
self.canvas.plot(cgm,args,*kwargs)
File "/Users/tommy/git/uvcdat-build/install/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/vcs/Canvas.py", line 2549, in plot
a = self.__plot( arglist, keyargs )
File "/Users/tommy/git/uvcdat-build/install/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/vcs/Canvas.py", line 3485, in __plot
gm=vcs.elements[tp][arglist[4]]
KeyError: ‘_yxvsx_86648776939766_yxvsx'


Reply to this email directly or view it on GitHubhttps://github.com//issues/689.

@rexissimus

This comment has been minimized.

Member

rexissimus commented Sep 22, 2014

There is no branch for this yet.

@rexissimus

This comment has been minimized.

Member

rexissimus commented Sep 23, 2014

Should this work?

>>> import cdms2, vcs
>>> f = cdms2.open('/Users/tommy/git/uvcdat/libcdms/src/cdunif/test/testnc.nc')
>>> canvas = vcs.init()
>>> canvas.boxfill(f.axes['latitude_4x5'])
KeyError: '__yxvsx_753941972065515_yxvsx_'
@williams13

This comment has been minimized.

Contributor

williams13 commented Sep 23, 2014

Your are correct, this should work, but is producing an error:

import cdms2, vcs
cdmsfile = cdms2.open( 'clt.nc' )
data = cdmsfile('clt', longitude=(-180, -180), latitude = (90., 90.), squeeze = 1)

data.info(), do this to show the data

x=vcs.init()
x.boxfill(data)
/Users/williams13/work/uvcdatj/build_uvcdat/install/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/vcs/manageElements.py:735: UserWarning: the createyxvsx method is now obsolete, 1D graphics method have been unified,to avoid your code breaking in the future please change it to use: createoneD
warnings.warn("the createyxvsx method is now obsolete, 1D graphics method have been unified,to avoid your code breaking in the future please change it to use: createoneD")
Traceback (most recent call last):
File "", line 1, in
File "/Users/williams13/work/uvcdatj/build_uvcdat/install/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/vcs/Canvas.py", line 1360, in boxfill
return self.__plot(arglist, parms)
File "/Users/williams13/work/uvcdatj/build_uvcdat/install/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/vcs/Canvas.py", line 3485, in __plot
gm=vcs.elements[tp][arglist[4]]
KeyError: '_yxvsx_493212840904967_yxvsx'

x.isofill(data)
Traceback (most recent call last):
File "", line 1, in
File "/Users/williams13/work/uvcdatj/build_uvcdat/install/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/vcs/Canvas.py", line 1519, in isofill
return self.__plot(arglist, parms)
File "/Users/williams13/work/uvcdatj/build_uvcdat/install/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/vcs/Canvas.py", line 3520, in __plot
raise vcsError, 'Invalid number of dimensions for %s' % arglist[3]
vcs.error.vcsError: Invalid number of dimensions for isofill

x.isoline(data)
Traceback (most recent call last):
File "", line 1, in
File "/Users/williams13/work/uvcdatj/build_uvcdat/install/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/vcs/Canvas.py", line 1575, in isoline
return self.__plot(arglist, parms)
File "/Users/williams13/work/uvcdatj/build_uvcdat/install/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/vcs/Canvas.py", line 3520, in __plot
raise vcsError, 'Invalid number of dimensions for %s' % arglist[3]
vcs.error.vcsError: Invalid number of dimensions for isoline

From: Tommy Ellqvist <notifications@github.commailto:notifications@github.com>
Reply-To: UV-CDAT/uvcdat <reply@reply.github.commailto:reply@reply.github.com>
Date: Tuesday, September 23, 2014 4:28 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] Test cdms_load_and_plot_axis_variable fails (#689)

Should this work?

import cdms2, vcs
f = cdms2.open('/Users/tommy/git/uvcdat/libcdms/src/cdunif/test/testnc.nc')
canvas = vcs.init()
canvas.boxfill(f.axes['latitude_4x5'])
KeyError: '_yxvsx_753941972065515_yxvsx'


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

@doutriaux1

This comment has been minimized.

Member

doutriaux1 commented Sep 23, 2014

in theory yes, let me fix this right away.

@doutriaux1 doutriaux1 added this to the 2.0.0 milestone Sep 23, 2014

@doutriaux1 doutriaux1 self-assigned this Sep 23, 2014

@doutriaux1

This comment has been minimized.

Member

doutriaux1 commented Sep 23, 2014

fixed in 2 separate branches
issue_689_1d_in_boxfill
issue_689_1d_with_manyDs
@aashish24 @williams13 please review
pngs of boxfill branch is off of staging2 build, i think pngs of second one as well not positive,

@rexissimus

This comment has been minimized.

Member

rexissimus commented Sep 24, 2014

Updated baseline png for test cdms_load_and_plot_axis_variable on branch issue_689_cdms_load_and_plot_axis_variable_baseline and merged into devel.

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