Files changed (1)
+122 -9Data Inspection.ipynb
+ "We're going to get started by loading up yt. This next command brings all of the libraries into memory and sets up our environment. Note that in most scripts, you will want to import from ``yt.mods`` rather than ``yt.imods``. But using ``yt.imods`` gets you some nice stuff for the IPython notebook, which we'll use below."
+ "When you call the `load` function, yt tries to do very little -- this is designed to be a fast operation, just setting up some information about the simulation. Now, the first time you access the \"hierarchy\" (shorthand is `.h`) it will read and load the mesh and then determine where data is placed in the physical domain and on disk. Once it knows that, yt can tell you some statistics about the simulation:"
+ "yt can also transparently generate fields. However, we encourage you to examine exactly what yt is doing when it generates those fields. To see, you can ask for the source of a given field."
+ "If you're using a simulation type that has grids (for instance, here we're using an Enzo simulation) you can examine the structure of the mesh. For the most part, you probably won't have to use this unless you're debugging a simulation or examining in detail what is going on."
+ "But, you may have to access information about individual grid objects! Each grid object mediates accessing data from the disk and has a number of attributes that tell you about it. The hierarchy (`pf.h` here) has an attribute `grids` which is all of the grid objects."
+ "If we want to examine grids only at a given level, we can! Not only that, but we can load data and take a look at various fields.\n",
+ "yt provides data object selectors. In subsequent notebooks we'll examine these in more detail, but we can select a sphere of data and perform a number of operations on it. yt makes it easy to operate on fluid fields in an object in *bulk*, but you can also examine individual field values.\n",
+ "This creates a sphere selector positioned at the most dense point in the simulation that has a radius of 10 kpc."
+ "We can calculate a bunch of bulk quantities. Here's that list, but there's a list in the docs, too!"
+ "Let's look at the total mass. This is how you call a given quantity. yt calls these \"Derived Quantities\". We'll talk about a few in a later notebook."