<div dir="ltr">Dear Annamalai,<div><br></div><div>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</div><div>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</div><div>because you need to be able to draw several kinds of structures (curves, arrows, meshes, volume rendering), and I am not</div><div>sure what is the level of support for all these different kinds of plots in yt. I used mayavi for the example. </div><div><br></div><div>1. Horizons are meshes (typically, 6 partially overlapping meshes). So, you need to figure out how to draw meshes</div><div> with yt. You can learn about how these are represented by kuibit in the tutorial on horizons.</div><div> (<a href="https://sbozzolo.github.io/kuibit/tutorials/cactus_horizons.html">https://sbozzolo.github.io/kuibit/tutorials/cactus_horizons.html</a>). I report here one of the figures to give an idea</div><div> of how horizons are represented</div><div>.</div><div><img src="cid:ii_kosxhwo00" alt="image.png" width="400" height="350"><br></div><div><br></div><div> You can obtain the 3D position of all the vertices with the function `shape_at_iteration` or `shape_at_time`.</div><div><br></div><div>2. Spins are vectors. You have to find out how to draw arrows in yt. You can use the function</div><div> `ah_origin_at_iteration` to find the center of the horizon at any given time, and then you can find the</div><div> value of the vector you are interested in simply getting the quantity with brackets, e.g. h["momentum_x"]</div><div> would give you a timeseries with the value of the linear momentum along the x direction for horizon h.</div><div> h["momentum_x"](time) is the value of that component at the given time, which you can use to draw the</div><div> arrow. </div><div><br></div><div>3. Orbits are 3D curves. h.ah.centroid_x is a timeseries with the x coordinate of the horizon h. You can use this</div><div> to draw a 3D plot with the orbits. Read tutorial on timeseries for more information</div><div> (<a href="https://sbozzolo.github.io/kuibit/tutorials/timeseries.html">https://sbozzolo.github.io/kuibit/tutorials/timeseries.html</a>)</div><div><br></div><div>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,</div><div> this has all the information about the refinement levels, but you can resample everything to a uniform grid. </div><div> This can be passed to yt as "generic data", as shown here <a href="https://yt-project.org/doc/examining/generic_array_data.html">https://yt-project.org/doc/examining/generic_array_data.html</a>.</div><div> For information about grid data, have a look at the relevant tutorial </div><div> <a href="https://sbozzolo.github.io/kuibit/tutorials/grid_data.html">https://sbozzolo.github.io/kuibit/tutorials/grid_data.html</a>.</div><div><br></div><div> When you use mayavi, this can be a 3D contour plot, but it still has to be resampled onto an uniform grid.</div><div><br></div><div><div>5. Gravitational waves are 2D curves that live on a different space compared to the main plot. I used matplotlib</div><div> to draw this (plt.plot(strain)) and then joined the images with Pillow. The tutorial on gravitational waves will</div><div> tell you more about this: <a href="https://sbozzolo.github.io/kuibit/tutorials/gravitational_waves.html">https://sbozzolo.github.io/kuibit/tutorials/gravitational_waves.html</a></div></div><div><br></div><div>6. If you want to have something nice and user-friendly, you can take inspiration from the examples in kuibit.</div><div> These examples are command-line utilities that work out-of-the-box for all the simulations. They have a lot</div><div> of options and other nice features (e.g. tab-completion). Some documentation about that is here </div><div> <a href="https://sbozzolo.github.io/kuibit/argparse_helper.html">https://sbozzolo.github.io/kuibit/argparse_helper.html</a>, but the examples themselves are great starting points.</div><div><br></div><div>My personal recommendation for how you should move forward is to familiarize yourself with kuibit first. In this</div><div>email I sketched how you can achieve what you want, but I neglected a ton of details. I suspect that it is only after</div><div>you learned the basics of kuibit that this email will make sense. Also, you should ask yourself if you really want</div><div>to use yt for this specific use case. If you don't want to, everything I described in this email is already implemented</div><div>(with mayavi) and you can simply customize the example that I pointed out in the previous email for your needs. </div><div><br></div><div>To get started with kuibit, you can read the tutorials, <a href="https://sbozzolo.github.io/kuibit/#tutorials">https://sbozzolo.github.io/kuibit/#tutorials</a> and this page</div><div><a href="https://sbozzolo.github.io/kuibit/simdir.html">https://sbozzolo.github.io/kuibit/simdir.html</a>. Then, I'd suggest trying to re-implement one of the examples on your</div><div>own, for example plot_ah_separation.py (<a href="https://sbozzolo.github.io/kuibit/examples/bins/plot_ah_separation.html">https://sbozzolo.github.io/kuibit/examples/bins/plot_ah_separation.html</a>).</div><div>With this, you will gain enough experience to move to the next step and make the movie you want to.</div><div><br></div><div>Every single function in kuibit is documented. In addition to the examples and tutorials, we have two additional</div><div>types of documentation (for a total of four different types):</div><div>- Explanations of the various modules (<a href="https://sbozzolo.github.io/kuibit/#usage">https://sbozzolo.github.io/kuibit/#usage</a>), where you can see how the modules</div><div> should be used and a broad overview on how they are structured and what features they provide.</div><div>- Reference and technical details of the APIs (<a href="https://sbozzolo.github.io/kuibit/#reference-material-classes-functions">https://sbozzolo.github.io/kuibit/#reference-material-classes-functions</a>),</div><div> where you can see the details of the function signatures, the types expected, et cetera.</div><div>You will likely need the latter two forms of documentation when you will start writing code with kuibit.</div><div><br></div><div>Best,</div><div>Gabriele</div><div> </div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, May 17, 2021 at 11:05 AM Annnamalai P S <<a href="mailto:annamalaips.97@gmail.com">annamalaips.97@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div>Dear Gabriele,<br></div><div><br></div><div>Thank you for your reply and for taking the time to point out the resources you felt would be relevant to my current research.<div></div></div><div><br></div><div>I'm currently not very well versed with yt package but am very much interested in the idea that you have suggested. But at the same time I'm new to kuibit as well. If you can share any resources/documentation that helps me to prepare data to be used for yt package that would be great. I hope to create animated volume rendering using yt package like the ones you have created. I also want to set it up as a user friendly and out of the box package that can yield plots for visualization.</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, May 17, 2021 at 8:52 PM Gabriele Bozzola <<a href="mailto:bozzola.gabriele@gmail.com" target="_blank">bozzola.gabriele@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Dear Annamalai,<div><br></div><div>I am the author of kuibit, and I would like to highlight that the package is capable of doing what you are looking for,</div><div>including 3D rendering. The package also comes with a lot of examples that you can immediately use for your </div><div>goals. There are already some examples for 2D/3D plots of binary black holes, and you can see an example of</div><div>rendering here: <a href="https://github.com/Sbozzolo/kuibit/tree/experimental/examples" target="_blank">https://github.com/Sbozzolo/kuibit/tree/experimental/examples</a></div><div>where I rendered a 3D movie with the apparent horizons, magnitude of the spins, orbits, and gravitational wave</div><div>strain. You can produce the same movie for your simulation writing 0 lines of code [1].</div><div><br></div><div>As for yt, kuibit can prepare the data so that it is trivial to use it with yt (see GitHub issue </div><div><a href="https://github.com/Sbozzolo/kuibit/issues/18" target="_blank">https://github.com/Sbozzolo/kuibit/issues/18</a>). I've never used yt and I don't even know where to start, but if you<br></div><div>are already familiar with it, you'll be able to use it with kuibit in no time. [2]</div><div><br></div><div>Finally, let me point to the documentation: <a href="https://sbozzolo.github.io/kuibit/" target="_blank">https://sbozzolo.github.io/kuibit/</a>. kuibit is thoroughly documented and </div><div>there are lots of examples and tutorials that will help you get started. In addition to that, we have a kuibit user </div><div>group chat on Telegram (<a href="https://t.me/kuibit" target="_blank">https://t.me/kuibit</a>) where you can ask questions if you find that something is not clear.</div><div><br></div><div>Let me know if you have any questions,</div><div>Gabriele</div><div><br></div><div><br></div><div>[1] The code is in the experimental branch, so I would actually not recommend using it at the moment because it</div><div>will break in the future. However, you can still see how it is done there and use the stable version of kuibit to </div><div>achieve a similar result. At this point in time, I would recommend NOT using the experimental branch.</div><div><br></div><div>[2] In that case, we would love you to contribute back to kuibit :)</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, May 17, 2021 at 8:05 AM Roland Haas <<a href="mailto:rhaas@illinois.edu" target="_blank">rhaas@illinois.edu</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hello Annamalai,<br>
<br>
please take a look at our wiki:<br>
<br>
<a href="https://docs.einsteintoolkit.org/et-docs/Analysis_and_post-processing" rel="noreferrer" target="_blank">https://docs.einsteintoolkit.org/et-docs/Analysis_and_post-processing</a><br>
<br>
Linked in the "Analyzing Data Output by the Einstein Toolkit"<br>
bullet of "Documentation" section of the wiki at <br>
<br>
<a href="https://docs.einsteintoolkit.org/et-docs/Main_Page" rel="noreferrer" target="_blank">https://docs.einsteintoolkit.org/et-docs/Main_Page</a><br>
<br>
Please note that yt support is not currently functional since the<br>
repository linked to no longer exists.<br>
<br>
The most functionally complete packages are likely:<br>
<br>
* SimulationTools<br>
* PostCactus<br>
* Kuibit<br>
<br>
For 3d visualization I think you are pretty much limited to VisIt<br>
unless you convert the HDF5 files into a format understood by other<br>
packages.<br>
<br>
Yours,<br>
Roland<br>
<br>
> Hi Einstein Toolkit users,<br>
> <br>
> I'm a relatively new Einstein Toolkit user learning to simulate and<br>
> visualise binary black hole system mergers. I'm trying to write a code to<br>
> visualise animated trajectories, horizons, gravitational waveforms and<br>
> curvature of binary system merger using Python matplotlib and yt-project<br>
> packages.<br>
> <br>
> Before I proceed, I want to know what are the list of available<br>
> open-source/commercial visualisation software/packages that can produce<br>
> animated plots(2D and 3D) of binary system merger with data from Einstein<br>
> toolkit output, and get an idea of whether something similar already exists.<br>
> <br>
> <br>
> --<br>
> Best regards,<br>
> Annamalai P S<br>
<br>
<br>
-- <br>
My email is as private as my paper mail. I therefore support encrypting<br>
and signing email messages. Get my PGP key from <a href="http://pgp.mit.edu" rel="noreferrer" target="_blank">http://pgp.mit.edu</a> .<br>
_______________________________________________<br>
Users mailing list<br>
<a href="mailto:Users@einsteintoolkit.org" target="_blank">Users@einsteintoolkit.org</a><br>
<a href="http://lists.einsteintoolkit.org/mailman/listinfo/users" rel="noreferrer" target="_blank">http://lists.einsteintoolkit.org/mailman/listinfo/users</a><br>
</blockquote></div>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr"><div dir="ltr">Annamalai P S</div></div>
</blockquote></div>