...
 
Commits (4)
mpfit (1.85+2017.01.03-2) unstable; urgency=low
* Update VCS fields to use salsa.d.o
* Fix mpfit test (Closes: #895119)
* Push Standards-Version to 4.1.4. No changes needed
* Push compat to 11
-- Ole Streicher <olebole@debian.org> Tue, 29 May 2018 09:16:23 -0700
mpfit (1.85+2017.01.03-1) unstable; urgency=low
* New upstream version 1.85+2017.01.03
......
......@@ -3,8 +3,8 @@ Section: science
Priority: optional
Maintainer: Debian Astro Team <debian-astro-maintainers@lists.alioth.debian.org>
Uploaders: Ole Streicher <olebole@debian.org>
Build-Depends: debhelper (>= 9), gnudatalanguage (>= 0.9.5), python
Standards-Version: 4.0.1
Build-Depends: debhelper (>= 11), gnudatalanguage (>= 0.9.5), python
Standards-Version: 4.1.4
Homepage: https://cow.physics.wisc.edu/~craigm/idl/fitting.html
Vcs-Git: https://salsa.debian.org/debian-astro-team/mpfit.git
Vcs-Browser: https://salsa.debian.org/debian-astro-team/mpfit
......
FUNCTION fitfunc, p, x=x, y=y, err=err
gauss = p[0]*exp(-(x-p[1])^2/(2*p[2]^2))
gauss = p[0]+p[1]*exp(-(x-p[2])^2/(2*p[3]^2))
return, (y - gauss)/err
END
PRO test_mpfit
x = findgen(101)
y = 25.*exp(-(x-32.)^2/(2*5.^2))+2.*randomn(0,101)
err = 0.1*y
start_params = [10.,45.,10.]
err = replicate(3.0,101) ; error estimate
y = 25.*exp(-(x-32.)^2/(2*5.^2))+12.0+err*randomn(33,101)
start_params = [12.,10.,45.,10.]
functargs = {x:x, y:y, err:err}
params = mpfit("fitfunc",start_params,functargs=functargs)
ref = [28.2524, 31.9683, -4.26773]
ref = [12.032, 24.0875, 32.2197, 5.096]
print, params, ref
for i = 0, 2 do $
if params[i] lt ref[i]-.5 || params[i] gt ref[i]+.5 then exit, status=1
w=where(abs(params-ref) gt 0.5, count)
if (count gt 0) then exit, status=1
exit, status=0
END