some questions about particleprojectionplot

Hello I am new about YT. I want to use YT to make some analysis and get some projection plots. The data that will be used is from Arepo code. The output files are same as Gadget that the format of them is HDF5. I have used YT to produce the stellar particles projection plots using yt.ParticleProjectionPlot(). However, I found that if I use yt.ParticleProjectionPlot(), I cannot use contour . (error information:yt.utilities.exceptions.YTUnsupportedPlotCallback: The `Particle` class currently doesn't support the `annotate_contour` method.) So, I want to learn how to add the contour if I just want to plot the N-body partciles. Additionally, in my simulation, my galaxy model is not aligned with the descartes system.In other words, the disc of the galaxy is not parallel to any plane of the coordinate system.I found I can set the normal vector L as showed in examples,but how I could know the real normal vector if I want to make the face-on galaxy plot? Thank everyone very much for answering my questions !And I will be sorry if I miss the important imformation which is showed in YT home website.Please tell me!

Hi there! Thanks for writing. Right now you can't do the particle contours directly, *however* you may be able to apply contours manually on the dataset by accessing the .axes object on your projection plot and applying contours. There may also be a way to apply contours of a different field which is deposited, but I don't think it will be highly performant. For your second question, you can absolutely do what we call an 'off-axis' projection and supply a normal vector. I think that is what you will want to do -- and for your specific case, I believe that computing the angular momentum vector is the way to compute it. You can do this by identifying a data object, perhaps a sphere centered on your galaxy with an estimated radius, and calling "dobj.quantities.angular_momentum_vector()" where dobj is the variable name for your data object. I hope that helps! -Matt On Sat, Jul 22, 2023 at 7:53 AM <34820221153820@stu.xmu.edu.cn> wrote:

Thank you very much! I have solved the second question using the same method as you said.And I will try to solve the first question soon. Now I have a new question that because my galaxy model is not aligned, so how can I use the LinePlot to analysis data?Adjusting all particles coordinates to let the galaxy aligned didn't effect well.I don't know whether I did rightly. Hope your reply.Thank you very much again!

Hi there! Thanks for writing. Right now you can't do the particle contours directly, *however* you may be able to apply contours manually on the dataset by accessing the .axes object on your projection plot and applying contours. There may also be a way to apply contours of a different field which is deposited, but I don't think it will be highly performant. For your second question, you can absolutely do what we call an 'off-axis' projection and supply a normal vector. I think that is what you will want to do -- and for your specific case, I believe that computing the angular momentum vector is the way to compute it. You can do this by identifying a data object, perhaps a sphere centered on your galaxy with an estimated radius, and calling "dobj.quantities.angular_momentum_vector()" where dobj is the variable name for your data object. I hope that helps! -Matt On Sat, Jul 22, 2023 at 7:53 AM <34820221153820@stu.xmu.edu.cn> wrote:

Thank you very much! I have solved the second question using the same method as you said.And I will try to solve the first question soon. Now I have a new question that because my galaxy model is not aligned, so how can I use the LinePlot to analysis data?Adjusting all particles coordinates to let the galaxy aligned didn't effect well.I don't know whether I did rightly. Hope your reply.Thank you very much again!
participants (2)
-
34820221153820@stu.xmu.edu.cn
-
Matthew Turk