<meta http-equiv="Content-Type" content="text/html; charset=utf-8"><div dir="ltr">Hi,<div>  Thank you both. Nathan, is there a way to change the resolution of the frb using your approach?</div><div>  Thanks again,</div><div>  Sandy</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Mar 16, 2015 at 10:21 AM,  <span dir="ltr"><<a href="mailto:yt-users-request@lists.spacepope.org" target="_blank">yt-users-request@lists.spacepope.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Send yt-users mailing list submissions to<br>
        <a href="mailto:yt-users@lists.spacepope.org">yt-users@lists.spacepope.org</a><br>
<br>
To subscribe or unsubscribe via the World Wide Web, visit<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>
or, via email, send a message with subject or body 'help' to<br>
        <a href="mailto:yt-users-request@lists.spacepope.org">yt-users-request@lists.spacepope.org</a><br>
<br>
You can reach the person managing the list at<br>
        <a href="mailto:yt-users-owner@lists.spacepope.org">yt-users-owner@lists.spacepope.org</a><br>
<br>
When replying, please edit your Subject line so it is more specific<br>
than "Re: Contents of yt-users digest..."<br>
<br>
<br>
Today's Topics:<br>
<br>
   1. Re: What's the best way to project volume density to      surface<br>
      density? (Suoqing JI)<br>
   2. Re: What's the best way to project volume density to surface<br>
      density? (Nathan Goldbaum)<br>
   3. Re: twinkle while rotate during volume rendering (Michael Zingale)<br>
<br>
<br>
----------------------------------------------------------------------<br>
<br>
Message: 1<br>
Date: Sun, 15 Mar 2015 19:43:18 -0700<br>
From: Suoqing JI <<a href="mailto:suoqing@physics.ucsb.edu">suoqing@physics.ucsb.edu</a>><br>
To: Discussion of the yt analysis package<br>
        <<a href="mailto:yt-users@lists.spacepope.org">yt-users@lists.spacepope.org</a>><br>
Subject: Re: [yt-users] What's the best way to project volume density<br>
        to      surface density?<br>
Message-ID: <<a href="mailto:F495764F-5CA0-4E90-B98B-29D02176F900@physics.ucsb.edu">F495764F-5CA0-4E90-B98B-29D02176F900@physics.ucsb.edu</a>><br>
Content-Type: text/plain; charset="utf-8"<br>
<br>
Hi Sandy,<br>
<br>
I think you mean by this: <a href="http://yt-project.org/docs/2.6/reference/api/generated/yt.data_objects.data_containers.AMRSliceBase.to_frb.html?highlight=to_frb" target="_blank">http://yt-project.org/docs/2.6/reference/api/generated/yt.data_objects.data_containers.AMRSliceBase.to_frb.html?highlight=to_frb</a> <<a href="http://yt-project.org/docs/2.6/reference/api/generated/yt.data_objects.data_containers.AMRSliceBase.to_frb.html?highlight=to_frb" target="_blank">http://yt-project.org/docs/2.6/reference/api/generated/yt.data_objects.data_containers.AMRSliceBase.to_frb.html?highlight=to_frb</a>><br>
<br>
where frb[?Density?] is just the data you want.<br>
<br>
Best wishes,<br>
--<br>
Suoqing JI<br>
Ph.D Student<br>
Department of Physics<br>
University of California, Santa Barbara<br>
<a href="http://web.physics.ucsb.edu/~suoqing" target="_blank">http://web.physics.ucsb.edu/~suoqing</a><br>
<br>
> On Mar 15, 2015, at 7:07 PM, Sandy Yuan <<a href="mailto:sihany@princeton.edu">sihany@princeton.edu</a>> wrote:<br>
><br>
> Hi all,<br>
>   I have created a box object centered on a galaxy in an enzo cosmological simulation. What is the best way to project the volume density field of the object along the x,y,z axes to obtain the surface densities in yt 2.6? I can visualize the projection by using ProjectionPlot, but I don't know how to get the actual surface density data in this way. There is also the proj command, but I am not sure how to use it. Any help would be greatly appreciated.<br>
>   Thanks a lot in advance,<br>
> --<br>
> Sandy<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>
-------------- next part --------------<br>
An HTML attachment was scrubbed...<br>
URL: <<a href="http://lists.spacepope.org/pipermail/yt-users-spacepope.org/attachments/20150315/7ca30403/attachment-0001.htm" target="_blank">http://lists.spacepope.org/pipermail/yt-users-spacepope.org/attachments/20150315/7ca30403/attachment-0001.htm</a>><br>
<br>
------------------------------<br>
<br>
Message: 2<br>
Date: Sun, 15 Mar 2015 20:08:26 -0700<br>
From: Nathan Goldbaum <<a href="mailto:nathan12343@gmail.com">nathan12343@gmail.com</a>><br>
To: Discussion of the yt analysis package<br>
        <<a href="mailto:yt-users@lists.spacepope.org">yt-users@lists.spacepope.org</a>><br>
