Hi Wolfram,<br><br>For your second question, if you are asking about how to change the x and y limits of the image place for a slice, you can do that with:<br>pc.set_lim((xmin, xmax, ymin, ymax))<br><br>Britton<br><br><div class="gmail_quote">
On Fri, Dec 17, 2010 at 11:01 AM, Matthew Turk <span dir="ltr"><<a href="mailto:matthewturk@gmail.com">matthewturk@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
Hi Wolfram,<br>
<div class="im"><br>
On Fri, Dec 17, 2010 at 12:58 AM, Wolfram Schmidt<br>
<<a href="mailto:schmidt@astro.physik.uni-goettingen.de">schmidt@astro.physik.uni-goettingen.de</a>> wrote:<br>
> Hi,<br>
><br>
> I've got two questions:<br>
><br>
> (1) Is it possible to change the colors of grid boundaries (produced<br>
> with the grids callback), preferably, using different colors<br>
> corresponding to refinement levels?<br>
<br>
</div>As it's written in the code currently, no, this isn't available.  But<br>
I was able to modify the existing one to handle this.  I've placed a<br>
copy here:<br>
<br>
<a href="http://paste.enzotools.org/show/1446/" target="_blank">http://paste.enzotools.org/show/1446/</a><br>
<br>
which you can download with:<br>
<br>
yt_lodgeit.py --download=1446<br>
<br>
If you put this in ~/.yt/my_plugins.py, it should be accessible as<br>
"level_grids", for instance:<br>
<br>
pf = load("tests/DD0010/moving7_0010")<br>
pc = PlotCollection(pf, [0.5, 0.5, 0.5])<br>
p = pc.add_projection("Density", 0)<br>
p.modify["level_grids"](1, color=(0.0,0.0,0.0))<br>
p.modify["level_grids"](2, color=(1.0,0.0,0.0))<br>
p.modify["level_grids"](3, color=(0.0,1.0,0.0))<br>
pc.save()<br>
<br>
the first argument is the level, then you specify the color in an rgb triple.<br>
<div class="im"><br>
><br>
> (2) Surely, there must be something to specify the x- and y-range<br>
> of slices. Where in the documentation is it explained how to do that?<br>
<br>
</div>The slice operator in yt is an infinitely thin, and only returns those<br>
cells it intersects.  One option would be to take a thin projection,<br>
where the line integral or the average through some thin set of the<br>
domain is taken:<br>
<br>
thickness = 0.1<br>
pc.add_thin_projection("Density", 0, thickness)<br>
<br>
However, one word of caution is that the thin projection operator is<br>
greedy; any cell that it intersects with will be selected *wholly*.<br>
This can lead to artifacts if you take straight line integrals.  If<br>
you average, these artifacts will be somewhat less visible.<br>
<br>
If you want to be much more careful with thick projections, using both<br>
interpolation and paths that do not operate in full cell width<br>
intervals, you can use the ProjectionTransferFunction to volume render<br>
it, which will take the line integral as specified along an image<br>
plane.<br>
<br>
Hope that helps,<br>
<br>
Matt<br>
<div><div></div><div class="h5"><br>
><br>
> Best regards,<br>
> Wolfram<br>
> _______________________________________________<br>
> yt-users mailing list<br>
> <a href="mailto:yt-users@lists.spacepope.org">yt-users@lists.spacepope.org</a><br>
> <a href="http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org" target="_blank">http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org</a><br>
><br>
_______________________________________________<br>
yt-users mailing list<br>
<a href="mailto:yt-users@lists.spacepope.org">yt-users@lists.spacepope.org</a><br>
<a href="http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org" target="_blank">http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org</a><br>
</div></div></blockquote></div><br>