[yt-users] Question in the projection plot

Jun-Hwan Choi jhchoi at pa.uky.edu
Wed Oct 10 11:37:11 PDT 2012


Thank you Nathan and Matt.

Junhwan
On 10/10/12 13:35, Nathan Goldbaum wrote:
> Hi Junhwan,
>
> It's the latter: z=center-0.2 to z=center+0.2.  If you don't like the 
> center you've defined for the PlotCollection, you can optionally 
> define a new center in the add_thin_projection call.
>
> To see exactly what add_thin_projection is doing, take a look at its 
> definition: 
> https://bitbucket.org/yt_analysis/yt/src/f180d1f7c698/yt/visualization/plot_collection.py?at=yt#cl-791
>
> Cheers,
>
> Nathan
>
> On Oct 10, 2012, at 8:01 AM, Jun-Hwan Choi wrote:
>
>> It is nice there is a method what I need.
>> One more question.
>> Let say I set pc.add_thin_projection("Density","z",0.4).
>> Is this thin projection is through z=0 to z=0.4 or z=center-0.2 to 
>> z=center+02 where the center is define at PlotCollection and/or 
>> add_thin_projection?
>>
>> Thank you,
>> Junhwan
>> On 10/10/12 00:50, Matthew Turk wrote:
>>> Hi Nathan and Jun-Hwan,
>>>
>>>> Unfortunately, I just tried to create a plot that way and either 
>>>> I'm doing
>>>> something wrong or there's a bug somewhere that breaks this 
>>>> functionality.
>>>> I could create the projection object, but when I supplied the 
>>>> projection
>>>> object as a data source in add_projection, it failed (traceback
>>>> here:http://paste.yt-project.org/show/2775/). Can someone else on 
>>>> the list
>>>> let us know if I'm doing something wrong here?
>>> I think you want to create a region, with pf.h.region, and supply that
>>> as the data source.  The data_source gets queried from the projection.
>>>  You could also create field cuts by using an InlineExtractedRegion
>>> but it's probably easier to do it with a region . So the next result
>>> would be:
>>>
>>> reg = pf.h.region([0.5, 0.5, 0.5], [0.3, 0.0, 0.0], [0.7, 0.0, 0.0])
>>> pc.add_projection("Density", "x", data_source=reg)
>>>
>>> But there's also pc.add_thin_projection which does this for you and
>>> accepts a 'thickness' argument:
>>>
>>> http://yt-project.org/doc/api/generated/yt.visualization.plot_collection.PlotCollection.add_thin_projection.html
>>>
>>> So,
>>>
>>> pc.add_thin_projection("Density", "z", 0.4)
>>>
>>> Hope that helps!
>>>
>>> -Matt
>>> _______________________________________________
>>> yt-users mailing list
>>> yt-users at lists.spacepope.org <mailto:yt-users at lists.spacepope.org>
>>> http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
>>
>>
>> -- 
>> --------------------------------------------------------------
>> Jun-Hwan Choi, Ph.D.
>> Department of Physics and Astronomy, University of Kentucky
>> Tel: (859) 897-6737        Fax: (859) 323-2846
>> Email: jhchoi at pa.uky.edu <mailto:jhchoi at pa.uky.edu>   URL: 
>> http://www.pa.uky.edu/~jhchoi <http://www.pa.uky.edu/%7Ejhchoi>
>> --------------------------------------------------------------
>>
>> _______________________________________________
>> yt-users mailing list
>> yt-users at lists.spacepope.org <mailto: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


-- 
--------------------------------------------------------------
Jun-Hwan Choi, Ph.D.
Department of Physics and Astronomy, University of Kentucky
Tel: (859) 897-6737        Fax: (859) 323-2846
Email: jhchoi at pa.uky.edu   URL: http://www.pa.uky.edu/~jhchoi
--------------------------------------------------------------

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.spacepope.org/pipermail/yt-users-spacepope.org/attachments/20121010/0445b7a9/attachment.html>


More information about the yt-users mailing list