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

Vector animation implementation needs finishing #81

Open
chaosphere2112 opened this issue Nov 23, 2016 · 1 comment
Open

Vector animation implementation needs finishing #81

chaosphere2112 opened this issue Nov 23, 2016 · 1 comment
Assignees
Labels
bug medium Medium Priority Bugs
Milestone

Comments

@chaosphere2112
Copy link
Contributor

#1450 removes the VTK pipeline rebuilding code from VTKPlots.py, and with it goes a partial implementation for vector plots. I've ported this bit into unmerged commit 1ffc97a6e029d3988be8b26df3b4713ffa083181 (branch https://github.com/UV-CDAT/uvcdat/tree/update_input_vector), made sure a complete pipeline would persist through the animation steps, and added a test.

Migrated from: CDAT/cdat#1451

@doutriaux1 doutriaux1 modified the milestone: 3.0 May 5, 2017
@doutriaux1 doutriaux1 modified the milestones: 3.0, post 3.0 Mar 29, 2018
@doutriaux1 doutriaux1 modified the milestones: 8.1, 8.2 Mar 27, 2019
@doutriaux1
Copy link
Contributor

doutriaux1 commented Apr 17, 2019

on nightly i get:

import vcs, cdms2, MV2                                                                                                                                                                                                 
import cdat_info  ; f = cdms2.open(cdat_info.get_sampledata_path()+"/clt.nc")                                                                                                                                          
u = f("u")                                                                                                                                                                                                             
v = f("v")                                                                                                                                                                                                             
gm = vcs.createvector()                                                                                                                                                                                                
x = vcs.init()                                                                                                                                                                                                         
x.plot(u,v,gm)                                                                                                                                                                                                         
x.interact()                                                                                                                                                                                                          

Then click [configure]->[Open Animation]->[Run]

---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
/1TB/git/vcs/vcs/configurator.py in animate(self, obj, event)
    702                 self.canvas.animate.number_of_frames(),
    703                 render_offscreen=False,
--> 704                 allow_static=False)
    705 
    706     def start_animating(self):

/1TB/git/vcs/vcs/VTKAnimate.py in draw_frame(self, frame_num, render_offscreen, allow_static, main_window_png)
    315                 self._number_of_dims_used_for_plot,
    316                 frame_num,
--> 317                 update=False)
    318 
    319             self.vcs_self.backend.renWin.Render()

/1TB/git/vcs/vcs/VTKAnimate.py in update_input(canvas, dimensions, frame_num, update)
     42                 slabs[1](
     43                     *args),
---> 44                 update=update)
     45 
     46 

/1TB/git/vcs/vcs/VTKPlots.py in update_input(self, vtkobjects, array1, array2, update)
   1759             vcs2vtk.setArray(vg, array1.filled(0).flat, "scalar",
   1760                              isCellData=vg.GetCellData().GetScalars(),
-> 1761                              isScalars=True)
   1762 
   1763             if "vtk_backend_filter" in vtkobjects:

/1TB/git/vcs/vcs/vcs2vtk.py in setArray(grid, array, arrayName, isCellData, isScalars)
    214     if (pedigreeId):
    215         vtkarray = attributes.GetArray(arrayName)
--> 216         for i in range(0, vtkarray.GetNumberOfTuples()):
    217             vtkarray.SetValue(i, array[pedigreeId.GetValue(i)])
    218     else:

AttributeError: 'NoneType' object has no attribute 'GetNumberOfTuples'

@doutriaux1 doutriaux1 added the bug label Apr 17, 2019
@doutriaux1 doutriaux1 added the medium Medium Priority Bugs label Apr 17, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug medium Medium Priority Bugs
Projects
None yet
Development

No branches or pull requests

3 participants