[yt-users] a question on camera with volume rendering

Renyue Cen cen at astro.princeton.edu
Mon Jan 14 07:34:19 PST 2013


Hi Sam,

Thanks for the suggestion, I think it could work if I choose an appropriate size for the embedding sphere.

For not using yt ver 2.5 it is because when I use yt 2.5, I got this error:

AttributeError: 'AMRSmoothedCoveringGrid' object has no attribute 'NumberOfParticles'

so John switched back to yt2.4 with the transpose=False fix, which worked most of the time.

Best,
Renyue

On Jan 14, 2013, at 10:27 AM, Sam Skillman wrote:

> Hi Renyue, 
> 
> If you can describe the galaxy using a data object (sphere, disk, etc), you could then do something like galaxy_object.quantities['BulkVelocity']() to get the motion of just that piece of the data.  I'm not sure if that is helpful for you or not.
> 
> I would say that it would be best to get on a more recent version of yt, where you will be able to use the tranpose, and the north vector will make more sense with option 1 or 3.
> 
> Sam
> 
> 
> On Mon, Jan 14, 2013 at 7:25 AM, Renyue Cen <cen at astro.princeton.edu> wrote:
> Hi Sam,
> 
> I am using option (2) below without transpose (per your suggestion to fix the symmetric image problem)
> and it does seem to point to the right (I have a bit trouble to decide exactly at which direction the galaxy 
> is traveling even though I have its peculiar velocity, because I do not have information about 
> the velocity of the volume it is in).
> 
> Thanks,
> Renyue
> 
> 
> 
> On Jan 14, 2013, at 10:17 AM, Sam Skillman wrote:
> 
>> Hi Renyue,
>> 
>> It depends a bit on how you are saving the image, unfortunately.  If you are using a recent changeset of yt (after 2.4 where the transpose causes symmetric images on some compilers/machines), and you save with:
>> 
>> cam.snapshot('image1.png')
>> Then image1.png will have north pointing up.
>> 
>> If you did:
>> im = cam.snapshot()
>> write_bitmap(im, 'image2.png', tranpose=False)
>> Then image2.png will have north pointing right.
>> 
>> If you did 
>> im = cam.snapshot()
>> write_bitmap(im, 'image3.png', transpose=True)
>> Then image3.png will have north pointing up.
>> 
>> I am working on ways to make sure that it always points up by using the new ImageArray class, but have not come up with the full solution yet.  I hope that description helps.
>> 
>> Sam
>> 
>> 
>> 
>> On Sat, Jan 12, 2013 at 8:12 PM, Renyue Cen <cen at astro.princeton.edu> wrote:
>> Hi,
>> 
>> I think I am unclear about the orientation in pf.h.camera(c,W,L, ..., north=vec, ...).
>> I  got some nice looking pictures but don't know what north means in this case,
>> because when I switch north=vec to north=reverse of vec, the image rotates along the vertical direction,
>> so it seems like north is pointing to either left or right.  It is very desirable for me to be able
>> to make sure which direction vec points to (vec is the vec in north=vec) in the final rendered plot.
>> 
>> 
>> Thanks in advance for help,
>> Renyue
>> 
> 
> 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.spacepope.org/pipermail/yt-users-spacepope.org/attachments/20130114/8ce3e250/attachment.html>


More information about the yt-users mailing list