pro udisol2m,movin1,mask,movout ; Procedure to isolate umbral dots in a 3-D sunspot movie. ; "Everything" except UDs is set to zero. ; ;Version 2 of UDISOL.PRO - general mask MASK is set ;from outside as a routine's parameter. ; ;Equivalent to old version of UDISOL.PRO ; ; Method: Differentiation based on unsharp masking, ; like in SBV, ApJ 415 (1993), 832 ; MOVIN - input movie ; MASK - input binary mask ; MOVOUT- output movie with isolated UDs ; 30 March 1997, Michal on_error,1 ;*************** PARAMETERS ********************************** ; SMO - unsharp masking smoothing parameter (in pixels) ; THR - threshold (minimum) value in the differential image smo=7 ; 0.625" x 0.625" thr=250 ; determine visually to remove noisy pixels ;************************************************************* movin=fix(movin1) 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 (for unsharp masking) ima=oima-ima ; differential image (unsharp masking) ima=ima gt thr ; thresholding - mask for small BFs ima=ima*oima ; masked original image ima=ima*mask ; resulting masked image movout(0,0,i)=ima ; compose resulting movie endfor end