Viewing contents of file '../idllib/astron/contrib/varosi/vlibm/allpro/deconv_setup.pro'
pro deconv_setup, deconv_info, MLP=mlp, MLG=mlg, MEM=mem, MRL=mrl, CLEAN=clean,$
GAUSSIAN=gaussian, POISSON=poisson, NO_NOISE=nonoise, $
MENUS=menus, LOG10_MIN=Log10
; Select deconvolution options.
; Frank Varosi NASA/GSFC 1992.
if keyword_set( menus ) then begin
menu = ["Choose DeConvolution Method:" ,$
" " ,$
"MLP = Max. Likelihood - Poisson (Lucy)",$
" " ,$
"MLG = Max. Likelihood - Gaussian" ,$
" " ,$
"MRL = Maximum Residual Likelihood" ,$
" " ,$
"MEM = Maximum Entropy (simple)" ]
MENU1: sel = wmenu( menu, INIT=2, TITLE=0 )
if (sel LT 1) then goto,MENU1
method = menu( sel )
pb = strpos( method, " " )
if (pb LE 0) then goto,MENU1
menu = ["Image Noise Model?" ,$
" " ,$
"Gaussian" ,$
" " ,$
"Poisson" ,$
" " ,$
"both" ,$
" " ,$
"none" ]
MENU2: sel = wmenu( menu, INIT=2, TITLE=0 )
if (sel LT 2) then goto,MENU2
noise_model = strupcase( strtrim( menu(sel), 2 ) )
if strlen( noise_model ) LE 0 then goto,MENU2
if (noise_model EQ "both") then noise_model = "GAUSSIAN"
menu = ["Scaling for Display?" ,$
" " ,$
"Linear" ,$
" " ,$
"Log10" ]
MENU3: sel = wmenu( menu, INIT=2, TITLE=0 )
if (sel LT 2) then goto,MENU3
if strlen( menu(sel) ) LE 1 then goto,MENU3
Log10 = ( menu(sel) EQ "Log10" )
endif else begin
if keyword_set( poisson ) then noise_model = "POISSON" else $
if keyword_set( nonoise ) then noise_model = "none" else $
if keyword_set( gaussian ) then noise_model = "GAUSSIAN" $
else noise_model = "GAUSSIAN"
CASE 1 OF
keyword_set( mlp ): method = "MLP (Max. Likelihood - Poisson)"
keyword_set( mlg ): method = "MLG (Max. Likelihood - Gaussian)"
keyword_set( mem ): method = "MEM (Maximum Entropy)"
keyword_set( mrl ): method = "MRL (Max. Residual Likelihood)"
keyword_set( clean ): method = "CLEAN"
else: method = "MLP (Max. Likelihood - Poisson)"
ENDCASE
endelse
deconv_info.method = method
deconv_info.noise_model = noise_model
pb = strpos( method, " " )
deconv_info.algorithm = strmid( method, 0, pb )
print," algorithm = ",deconv_info.algorithm
return
end