[yt-users] Projection Question
Matthew Turk
matthewturk at gmail.com
Mon Apr 8 22:41:19 PDT 2013
Hi Dave,
On Mon, Apr 8, 2013 at 6:07 PM, david collins <dcollins4096 at gmail.com> wrote:
> Hi, Everybody!
>
> I have a probably dumb question. I keep getting the following error when
> projecting. I get this from a variety of methods, but what I'm trying to do
> is project a region. What I used to do was something like this, but it's no
> longer working (with or without the source.)
>
> reg = pf.h.region(center,left,right)
> pf = load(thing)
> pc = PlotCollection(pf)
> proj = pf.h.proj(0,'Density',center=Center) #,source=reg)
> prooj = pc.add_projection('Density','x') #,data_source=reg)
So we're on the same page, would you mind showing how you create
center, left, right, and what their values are? And would it also be
possible to have you run:
print reg.quantities["TotalQuantity"]("CellVolumeCode")
print reg.quantities["Extrema"]("Density")
Thanks,
Matt
>
> So my question is: with the recent developments to yt, what's the best
> mechanism to do this?
> I'm on a self install that was done fresh pretty recently, the hash is
> 34b95297062b
>
> Thanks,
> d.
>
>
> prooj = pc.add_projection('Density','x',data_source=reg)
> File
> "/nics/b/home/collins/local_2013_03_12/src/yt-hg/yt/visualization/plot_collection.py",
> line 786, in add_projection
> size=fig_size, periodic=periodic))
> File
> "/nics/b/home/collins/local_2013_03_12/src/yt-hg/yt/visualization/plot_types.py",
> line 326, in __init__
> self.__init_temp_image(use_colorbar)
> File
> "/nics/b/home/collins/local_2013_03_12/src/yt-hg/yt/visualization/plot_types.py",
> line 358, in __init_temp_image
> shrink=0.95)
> File
> "/nics/b/home/collins/local_2013_03_12/lib/python2.7/site-packages/matplotlib/figure.py",
> line 1387, in colorbar
> cb = cbar.colorbar_factory(cax, mappable, **kw)
> File
> "/nics/b/home/collins/local_2013_03_12/lib/python2.7/site-packages/matplotlib/colorbar.py",
> line 1173, in colorbar_factory
> cb = Colorbar(cax, mappable, **kwargs)
> File
> "/nics/b/home/collins/local_2013_03_12/lib/python2.7/site-packages/matplotlib/colorbar.py",
> line 854, in __init__
> ColorbarBase.__init__(self, ax, **kw)
> File
> "/nics/b/home/collins/local_2013_03_12/lib/python2.7/site-packages/matplotlib/colorbar.py",
> line 298, in __init__
> self.draw_all()
> File
> "/nics/b/home/collins/local_2013_03_12/lib/python2.7/site-packages/matplotlib/colorbar.py",
> line 323, in draw_all
> self._config_axes(X, Y)
> File
> "/nics/b/home/collins/local_2013_03_12/lib/python2.7/site-packages/matplotlib/colorbar.py",
> line 409, in _config_axes
> self.update_ticks()
> File
> "/nics/b/home/collins/local_2013_03_12/lib/python2.7/site-packages/matplotlib/colorbar.py",
> line 345, in update_ticks
> ticks, ticklabels, offset_string = self._ticker()
> File
> "/nics/b/home/collins/local_2013_03_12/lib/python2.7/site-packages/matplotlib/colorbar.py",
> line 560, in _ticker
> ticks = self._locate(b)
> File
> "/nics/b/home/collins/local_2013_03_12/lib/python2.7/site-packages/matplotlib/colorbar.py",
> line 808, in _locate
> z = np.take(y, i0) + (xn-np.take(b,i0))*dy/db
>
>
> _______________________________________________
> yt-users mailing list
> yt-users at lists.spacepope.org
> http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
>
More information about the yt-users
mailing list