Monte Carlo 2D Packet Visualization
This page is a report of Google Summer of Code 2022 project done by Jayant Bhakar and mentored by Sona Chitchyan, Jaladh Singhal, Mark Magee, and James Gillanders in the TARDIS RT Collaboration.
TARDIS uses a monte carlo method to propagate photon packets through a model of an exploded star. As these virtual packets move through the ejecta model they interact with the gas through absorption, emission, and scattering. TARDIS has the functionality to track the properties of the packets that are generated when running the Simulation. In this project, I have built an interactive animated visualization tool that allows scientists to see the trajectories and interactions of packets throughout their journey.
Work Product
RPacket Plotter
RPacket Plotter is an interactive and animated visualization tool built using Plotly that plots the real packets generated by the Monte Carlo simulation in the TARDIS. It uses the packet data available in rpacket_tracker and then uses that data to generate the coordinates of different packets as they move through the ejecta. These coordinates are finally used to generate a plot. The plot has the following features:
Number of packets can be specified initially by the user and it will automatically distribute the packets evenly throughout the photosphere.
Plot has two themes for the user to choose from, i.e. dark and light. By default, light theme shows up.
There are some useful elements in the plot like the radial shells, color-coded interaction markers, etc.
Plot comes with many interactive features like:
Play/Pause button to control the animation.
Timeline Slider to get to any step in the complete animation.
Zoom feature to closely inspect any packet.
Hover feature to see different attributes of a packet at any given step.
Export plot as a png file.
Here are the PRs for this tool:
#2057: contains the jupyter notebook which was used to develop different prototypes of the plot and other functionality.
#2119: includes the main module that has the RPacketPlotter, along with its documentation and tests.
To see complete and descriptive documentation of RPacket Plotter, please visit the official documentation page of Montecarlo visualization.
Other Contributions
Future Work
In the future, I plan to contribute to the TARDIS and here are some of the tasks that I would be doing:
Reduce the scale of the photosphere in the plot generated by RPacket Plotter.
Add other iterations in the rpacket_tracker.
Work on other open issues that interest me.
Acknowledgement
The past three months have been really exciting. This time was filled with full of new types of things to learn. Putting aside the satisfaction and the feeling of achievement after completing the project, I am really filled with the confidence of conquering bigger challenges in life. This would not have been possible without the generous support from my mentors, friends, and parents. The environment inside the TARDIS community was something I have never experienced in my life. It is a great team working for science and using technology in the best possible way to make it easily accessible to anyone on the planet, from scientists to school-going kids. The skills meetings were more than helpful to me for not just the project. All those science and programming-related topics have really given me some new insights and a deeper understanding, and are gonna stay with me during my entire lifetime. The encouragement to ask questions and involve in discussions really nurtured my curiosity. Overall this was a great experience and there could not have been a better way to spend summers. Thank you GSoC and TARDIS for this fantastic opportunity!