mirror of
https://github.com/slsdetectorgroup/aare.git
synced 2026-10-20 12:46:17 +02:00
Removing deprecated use of lmfit (#344)
Removed the lmfit based fitting and the old API for calling functions closes #296
This commit is contained in:
1 parent
e26db97b5c
commit
4f6b69fba6
18 files changed
+635
-1923
No files matched your search
@@ -0,0 +1,15 @@
|
||||
# SPDX-License-Identifier: MPL-2.0
|
||||
import numpy as np
|
||||
import aare
|
||||
|
||||
|
||||
|
||||
def test_gaussian_model_evaluates_and_fits_data():
|
||||
x = np.linspace(-5.0, 5.0, 51)
|
||||
expected = np.array([20.0, 0.5, 1.2])
|
||||
model = aare.Gaussian()
|
||||
|
||||
y = model(x, expected)
|
||||
result = model.fit(x, y)
|
||||
|
||||
np.testing.assert_allclose(result["par"], expected, atol=2e-3)
|
||||
Reference in new issue
Block a user