[yt-users] Trouble projecting a derived field

Britton Smith brittonsmith at gmail.com
Wed Sep 7 05:36:27 PDT 2011


Hi Nathan,

I would just like to add that once you get this working, a field like this
seems like it would be useful to a number of people.  If you're up for it, I
would encourage you to submit a yt script with just the definition of the
field to the yt hub.  Perhaps we should even have a section devoted complex
field definitions.

Britton

On Wed, Sep 7, 2011 at 3:55 AM, Matthew Turk <matthewturk at gmail.com> wrote:

> Hi Nathan,
>
> On Wed, Sep 7, 2011 at 3:30 AM, Nathan Goldbaum <goldbaum at ucolick.org>
> wrote:
> > Hi Andrew,
> > Thanks for the idea.  Unfortunately, that doesn't seem to be the problem.
>  I
> > just tried taking the absolute value of R cross V before taking the
> square
> > root and got the exact same results.
>
> Your script actually did not work for me on a standard AMR dataset.
> The axes of the result of the cross product were transposed from what
> they should be; my script died on a grid of size (18, 16, 16) because
> the result of the cross product was (16, 16, 18) and the
> CylinderRadius variable was (18, 16, 16).  Naively applying a
> transpose (although I am not sure why I had to do this) and Andrew's
> suggestion of na.abs produced plots that looked vaguely correct.  I
> recognize this is perhaps not a satisfying answer, but I would
> encourage you to investigate how the axes in the na.cross function are
> modified and returned; I also noted that only specifying "axis=0"
> instead of "axisa=0" and "axisb=0" got me the same result.  I suspect
> that not specifying "axisc=0" is the cause of the problem.  Another
> note is that I end up with a singularity at the y=z line.
>
> If you end up wanting to do this *not* aligned with the axes, the
> off-axis projection method will probably be of some help.  It would be
> very nice if we had some kind of recipe or script for calculating
> Toomre Q; I have done it myself, but unfortunately the script I used
> to calculate it was not backed up and was wiped out in a colossal and
> deep-cutting hard drive failure at SDSC, and so I am unable to share
> it.
>
> Best,
>
> Matt
>
> > -Nathan
> > On Sep 6, 2011, at 11:43 PM, Andrew Myers wrote:
> >
> > Hi Nathan,
> >
> > This is just a guess, but do you really mean to be taking the square root
> of
> > R cross V, at line 30? That quantity could potentially be negative,
> > depending on the sense in which the fluid is spinning.
> >
> > -Andrew Myers
> >
> >
> > On Tue, Sep 6, 2011 at 5:54 PM, Nathan Goldbaum <goldbaum at ucolick.org>
> > wrote:
> >>
> >> Hello all,
> >> Right now I'm trying to generate maps of the Toomre Q in an isolated
> >> galaxy simulation.  To do so, I'm using yt to generate maps of the gas
> >> column density as well as density-weighted projections of the sound
> speed
> >> and orbital frequency, which I'm using as a proxy for the epicyclic
> >> frequency.
> >> Unfortunately, I'm having some trouble making projected maps of the
> >> orbital frequency.  I've defined two new derived fields, CylinderRadius
> and
> >> AngularVelocity (http://paste.yt-project.org/show/1784/).
> >> When I try to project the AngularVelocity field, I get what looks like
> >> garbage: http://i.imgur.com/PkYhe.png
> >> However, slices work just fine: http://i.imgur.com/NnEbq.png
> >> I've written the derived fields in a coordinate-dependent way, since
> I'll
> >> always be doing projections down a fixed axis.  Is that where my problem
> >> lies?  My understanding of how yt does projections is too shallow to
> figure
> >> out exactly what's going wrong here, so I'm hoping the collective wisdom
> of
> >> the yt developers and user base can come to the rescue.
> >> Best regards,
> >> Nathan Goldbaum
> >> Graduate Student
> >> Astronomy & Astrophysics, UCSC
> >> goldbaum at ucolick.org
> >> http://www.ucolick.org/~goldbaum
> >>
> >> _______________________________________________
> >> yt-users mailing list
> >> yt-users at lists.spacepope.org
> >> http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
> >>
> >
> > !DSPAM:10175,4e67128a9212068012397!
> > _______________________________________________
> > yt-users mailing list
> > yt-users at lists.spacepope.org
> > http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
> >
> >
> > !DSPAM:10175,4e67128a9212068012397!
> >
> >
> > _______________________________________________
> > 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/20110907/1a6c2185/attachment.htm>


More information about the yt-users mailing list