[yt-users] OffAxisProjection axes problems

Stephanie Tonnesen stonnes at gmail.com
Thu Jun 2 16:45:31 PDT 2016


Hi all,

The quick summary of what I want to do is switch the coordinates of the
x-axis on a OffAxisProjection plot.  Basically, what I am trying to do is
get a LOS look at a galaxy , so I need a 20 degree tilt in the y-z plane.
For some reason this is swapping the x-axis direction from my plain old y
slice.  The relevant parts of my code look like this:

ds.coordinates.x_axis[1] = 0
    ds.coordinates.x_axis['y'] = 0
    ds.coordinates.y_axis[1] = 2
    ds.coordinates.y_axis['y'] = 2

    plot6=yt.SlicePlot(ds,"y","density")
    plot6.save()

    plot8=yt.SlicePlot(ds,"y","velocity_z")
    plot8.save()

    plot9 = yt.SlicePlot(ds,"y","velocity_y")
    plot9.save()

    plot10 = yt.SlicePlot(ds,"y","velocity_x")
    plot10.save()

    ds.periodicity=(True,True,True)

    L = [0.0,0.93969,-0.342]
    #W = [0.5,0.5,0.5]
    #c = [0.5,0.5,0.5]
    #N = 1028
    north_vector = [0,0.342,0.93969]
    plot12 =
yt.OffAxisProjectionPlot(ds,L,'density',width=(100,'kpc'),north_vector=north_vector)
    plot12.save()

    plot13 =
yt.OffAxisProjectionPlot(ds,L,'velocity_x',width=(100,'kpc'),north_vector=north_vector)
    plot13.save()
    plot14 =
yt.OffAxisProjectionPlot(ds,L,'velocity_y',width=(100,'kpc'),north_vector=north_vector)
    plot14.save()
    plot15 =
yt.OffAxisProjectionPlot(ds,L,'velocity_z',width=(100,'kpc'),north_vector=north_vector)
    plot15.save()

I have attached four files:  the slices of velocity_y and velocity_x and
the OffAxisProjections of the same.  You can see that the x-axis seems to
be flipped.  You will also notice that the OffAxisProjection is more zoomed
than the Slice, but don't let this distract you :)

I have no idea what has gone wrong here.  Any help, as always, is really
appreciated.

Thanks,
Stephanie
--
Dr. Stephanie Tonnesen
Alvin E. Nashman Postdoctoral Fellow
Carnegie Observatories, Pasadena, CA
stonnes at gmail.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.spacepope.org/pipermail/yt-users-spacepope.org/attachments/20160602/900bc6c4/attachment-0001.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: DDBPr1vf60agrb0009_OffAxisProjection_velocity_x.png
Type: image/png
Size: 102507 bytes
Desc: not available
URL: <http://lists.spacepope.org/pipermail/yt-users-spacepope.org/attachments/20160602/900bc6c4/attachment-0004.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: DDBPr1vf60agrb0009_OffAxisProjection_velocity_y.png
Type: image/png
Size: 102237 bytes
Desc: not available
URL: <http://lists.spacepope.org/pipermail/yt-users-spacepope.org/attachments/20160602/900bc6c4/attachment-0005.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: DDBPr1vf60agrb0009_Slice_y_velocity_x.png
Type: image/png
Size: 125023 bytes
Desc: not available
URL: <http://lists.spacepope.org/pipermail/yt-users-spacepope.org/attachments/20160602/900bc6c4/attachment-0006.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: DDBPr1vf60agrb0009_Slice_y_velocity_y.png
Type: image/png
Size: 65460 bytes
Desc: not available
URL: <http://lists.spacepope.org/pipermail/yt-users-spacepope.org/attachments/20160602/900bc6c4/attachment-0007.png>


More information about the yt-users mailing list