aboutsummaryrefslogtreecommitdiff
path: root/noao/onedspec/splot/conflam.x
diff options
context:
space:
mode:
authorJoe Hunkeler <jhunkeler@gmail.com>2015-08-11 16:51:37 -0400
committerJoe Hunkeler <jhunkeler@gmail.com>2015-08-11 16:51:37 -0400
commit40e5a5811c6ffce9b0974e93cdd927cbcf60c157 (patch)
tree4464880c571602d54f6ae114729bf62a89518057 /noao/onedspec/splot/conflam.x
downloadiraf-osx-40e5a5811c6ffce9b0974e93cdd927cbcf60c157.tar.gz
Repatch (from linux) of OSX IRAF
Diffstat (limited to 'noao/onedspec/splot/conflam.x')
-rw-r--r--noao/onedspec/splot/conflam.x28
1 files changed, 28 insertions, 0 deletions
diff --git a/noao/onedspec/splot/conflam.x b/noao/onedspec/splot/conflam.x
new file mode 100644
index 00000000..c322d566
--- /dev/null
+++ b/noao/onedspec/splot/conflam.x
@@ -0,0 +1,28 @@
+include <error.h>
+include <smw.h>
+
+define VLIGHT 2.997925e18
+
+# CONFLAM -- Convert to FLAMBDA from FNU
+
+procedure conflam (sh)
+
+pointer sh # SHDR pointer
+
+int i
+real lambda
+pointer ang, un_open()
+errchk un_open, un_ctranr
+
+begin
+ ang = un_open ("angstroms")
+ iferr {
+ do i = 0, SN(sh)-1 {
+ call un_ctranr (UN(sh), ang, Memr[SX(sh)+i], lambda, 1)
+ Memr[SY(sh)+i] = Memr[SY(sh)+i] * VLIGHT / lambda**2
+ }
+ } then
+ call erract (EA_WARN)
+
+ call un_close (ang)
+end