Unable yt to create a particle plot (yt.ParticlePlot) of PartType4 particles (stars/wind particles)

Edrick Wang
  • 5 Apr '23

I have access to the TNG's Remote JupyterLab, and I am trying to follow the provided example script "pyxsim_xrays.ipynb", and instead of making visualizations of the gas particles (PartType0), I am trying to look at the stars within the subhalo and hopefully simulate a synthetic image of it from different viewing angle in the future. I modified the python script in the remote server in order to accommodate it for the different particle type, and currently I am simply trying to make a plot of particles positions (x vs. y) with no field in the z direction, using yt.ParticlePlot (see here). However, the resulting plot is simply blank (screenshot attached below). I have tried several things but nothing worked. I am not extremely knowledgeable in coding so apologies in advance if the mistake was trivial.
I am unable to attach the ipynb file for reference, so I uploaded the equivalent .py file to a repository with the link here.
For reference, the subhalo I am looking at has ID 488530 (Parent Halo ID 127) at z=0 (snapshot_number = 99).
Screenshot of the blank plot and the code:
Screen Shot 2023-04-05 at 16.04.31.png
Screen Shot 2023-04-05 at 16.05.23.png

If any additional information is needed, please let me know and I will provide the requested material.

Dylan Nelson
  • 5 Apr '23

Hi Edrick,

I'm afraid it's clearly an issue with yt and how yt understands (or not) data like TNG. You'd have to ask over there, and likely it would be useful if you provide them with a minimal working example i.e. with a cutout to reproduce the problem.

The subhalo has ~2 million star particles and the result should look something like this visualization:

https://www.tng-project.org/data/vis/?sim=TNG50-1&subhalo_num=488530&partType=stars&partField=coldens_msunkpc2&sizeType=kpc&size=40&rasterPx=600

vis_TNG50-1_subhalo_99_488530_stars_coldens_msunkpc2.png

Edrick Wang
  • 6 Apr '23

Hello,
Thank you for the quick response! Yes I already used matplotlib before to plot the particles so I already know what I am expecting. I will go over the the yt forum and hopefully get a response. Thank you very much for the help!

  • Page 1 of 1