Thanks for the idea. However, I get an incompatible error with accessing mesh and particle fields combinedly. So, essentially, I do the following:

profiles.append(yt.create_profile(ad, "ones", "particle_refinement_level", weight_field=None))

and the error is:

Traceback (most recent call last):

  File "", line 19, in <module>

    profiles.append(yt.create_profile(ad, "ones", "particle_refinement_level", weight_field=None))

  File "/home/samvad/yt-conda/lib/python3.6/site-packages/yt/data_objects/", line 989, in create_profile

    bin_fields, data_source._determine_fields(fields), wf, is_pfield)


Cannot create a profile object that mixes particle and mesh fields.

Received the following bin_fields:

   ('index', 'ones'), particle_type = False

Profile fields:

   ('all', 'particle_refinement_level'), particle_type = True

Is there any other field that I could probably use? 

On Tue, Dec 18, 2018 at 9:02 PM Matthew Turk <> wrote:

Try looking at a profile where the binning field is "grid_level" with
the binned field as "ones", and weight_field=None.
On Tue, Dec 18, 2018 at 9:18 AM Vadlamani Samhitha
<> wrote:
> Is there a way I could know what refinement level yt is accessing my data? For e.g., I plot 1D profiles of density
>> ts=yt.load(["/lunarc/nobackup/users/samvad/FINAL-50-0.5/output/output_00029/info_00029.txt","/lunarc/nobackup/users/samvad/FINAL-50-0.5/output/output_00037/info_00037.txt","/lunarc/nobackup/users/samvad/FINAL-50-0.5/output/output_00042/info_00042.txt"])
> for ds in ts:
>         ds.define_unit("H", (1.674*10**(-24), "g"))
>         ad=ds.all_data()
>         dens=ad.cut_region(["obj[('gas','density')].in_units('H/cm**3') > 0"])
>>       profiles.append(yt.create_profile(ad, ("gas","density"), [("gas","cell_mass")], weight_field=None, fractional=True))
> My data has highest refinement level of 15 from simulations. However, I'm not sure if this is the same level at which the profiles are being plotted
> _______________________________________________
> yt-users mailing list --
> To unsubscribe send an email to
yt-users mailing list --
To unsubscribe send an email to