[yt-users] yt-users Digest, Vol 67, Issue 18

Seyit Hocuk seyit at astro.rug.nl
Wed Sep 11 09:24:23 PDT 2013


Hi Matt,

Sorry, I'm new to the mailing list and I didn't notice your email 
before. I was set on Digest mode, which I find quite chaotic. I now 
switched to regular mode.
Thank you for your reply. I already found a workaround actually, but 
it's ugly. I will try your suggestion the next time I need it. Thanks 
for the swift reply.

Kind regards,
Seyit



On 09/10/2013 07:37 PM, yt-users-request at lists.spacepope.org wrote:
> ------------------------------
>
> Message: 4
> Date: Tue, 10 Sep 2013 09:03:19 -0400
> From: Matthew Turk<matthewturk at gmail.com>
> To: Discussion of the yt analysis package
> 	<yt-users at lists.spacepope.org>
> Subject: Re: [yt-users] Annotate_contour
> Message-ID:
> 	<CALO3=5GvDOjx854OXCGsSdKxWq4JzH9FmaCHeokHocp7+WCNgA at mail.gmail.com>
> Content-Type: text/plain; charset=ISO-8859-1
>
> Hi Seyit,
>
> As you note, right now what the contours do is essentially take the
> underlying data source, query the field to be contoured, and then
> perform an interpolation on that field.  This means if you have a
> weighted projection, because queries will also have the same weight,
> the result will be weighted.
>
> I've issued a pull request to enable the behavior you describe:
>
> https://bitbucket.org/yt_analysis/yt/pull-request/595/adding-alternate-data-source-for/diff
>
> You can test this by pulling from my repo:
>
> cd $YT_DEST/src/yt-hg/
> hg pull -r 0b52b74
> hg up -r 0b52b74
> python2.7 setup.py build_ext -i
>
> Now when you call annotate_contours, you can specify data_source as an
> option.  You can specify a projection you have created by hand, or a
> slice, or whatever is most appropriate.
>
> The repository is in a bit of a state at the moment and we're waiting
> on bitbucket support, so there may be a holdup on accepting the pull
> request, but let us know if this accomplishes what you're looking for.
>
> -Matt
>
> On Tue, Sep 10, 2013 at 5:13 AM, Seyit Hocuk<seyit at astro.rug.nl>  wrote:
>> >Dear all,
>> >
>> >I don't know if this is a simple question or not, but is it possible to
>> >annotate_contours independent of the conditions of the main plot?
>> >
>> >For example, I'm doing a projection plot "prj = ProjectionPlot(pf, "z",
>> >"Velocitydispersion",center=cent,width=wide,weight_field='volinv')" and my
>> >contour callback is
>> >"prj.annotate_contour("T_{gas}",clim=(1.0e0,2.8e1),ncont=ncont)". My problem
>> >is that the contours are also weighted by the chosen weight_field, which I
>> >do not want.
>> >
>> >Is there a workaround?
>> >
>> >Kind regards,
>> >Seyit
>> >
>> >--
>> >With kind regards,
>> >Seyit
>> >
>> >
>> >S. Hocuk
>> >Postdoctoral Researcher
>> >Kapteyn Astronomical Institute
>> >P.O. box 800
>> >9700AV Groningen, the Netherlands
>> >
>> >_______________________________________________
>> >yt-users mailing list
>> >yt-users at lists.spacepope.org
>> >http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
> -------------


-- 
With kind regards,
Seyit


S. Hocuk
Postdoctoral Researcher
Kapteyn Astronomical Institute
P.O. box 800
9700AV Groningen, the Netherlands




More information about the yt-users mailing list