[ PySIT Setup ] [ An Example ] [ Developing PySIT ]

About

PySIT is a scalable test bed for cutting edge numerical methods for solving the seismic imaging problem. The package is written in a combination of Python, C, C++, and other languages (as necessary). There may be other dependencies in the future, e.g., libraries like PETSc. This page details the installation procedure for the necessary software. For now, these instructions are limited to installing the required software in your MIT mathematics home directory, though it should be pretty obvious how to install them elsewhere.

Dependencies

PySIT depends explicitly on the following packages:

Those dependencies tagged with Anaconda or EPD are provided in the Continuum Analytics Anaconda or Enthought Canopy (formerly EPD) Python Distribution .

Currently, I recommend using Anaconda because it contains all of the necessary packages (plus some additional useful tools, mpi4py and mpich2 on Linux, LLVM on all platforms), with reasonable assurance that the included package versions are properly interoperable. Moreover, Continuum Analytics provides stable installers for all three dominant operating systems (Windows, OSX, and Linux). Finally, the Anaconda, with MKL acceleration is free for academic use.

Installing Python

There are many basic python libraries that this package will rely on. Currently, it is developed for Python 2.7. In addition to the python language proper, PySIT also depends heavily on the Numpy, SciPy, and Matplotlib packages. It will likely depend on (and contribute to) some utilities in the Madagascar package as well.

Installing Anaconda

Download and install the latest Anaconda for your operating system. Don't forget to register for the free academic version. Instructions for installing Anaconda on your math department account can be found on the ICG wiki.

Note for Windows Users

For Anaconda 1.6.1 or older, there are a few issues with the installer. These are trivial to correct. (Assuming you used the default install path.) Get Anaconda 1.7 or later.

  1. Edit your system PATH environment variable to ensure that there is a semicolon ';' before the entry for C:\Anaconda
  2. Edit your system PATH environment variable to add C:\Anaconda\MinGW\x86_64-w64-mingw32\lib. (Be sure to separate it with a semicolon.)

Setting Up PySIT

  1. I host a master copy of PySIT in a private Mercurial (hg) repository at bitbucket.org. E-mail me if you need an invite for read-access.

    (I highly suggest that you use bitbucket for your own projects and papers, it is really great, and free unlimited accounts if you use your mit.edu e-mail address!). If you have never used mercurial, or any version control system, I highly suggest looking at hginit.com to get started. We are also using bitbucket for issue/bug/feature request tracking.

    Once you have your bitbucket account and I have shared the repository with you, you can 'fork' my repository. If you have to make modifications to PySIT, you will make them in your own fork. If you intend for the modifications to 'merge' into the main PySIT (and you might), you should create a 'branch' in your repository for the changes you wish to make. Then, once you get used to the system and any new feature you have written is mature, you can make a 'pull request' on BitBucket to merge them in to the main package. For more info on the preferred workflow for adding new features, see the Mercurial discussion on the subject.

  2. Tech Square has installed hg on the math machines, so it is accessable from the waves (or any math dept. machine). If you are using your own system, install the platform appropriate version (I suggest TortoiseHG for Windows).

  3. As we use Mercurial (hg) for versioning, clone the latest version of your fork to your favorite LOCAL_DIR with

    hg clone https://YOUT_BITBUCKET_USERNAME@bitbucket.org/YOUT_BITBUCKET_USERNAME/pysit LOCAL_DIR

  4. Change directories to the LOCAL_DIR directory and run the command

    python setup.py install

  5. Now you should be able to import PySIT from a python console (Start iPython with ipython --pylab).

    import pysit

    Note that you cannot be in LOCAL_DIR when you import PySIT.

An Example Experiment in PySIT

Go on to the next page.