[yt-users] log-linear phase plot (David Collins)
Wolfram Schmidt
schmidt at astro.physik.uni-goettingen.de
Mon Oct 3 11:58:32 PDT 2011
Hi Dave,
thanks a lot, setting y_log=False does the trick!
Wolfram
> ------------------------------
>
> Message: 3
> Date: Fri, 30 Sep 2011 16:32:58 -0600
> From: David Collins <dcollins at physics.ucsd.edu>
> To: Discussion of the yt analysis package
> <yt-users at lists.spacepope.org>
> Subject: Re: [yt-users] log-linear phase plot
> Message-ID:
> <CAGva0oysAaoEf8cPXxCevTtJqjcQX55n15Bixsx2WPMFD3TzXQ at mail.gmail.com>
> Content-Type: text/plain; charset=ISO-8859-1
>
> I've run into this as well. I believe you need to give
> add_phase_object the log value by hand, with
>
> x_log=False
>
> Cheers,
> d.
>
> On Fri, Sep 30, 2011 at 3:52 PM, Geoffrey So <gsiisg at gmail.com> wrote:
>> Just wondering, if FieldOne is already logged, do you still want the limits
>> to encompass 1 to 1e10, have you tried something like (1e9,1e10) ?
>> From
>> G.S.
>>
>> On Fri, Sep 30, 2011 at 2:37 PM, Wolfram Schmidt
>> <schmidt at astro.physik.uni-goettingen.de> wrote:
>>>
>>> Hi everyone,
>>>
>>> I defined two fields, say, FieldOne and FieldTwo, to make 2D phase plot.
>>> FieldOne is logarithmic by default, FieldTwo is linear (i.e., I set
>>> take_log=False in add_field).
>>>
>>> I want to produce a phase plot with logarithmic bins for FieldOne and
>>> linear bins for FieldTwo, where the range of FieldTwo is [-10,10]
>>>
>>> I thought that
>>>
>>> pc.add_phase_object(dd, ["FieldOne", "FieldTwo", "CellMass"], weight=None,
>>> x_bins=100,y_bins=100, \
>>> ? ? ? ? ? ? ? ? ? ?x_bounds=[1e0,1e10], y_bounds=[-10,10])
>>>
>>> might do the job, but ?yt returns the error message:
>>>
>>> Warning: invalid value encountered in log10
>>> yt : [ERROR ? ?] 2011-09-30 16:55:05,610 Your min/max values for x, y have
>>> given me a nan.
>>> yt : [ERROR ? ?] 2011-09-30 16:55:05,610 Usually this means you are asking
>>> for log, with a zero bound.
>>> Traceback (most recent call last):
>>> ?File "stability.py", line 352, in <module>
>>> ? ?x_bounds=[1e0,1e10], y_bounds=[-10,10])
>>> ?File
>>> "/nics/e/sw/analysis/yt/2.1/sles11.1_gnu4.3.4/src/yt-hg/yt/visualization/plot_collection.py",
>>> line 1149, in add_phase_object
>>> ? ?lazy_reader)
>>> ?File
>>> "/nics/e/sw/analysis/yt/2.1/sles11.1_gnu4.3.4/src/yt-hg/yt/data_objects/profiles.py",
>>> line 408, in __init__
>>> ? ?raise ValueError
>>> ValueError
>>>
>>> It appears that add_phase_object treats FieldTwo logarithmically, although
>>> it is linear.
>>>
>>> So how can I do a log-linear phase plot?
>>>
>>> Best,
>>> Wolfram
>>> _______________________________________________
>>> 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
>>
>>
>
>
>
>
More information about the yt-users
mailing list