ENH: Initial commit of new PR re: dpc

Hi Li and Tom, thanks. I just saw your notes and comments. I will work on them this afternoon.

On Sep 26, 2014, at 2:05 PM, Li Li <notifications@github.com> wrote:

> In nsls2/dpc.py:
> 
> > +    residue : float
> > +        residue value
> > +    
> > +    """
> > +    
> > +    length = len(xdata)
> > +    beta = 1j * (np.arange(length) - np.floor(length / 2.0))
> > +    
> > +    fitted_curve = xdata * v[0] * np.exp(v[1] * beta)
> > +    residue = np.sum(np.abs(ydata - fitted_curve) ** 2)
> > +    
> > +    return residue
> > +
> > +
> > +
> > +def fit(ref_f, f, start_point=[1, 0], solver='Nelder-Mead', tol=1e-8, 
> @thegreatwall , I think you can still keep the current fitting code. We do not need to use lmfit engine for this simple case. Please work on the other new issues, and get this one merged.
> 
> —
> Reply to this email directly or view it on GitHub.
> 

--
Best Regards,

  Cheng Chang 
  Computer Engineering, Stony Brook University
  Computer Science Group, Computational Science Center, Brookhaven National Laboratory
  Tel：(001) 631-885-4922