SlicePlot of 3D cylindrical coordinates for FLASH
Hello, First of all, thanks to the yt community for developing the toolkit for visualizing various forms of data. I am working on FLASH simulations in 3D cylindrical coordinates. A SlicePlot of density along 'z' creates a plot of the x-y plane (I assume that yt performs the coordinate transformation internally, converts the radial coordinate 'r' into 'x' and 'y' and generates the plot in the x-y plane), whereas SlicePlot along 'theta' creates a plot of 'r' vs 'z' which understandably considers only the positive values for 'r'. I would like to plot a cross-section of my domain (that considers both postive and negative values of the radial direction either in terms of 'x' or 'y'). i.e., I would like to SlicePlot along 'theta' that creates a plot of 'z' vs 'y' or 'z' vs 'x'. Can someone please guide me how to do it? I am very new to yt and in general to a coding language. Therefore, I request you to kindly elaborate your answer to a level that a layman like me can understand and benefit from it. Thanks in advance :)
Hi there! There's no built-in way to do this with yt, but if I'm following what you want to do, you can do this with a bit of manual work by taking two theta-normal slices and stitching them together manually. The idea is to take one slice at your theta of interest and a second slice at theta + pi, extract the underlying image arrays of both them and then concatenate the two image arrays and plot manually. I wrote up a jupyter notebook demonstrating one way to do this: https://github.com/chrishavlin/yt_scratch/blob/master/notebooks/general_scra... Let me know if that helps! Also, just for reference I've actually been working on a general way of doing this with non-cartesian datasets (https://github.com/yt-project/yt/issues/4750 and https://github.com/yt-project/yt/pull/4847), but I started with spherical coordinates, so it won't help you at present.
Hi Chris, Many thanks for your response. Thats a nice workaround, definitely helpful for me. Thank you San
participants (2)
-
Chris Havlin -
sanbackup313@gmail.com