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

bug on OSX "only" in some cases in new fast GAUSSFIT #1662

Closed
alaingdl opened this issue Nov 8, 2023 · 2 comments
Closed

bug on OSX "only" in some cases in new fast GAUSSFIT #1662

alaingdl opened this issue Nov 8, 2023 · 2 comments

Comments

@alaingdl
Copy link
Contributor

alaingdl commented Nov 8, 2023

No problem up to now on Linux, 2 very different OSX gave the same error (b1)

pro TEST_BUG_GAUSSFIT

a = [4.0, 1.0, 2.0, 1.0]

n=100
x = (FINDGEN(n)-(n/2))/4
z = (x -a[1])/a[2]
y = a[0]*exp(-z^2/2)
y=y+0.01*randomn(123, n)

yf=gaussfit(x, y)

plot, x, y
oplot, x, yf, col=color2color(!color.green)

yf1=gaussfit(x, y, b1)
oplot, x, yf1, col=color2color(!color.red)

b=a+0.1
yf2=gaussfit(x, y, c, est=b, nt=4)
oplot, x, yf2, col=color2color(!color.orange)

print, b1
print, c

stop
end
@alaingdl
Copy link
Contributor Author

I wrote some tests covering more tests for GAUSSFIT() and the situation is not good !
-- some tests (when called without estimated values) are broken on OSX (but not on Linux)
-- few basic cases are now broken in Linux too

The good point is the code is very fast when it is stable !

@alaingdl
Copy link
Contributor Author

Since now we do have a "test_gaussfit.pro" and a "bench_gaussfit.pro" in Git, and I correct the code to take into account the case when the step in X is not unity (1), and I also improved the initial estimation of the a4/a5/a6 and the result is in #1671 I will close this issue.

Please open a new issue if any trouble with GAUSSFIT()

Sorry but few keywords now are not avaialble in the fast GAUSSFIT, you can use the old one ("gaussfit_mpfit.pro" in src/pro) for that.

On larges tests I made, the new implementation is as fast and as accurate than the IDL one ...

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

No branches or pull requests

1 participant