REFINEMENT LEVEL FOR PROFILE DATA
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
Hi, 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 <vadlamani.samhitha@gmail.com> 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 -- yt-users@python.org To unsubscribe send an email to yt-users-leave@python.org
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 "pdf.py", 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/profiles.py", line 989, in create_profile
bin_fields, data_source._determine_fields(fields), wf, is_pfield)
yt.utilities.exceptions.YTIllDefinedProfile:
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 <matthewturk@gmail.com> wrote:
Hi,
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 <vadlamani.samhitha@gmail.com> wrote:
Is there a way I could know what refinement level yt is accessing my
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
data? For e.g., I plot 1D profiles of density plotted
_______________________________________________ yt-users mailing list -- yt-users@python.org To unsubscribe send an email to yt-users-leave@python.org
yt-users mailing list -- yt-users@python.org To unsubscribe send an email to yt-users-leave@python.org
You want the "particle_ones" field for particle data. On Thu, Dec 20, 2018 at 11:21 AM Vadlamani Samhitha < vadlamani.samhitha@gmail.com> wrote:
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 "pdf.py", 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/profiles.py", line 989, in create_profile
bin_fields, data_source._determine_fields(fields), wf, is_pfield)
yt.utilities.exceptions.YTIllDefinedProfile:
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 <matthewturk@gmail.com> wrote:
Hi,
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 <vadlamani.samhitha@gmail.com> wrote:
Is there a way I could know what refinement level yt is accessing my
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
data? For e.g., I plot 1D profiles of density plotted
_______________________________________________ yt-users mailing list -- yt-users@python.org To unsubscribe send an email to yt-users-leave@python.org
yt-users mailing list -- yt-users@python.org To unsubscribe send an email to yt-users-leave@python.org
_______________________________________________ yt-users mailing list -- yt-users@python.org To unsubscribe send an email to yt-users-leave@python.org
Thanks, this works, but I noticed that my data is not being accessed at its maximum resolution (level=15). Is there a way I manually do so. On Thu, Dec 20, 2018 at 6:39 PM Nathan Goldbaum <nathan12343@gmail.com> wrote:
You want the "particle_ones" field for particle data.
On Thu, Dec 20, 2018 at 11:21 AM Vadlamani Samhitha < vadlamani.samhitha@gmail.com> wrote:
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 "pdf.py", 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/profiles.py", line 989, in create_profile
bin_fields, data_source._determine_fields(fields), wf, is_pfield)
yt.utilities.exceptions.YTIllDefinedProfile:
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 <matthewturk@gmail.com> wrote:
Hi,
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 <vadlamani.samhitha@gmail.com> 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()
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
dens=ad.cut_region(["obj[('gas','density')].in_units('H/cm**3') > 0"]) plotted
_______________________________________________ yt-users mailing list -- yt-users@python.org To unsubscribe send an email to yt-users-leave@python.org
yt-users mailing list -- yt-users@python.org To unsubscribe send an email to yt-users-leave@python.org
_______________________________________________ yt-users mailing list -- yt-users@python.org To unsubscribe send an email to yt-users-leave@python.org
_______________________________________________ yt-users mailing list -- yt-users@python.org To unsubscribe send an email to yt-users-leave@python.org
participants (3)
-
Matthew Turk
-
Nathan Goldbaum
-
Vadlamani Samhitha