Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unit test failure with the COBYLA algorithm for spectral fitting #73

Open
AdamGoldstein-USRA opened this issue Oct 9, 2024 · 0 comments

Comments

@AdamGoldstein-USRA
Copy link
Collaborator

The COBYLA algorithm in scipy.optimize.minimize is failing its unit test with the following error:

________________________ TestCOBYLA.test_parameters _________________________

self = <tests.core.spectra.test_fitting.TestCOBYLA testMethod=test_parameters>

    def test_parameters(self):
>       self.assertAlmostEqual(self.fitter.parameters[0], 0.05, places=2)
E       AssertionError: 0.0001000001 != 0.05 within 2 places (0.049899999900000006 difference)

tests/core/spectra/test_fitting.py:739: AssertionError

In the unit test, a power law with index = -1.3 and amplitude = 0.05 is simulated and fit. The failure appears to be on fitting the amplitude. Unit tests for other algorithms pass, so maybe this is a problem in scipy?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant