Hi Vadlamani,

Yes, there are a few ways to do this. Starting with a 1D profile, like the following:
p = yt.ProfilePlot(ds, 'density', 'cell_mass', weight_field=None)
If you add the accumulation=True keyword, the profile will be the sum of all values in the previous bins.
p = yt.ProfilePlot(ds, 'density', 'cell_mass', weight_field=None, accumulation=True)

Additionally, you can access the profile object as p.profiles, which will be a list of all the profiles plotted. You could then get the bin values and profile values by doing the following:
p.profiles[0]['cell_mass'] # mass values
p.profiles[0].x # density values

You can do array summation or use functions like numpy.trapz to do integration.


On Thu, Nov 15, 2018 at 4:06 AM Vadlamani Samhitha <vadlamani.samhitha@gmail.com> wrote:

Is there a way to obtain area under the curves for 1D profile plots in yt? 
yt-users mailing list -- yt-users@python.org
To unsubscribe send an email to yt-users-leave@python.org