def test_lorentz_complex3(self): curve = load(osp.join(CURVE_FOLDER, "lorentz_complex3.h5")) f, c = curve.fit("lorentz_complex_sam") if SHOW_PLOTS: plot(np.real(curve.data), np.imag(curve.data)) plot(np.real(c.data), np.imag(c.data)) show() self.assertLess(f.sqerror, 4.4e-8)
def test_lorentz_complex2(self): curve = load(osp.join(CURVE_FOLDER, "lorentz_complex2.h5")) f, c = curve.fit("lorentz_complex_sam") if SHOW_PLOTS: plot(np.real(curve.data), np.imag(curve.data)) plot(np.real(f.getoversampledfitdata(5000)), np.imag(f.getoversampledfitdata(5000))) show() self.assertLess(f.sqerror, 8.2e-9)
def test_lorentz_complex(self): """ Tests that a curve can be saved. """ curve = load(osp.join(CURVE_FOLDER, "lorentz_complex1.h5")) f, c = curve.fit("lorentz_complex_sam") if SHOW_PLOTS: plot(np.real(curve.data), np.imag(curve.data)) plot(np.real(f.getoversampledfitdata(5000)), np.imag(f.getoversampledfitdata(5000))) show() self.assertLess(f.sqerror, 1.4e-9)