From 40e5a5811c6ffce9b0974e93cdd927cbcf60c157 Mon Sep 17 00:00:00 2001 From: Joe Hunkeler Date: Tue, 11 Aug 2015 16:51:37 -0400 Subject: Repatch (from linux) of OSX IRAF --- noao/onedspec/splot/confnu.x | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 noao/onedspec/splot/confnu.x (limited to 'noao/onedspec/splot/confnu.x') diff --git a/noao/onedspec/splot/confnu.x b/noao/onedspec/splot/confnu.x new file mode 100644 index 00000000..228cea6f --- /dev/null +++ b/noao/onedspec/splot/confnu.x @@ -0,0 +1,28 @@ +include +include + +define VLIGHT 2.997925e18 + +# CONFNU -- Convert to FNU from FLAMBDA + +procedure confnu (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] * lambda**2 / VLIGHT + } + } then + call erract (EA_WARN) + + call un_close (ang) +end -- cgit