Hi Sam,

I think what you're seeing there are the bin centers. If you check out rp.x_bins, you should get what you expect.


On Wed, Jun 19, 2019 at 1:07 PM Sam Patrick via yt-users <yt-users@python.org> wrote:

I'm trying to create a radial profile of the gas density using the
create_profile function. Even with the extrema explicitly specified the
binning does not take these values. I was wondering whether there was a
simple way to work around this? My script and output are bellow:

ds = yt.load("DD0077/output_0077")
val, loc = ds.find_max('density')
sp = ds.sphere(loc, (10.0, 'pc'))
rp = yt.create_profile(sp, 'radius', ('gas', 'density'), n_bins= 10,
extrema= {'radius':((1e-2, 'pc'), (10.0, 'pc'))}, logs= {'radius':True})

 >>>YTArray([0.01497631, 0.02988167, 0.05962177, 0.11896107, 0.23735854,
              0.47359256, 0.94494138, 1.88540592, 3.76187938,
7.50593617]) pc
         (where 0.01 and 10 are expected to be the first and last values)

Many thanks,
Sam Patrick
yt-users mailing list -- yt-users@python.org
To unsubscribe send an email to yt-users-leave@python.org