FUNCTION dingo2a,smov ;Calculation of ALL EFFECTIVE DIAMETERS ;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 (") ;CALLING SEQUENCE: res=dingo2a(smov) ; ; ************* PARAMETER *************** scale=0.125 ;image scale arcsec/pix ; *************************************** 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 OBJEKT1,smov,tab nobj=max(tab(0,*)) ;number of objects diam=fltarr(nobj) ;array of effective diameters for j=1,nobj do begin ;loop over objects w=where(tab(0,*) eq j,c) ;c=number of pixels in j-th object diam(j-1)=scale*sqrt(4*c/!pi) endfor out=fltarr(2,nobj) ;only 1 frame - out(0,*)=0 everywhere out(1,*)=diam ;column of diameters endif if s(0) eq 3 then begin ;movie case 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 frnu=fltarr(nobj)+i ;array filled by frame number (i) for j=1,nobj do begin ;loop over objects w=where(tab(0,*) eq j,c) ;c=number of pixels in j-th object diam(j-1)=scale*sqrt(4*c/!pi) endfor frn=[frn,frnu] dia=[dia,diam] endfor n=n_elements(dia)-1 ;the first element was "ground" out=fltarr(2,n) out(0,*)=frn(1:n) ;compose the output without "ground" out(1,*)=dia(1:n) endif RETURN,out end