[yt-users] Bin 1D spherically averaged profiles uniformly on log radius

Nathan Goldbaum nathan12343 at gmail.com
Thu Nov 24 17:39:42 PST 2016


One other thing to note, especially for logarithmically spaced radial bins,
it very well might be the case that there isn't any data in some o the bins
at small radii. If you're worried about that, you might need to play with
setting the leftmost bin edge or the bin spacing to get "nice" bins that
all contain data.

On Thu, Nov 24, 2016 at 8:38 PM, Nathan Goldbaum <nathan12343 at gmail.com>
wrote:

> And by default, I think the radius field is always uniformly binned in log
> space. You can see for yourself by inspecting the underlying Profile1D
> object associated with the ProfilePlot:
>
> http://paste.yt-project.org/show/6946/
>
> Here profile.x is the centers of the radius bins (profile.x_bins is the
> bin edges). Note how when I take the logarithm of profile.x, then subtract
> neighboring bin centers, I get a constant array: the bin sizes are constant
> in log space.
>
> -Nathan
>
> On Thu, Nov 24, 2016 at 7:16 PM, Suoqing Ji <suoqing at physics.ucsb.edu>
> wrote:
>
>> Hi Marco,
>>
>> Sorry that I do not understand what you mean by saying “does not bin the
>> data uniformly in log radius”... In ProfilePlot you can set x_log=True to
>> get a log bin in radius (http://yt-project.org/docs/de
>> v/reference/api/generated/yt.visualization.profile_plotter.P
>> rofilePlot.html#yt.visualization.profile_plotter.ProfilePlot), and
>> np.logspace will be called to get a log bin uniformly.
>>
>> Do you want something other than that?
>>
>> Best wishes,
>> --
>> Suoqing JI
>> Ph.D Candidate
>> Department of Physics
>> University of California, Santa Barbara
>> http://web.physics.ucsb.edu/~suoqing
>>
>> On Nov 24, 2016, at 3:39 PM, Marco Surace <marco.surace at port.ac.uk>
>> wrote:
>>
>> Hi all,
>>
>> I have been using yt.ProfilePlot to create 1D spherically averaged
>> profiles of say the gas temperature in a simulation as a function of
>> radius, starting from the centre of a halo out to a given radius.
>>
>> Does anyone know how I can bin the data uniformly in log radius? This
>> would improve the resolution at smaller radii. It currently does not bin
>> the data uniformly in linear or log radius. I haven't found an option with
>> ProfilePlot for affecting the binning.
>>
>> Best wishes,
>> Marco
>> _______________________________________________
>> 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/20161124/87a12925/attachment.htm>


More information about the yt-users mailing list