[yt-users] create_profile of linear fields
Douglas Harvey Rudd
drudd at uchicago.edu
Fri Oct 31 14:18:37 PDT 2014
I believe it only works for axis fields. From the docstrings:
logs : dict of boolean values
Whether or not to log the bin_fields for the profiles.
The keys correspond to the field names. Defaults to the take_log
attribute of the field.
and adding velocity_magnitude to logs generates the same error as before.
Douglas Rudd
Scientific Computing Consultant
Research Computing Center
drudd at uchicago.edu<mailto:drudd at uchicago.edu>
On Oct 31, 2014, at 4:10 PM, Nathan Goldbaum <nathan12343 at gmail.com<mailto:nathan12343 at gmail.com>> wrote:
What happens if you use the 'logs' keyword for create_profile to control the logging for temperature, velocity_magnitude, and dx?
On Fri, Oct 31, 2014 at 2:08 PM, Douglas Harvey Rudd <drudd at uchicago.edu<mailto:drudd at uchicago.edu>> wrote:
Hi all,
Is there a way to specify the log/non-log scaling of a y-axis variable in create_profile or ProfilePlot.from_profiles? I have some profiles that start flat at an initial time and so the velocity_magnitude is everywhere 0. create_profile succeeds, but ProfilePlot.from_profiles generates a Matplotlib error before I have the ability to specify a scaling:
sph = ds.sphere(ds.domain_center, ds.domain_width[0]/2)
profile = yt.create_profile(sph, "radius",
["density", "temperature", "velocity_magnitude", "dx"],
extrema={'radius':(ds.domain_width[0]/ds.num_grid,ds.domain_width[0]/2.)},
n_bins=int(ds.domain_width[0]*2.**(ds.max_level-1)),
logs={'radius':False},
units={'radius':'pc'})
plot = yt.ProfilePlot.from_profiles(profile)
Relevant part of the dump:
/software/python-2.7-2014q3-el6-x86_64/lib/python2.7/site-packages/matplotlib-1.4.0-py2.7-linux-x86_64.egg/matplotlib/ticker.pyc in view_limits(self, vmin, vmax)
1523 if minpos <= 0 or not np.isfinite(minpos):
1524 raise ValueError(
-> 1525 "Data has no positive values, and therefore can not be "
1526 "log-scaled.")
1527
Douglas Rudd
Scientific Computing Consultant
Research Computing Center
drudd at uchicago.edu<mailto:drudd at uchicago.edu>
_______________________________________________
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<mailto: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/20141031/80d928ed/attachment.html>
More information about the yt-users
mailing list