[yt-users] draw_domain failure

Chang-Goo Kim cgkim at astro.princeton.edu
Wed Apr 16 09:22:10 PDT 2014


Hi Sam,

It works! I think you'd better to change documentation for this too. I
found previous syntax from following link:

http://yt-project.org/docs/dev-3.0/reference/api/generated/yt.visualization.volume_rendering.camera.Camera.draw_domain.html#yt.visualization.volume_rendering.camera.Camera.draw_domain

Thanks a lot!

Chang-Goo



On Wed, Apr 16, 2014 at 10:39 AM, Sam Skillman <samskillman at gmail.com>wrote:

> Hi Chang-Goo,
>
> I think I spotted the problem. The syntax for drawing the domain is not
> exactly the same as that for drawing the coordinate vectors. Instead of:
>         cam.draw_coordinate_vectors(im)
>         cam.draw_domain(im)
>         im.write_png("camera_domain.png")
>  can you try
>         cam.draw_coordinate_vectors(im)
>         im = cam.draw_domain(im)
>         im.write_png("camera_domain.png")
>
> Sorry that this doesn't have a consistent API for the two draw functions.
> draw_coordinate_vectors modified the im image directly, whereas draw_domain
> makes a copy.  We are hoping to clean this API up in an in-progress
> refactor of the volume rendering module for yt.
>
> Let us know if that does the trick.  Its seems to work for me over here on
> a test rendering.
>
> Cheers,
> Sam
>
>
> On Mon, Apr 14, 2014 at 9:40 PM, Sam Skillman <samskillman at gmail.com>wrote:
>
>> Hi Chang-Goo,
>>
>> I'll try to test this out tomorrow. I'm not sure that drawing grid
>> domains are up to snuff after the unit refactor of 3.0.  Have you modified
>> the source code in any way?  If so, would you please paste the diff?
>>
>> Thanks,
>> Sam
>>
>>
>> On Mon, Apr 14, 2014 at 6:07 PM, Chang-Goo Kim <cgkim at astro.princeton.edu
>> > wrote:
>>
>>> Hi John,
>>>
>>> Yes, it's Athena vtk file. yt supports it very well.
>>>
>>> Here's ytathena_mpi.py:
>>>
>>> http://paste.yt-project.org/show/4523/
>>>
>>> Thanks,
>>>
>>> Chang-Goo
>>>
>>>
>>> On Mon, Apr 14, 2014 at 5:01 PM, John ZuHone <jzuhone at gmail.com> wrote:
>>>
>>>> Hi Chang-Goo,
>>>>
>>>> Also, could you elaborate a little bit on these other questions:
>>>>
>>>> 1) What sort of file are you trying to read? It looks like Athena.
>>>>
>>>> 2) What exactly is ytathena_mpi importing?
>>>>
>>>> Best,
>>>>
>>>> John
>>>>
>>>> On Apr 14, 2014, at 4:54 PM, Sam Skillman <samskillman at gmail.com>
>>>> wrote:
>>>>
>>>> Hi Chang-Goo,
>>>>
>>>> Sorry to hear it isn't working. Could you elaborate on a few pieces:
>>>>
>>>> 1. What version of yt are you using?  From your original traceback I'm
>>>> assuming a very recent version, but could you send along the results of "hg
>>>> summary"?
>>>>
>>>> 2. Does the code fail in some new way, or do the wireframes just not
>>>> show up on the image?
>>>>
>>>> 3. What is pf.domain_width for your simulation?  If it is much more
>>>> than 600, its possible that you are just zoomed in so far that you can't
>>>> see the domain wireframe.
>>>>
>>>> Thanks,
>>>> Sam
>>>>
>>>>
>>>> On Mon, Apr 14, 2014 at 9:01 AM, Chang-Goo Kim <
>>>> cgkim at astro.princeton.edu> wrote:
>>>>
>>>>> HI all,
>>>>>
>>>>> I'm a new yt-user, who are trying to produce nice volume rendering
>>>>> images with yt. While I was playing with volume rendering examples, I got
>>>>> an error message for draw_domain function.
>>>>>
>>>>> http://paste.yt-project.org/show/sbQxZHfKi5Wto03SlKI2/
>>>>>
>>>>> I talked with Matt, and he tried to solve it. Now it doesn't return
>>>>> error message, but I still cannot draw wireframes for domain. Here's my
>>>>> code.
>>>>>
>>>>> http://paste.yt-project.org/show/4506/
>>>>>
>>>>> Thanks a lot!
>>>>>
>>>>> Chang-Goo
>>>>>
>>>>> _______________________________________________
>>>>> yt-users mailing list
>>>>> yt-users at lists.spacepope.org
>>>>> http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
>>>>>
>>>>>
>>>> _______________________________________________
>>>> yt-users mailing list
>>>> yt-users at lists.spacepope.org
>>>> http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
>>>>
>>>>
>>>>
>>>> _______________________________________________
>>>> yt-users mailing list
>>>> yt-users at lists.spacepope.org
>>>> http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
>>>>
>>>>
>>>
>>> _______________________________________________
>>> yt-users mailing list
>>> yt-users at lists.spacepope.org
>>> http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
>>>
>>>
>>
>
> _______________________________________________
> yt-users mailing list
> yt-users at lists.spacepope.org
> http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.spacepope.org/pipermail/yt-users-spacepope.org/attachments/20140416/03422889/attachment.htm>


More information about the yt-users mailing list