Create a 3D fixed resolution buffer from 3D AMR data
Dear all, How to create a 3D fixed resolution buffer (FRB) from 3D AMR data? More specifically, if we would like to project 3D AMR data onto a 2D plane with fixed resolution, we can do something like below: proj = ds.proj(...) frb = proj.to_frb(...) plt.imshow(np.array(frb['density'])) However, if I understand correctly, the array `frb` stores 2D projected data instead of the original 3D data with fixed resolution, correct? How do I do that?. Thanks.
Hi, Depending on your requirements, you may want to use a (smoothed) covering grid (see https://yt-project.org/doc/examining/low_level_inspection.html#examining-gri...) or an arbitrary covering grid (https://yt-project.org/doc/analyzing/objects.html#arbitrary-grid). The former need to be aligned with your AMR grid at some level, while the latter allows for more flexibility at the cost of being slower and needing to interpolate. Both of them yield data on 3D uniform grid. I hope this answers your question, Best regards, Corentin On 23/05/2021 08:57, Tseng, Po-Hsun wrote:
Dear all,
How to create a 3D fixed resolution buffer (FRB) from 3D AMR data? More specifically, if we would like to project 3D AMR data onto a 2D plane with fixed resolution, we can do something like below:
proj = ds.proj(...) frb = proj.to_frb(...) plt.imshow(np.array(frb['density']))
However, if I understand correctly, the array `frb` stores 2D projected data instead of the original 3D data with fixed resolution, correct? How do I do that?.
Thanks. _______________________________________________ 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: contact@cphyc.me
participants (2)
-
Corentin CADIOU
-
Tseng, Po-Hsun