This document is broken into a few secions. First of all, there is information about getting a Python installation up and running. This is followed by a section on the basic usage of these programs to manipulate, plot, and execute simple non-negative least squares fits on GCMS datasets. The final section covers generating calibration curves and automating data extraction with this calibration information. You can skip to that section if all you want to do is automate some data extractions. (It is not necessary to understand the data manipulation/plotting as that is automated in the final section.)
Gcmstools requires Python and a number of third-party packages. Below is a complete list of packages and minium versions:
Although not required, IPython (v 2.3.1 tested) provides a very useful advanced interactive Python interpreter, and examples in this documentation assume that you are using this environment.
All of these packages can easily be installed using the all-in-one Anaconda Python distribution. It combines a large number of Python packages for scientific data analysis and a program (conda) for managing package updates (in addition to many other advanced features). The Anaconda developers (Continuum Analytics) have a lot of useful documentation for installing Anaconda and using conda. There are other ways to install Python and it’s packages, but for this documentation, it will be assumed that Anaconda is being used.
Note
On Mac/Linux systems, Python is already part of the operating systems. Do not try to install these packages into the builtin Python distribution unless you really know what you are doing. You might overwrite and important file, which can cause problems for your system. Confusion between the system and Anaconda Python installation is a common source of problems for beginners, so make sure that your Anaconda Python is “activated” before running the commands in this document. (See the Anaconda documentation for more information on the activation process.)
Note
On Windows, Anaconda may not install netCDF4. In this case, you can get a prebuilt installer from Christoph Gohlke: be sure to get the Python 2.7 (“cp27”) 64-bit (“amd64”) build for the most recent version.
Learning the usage of all of these Python packages is far beyond the scope of this document. However, excellent documentation for most of the packages as well as full tutorials are easily discovered.
To install gcmstools from the main repository, there are two options: 1) download the source file and install the package or 2) install using git (recommended).
Option 1
Download a zip file of the current state of the repository. (Look for the button shown below (Figure 3)at the main repository.) Unzip this package wherever you’d like.
Figure 3: The zipfile download button.
From the command line, navigate the newly extracted folder and use pip to install the package. (In this case, path-to-gcmstools-folder is the location of the newly unzipped gcmstools folder.)
home>$ cd path-to-gcmstools-folder
gcmstools>$ pip install .
Option 2 (recommended)
First, install the version-control software Git. Now, download and install gcmstools with one command.
home>$ pip install git+https://github.com/rnelsonchem/gcms_nnls.git
The advantage here is that the same command will update your gcmstools installation with any any changes that have been made to the main repository.
Uninstall
Uninstallation of gcmstools is identical regardless of the installation method used above.
home>$ pip uninstall gcmstools