aboutsummaryrefslogtreecommitdiff
path: root/lib/math/nlfit.h
diff options
context:
space:
mode:
authorJoseph Hunkeler <jhunkeler@gmail.com>2015-07-08 20:46:52 -0400
committerJoseph Hunkeler <jhunkeler@gmail.com>2015-07-08 20:46:52 -0400
commitfa080de7afc95aa1c19a6e6fc0e0708ced2eadc4 (patch)
treebdda434976bc09c864f2e4fa6f16ba1952b1e555 /lib/math/nlfit.h
downloadiraf-linux-fa080de7afc95aa1c19a6e6fc0e0708ced2eadc4.tar.gz
Initial commit
Diffstat (limited to 'lib/math/nlfit.h')
-rw-r--r--lib/math/nlfit.h28
1 files changed, 28 insertions, 0 deletions
diff --git a/lib/math/nlfit.h b/lib/math/nlfit.h
new file mode 100644
index 00000000..17570ed9
--- /dev/null
+++ b/lib/math/nlfit.h
@@ -0,0 +1,28 @@
+# Definitions for the non-linear least-squares fitting package NLFIT
+
+# define parameters for nlstat[ird]
+
+define NLNPARAMS 1
+define NLNFPARAMS 2
+define NLITMAX 3
+define NLITER 4
+define NLSUMSQ 5
+define NLOLDSQ 6
+define NLLAMBDA 7
+define NLTOL 8
+define NLNPTS 9
+define NLSCATTER 10
+
+# define the weighting flags
+
+define WTS_USER 1 # User enters weights
+define WTS_UNIFORM 2 # Equal weights
+define WTS_CHISQ 3 # Chi-squared weights (input data in photons)
+define WTS_SCATTER 4 # Weights include an adjustable scatter term
+
+# define the error conditions
+
+define DONE 0 # Solution converged
+define SINGULAR 1 # Singular matrix
+define NO_DEG_FREEDOM 2 # Too few points
+define NOT_DONE 3 # Solution did not converge