def overlap(self,xc,A0,A1,m0,m1,s0,s1):
        err0=A0*np.sqrt(np.pi/2)*s0*(1-erf((xc-m0)/np.sqrt(2)/s0))
        err1=A1*np.sqrt(np.pi/2)*s1*(erf((xc-m1)/np.sqrt(2)/s1)+erf(m1/np.sqrt(2)/s1))
        return (err0+err1)/self.area(A0,A1,m0,m1,s0,s1)