[yt-users] volume rendering for gadget

Yuxiang Qin yuxiangq at student.unimelb.edu.au
Wed Nov 11 20:33:56 PST 2015


Hi YTers,

I am using my old scripts to do volume rendering with my gadget data. However with the new installed yt (3.2.1) it fails every time when I output the picture using:

cam = ds.camera(c, [0.0, 0.0, 1.0], ds.domain_width, 1024, tf,                                       
    fields=["density"], no_ghost=False)#, log_fields=[True])    

####### failed from here !!!######                                     
im = cam.snapshot("../results/NOSN_NOZCOOL_L010N0256/rendering_%03d.png"%(snapshot),clip_ratio=4.0)  

The error is RuntimeError:
Traceback (most recent call last):                                                                                        
  File "yt_rendering_parallel_simple.py", line 47, in <module>                                                            
    im = cam.snapshot("../results/NOSN_NOZCOOL_L010N0256/rendering_%03d.png"%(snapshot),clip_ratio=4.0)                   
  File "/mnt/home/yqin/programs/yt-x86_64/src/yt-hg/yt/visualization/volume_rendering/camera.py", line 769, in snapshot   
    self.initialize_source()                                                                                              
  File "/mnt/home/yqin/programs/yt-x86_64/src/yt-hg/yt/visualization/volume_rendering/camera.py", line 721, in initialize$
source                                                                                                                    
    self.no_ghost)                                                                                                        
  File "/mnt/home/yqin/programs/yt-x86_64/src/yt-hg/yt/utilities/amr_kdtree/amr_kdtree.py", line 180, in initialize_sourc$
    self.set_fields(fields, log_fields, no_ghost)                                                                         
  File "/mnt/home/yqin/programs/yt-x86_64/src/yt-hg/yt/utilities/amr_kdtree/amr_kdtree.py", line 170, in set_fields       
    for b in self.traverse():                                                                                             
  File "/mnt/home/yqin/programs/yt-x86_64/src/yt-hg/yt/utilities/amr_kdtree/amr_kdtree.py", line 184, in traverse         
    yield self.get_brick_data(node)                                                                                       
  File "/mnt/home/yqin/programs/yt-x86_64/src/yt-hg/yt/utilities/amr_kdtree/amr_kdtree.py", line 271, in get_brick_data   
    vcd = grid.get_vertex_centered_data(field, smoothed=True, no_ghost=self.no_ghost).astype('float64')                   
  File "/mnt/home/yqin/programs/yt-x86_64/src/yt-hg/yt/data_objects/grid_patch.py", line 280, in get_vertex_centered_data 
    cg = self.retrieve_ghost_zones(1, field, smoothed=smoothed)                                                           
  File "/mnt/home/yqin/programs/yt-x86_64/src/yt-hg/yt/data_objects/grid_patch.py", line 257, in retrieve_ghost_zones     
    **kwargs)                                                                                                             
  File "/mnt/home/yqin/programs/yt-x86_64/src/yt-hg/yt/data_objects/construction_data_containers.py", line 841, in __init$
_                                                                                                                         
    YTCoveringGridBase.__init__(self, *args, **kwargs)                                                                    
  File "/mnt/home/yqin/programs/yt-x86_64/src/yt-hg/yt/data_objects/construction_data_containers.py", line 517, in __init$
_                                                                                                                         
    self.get_data(fields)                                                                                                 
  File "/mnt/home/yqin/programs/yt-x86_64/src/yt-hg/yt/data_objects/construction_data_containers.py", line 600, in get_da$
a                                                                                                                         
    if len(fill) > 0: self._fill_fields(fill)                                                                             
  File "/mnt/home/yqin/programs/yt-x86_64/src/yt-hg/yt/data_objects/construction_data_containers.py", line 879, in _fill_$
ields                                                                                                                     
    raise RuntimeError                                                                                                    
RuntimeError                                                                                                              

Am I missing something updated in the new yt code? 

Cheers,
Yuxiang

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.spacepope.org/pipermail/yt-users-spacepope.org/attachments/20151112/6e8b6c9f/attachment.htm>


More information about the yt-users mailing list