Hi all, I am having trouble with using north_vector--basically it is doing nothing as I am writing it. As far as I can tell there are a few ways I can call camera, and I am doing this: scall = yt.create_scene(ds) source_all = scall[0] source_all.set_field('density') source_all.set_log(True) #cam = scall.add_camera() scall.camera.set_width(ds.quan(80,'kpc')) scall.camera.position = ds.arr([0.5,1.0,0.3],'unitary') scall.camera.focus = ds.arr([0.5,0.5,0.36],'unitary') scall.camera.north_vector = ds.arr([0.0,0.0,1.0],'unitary') scall.camera.resolution = (2048,2048) What I want is a nearly edge-on view of a disk in the x-y plane where the disk is aligned on the x-y plane (horizontal) and instead I get the picture below. I have run this with the north_vector line commented out, with it as ds.arr([1.0,0.0,0.0],'unitary') and as np.array([0.0,0.0,1.0]) and always get the same image. Any help is always appreciated!! Thanks in advance, Stephanie [image: image.png] -- Dr. Stephanie Tonnesen Associate Research Scientist CCA, Flatiron Institute New York, NY stonnes@gmail.com
Hi all, I found the solution. It just needs a second step as Nathan highlighted in issue #1642. Added a line scall.camera.switch_orientation() and it all worked. Maybe I will try and get the north_vector to be a property at the yt workshop in March! Best, Stephanie -- Dr. Stephanie Tonnesen Associate Research Scientist CCA, Flatiron Institute New York, NY stonnes@gmail.com On Sun, Feb 9, 2020 at 11:13 PM Stephanie Tonnesen <stonnes@gmail.com> wrote:
Hi all,
I am having trouble with using north_vector--basically it is doing nothing as I am writing it. As far as I can tell there are a few ways I can call camera, and I am doing this:
scall = yt.create_scene(ds) source_all = scall[0] source_all.set_field('density') source_all.set_log(True)
#cam = scall.add_camera() scall.camera.set_width(ds.quan(80,'kpc')) scall.camera.position = ds.arr([0.5,1.0,0.3],'unitary') scall.camera.focus = ds.arr([0.5,0.5,0.36],'unitary') scall.camera.north_vector = ds.arr([0.0,0.0,1.0],'unitary') scall.camera.resolution = (2048,2048)
What I want is a nearly edge-on view of a disk in the x-y plane where the disk is aligned on the x-y plane (horizontal) and instead I get the picture below. I have run this with the north_vector line commented out, with it as ds.arr([1.0,0.0,0.0],'unitary') and as np.array([0.0,0.0,1.0]) and always get the same image. Any help is always appreciated!!
Thanks in advance, Stephanie
[image: image.png] -- Dr. Stephanie Tonnesen Associate Research Scientist CCA, Flatiron Institute New York, NY
stonnes@gmail.com
participants (1)
-
Stephanie Tonnesen