;+ ;FUNCTION mirrorang ;USAGE: ; y = mirrorang(x,par=p) ;- function mirrorang, e, parameters=p $ , p_names = p_names, pder_values= pder_values if not keyword_set(p) then $ p = {brat:-6.d, e0:100.0d, vdht:0.d } a = sqrt(abs(1/p.brat)*(1+p.e0/e)) bad = where(a gt 1.,count) if count ne 0 then a(bad) = !values.f_nan a = asin(a) if p.brat lt 0. then a= !pi - a ; ignore the following ;if keyword_set(p_names) then begin ; np = n_elements(p_names) ; nd = n_elements(f) ; for i=0,np-1 do begin ; case strlowcase(p_names(i)) of ; 'h': pder_values(*,i) = e ; 'l': pder_values(*,i) = p.h * e * x / p.l^2 ; 'a0': pder_values(*,i) = 1 ; else: print,'Unknown Variable ', p_names(i) ; endcase ; endfor ;endif print,'Do not use this routine' return,a/!dtor end