aboutsummaryrefslogtreecommitdiff
path: root/noao/onedspec/ecidentify/ecffit/ecfgdata.x
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 /noao/onedspec/ecidentify/ecffit/ecfgdata.x
downloadiraf-linux-fa080de7afc95aa1c19a6e6fc0e0708ced2eadc4.tar.gz
Initial commit
Diffstat (limited to 'noao/onedspec/ecidentify/ecffit/ecfgdata.x')
-rw-r--r--noao/onedspec/ecidentify/ecffit/ecfgdata.x37
1 files changed, 37 insertions, 0 deletions
diff --git a/noao/onedspec/ecidentify/ecffit/ecfgdata.x b/noao/onedspec/ecidentify/ecffit/ecfgdata.x
new file mode 100644
index 00000000..eebb34d6
--- /dev/null
+++ b/noao/onedspec/ecidentify/ecffit/ecfgdata.x
@@ -0,0 +1,37 @@
+include <pkg/gtools.h>
+
+# ECF_GDATA -- Get graph data for the specified axis type from the fitting data.
+
+procedure ecf_gdata (ecf, type, x, y, z, r, data, npts)
+
+pointer ecf # GSURFIT pointer
+int type # Axis type
+double x[npts] # X fit data
+double y[npts] # Y fit data
+double z[npts] # Z fit data
+double r[npts] # Residuals
+real data[npts] # Graph data
+int npts # Number of points
+
+pointer sp, v
+include "ecffit.com"
+
+begin
+ switch (type) {
+ case 'p':
+ call achtdr (x, data, npts)
+ case 'o':
+ call achtdr (y, data, npts)
+ case 'w':
+ call achtdr (z, data, npts)
+ case 'r':
+ call achtdr (r, data, npts)
+ case 'v':
+ call smark (sp)
+ call salloc (v, npts, TY_DOUBLE)
+ call adivd (r, z, Memd[v], npts)
+ call amulkd (Memd[v], 300000.D0, Memd[v], npts)
+ call achtdr (Memd[v], data, npts)
+ call sfree (sp)
+ }
+end