Zero To Sixty With yt

Hi there. This is maybe the third version of the “Introduction to yt” tutorial that I’ve written, and I hope that it’s the best one. It will start out with a blank, fresh computer, and then take you all the way through to plotting images from a simulation from Enzo.

Let’s get started with the installation process. I’ll provide links here to other sections of the documentation that might be helpful.

Installing yt

yt provides an installation script, which we try very, very hard to keep up to date and working on most machines you’re likely to run on. It installs an isolated stack of software and provides you with the correct environment variables to use that stack of software.

First, get the installation script. If you’re on Linux:

$ wget http://svn.enzotools.org/yt/trunk/doc/install_script.sh

If you’re on OSX 10.5:

$ wget http://svn.enzotools.org/yt/trunk/doc/install_script_osx.sh

And, if you’re on OSX 10.6:

$ wget http://svn.enzotools.org/yt/trunk/doc/install_script_osx106.sh

I recommend you open up your install script in an editor, just so you can browse what it’s going to do. In particular, the OSX install files will install a couple packages system wide – so if you have a tuned Python installation already, you might be a bit cautious with it.

Now, run the installation script.

$ bash install_script.sh

If you’re on OSX, of course you want to replace install_script.sh with install_script_osx.sh or install_script_osx106.sh. It’ll print out some info, download some files, and the install things.

At the end of the installation process, you will see something like this:

========================================================================

yt is now installed in /u/ki/mturk/Research/local/yt-x86_64 .
To run from this new installation, the a few variables need to be
prepended with the following information:

PATH            => /u/ki/mturk/Research/local/yt-x86_64/bin/
PYTHONPATH      => /u/ki/mturk/Research/local/yt-x86_64/lib/python2.6/site-packages/
LD_LIBRARY_PATH => /u/ki/mturk/Research/local/yt-x86_64/lib/

For interactive data analysis and visualization, we recommend running
the IPython interface, which will become more fully featured with time:

/u/ki/mturk/Research/local/yt-x86_64/bin/iyt

For command line analysis run:

/u/ki/mturk/Research/local/yt-x86_64/bin/yt

Note of interest: this installation will use the directory
/u/ki/mturk/Research/local/yt-x86_64/src/yt-trunk-svn/
as the source for all the YT code.  This means you probably shouldn't
delete it, but on the plus side, any changes you make there are
automatically propagated.
Mercurial has also been installed:

/u/ki/mturk/Research/local/yt-x86_64/bin/hg


For support, see one of the following websites:

    http://yt.enzotools.org/wiki/
    http://yt.enzotools.org/doc/

Or join the mailing list:

    http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org

========================================================================

That’s what it looks like for me, when I installed it. Yours will look different, and there are three specific variables you need to grab from this: PATH, PYTHONPATH and LD_LIBRARY_PATH. These are environment variables, and you must set them in your path if you want to use yt. If you’re not always going to use yt, it might be handy to create an alias or function that sets these paths.

Okay, hopefully yt has installed correctly. Fire it up, very briefly, just to make sure it works:

$ yt

That’ll print out some help and not do anything, but if it doesn’t throw any traceback errors, we’re in business!

Table Of Contents

This Page