aboutsummaryrefslogtreecommitdiff
path: root/lib/math
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
downloadiraf-linux-fa080de7afc95aa1c19a6e6fc0e0708ced2eadc4.tar.gz
Initial commit
Diffstat (limited to 'lib/math')
-rw-r--r--lib/math/curfit.h34
-rw-r--r--lib/math/gsurfit.h48
-rw-r--r--lib/math/iminterp.h44
-rw-r--r--lib/math/interp.h20
-rw-r--r--lib/math/nlfit.h28
-rw-r--r--lib/math/surfit.h21
6 files changed, 195 insertions, 0 deletions
diff --git a/lib/math/curfit.h b/lib/math/curfit.h
new file mode 100644
index 00000000..7c9d9eab
--- /dev/null
+++ b/lib/math/curfit.h
@@ -0,0 +1,34 @@
+# definitions for the curfit package
+
+# define the permitted types of curves
+
+define CV_FUNCTIONS "|chebyshev|legendre|spline3|spline1|"
+define CHEBYSHEV 1
+define LEGENDRE 2
+define SPLINE3 3
+define SPLINE1 4
+define USERFNC 5
+define NTYPES 5
+
+# define the weighting flags
+
+define CV_WEIGHTS "|user|uniform|spacing|chisq|"
+define WTS_USER 1 # user enters weights
+define WTS_UNIFORM 2 # equal weights
+define WTS_SPACING 3 # weight proportional to spacing of data points
+define WTS_CHISQ 4 # chi-squared weights (input data in photons)
+
+# error conditions
+
+define SINGULAR 1
+define NO_DEG_FREEDOM 2
+
+# definitions for cvstat
+
+define CVTYPE 1 # curve type
+define CVORDER 2 # order
+define CVNCOEFF 3 # Number of coefficients
+define CVNSAVE 4 # Length of save buffer
+define CVXMIN 5 # minimum ordinate
+define CVXMAX 6 # maximum ordinate
+
diff --git a/lib/math/gsurfit.h b/lib/math/gsurfit.h
new file mode 100644
index 00000000..5d46762b
--- /dev/null
+++ b/lib/math/gsurfit.h
@@ -0,0 +1,48 @@
+# definitions for the gsurfit package
+
+# define the permitted types of curves
+
+define GS_FUNCTIONS "|chebyshev|legendre|polynomial|"
+define GS_CHEBYSHEV 1 # chebyshev polynomials
+define GS_LEGENDRE 2 # legendre polynomials
+define GS_POLYNOMIAL 3 # power series polynomials
+define NTYPES 3
+
+# define the xterms flags
+
+define GS_XTYPES "|none|full|half|"
+define GS_XNONE 0 # no x-terms (old NO)
+define GS_XFULL 1 # full x-terms (new YES)
+define GS_XHALF 2 # half x-terms (new)
+
+# define the weighting flags
+
+define GS_WEIGHTS "|user|uniform|spacing|"
+define WTS_USER 1 # user enters weights
+define WTS_UNIFORM 2 # equal weights
+define WTS_SPACING 3 # weight proportional to spacing of data points
+
+# error conditions
+
+define SINGULAR 1
+define NO_DEG_FREEDOM 2
+
+# gsstat/gsset definitions
+
+define GSTYPE 1
+define GSXORDER 2
+define GSYORDER 3
+define GSXTERMS 4
+define GSNXCOEFF 5
+define GSNYCOEFF 6
+define GSNCOEFF 7
+define GSNSAVE 8
+define GSXMIN 9
+define GSXMAX 10
+define GSYMIN 11
+define GSYMAX 12
+define GSXREF 13
+define GSYREF 14
+define GSZREF 15
+
+define GS_SAVECOEFF 8
diff --git a/lib/math/iminterp.h b/lib/math/iminterp.h
new file mode 100644
index 00000000..c42f49ec
--- /dev/null
+++ b/lib/math/iminterp.h
@@ -0,0 +1,44 @@
+# IMINTERP.H -- User definitions for the image interpolation package.
+
+define II_FUNCTIONS "|nearest|linear|poly3|poly5|spline3|sinc|lsinc|drizzle|"
+define II_NEAREST 1 # nearest neighbour
+define II_LINEAR 2 # linear
+define II_POLY3 3 # 3rd order polynomial
+define II_POLY5 4 # 5th order polynomial
+define II_SPLINE3 5 # cubic spline
+define II_SINC 6 # sinc
+define II_LSINC 7 # look-up table sinc
+define II_DRIZZLE 8 # drizzle
+define II_NTYPES 8
+
+# 2D interpolation definitions.
+
+define II_BFUNCTIONS "|nearest|linear|poly3|poly5|spline3|sinc|lsinc|drizzle|"
+define II_BINEAREST 1 # nearest neighbour
+define II_BILINEAR 2 # bilinear
+define II_BIPOLY3 3 # bicubic polynomial
+define II_BIPOLY5 4 # biquintic polynomial
+define II_BISPLINE3 5 # bicubic spline
+define II_BISINC 6 # bisinc
+define II_BILSINC 7 # look-up table bisinc
+define II_BIDRIZZLE 8 # drizzle
+define II_NTYPES2D 8
+
+# Define types for asigeti
+
+define II_ASITYPE 1 # interpolant type
+define II_ASINSAVE 2 # size of array to be saved
+define II_ASINSINC 3 # size of the sinc convolution
+define II_ASIBADVAL 4 # bad pixel value for drizzle
+
+# Define types for msigeti
+
+define II_MSITYPE 1 # interpolant type
+define II_MSINSAVE 2 # size of array to be saved
+define II_MSINSINC 3 # size of array to be saved
+define II_MSIBADVAL 4 # bad pixel value for drizzle
+
+# Boundary types for arbpix
+
+define II_BOUNDARYEXT 1 # boundary extension
+define II_NBOUND 1 # number of boundary types
diff --git a/lib/math/interp.h b/lib/math/interp.h
new file mode 100644
index 00000000..ee08cf06
--- /dev/null
+++ b/lib/math/interp.h
@@ -0,0 +1,20 @@
+# File of definitions for interpolator package.
+
+# Interpolator Types:
+
+define IT_FUNCTIONS "|nearest|linear|poly3|poly5|spline3|"
+define IT_NEAREST 1
+define IT_LINEAR 2
+define IT_POLY3 3
+define IT_POLY5 4
+define IT_SPLINE3 5
+define ITNIT 5 # number of types
+
+# Size of header etc. used for part of coeff dimension
+
+define SZ_ASI 20
+
+# Total number of points used in spline interpolation of of bad pixels by
+# subroutine arbpix.
+
+define SPLPTS 16
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
diff --git a/lib/math/surfit.h b/lib/math/surfit.h
new file mode 100644
index 00000000..7b6de492
--- /dev/null
+++ b/lib/math/surfit.h
@@ -0,0 +1,21 @@
+# SURFIT.H -- Global defines for the surface fitting package.
+
+# Permitted types of curves.
+
+define SF_FUNCTIONS "|legendre|chebyshev|spline3|spline1|"
+define SF_LEGENDRE 1
+define SF_CHEBYSHEV 2
+define SF_SPLINE3 3
+define SF_SPLINE1 4
+define SF_NTYPES 4
+
+# Weighting flags
+
+define SF_WEIGHTS "|user|uniform|"
+define SF_USER 1 # user enters weights
+define SF_UNIFORM 2 # equal weights, weight 1.0
+
+# Error conditions
+
+define SINGULAR 1 # matrix is singular
+define NO_DEG_FREEDOM 2 # insufficient number of data points