NSLS-II/NSLS2 — pull request #3 by tacaswell (2014-05-15 03:17:47+00:00)
Title: ENH : added simple align + shift function

If you install the package (`python setup.py install`) the following _should_ demo this code:

```
from __future__ import (absolute_import, division, print_function,
unicode_literals)
from nsls2.spectroscopy import align_and_scale
import six
from matplotlib import pyplot as plt
import numpy as np
E = np.linspace(0, 50, 1000)

# this is not efficient for large lists, but quick and dirty
e_list = []
c_list = []

for j in range(25, 35, 2):
e_list.append(E)
c_list.append(synthetic_data(E, j + j / 100, j / 10, 1000, 2*np.pi * 6/50, 60))

e_cor_list, c_cor_list = align_and_scale(e_list, c_list)

fig, (ax1, ax2) = plt.subplots(1, 2)
for e, c in zip(e_list, c_list):
ax1.plot(e, c)

for e, c in zip(e_cor_list, c_cor_list):
ax2.plot(e, c)

```

Running `nosetest` in the top level directory will test the (installed version of the) package. There is currently only one test that just makes sure no exceptions are raised.