{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "Copyright 2025 Marc Kamionkowski and Kris Sigurdson.\n", "Licensed under Apache-2.0 (http://www.apache.org/licenses/LICENSE-2.0).\n", "\n", "This notebook demonstrates how to load, visualize, and create animations from the output data generated by the main NSphere simulation (`nsphere`). It focuses on plotting the phase-space evolution and the radial density profile.\n", "\n", "You must have successfully installed NSphere by following the instructions in the main [README](https://github.com/kris-sigurdson/NSphere-Development). Ensure the `nsphere` Python virtual environment is activated (`source ./activate_nsphere` from the project root).\n", "\n", "This notebook requires output data from an NSphere simulation run created by running the following command from the project root:\n", "```bash\n", "./nsphere --save all\n", "```\n", "\n", "To visualize the tidal stripping scenario shown in the pre-rendered animations when first loading this notebook, run:\n", "```bash\n", "./nsphere --save all --ftidal 0.4\n", "```\n", "and then rerun this notebook.\n", "\n", "To save animations, uncomment the `ani.save(...)` lines in the code cells (they will save to `nsphere/results/`).\n", "\n", "For more information on NSphere, see the [full documentation](https://kris-sigurdson.github.io/NSphere-Development/).\n", "\n", "*(This notebook was last tested with Python 3.12.x)*" ] }, { "cell_type": "code", "execution_count": 1, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Histogram data shape: (100, 59, 60)\n" ] }, { "data": { "text/html": [ "\n", "\n", "\n", "\n", "\n", "\n", "