pro udisol2,movin1,movout,area ; 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 is set individually ;for each frame, trying to outline the actual UC boundary. ;Then, the 'penumbral' mask to remove too bright BFs is ;obsolete. ; ; Method: Differentiation based on unsharp masking, ; like in SBV, ApJ 415 (1993), 832 ; MOVIN - input movie ; MOVOUT- output movie with isolated UDs ; AREA - output array with 'active' (non-masked) umbral ; area in pixels (this cannot be considered as real ;physical umbral area due to rather arbitrary selection of ;parameters and the dependence on seeing, but it is suitable ;for later calculation of filling factor). ; 7 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 ; GMSMO - smoothing parameter to define general mask ; GMTHR - threshold to define general mask smo=7 ; 0.625" x 0.625" thr=200 ; determine visually to remove noisy pixels ; pethr=0000 ; maximum allowed intensity of UDs (OBSOLETE) gmsmo=23 ; 0.875" x 0.875" to smooth umbra gmthr=7000 ; max. umbral intensity in smoothed frame ;************************************************************* movin=fix(movin1) smov=size(movin) if smov(0) ne 3 then message,'Input must be a 3-D array!' movout=movin*0 area=lonarr(smov(3)) 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 ; ( mpe=ima lt pethr ; mask to remove too bright BFs ) ; ( ima=ima*mpe ; too bright features eliminated ) msk=SMOOTHE(oima,gmsmo) lt gmthr ;general mask ima=ima*msk ; resulting masked image movout(0,0,i)=ima ; compose resulting movie w=WHERE(msk,c) ; c=number of non-zero pixels in msk, area(i)=c ; i.e. the 'umbral area' endfor end