Dear Annamalai,
I don't know much about yt, so the help I can offer is limited and I can only point out what you need to be able to do with yt
to make a video like the one I made. I personally think that yt is not the correct tool to use for this kind of plots
because you need to be able to draw several kinds of structures (curves, arrows, meshes, volume rendering), and I am not
sure what is the level of support for all these different kinds of plots in yt. I used mayavi for the example.
1. Horizons are meshes (typically, 6 partially overlapping meshes). So, you need to figure out how to draw meshes
with yt. You can learn about how these are represented by kuibit in the tutorial on horizons.
of how horizons are represented
.
You can obtain the 3D position of all the vertices with the function `shape_at_iteration` or `shape_at_time`.
2. Spins are vectors. You have to find out how to draw arrows in yt. You can use the function
`ah_origin_at_iteration` to find the center of the horizon at any given time, and then you can find the
value of the vector you are interested in simply getting the quantity with brackets, e.g. h["momentum_x"]
would give you a timeseries with the value of the linear momentum along the x direction for horizon h.
h["momentum_x"](time) is the value of that component at the given time, which you can use to draw the
arrow.
3. Orbits are 3D curves. h.ah.centroid_x is a timeseries with the x coordinate of the horizon h. You can use this
to draw a 3D plot with the orbits. Read tutorial on timeseries for more information
4. The curvature is the only quantity for which I think it makes sense to plot with yt. It is a 3D grid function. Normally,
this has all the information about the refinement levels, but you can resample everything to a uniform grid.
For information about grid data, have a look at the relevant tutorial
When you use mayavi, this can be a 3D contour plot, but it still has to be resampled onto an uniform grid.
5. Gravitational waves are 2D curves that live on a different space compared to the main plot. I used matplotlib
to draw this (plt.plot(strain)) and then joined the images with Pillow. The tutorial on gravitational waves will
6. If you want to have something nice and user-friendly, you can take inspiration from the examples in kuibit.
These examples are command-line utilities that work out-of-the-box for all the simulations. They have a lot
of options and other nice features (e.g. tab-completion). Some documentation about that is here
My personal recommendation for how you should move forward is to familiarize yourself with kuibit first. In this
email I sketched how you can achieve what you want, but I neglected a ton of details. I suspect that it is only after
you learned the basics of kuibit that this email will make sense. Also, you should ask yourself if you really want
to use yt for this specific use case. If you don't want to, everything I described in this email is already implemented
(with mayavi) and you can simply customize the example that I pointed out in the previous email for your needs.
With this, you will gain enough experience to move to the next step and make the movie you want to.
Every single function in kuibit is documented. In addition to the examples and tutorials, we have two additional
types of documentation (for a total of four different types):
should be used and a broad overview on how they are structured and what features they provide.
where you can see the details of the function signatures, the types expected, et cetera.
You will likely need the latter two forms of documentation when you will start writing code with kuibit.
Best,
Gabriele