[yt-users] OffAxisProjection axes problems

Stephanie Tonnesen stonnes at gmail.com
Fri Jun 3 15:10:34 PDT 2016


Right, I have my north vector, which I *think* is why my z-axis (Image y)
looks correct.  Unfortunately I can't specify an east_vector.  I will keep
playing and if I come up with something clever I will let ppl know.

Thanks for thinking about this with me!

Stephanie





--
Dr. Stephanie Tonnesen
Alvin E. Nashman Postdoctoral Fellow
Carnegie Observatories, Pasadena, CA
stonnes at gmail.com

On Fri, Jun 3, 2016 at 2:10 PM, Nathan Goldbaum <nathan12343 at gmail.com>
wrote:

>
>
> On Fri, Jun 3, 2016 at 4:08 PM, Stephanie Tonnesen <stonnes at gmail.com>
> wrote:
>
>> 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?
>>
>
> 'x' and 'z' don't really have a meaning for OffAxisProjectionPlot, that's
> why they're dispalyed as "image x" and "image y". However, if you specify a
> north_vector, that should disambiguate things.
>
> It's entirely possible there's a bug here.
>
>
>>
>> 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
>>>
>>>
>>
>> _______________________________________________
>> 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/55da6c5e/attachment.htm>


More information about the yt-users mailing list