Subject: Re: [yt-users] What's the best way to project volume density<br>
        to surface density?<br>
Message-ID:<br>
        <<a href="mailto:CAJXewOn1ghu0-pyzgW9-Y8ZOKjzeUAgJcYVsQygWJAPhjuGuDg@mail.gmail.com">CAJXewOn1ghu0-pyzgW9-Y8ZOKjzeUAgJcYVsQygWJAPhjuGuDg@mail.gmail.com</a>><br>
Content-Type: text/plain; charset="utf-8"<br>
<br>
Alternatively, if you already have a ProjectionPlot, you can get its<br>
associated FRB object like so:<br>
<br>
plot = ProjectionPlot(...)<br>
<br>
frb = plot._frb<br>
<br>
dens_image = frb['density']<br>
<br>
You can also access the frb via plot.frb in yt 3.0 or newer.<br>
<br>
To use suoqing's method you will need to create a custom projection data<br>
object.  This is the "proj" function you were confused about.<br>
<br>
I'd encourage you to look at these pages in th docs to learn more about<br>
data objects and how to use them:<br>
<br>
<a href="http://yt-project.org/docs/3.1/analyzing/objects.html" target="_blank">http://yt-project.org/docs/3.1/analyzing/objects.html</a><br>
<br>
Note these are the docs for yt 3.1 but the concepts are the same for 2.6,<br>
just somewhat different syntax.<br>
<br>
On Sunday, March 15, 2015, Suoqing JI <<a href="mailto:suoqing@physics.ucsb.edu">suoqing@physics.ucsb.edu</a>> wrote:<br>
<br>
> Hi Sandy,<br>
><br>
> I think you mean by this:<br>
> <a href="http://yt-project.org/docs/2.6/reference/api/generated/yt.data_objects.data_containers.AMRSliceBase.to_frb.html?highlight=to_frb" target="_blank">http://yt-project.org/docs/2.6/reference/api/generated/yt.data_objects.data_containers.AMRSliceBase.to_frb.html?highlight=to_frb</a><br>
><br>
> where frb[?Density?] is just the data you want.<br>
><br>
> Best wishes,<br>
> --<br>
> Suoqing JI<br>
> Ph.D Student<br>
> Department of Physics<br>
> University of California, Santa Barbara<br>
> <a href="http://web.physics.ucsb.edu/~suoqing" target="_blank">http://web.physics.ucsb.edu/~suoqing</a><br>
><br>
> On Mar 15, 2015, at 7:07 PM, Sandy Yuan <<a href="mailto:sihany@princeton.edu">sihany@princeton.edu</a><br>
> <javascript:_e(%7B%7D,'cvml','<a href="mailto:sihany@princeton.edu">sihany@princeton.edu</a>');>> wrote:<br>
><br>
> Hi all,<br>
>   I have created a box object centered on a galaxy in an enzo cosmological<br>
> simulation. What is the best way to project the volume density field of the<br>
> object along the x,y,z axes to obtain the surface densities in yt 2.6? I<br>
> can visualize the projection by using ProjectionPlot, but I don't know how<br>
> to get the actual surface density data in this way. There is also the proj<br>
> command, but I am not sure how to use it. Any help would be greatly<br>
> appreciated.<br>
>   Thanks a lot in advance,<br>
> --<br>
> Sandy<br>
>  _______________________________________________<br>
> yt-users mailing list<br>
> <a href="mailto:yt-users@lists.spacepope.org">yt-users@lists.spacepope.org</a><br>
> <javascript:_e(%7B%7D,'cvml','<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>
><br>
-------------- next part --------------<br>
An HTML attachment was scrubbed...<br>
URL: <<a href="http://lists.spacepope.org/pipermail/yt-users-spacepope.org/attachments/20150315/1d117125/attachment-0001.htm" target="_blank">http://lists.spacepope.org/pipermail/yt-users-spacepope.org/attachments/20150315/1d117125/attachment-0001.htm</a>><br>
<br>
------------------------------<br>
<br>
Message: 3<br>
Date: Mon, 16 Mar 2015 10:21:22 -0400<br>
From: Michael Zingale <<a href="mailto:michael.zingale@stonybrook.edu">michael.zingale@stonybrook.edu</a>><br>
To: Discussion of the yt analysis package<br>
        <<a href="mailto:yt-users@lists.spacepope.org">yt-users@lists.spacepope.org</a>><br>
Subject: Re: [yt-users] twinkle while rotate during volume rendering<br>
Message-ID:<br>
        <<a href="mailto:CAGO1_wr9hx_Fejqk6Wk6qR2osM9LDKe13ewUeChJn80HYUxUFg@mail.gmail.com">CAGO1_wr9hx_Fejqk6Wk6qR2osM9LDKe13ewUeChJn80HYUxUFg@mail.gmail.com</a>><br>
Content-Type: text/plain; charset="utf-8"<br>
<br>
My thought was that clip_ratio operates on each render independently, so it<br>
will adjust the scale of one frame of your movie without knowing about the<br>
other frames.  Instead, you want a constant normalization throughout the<br>
entire sequence.  This may mean computing the normalization once and then<br>
manually normalizing each frame by the same amount.  That's the approach I<br>
usually do.<br>
<br>
On Sun, Mar 15, 2015 at 9:13 PM, Yuxiang Qin <<br>
<a href="mailto:yuxiangq@student.unimelb.edu.au">yuxiangq@student.unimelb.edu.au</a>> wrote:<br>
<br>
> Hi Matthew,<br>
><br>
> I think I misunderstood you and Michael. Are you saying clip_ratio limits<br>
> the data according to std()? If so, what?s the difference between using<br>
> clip_ratio and restricting data by std() manually? Btw, I actually used<br>
> clip_ratio every time when I rotate the camera.<br>
><br>
> Cheers,<br>
> Yuxiang<br>
><br>
> On 13 Mar 2015, at 10:43, Matthew Turk <<a href="mailto:matthewturk@gmail.com">matthewturk@gmail.com</a>> wrote:<br>
><br>
> I think that's a likely possibility! I do the same. This can be mitigated<br>
> by supplying a clip ratio because that is with respect to the std(), not<br>
> max(), which is often slower varying.<br>
><br>
> On Thu, Mar 12, 2015, 6:40 PM Michael Zingale <<br>
> <a href="mailto:michael.zingale@stonybrook.edu">michael.zingale@stonybrook.edu</a>> wrote:<br>
><br>
>> I'm not 100% sure, but when you feed the clip_ratio to the camera, it<br>
>> will renomalize each image indepedently using the max value for that<br>
>> particular image, so the overall scaling is not preserved from one image to<br>
>> the next.  I've done this instead by defining the amount I want to rescale<br>
>> based on the first image and then manually rescaling all the other images<br>
>> with the same factor.<br>
>><br>
>> On Thu, Mar 12, 2015 at 7:32 PM, Yuxiang Qin <<br>
>> <a href="mailto:yuxiangq@student.unimelb.edu.au">yuxiangq@student.unimelb.edu.au</a>> wrote:<br>
>><br>
>>> yes, it?s a gadget data. I would try it now.<br>
>>><br>
>>><br>
>>> On 13 Mar 2015, at 10:30, Sam Skillman <<a href="mailto:samskillman@gmail.com">samskillman@gmail.com</a>> wrote:<br>
>>><br>
>>> Just a quick thought, can you remove try removing the .transpose() after<br>
>>> block['gas','density']?  Is this gadget data?<br>
>>><br>
>>> On Thu, Mar 12, 2015 at 4:22 PM Yuxiang Qin <<a href="mailto:yuxiang.l.qin@gmail.com">yuxiang.l.qin@gmail.com</a>><br>
>>> wrote:<br>
>>><br>
>>>> Hi Sam,<br>
>>>><br>
>>>> Here are the scripts (I use the parallel script to render on different<br>
>>>> snapshot and use the normal script to do the rotation and zoom) :<br>
>>>><br>
>>>><br>
>>>> and result:<br>
>>>><br>
>>>> <a href="https://www.dropbox.com/s/50yrzjj3rg3pdo0/rendering.gif?dl=0" target="_blank">https://www.dropbox.com/s/50yrzjj3rg3pdo0/rendering.gif?dl=0</a><br>
>>>><br>
>>>> Thanks for your help!<br>
>>>><br>
>>>> Cheers,<br>
>>>> Yuxiang<br>
>>>><br>
>>>> On 13 Mar 2015, at 07:45, Sam Skillman <<a href="mailto:samskillman@gmail.com">samskillman@gmail.com</a>> wrote:<br>
>>>><br>
>>>> Hi Yuxiang,<br>
>>>> Can you attach the script you used, or perhaps paste it on<br>
>>>> <a href="http://paste.yt-project.org/" target="_blank">http://paste.yt-project.org/</a> and send the resulting link?<br>
>>>> Thanks,<br>
>>>> Sam<br>
>>>><br>
>>>> On Wed, Mar 11, 2015 at 7:46 PM Yuxiang Qin <<br>
>>>> <a href="mailto:yuxiangq@student.unimelb.edu.au">yuxiangq@student.unimelb.edu.au</a>> wrote:<br>
>>>><br>
>>>>> Hi Professor Zingale,<br>
>>>>><br>
>>>>> I did use no_ghost = False, when I created my camera.The grids are<br>
>>>>> still there?<br>
>>>>><br>
>>>>> Cheers,<br>
>>>>> Yuxiang<br>
>>>>><br>
>>>>> On 12 Mar 2015, at 03:42, Michael Zingale <<br>
>>>>> <a href="mailto:michael.zingale@stonybrook.edu">michael.zingale@stonybrook.edu</a>> wrote:<br>
>>>>><br>
>>>>> Not sure if anyone answered this yet.  For the artificial grids,<br>
>>>>> perhaps this is because you are not using using ghost cells?  Make sure you<br>
>>>>> have "no_ghost=False" in the Camera creation.<br>
>>>>><br>
>>>>> On Tue, Mar 10, 2015 at 12:55 AM, Yuxiang Qin <<a href="mailto:yuxiang.l.qin@gmail.com">yuxiang.l.qin@gmail.com</a><br>
>>>>> > wrote:<br>
>>>>><br>
>>>>> Dear yt users,<br>
>>>>>><br>
>>>>>> I just saw someone talks about artificial things appearing on volume<br>
>>>>>> rendering. Actually I also have this kind of problem.<br>
>>>>>><br>
>>>>>> 1. When I try to rotate on my volume rendering plots, It suddenly<br>
>>>>>> goes dark then kind of twinkles during rotating. What I have done is making<br>
>>>>>> the grid by myself then reading it back again and volume rendering it. I<br>
>>>>>> fixed the clip_ratio. But I still got this twinkling problems.<br>
>>>>>><br>
>>>>>> 2. The other problem is the artificial grids as you can see on my<br>
>>>>>> plots. I changed my resolution, over_refine_factor and other parameters.<br>
>>>>>> It?s also still there?<br>
>>>>>><br>
>>>>>> I really appreciate your help :)<br>
>>>>>><br>
>>>>>> Cheers,<br>
>>>>>> Yuxiang<br>
>>>>>><br>
>>>>>> Here are two example. One is before rotation and the second one is<br>
>>>>>> rotated by 0.5 degree.<br>
>>>>>><br>
>>>>><br>
>>>>>> <103 copy 3.jpg><rotate_000 copy.jpg><br>
>>>>>><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>
>>>>>><br>
>>>>>><br>
>>>>><br>
>>>>><br>
>>>>> --<br>
>>>>> Michael Zingale<br>
>>>>> Associate Professor<br>
>>>>><br>
>>>>> Dept. of Physics & Astronomy ? Stony Brook University ? Stony Brook,<br>
>>>>> NY 11794-3800<br>
>>>>> *phone*:  <a href="tel:631-632-8225" value="+16316328225">631-632-8225</a><br>
>>>>> *e-mail*: <a href="mailto:Michael.Zingale@stonybrook.edu">Michael.Zingale@stonybrook.edu</a><br>
>>>>> *web*: <a href="http://www.astro.sunysb.edu/mzingale" target="_blank">http://www.astro.sunysb.edu/mzingale</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>
>>>>><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>
>>>><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>
>>>><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>
>>><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>
>><br>
>><br>
>> --<br>
>> Michael Zingale<br>
>> Associate Professor<br>
>><br>
>> Dept. of Physics & Astronomy ? Stony Brook University ? Stony Brook, NY<br>
>> 11794-3800<br>
>> *phone*:  <a href="tel:631-632-8225" value="+16316328225">631-632-8225</a><br>
>> *e-mail*: <a href="mailto:Michael.Zingale@stonybrook.edu">Michael.Zingale@stonybrook.edu</a><br>
>> *web*: <a href="http://www.astro.sunysb.edu/mzingale" target="_blank">http://www.astro.sunysb.edu/mzingale</a><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>
><br>
><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>
><br>
><br>
<br>
<br>
--<br>
Michael Zingale<br>
Associate Professor<br>
<br>
Dept. of Physics & Astronomy ? Stony Brook University ? Stony Brook, NY<br>
11794-3800<br>
*phone*:  <a href="tel:631-632-8225" value="+16316328225">631-632-8225</a><br>
*e-mail*: <a href="mailto:Michael.Zingale@stonybrook.edu">Michael.Zingale@stonybrook.edu</a><br>
*web*: <a href="http://www.astro.sunysb.edu/mzingale" target="_blank">http://www.astro.sunysb.edu/mzingale</a><br>
-------------- next part --------------<br>
An HTML attachment was scrubbed...<br>
URL: <<a href="http://lists.spacepope.org/pipermail/yt-users-spacepope.org/attachments/20150316/61d1b987/attachment.htm" target="_blank">http://lists.spacepope.org/pipermail/yt-users-spacepope.org/attachments/20150316/61d1b987/attachment.htm</a>><br>
<br>
------------------------------<br>
<br>
Subject: Digest Footer<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>
<br>
<br>
------------------------------<br>
<br>
End of yt-users Digest, Vol 85, Issue 53<br>
****************************************<br>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature">Sandy<br></div>
</div>