Hi all, I encountered the 'RuntimeError' when use yt.ProjectionPlot like below: Traceback (most recent call last): File "/scratch/data/hnguyen/gas/gas/lss_pro.py", line 3, in <module> p = yt.ProjectionPlot(gas, 'z', ('gas', 'density'),data_source = gas.all_data(),buff_size=(100, 100)) File "/tiara/home/hnguyen/.local/miniconda3/lib/python3.9/site-packages/yt/visualization/plot_window.py", line 2069, in __init__ proj = ds.proj( File "/tiara/home/hnguyen/.local/miniconda3/lib/python3.9/site-packages/yt/data_objects/construction_data_containers.py", line 551, in __init__ self.get_data(field) File "/tiara/home/hnguyen/.local/miniconda3/lib/python3.9/site-packages/yt/data_objects/construction_data_containers.py", line 283, in get_data self._handle_chunk(chunk, fields + sfields, tree) File "/tiara/home/hnguyen/.local/miniconda3/lib/python3.9/site-packages/yt/data_objects/construction_data_containers.py", line 638, in _handle_chunk ilevel = chunk.ires * self.ds.ires_factor File "/tiara/home/hnguyen/.local/miniconda3/lib/python3.9/site-packages/yt/data_objects/static_output.py", line 1266, in ires_factor raise RuntimeError RuntimeError But when I use yt.SlicePlot, my code works. Is there any idea to solve this problem? I really need ProjectionPlot for my visualization. Thank you. Best regards, Huy
Hi Huy, Does your dataset have a refinement factor that is not a power of two? If so, we can take a different approach. On Sun, Aug 6, 2023 at 8:57 AM <ssp202311@asiaa.sinica.edu.tw> wrote:
Hi all, I encountered the 'RuntimeError' when use yt.ProjectionPlot like below:
Traceback (most recent call last): File "/scratch/data/hnguyen/gas/gas/lss_pro.py", line 3, in <module> p = yt.ProjectionPlot(gas, 'z', ('gas', 'density'),data_source = gas.all_data(),buff_size=(100, 100)) File "/tiara/home/hnguyen/.local/miniconda3/lib/python3.9/site-packages/yt/visualization/plot_window.py", line 2069, in __init__ proj = ds.proj( File "/tiara/home/hnguyen/.local/miniconda3/lib/python3.9/site-packages/yt/data_objects/construction_data_containers.py", line 551, in __init__ self.get_data(field) File "/tiara/home/hnguyen/.local/miniconda3/lib/python3.9/site-packages/yt/data_objects/construction_data_containers.py", line 283, in get_data self._handle_chunk(chunk, fields + sfields, tree) File "/tiara/home/hnguyen/.local/miniconda3/lib/python3.9/site-packages/yt/data_objects/construction_data_containers.py", line 638, in _handle_chunk ilevel = chunk.ires * self.ds.ires_factor File "/tiara/home/hnguyen/.local/miniconda3/lib/python3.9/site-packages/yt/data_objects/static_output.py", line 1266, in ires_factor raise RuntimeError RuntimeError
But when I use yt.SlicePlot, my code works. Is there any idea to solve this problem? I really need ProjectionPlot for my visualization. Thank you.
Best regards, Huy _______________________________________________ yt-users mailing list -- yt-users@python.org To unsubscribe send an email to yt-users-leave@python.org https://mail.python.org/mailman3/lists/yt-users.python.org/ Member address: matthewturk@gmail.com
Dear Matthew, I set the refinement factor equal to 20 before. But when I change to a power of two, it's works! Thank you very much! Best regards, Huy
participants (2)
-
Matthew Turk
-
ssp202311@asiaa.sinica.edu.tw