diff options
author | Joe Hunkeler <jhunkeler@gmail.com> | 2015-08-11 16:51:37 -0400 |
---|---|---|
committer | Joe Hunkeler <jhunkeler@gmail.com> | 2015-08-11 16:51:37 -0400 |
commit | 40e5a5811c6ffce9b0974e93cdd927cbcf60c157 (patch) | |
tree | 4464880c571602d54f6ae114729bf62a89518057 /noao/imred/dtoi/hdicfit/userfcn.x | |
download | iraf-osx-40e5a5811c6ffce9b0974e93cdd927cbcf60c157.tar.gz |
Repatch (from linux) of OSX IRAF
Diffstat (limited to 'noao/imred/dtoi/hdicfit/userfcn.x')
-rw-r--r-- | noao/imred/dtoi/hdicfit/userfcn.x | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/noao/imred/dtoi/hdicfit/userfcn.x b/noao/imred/dtoi/hdicfit/userfcn.x new file mode 100644 index 00000000..d5dba4ed --- /dev/null +++ b/noao/imred/dtoi/hdicfit/userfcn.x @@ -0,0 +1,37 @@ +include <error.h> + +# HD_POWERR -- Construct the basis functions for a power series function. +# Invoked from curfit as a user function. Real version. + +procedure hd_powerr (x, order, k1, k2, basis) + +real x # array of data points +int order # order of polynomial, order = 1, constant +real k1, k2 # normalizing constants - unused +real basis[ARB] # basis functions + +int i + +begin + do i = 1, order + iferr (basis[i] = x ** (i-1)) + call erract (EA_FATAL) +end + + +# HD_POWERD -- Double version of above. + +procedure hd_powerd (x, order, k1, k2, basis) + +double x # array of data points +int order # order of polynomial, order = 1, constant +double k1, k2 # normalizing constants - unused +double basis[ARB] # basis functions + +int i + +begin + do i = 1, order + iferr (basis[i] = x ** (i-1)) + call erract (EA_FATAL) +end |