{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": "Copyright 2025 Marc Kamionkowski and Kris Sigurdson.\nLicensed under Apache-2.0 (http://www.apache.org/licenses/LICENSE-2.0).\n\nThis 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\nYou must have successfully installed NSphere by following the instructions in the main [README](https://github.com/kris-sigurdson/NSphere). Ensure the `nsphere` Python virtual environment is activated (`source ./activate_nsphere` from the project root).\n\nThis 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\nTo 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```\nand then rerun this notebook.\n\nTo save animations, uncomment the `ani.save(...)` lines in the code cells (they will save to `nsphere/results/`).\n\nFor more information on NSphere, see the [full documentation](https://kris-sigurdson.github.io/NSphere/).\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", "