[yt-users] Problems when using YTSphere.max(...)

Nathan Goldbaum nathan12343 at gmail.com
Wed Nov 23 08:25:39 PST 2016


You can take a look at how the argmax function is defined in the latest
version of yt:

https://bitbucket.org/yt_analysis/yt/src/5499b32cce889b3306cf6718b80bc55fa5ce9315/yt/data_objects/data_containers.py?at=yt&fileviewer=file-view-default#data_containers.py-629

In addition, you should be able to install the latest version of yt in your
home folder by running the install script:

http://yt-project.org/#getyt

Once it runs you will get some instructions about how to update your PATH
environment variable to "activate" the installation.

Nathan

On Wed, Nov 23, 2016 at 11:21 AM Katharina Wollenberg <
kwollenberg89 at gmail.com> wrote:

> Hi Nathan,
>
> thank for the quick response!
>
> Unfortunately, I cannot update YT because I must use a particular version
> given on a cluster.
> I have already known about sp.quantities.extrema("temperature”) but was
> wondering if there is something similar to the argmax-command in order to
> specify for example argmax(“temperature”, axis = “density”).
>
> Best,
>
> Katharina
>
> On 23.11.2016, at 17:06, Nathan Goldbaum <nathan12343 at gmail.com> wrote:
>
> Hi Katharina,
>
> This is a new feature in yt 3.3, if you're using an older version I'd urge
> you to update.
>
> If you can't update, you can do:
>
> sp.quantities.extrema("temperature")
>
> To get both the max and minimum value.
>
> Nathan
>
> On Wed, Nov 23, 2016 at 10:55 AM Katharina Wollenberg <
> k.wollenberg at stud.uni-heidelberg.de> wrote:
>
> Hi together,
>
> I want to find out, among others, temperature and pressure values
> corresponding to a maximum density value within a spherical volume. I
> thought about using YTSphere.max(…) or YTSphere.argmax(…) for this purpose.
> However, in both cases I get the Attribute error “ “YTSphere” object has no
> attribute “max” “ .
>
> What might be the error origin? Have I forgotten something obvious?
>
> Regards,
>
> Katharina
>
>
>
>
> -------------------------------------------------------
> Katharina Wollenberg
> PhD Student in Astronomy
>
> Zentrum für Astronomie der Universität Heidelberg (ZAH)
> Institute of Theoretical Astrophysics (ITA)
> Albert-Ueberle-Str. 2
> 69120 Heidelberg
> Germany
>
>
>
>
>
> _______________________________________________
> yt-users mailing list
> yt-users at lists.spacepope.org
> http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
>
> <max-error.png>_______________________________________________
>
>
> 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/20161123/f8272ff2/attachment-0001.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: max-error.png
Type: image/png
Size: 76588 bytes
Desc: not available
URL: <http://lists.spacepope.org/pipermail/yt-users-spacepope.org/attachments/20161123/f8272ff2/attachment-0001.png>


More information about the yt-users mailing list