blob: 228cea6f0f5854afca7fda84a24b931ac546891d (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
include <error.h>
include <smw.h>
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
|