FUNCTION dingo2b,smov,aux ;Calculation of ALL EFFECTIVE DIAMETERS, numbers, and area ;of umbral dots in a segmented (after UDISOL.PRO) movie or image SMOV. ;Procedure OBJEKT1 is used for identification of UDs. ;OUTPUT: 2-D array/table with 2 columns and n lines, ; where n = number of all UDs in all frames ; Column 0 - number of frame where the UD is ; 1 - effective diameter of the UD (") ; ; AUX - array(2,nframes) with complementary info ; Column 0 - number of UDs in frame ; Column 1 - total area of UDs in frame (pix) ; ;CALLING SEQUENCE: res=dingo2a(smov) ; ; 9.4.1977 Michal ; ; ************* PARAMETERS ****************************** scale = 0.062 ;image scale arcsec/pix mindef = 0.20 ;minimum effective diameter accepted (") ; ******************************************************* s=size(smov) if (s(0) lt 2) or (s(0) gt 3) then RETURN,0 ;error case if s(0) eq 2 then begin ;SINGLE FRAME case aux=lonarr(2) OBJEKT1,smov,tab nobj=max(tab(0,*)) ;number of objects diam=fltarr(nobj) ;array of effective diameters are=lonarr(nobj) ;array of areas for j=1,nobj do begin ;loop over objects w=where(tab(0,*) eq j,c) ;c=number of pixels in j-th object are(j-1)=c diam(j-1)=scale*sqrt(4*c/!pi) endfor w=where(diam ge mindef,nobj) ;Limitation. New nobj! if nobj ne 0 then begin diam=diam(w) area=total(are(w)) out=fltarr(2,nobj) ;only 1 frame - out(0,*)=0 everywhere out(1,*)=diam ;column of diameters aux(0)=nobj aux(1)=area endif else begin out=[0.,0.] aux=[0,0] endelse endif if s(0) eq 3 then begin ;MOVIE case aux=lonarr(2,s(3)) dia=fltarr(1) ;"ground" of dia (diameter array) frn=fltarr(1) ;"ground" of frn (frame no. array) for i=0,s(3)-1 do begin ;loop over frames ima=smov(*,*,i) OBJEKT1,ima,tab nobj=max(tab(0,*)) ;max.object no.= number of objects diam=fltarr(nobj) ;array of effective diameters are=lonarr(nobj) ;array of areas for j=1,nobj do begin ;loop over objects w=where(tab(0,*) eq j,c) ;c=number of pixels in j-th object are(j-1)=c diam(j-1)=scale*sqrt(4*c/!pi) endfor w=where(diam ge mindef,nobj) ;Limitation. New nobj! if nobj gt 0 then begin diam=diam(w) area=total(are(w)) frnu=fltarr(nobj)+i ;array filled by frame number (i) frn=[frn,frnu] dia=[dia,diam] aux(0,i)=nobj aux(1,i)=area endif else begin aux(*,i)=0 endelse endfor n=n_elements(dia)-1 ;the first element was "ground" if n gt 0 then begin out=fltarr(2,n) out(0,*)=frn(1:n) ;compose the output without "ground" out(1,*)=dia(1:n) endif else out=[0,0] endif RETURN,out end