[yt-users] Problem with volume rendering

Joshua G. Albert albert at strw.leidenuniv.nl
Mon Feb 24 06:05:39 PST 2014


Hello,

Attn: Sam Skillman (Matthew thinks you might know a solution)

I'm attempting to follow the Simple Volume Rendering recipe given in the 
cookbook 
(http://yt-project.org/doc/cookbook/simple_plots.html#Simple_Volume_Rendering). 
I'm using Ramses simulation output and after consulting Matthew Turk it 
should be fine, using the bleeding edge version, which I am. My code 
that fails is:

pf = load(header)
dd = pf.h.all_data()
mi,ma = dd.quantities['Extrema']('Density')[0]
tf = ColorTransferFunction((np.log10(mi)+1,np.log10(ma)))
tf.add_layers(5,w=0.02)
center=pf.domain_center
look = [0.0,0.0,-1.0]
width = 1.0
res = 512
cam = pf.h.camera(center,look,width,res,tf)
cam.snapshot("%s_test_snap.png" % pf, clip_ratio=8.0)
#Something fails in the progressbar of all places!

I get a series of "Failed to split grids."

It fails at snapshot, and at the end of the traceback I find:

/data2/albert/ramses/yt-x86_64/src/yt-hg/yt/extern/progressbar/widgets.pyc 
in update_js(self, pbar)
     344             $myPB.progressbar({{value: 0, max: {pbar.maxval:d}}});
     345         }}
--> 346         """.format(divid=self.uuid, pbar=pbar)
     347
     348

ValueError: Unknown format code 'd' for object of type 'float'

Any idea how to solve this easily? Possibly a good idea to optionally 
remove the progressbar in the future?

-- 
Best Regards,

Joshua G. Albert



More information about the yt-users mailing list