From fa080de7afc95aa1c19a6e6fc0e0708ced2eadc4 Mon Sep 17 00:00:00 2001 From: Joseph Hunkeler Date: Wed, 8 Jul 2015 20:46:52 -0400 Subject: Initial commit --- noao/onedspec/splot/conflam.x | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 noao/onedspec/splot/conflam.x (limited to 'noao/onedspec/splot/conflam.x') 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 +include + +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 -- cgit