aboutsummaryrefslogtreecommitdiff
path: root/noao/twodspec/multispec/_msfindspec2.cl
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/twodspec/multispec/_msfindspec2.cl
downloadiraf-linux-fa080de7afc95aa1c19a6e6fc0e0708ced2eadc4.tar.gz
Initial commit
Diffstat (limited to 'noao/twodspec/multispec/_msfindspec2.cl')
-rw-r--r--noao/twodspec/multispec/_msfindspec2.cl28
1 files changed, 28 insertions, 0 deletions
diff --git a/noao/twodspec/multispec/_msfindspec2.cl b/noao/twodspec/multispec/_msfindspec2.cl
new file mode 100644
index 00000000..d09212fc
--- /dev/null
+++ b/noao/twodspec/multispec/_msfindspec2.cl
@@ -0,0 +1,28 @@
+#{ _MSFINDSPEC2 -- Create a new database, initialize with a template
+# image, refine the positions, and fit a position function.
+
+#image,f,a,,,,Image
+#template,f,a,,,,Template image
+#width,r,a,10,,,Width of spectra
+#naverage,i,a,20,1,,Number of lines to average
+#verbose,b,a,no,,,Verbose output?
+
+{
+ # Verbose message.
+ if (verbose) {
+ time
+ print (" Find the spectra in ", image, " using template image ",
+ template, ".")
+ }
+
+ # Create a new database and initialize with a template image.
+ newextraction (image, template)
+
+ # Refit the model.
+ fitgauss5 (image, 1, lower=-width/2, upper=width/2,
+ lines="*", spectra="*", naverage=naverage, track=no,
+ algorithm=2)
+
+ # Fit the default interpolation function to the positions.
+ fitfunction (image, parameter="x0", lines="*", spectra="*")
+}