pro udisol,movin,movout,msk ; Procedure to isolate umbral dots in a 3-D sunspot movie. ; "Everything" except UDs is set to zero. ; Method: Differentiation based on unsharp masking, ; like in SBV, ApJ 415 (1993), 832 ; MOVIN - input movie ; MOVOUT- output movie with isolated UDs ; MSK - input general mask to isolate the umbra (optional) ; 4 March 1996, Michal on_error,1 ;*************** PARAMETERS ********************************** ; SMO - unsharp masking smoothing parameter (in pixels) ; THR - threshold (minimum) value in the differential image ; PETHR - intensity above which the bright BFs are removed smo=7 ; 0.625" x 0.625" thr=350 ; determine visually to remove noisy pixels ; pethr=5500 ; maximum allowed intensity of UDs ;************************************************************* if n_params() lt 3 then msk=1 ; general mask, 1 everywhere smov=size(movin) if smov(0) ne 3 then message,'Input must be a 3-D array!' movout=movin*0 for i=0,smov(3)-1 do begin oima=movin(*,*,i) ; original image ima=SMOOTH(oima,smo) ; smoothed image ima=oima-ima ; differential image (unsharp masking) ima=ima gt thr ; thresholding - mask for small BFs ima=ima*oima ; masked original image ; mpe=ima lt pethr ; mask to remove too bright BFs ; ima=ima*mpe ima=ima*msk ; resulting masked image movout(0,0,i)=ima ; compose resulting movie endfor end