;+
; NAME:
;         test_efr_clean
; PURPOSE:
;         Wrapper around the EGSO Feature Recognition cleaning code to 
;         demonstrate the code capabilities
;
; CALLING SEQUENCE:
;         .run resf_efr_clean 
;
; RESTRICTIONS:
;         Note: cleaning code tuned for Meudon images
;
; HISTORY:
;            Nov-2004  Written by Bob Bentley (MSSL/UCL)
;         08-Dec-2004  Released version
;
;-


;  look for files under $EGSO_TEST_SEFC and let user choose 
print,get_logenv('EGSO_TEST_SEFC')
egso_get_fits,data,head,/local

if head(0) ne '' then begin

;  run cleaning code
  efr_cleanimage, data, newdata, /noplot

;  plot cleaned image
  window,1,xsiz=1024,ysiz=1024,title='original image'
  tvscl,data

;  plot the resulting image...
  window, 0, xs=1024, ys=1024, title='Cleaned Image'
  tvscl, newdata

endif

end
