add unit/integrted tests for dpc

I discussed it with Dantong when I started to write the code. I want to reserve this function. Though now, we use minimize() in numpy, in the future, we might want to extend it (from other library or implement one by ourselves). Separating the fitting routine makes it easier. What do you think?


> On Dec 5, 2014, at 1:43 PM, Thomas A Caswell <notifications@github.com> wrote:
> 
> In skxray/dpc.py:
> 
> > +            Residue value.
> > +
> > +        """
> > +
> > +        diff = ydata - xdata * v[0] * np.exp(v[1] * beta)
> > +        ret = np.sum((diff * np.conj(diff)).real)
> > +
> > +        return ret
> > +
> > +    return _rss
> > +
> > +
> > +def dpc_fit(rss, ref_f, f, start_point, solver='Nelder-Mead', tol=1e-6, 
> > +            max_iters=2000):
> > +    """
> > +    Nonlinear fitting for 2 points.
> Is this intended to be a user-facing function? Are you changing any of the scipy default values for any of the kwargs?
> 
> If not I would drop it all together and just call minimize directly in dpc_runner.
> 
> —
> Reply to this email directly or view it on GitHub <https://github.com/Nikea/scikit-xray/pull/177/files#r21390510>.
> 

--
Best Regards,

  Cheng Chang 
  Computer Engineering, Stony Brook University
  Computer Science Group, Computational Science Center, Brookhaven National Laboratory
  Tel：(001) 631-885-4922