From 19bf9951570ad382beaa376f5f532bcae9cc5811 Mon Sep 17 00:00:00 2001 From: Madicken Munk Date: Tue, 14 May 2019 15:23:51 -0500 Subject: [PATCH] add cell detailing IsolatedGalaxy source, setting data dir for yt --- examples/galaxy_display.ipynb | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/examples/galaxy_display.ipynb b/examples/galaxy_display.ipynb index 49feadb..5a7b27c 100644 --- a/examples/galaxy_display.ipynb +++ b/examples/galaxy_display.ipynb @@ -21,6 +21,15 @@ "import yt" ] }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "yt has several example datasets (and a number of tutorials on reading and analyzing its data) that are available on [its webpage](http://yt-project.org/data/). This tutorial will use the IsolatedGalaxy dataset. If you do not have IsoaltedGalaxy on your machine, please download and unzip it from http://yt-project.org/data/IsolatedGalaxy.tar.gz. \n", + "\n", + "yt's load function searches a for a user-configurable datapath (in addition to the current working directory). If you'd like to learn more about setting up your datapath for yt so that you can store your data centrally, see the documentation on configuring the `test_data_dir` on [this page](http://yt-project.org/doc/reference/configuration.html#available-configuration-options). The next cell loads IsolatedGalaxy as if it is in the `test_data_dir folder`. " + ] + }, { "cell_type": "code", "execution_count": null, @@ -29,17 +38,11 @@ }, "outputs": [], "source": [ - "ds = yt.load(\"data/IsolatedGalaxy/galaxy0030/galaxy0030\")\n", + "ds = yt.load(\"IsolatedGalaxy/galaxy0030/galaxy0030\")\n", "s = ds.r[:,:,0.5]\n", - "s.display(\"density\")" + "ss = s.display(\"density\")\n", + "ss" ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [] } ], "metadata": { @@ -58,7 +61,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.6.6" + "version": "3.6.5" } }, "nbformat": 4,