[yt-users] OffAxisProjection axes problems
Stephanie Tonnesen
stonnes at gmail.com
Fri Jun 3 14:08:36 PDT 2016
Hi Nathan,
So I tried two of your ideas, and don't get the last one.
ds.coordinates.x_axis[1] = 0
> ds.coordinates.x_axis['y'] = 0
> ds.coordinates.y_axis[1] = 2
> ds.coordinates.y_axis['y'] = 2
>
Is the orientation correct (albeit with z along the horizontal axis and x
along the vertical axis) if you don't do this ^ ?
If I don't do that but still have the same L and north_vector, I get the
same results.
If I change L = [0,1,0] and north_vector=[0,0,1], I get the same results as
well.
Ugh!
I am not sure what "x" and "z" fields you think I should be making
OffAxisProjection s for? Do you mean have L = [1,0,0] and [0,0,1], or have
it project an "x" and "z" field onto my off-axis projection?
Thanks,
Stephanie
--
Dr. Stephanie Tonnesen
Alvin E. Nashman Postdoctoral Fellow
Carnegie Observatories, Pasadena, CA
stonnes at gmail.com
On Thu, Jun 2, 2016 at 5:14 PM, Nathan Goldbaum <nathan12343 at gmail.com>
wrote:
>
>
> On Thu, Jun 2, 2016 at 6:45 PM, Stephanie Tonnesen <stonnes at gmail.com>
> wrote:
>
>> 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
>>
>
> Is the orientation correct (albeit with z along the horizontal axis and x
> along the vertical axis) if you don't do this ^ ?
>
> What happens if you make an off-axis projection aligned with the y axis,
> i.e. L = [0, 1, 0], north_vector = [0, 0, 1]?
>
> Can you try making an off-axis projection of the 'x' and 'z' fields?
>
>
>>
>> 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
>>
>> _______________________________________________
>> 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/20160603/016d8e5b/attachment.html>
More information about the yt-users
mailing list