Projection Plot: Finer Resolution than 800x800 Fixed Resolution Buffer
Hello! I am having trouble improving the resolution of my ProjectionPlot() of a density field. I have studied the documentation (attached below) and can't see a solution to my problem. I am trying to obtain a projection plot of an isolated galaxy from a 25Mpc box, using a data sphere as the data source for the projection. The default plot settings makes "a fixed resolution buffer of (('gas', 'density')) 800 by 800". When I use .set_buff_size(1000) for example, the resolution does not change - I'm assuming because the plot has already been plotted with buff size 800x800 and thus this is the 'max' buff size and cannot be reduced. However when I use a lower buff size, i.e. .set_buff_size(400), the resolution worsens and I am left with a horrifically pixelated projection plot. Can you help me identify a method to decrease the bin size of the density bins so I have a more detailed density projection plot? Thanks for your time. https://yt-project.org/doc/reference/api/yt.visualization.plot_window.html?h...
Hi, I would suggest using the manual plotting interface for the most control over your plots: https://yt-project.org/doc/visualizing/manual_plotting.html https://yt-project.org/doc/visualizing/manual_plotting.html The .to_frb attribute has a resolution parameter. Best, Michael
On Jul 18, 2020, at 5:42 AM, euan.newlands@gmail.com wrote:
Hello!
I am having trouble improving the resolution of my ProjectionPlot() of a density field. I have studied the documentation (attached below) and can't see a solution to my problem.
I am trying to obtain a projection plot of an isolated galaxy from a 25Mpc box, using a data sphere as the data source for the projection.
The default plot settings makes "a fixed resolution buffer of (('gas', 'density')) 800 by 800". When I use .set_buff_size(1000) for example, the resolution does not change - I'm assuming because the plot has already been plotted with buff size 800x800 and thus this is the 'max' buff size and cannot be reduced. However when I use a lower buff size, i.e. .set_buff_size(400), the resolution worsens and I am left with a horrifically pixelated projection plot.
Can you help me identify a method to decrease the bin size of the density bins so I have a more detailed density projection plot?
Thanks for your time.
https://yt-project.org/doc/reference/api/yt.visualization.plot_window.html?h... _______________________________________________ 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: robertmjenningsjr@berkeley.edu
Hi Michael, I've just tried this; unfortunately it still doesn't improve the resolution of my plot. As I run the code, the terminal returns the info I've attached below. Is it possible to set the fixed resolution buffer before it completes the projection? I feel like the issue here might be that the projection is getting completed to the default 800x800 resolution and so it is impossible to later improve this resolution - only reduce it. It would be great to hear your thoughts on this? Cheers, Euan
It might also be worth mentioning I am using a data sphere as my data source for the plot which has a radius of ~50kpc.
Hi, which frontend are you using (is it particle based)? which version of yt are you using? Can you share the images (e.g. via imgur) and script you're using to create them? Cheers, Kacper On 7/19/20 12:14 PM, euan.newlands@gmail.com wrote:
It might also be worth mentioning I am using a data sphere as my data source for the plot which has a radius of ~50kpc. _______________________________________________ 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: xarthisius.kk@gmail.com
Hi Kacper, Here's all that information: https://imgur.com/a/8fjuTS4 Thanks for the assist, Euan
Hi Euan, I think we are still missing the info about which code's data you're using, and whether it's particle or cell based. Can you insert this right after you load the dataset into yt? print(ds.__class__) and also in case it's a cell based code this line: print(ds.index.get_smallest_dx().in_units("kpc")) and show us the output? In case it's an sph/particle data there might be option to tweak resolution of deposited field by modifying `n_ref` parameter during loading. Cheers, Kacper On 7/19/20 5:02 PM, euan.newlands@gmail.com wrote:
Hi Kacper,
Here's all that information: https://imgur.com/a/8fjuTS4
Thanks for the assist, Euan _______________________________________________ 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: xarthisius.kk@gmail.com
if it's grid based, it looks to me like you are asking for a number of
pixels that is far greater than the number of zones in the subregion you
are plotting, so you are simply seeing the zoning.
On Mon, Jul 20, 2020 at 9:42 AM Kacper Kowalik
Hi Euan, I think we are still missing the info about which code's data you're using, and whether it's particle or cell based. Can you insert this right after you load the dataset into yt?
print(ds.__class__)
and also in case it's a cell based code this line:
print(ds.index.get_smallest_dx().in_units("kpc"))
and show us the output?
In case it's an sph/particle data there might be option to tweak resolution of deposited field by modifying `n_ref` parameter during loading.
Cheers, Kacper
On 7/19/20 5:02 PM, euan.newlands@gmail.com wrote:
Hi Kacper,
Here's all that information: https://imgur.com/a/8fjuTS4
Thanks for the assist, Euan _______________________________________________ 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: xarthisius.kk@gmail.com
_______________________________________________ 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: michael.zingale@stonybrook.edu
-- Michael Zingale Associate Professor Dept. of Physics & Astronomy • Stony Brook University • Stony Brook, NY 11794-3800 *phone*: 631-632-8225 *e-mail*: Michael.Zingale@stonybrook.edu *web*: h http://www.astro.sunysb.edu/mzingalettp://zingale.github.io github: http://github.com/zingale
Hi Kacper, I have attached the outputs to the link: https://imgur.com/a/8fjuTS4 I have also attached a Particle Projection Plot of the same galaxy using the same data sphere. This suggests to me that I should be able to achieve a finer resolution for the density projection as the data is able to produce a detailed particle projection? Thanks again for your help here. Best, Euan
Hi Euan, since you have an SPH dataset you have two options to increase the resolution: 1) experiment with lower n_ref during yt.load (more details can be found here [1]) 2) try out latest development version of yt (instruction can be found here [2]) I strongly recommend the latter. The way yt treats SPH datasets has been completely overhauled in yet-to-be-released yt-4.0. Cheers, Kacper [1] http://yt-project.org/docs/dev/examining/loading_data.html?highlight=n_ref#i... [2] http://yt-project.org/docs/dev/installing.html#installing-yt-from-source On 7/20/20 12:14 PM, euan.newlands@gmail.com wrote:
Hi Kacper,
I have attached the outputs to the link: https://imgur.com/a/8fjuTS4
I have also attached a Particle Projection Plot of the same galaxy using the same data sphere. This suggests to me that I should be able to achieve a finer resolution for the density projection as the data is able to produce a detailed particle projection?
Thanks again for your help here.
Best, Euan _______________________________________________ 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: xarthisius.kk@gmail.com
Hi Kacper, I am an undergraduate using the University's software so I don't have the authority to update yt to the development model - though I am excited to see the changes; when do you think it will be released? Altering the n_ref value has worked perfectly for what I am trying to achieve! Thank you so much! Best, Euan
Hi Euan, I'm not sure about the date of the release, but there's a good news: installing yt locally doesn't require any elevated privileges, it's no different from running python script as user. All you need is git, C compiler and python+pip, which most likely are available on the system you're using. You can try do the following: cd $HOME git clone https://github.com/yt-project/yt cd yt pip install Cython numpy h5py --user pip install -e . --user if all goes well, you're ready to roll with yt-4.0dev Cheers, Kacper On 7/20/20 2:07 PM, euan.newlands@gmail.com wrote:
Hi Kacper,
I am an undergraduate using the University's software so I don't have the authority to update yt to the development model - though I am excited to see the changes; when do you think it will be released?
Altering the n_ref value has worked perfectly for what I am trying to achieve! Thank you so much!
Best, Euan _______________________________________________ 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: xarthisius.kk@gmail.com
participants (4)
-
euan.newlands@gmail.com
-
Kacper Kowalik
-
Michael Jennings
-
Michael Zingale