add unit/integrted tests for dpc

Li, thanks. I caught a cold with fever and headache. I will return to it as soon as I get better.

Sent from my iPhone

> On Oct 27, 2014, at 11:50 AM, Li Li <notifications@github.com> wrote:
> 
> In nsls2/tests/test_dpc.py:
> 
> > +                imx, imy = dpc.image_reduction(im, roi=roi)
> > +            
> > +                # 5.3. 1-D IFFT
> > +                fx = np.fft.fftshift(np.fft.ifft(imx))
> > +                fy = np.fft.fftshift(np.fft.ifft(imy))
> > +                
> > +                # 5.4. Nonlinear fitting
> > +                _a, _gx = dpc.dpc_fit(ref_fx, fx)
> > +                _a, _gy = dpc.dpc_fit(ref_fy, fy)
> > +                            
> > +                # Store one-point intermediate results
> > +                gx[i, j] = _gx
> > +                gy[i, j] = _gy
> > +                a[i, j] = _a
> > +        
> > +            except Exception as ex:
> write something like this (https://docs.python.org/3.3/tutorial/errors.html)
> 
> try:
>     f = open('myfile.txt')
>     s = f.readline()
>     i = int(s.strip())
> except IOError as err:
>     print("I/O error: {0}".format(err))
> except ValueError:
>     print("Could not convert data to an integer.")
> except:
>     print("Unexpected error:", sys.exc_info()[0])
>     raise
> The last except clause may omit the exception name(s), to serve as a wildcard.
> 
> —
> Reply to this email directly or view it on GitHub.