<div dir="ltr">the off-axis plot is like this:<div><a href="http://i.imgur.com/7fDuNTA.png">http://i.imgur.com/7fDuNTA.png</a><br></div><div style>so no one has done volume rendering on DM only sims?</div><div style>how can I provide a 3d view of the zoom in box ( if there are alternative ways)?</div>
<div style>Regards,</div><div style><br></div><div style>-Mohammad</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Wed, Sep 4, 2013 at 3:09 PM, Sam Skillman <span dir="ltr"><<a href="mailto:samskillman@gmail.com" target="_blank">samskillman@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi Mohammad,<div><br></div><div>I just filed an issue for this, as it has to do with taking the log of a field that has zeros/negatives.  There may not be a quick turnaround on fixing this issue, but I've assigned it to me. I have some thoughts on how to address this but it needs some more thinking.</div>


<div><br></div><div><a href="https://bitbucket.org/yt_analysis/yt/issue/647/volume-rendering-log-fields-zeros" target="_blank">https://bitbucket.org/yt_analysis/yt/issue/647/volume-rendering-log-fields-zeros</a><br></div>
<div><br></div>
<div>
Best,</div><div>Sam</div></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><br><div class="gmail_quote">On Wed, Sep 4, 2013 at 10:53 AM, Matthew Turk <span dir="ltr"><<a href="mailto:matthewturk@gmail.com" target="_blank">matthewturk@gmail.com</a>></span> wrote:<br>


<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Mohammad,<br>
<br>
I'm not really sure.  Try using an OffAxisProjectionPlot to see if it<br>
looks like anything.  You should just be able to specify the<br>
orientation and field, and it should give back a column density.<br>
<br>
-Matt<br>
<br>
On Wed, Sep 4, 2013 at 1:39 PM, mohammad safarzadeh<br>
<div><div><<a href="mailto:mtsafarzadeh@gmail.com" target="_blank">mtsafarzadeh@gmail.com</a>> wrote:<br>
> I tried this, but I still get a blank black figure:<br>
><br>
> import numpy as np<br>
> from yt.mods import *<br>
> from yt.analysis_modules.halo_finding.api import *<br>
> Npixels=512<br>
> L=[1,1,1]<br>
> c_x =np.array( [ 0.5696202374 , 0.5330663554 , 0.4554251862 ])<br>
> c_X =np.array( [ 0.5657944233 , 0.524785043 , 0.4587818409 ])<br>
> for i in range(42,41,-1):<br>
>         t1="RD00%s"%i<br>
>         t2="RedshiftOutput00%s"%i<br>
>         pf=load(t1+'/'+t2)<br>
><br>
> W=1/pf["Mpc"]<br>
> c=(c_x+c_X)/2.<br>
> le=c-np.array(3*[2])/pf['Mpc']<br>
> re=c+np.array(3*[2])/pf['Mpc']<br>
><br>
> region=pf.h.region(c, le,re)<br>
><br>
> region=pf.h.region(c, le,re,fields="particle_density" )<br>
> mi,ma=region.quantities["Extrema"]("particle_density")[0]<br>
> mi=-24<br>
> ma=np.log10(ma)<br>
> tf = ColorTransferFunction((mi,ma))<br>
> tf.add_layers(5, w=0.02, colormap="spectral")<br>
> cam=region.pf.h.camera(c, L, W, Npixels,<br>
> tf,fields=["particle_density"],log_fields=True)<br>
> cam.snapshot("%s_volume_rendered.png" % pf, clip_ratio=8.0)<br>
><br>
> -Mohammad<br>
><br>
><br>
> On Wed, Sep 4, 2013 at 1:13 PM, Matthew Turk <<a href="mailto:matthewturk@gmail.com" target="_blank">matthewturk@gmail.com</a>> wrote:<br>
>><br>
>> Hi Mohammad,<br>
>><br>
>> You have to tell the transfer function that you want some levels to<br>
>> correspond to various colors.  An easy way to do that is with<br>
>> tf.add_layers().  Otherwise, the transfer function is blank, and it<br>
>> won't update the image as the rays traverse the domain.<br>
>><br>
>> -Matt<br>
>><br>
>> On Wed, Sep 4, 2013 at 1:04 PM, mohammad safarzadeh<br>
>> <<a href="mailto:mtsafarzadeh@gmail.com" target="_blank">mtsafarzadeh@gmail.com</a>> wrote:<br>
>> > Hi,<br>
>> > I am trying to do VR on a halo in my zoom-in region which is a dark<br>
>> > matter<br>
>> > only sim, but I get a black image when I try this:<br>
>> ><br>
>> > L=[1,1,1]<br>
>> ><br>
>> > W=1/pf["Mpc"]<br>
>> ><br>
>> > n [16]: mi,ma=region.quantities["Extrema"]("particle_density")[0]<br>
>> ><br>
>> ><br>
>> > In [17]: mi<br>
>> ><br>
>> > Out[17]: 0.0<br>
>> ><br>
>> ><br>
>> > In [18]: ma<br>
>> ><br>
>> > Out[18]: 4.5282895435060503e-24<br>
>> ><br>
>> ><br>
>> > In [21]: np.log10(ma)<br>
>> ><br>
>> > Out[21]: -23.344065811694637<br>
>> ><br>
>> ><br>
>> > mi=-24<br>
>> ><br>
>> > ma=np.log10(ma)<br>
>> ><br>
>> > tf = ColorTransferFunction((mi,ma))<br>
>> ><br>
>> > cam=region.pf.h.camera(c, L, W, Npixels,<br>
>> > tf,fields=["particle_density"],log_fields=True)<br>
>> ><br>
>> ><br>
>> > ImageArray([[[ 0.,  0.,  0.,  1.],<br>
>> ><br>
>> >         [ 0.,  0.,  0.,  1.],<br>
>> ><br>
>> >         [ 0.,  0.,  0.,  1.],<br>
>> ><br>
>> >         ...,<br>
>> ><br>
>> >         [ 0.,  0.,  0.,  1.],<br>
>> ><br>
>> >         [ 0.,  0.,  0.,  1.],<br>
>> ><br>
>> >         [ 0.,  0.,  0.,  1.]],<br>
>> ><br>
>> ><br>
>> >        [[ 0.,  0.,  0.,  1.],<br>
>> ><br>
>> >         [ 0.,  0.,  0.,  1.],<br>
>> ><br>
>> >         [ 0.,  0.,  0.,  1.],<br>
>> ><br>
>> >         ...,<br>
>> ><br>
>> >         [ 0.,  0.,  0.,  1.],<br>
>> ><br>
>> >         [ 0.,  0.,  0.,  1.],<br>
>> ><br>
>> >         [ 0.,  0.,  0.,  1.]],….<br>
>> ><br>
>> ><br>
>> > what is the mistake that I am doing?<br>
>> ><br>
>> ><br>
>> > -Regards,<br>
>> ><br>
>> > Mohammad<br>
>> ><br>
>> ><br>
>> > _______________________________________________<br>
>> > yt-users mailing list<br>
>> > <a href="mailto:yt-users@lists.spacepope.org" target="_blank">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" target="_blank">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>
><br>
> _______________________________________________<br>
> yt-users mailing list<br>
> <a href="mailto:yt-users@lists.spacepope.org" target="_blank">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" target="_blank">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></div>
</div></div><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></blockquote></div><br></div>