function check_multiplicity,clnmap,flevel,PLOT=plot ; Returns the number of distinct contours of clnmap at level flevel ; Uses the structure produced by keyword PATH_INFO in IDL's contour ; ejs FEB 2003, schmahl@hessi.gsfc.nasa.gov if (flevel LE 0 OR flevel GE 1.0) then message,'flevel out of range' CONTOUR, clnmap, level=[flevel]*max(clnmap),PATH_XY=xy, PATH_INFO=info ncontours=n_elements(info) if keyword_set(PLOT) then begin erase FOR I = 0, (N_ELEMENTS(info) - 1 ) DO BEGIN S = [INDGEN(info(I).N), 0] ; Plot the closed paths: PLOTS, xy(*,INFO(I).OFFSET + S ), /NORM ENDFOR endif return,ncontours end ; TEST ;xx=(findgen(64)-32)#replicate(1,64) ;yy=transpose(xx) ;a=5 & b=4. ;z=2.^(-(xx/a)^2-(yy/b)^2) ; ;z2=shift(z,3,4) ;clnmap=z+z2 ;ch=check_multiplicity(clnmap,0.5,/plot) ;print,ch,' contours' ;wait,1 ; ; ;z2=shift(z,5,6) ;clnmap=z+z2 ;ch=check_multiplicity(clnmap,0.5,/plot) ;print,ch,' contours' ;wait,1 ; ;z2=shift(z,6,7) ;clnmap=z+z2 ;ch=check_multiplicity(clnmap,0.5,/plot) ;print,ch,' contours' ;wait,1 ; ;z2=shift(z,7,8) ;clnmap=z+z2 ;ch=check_multiplicity(clnmap,0.5,/plot) ;print,ch,' contours' ;wait,1 ; ;z2=shift(z,8,9) ;clnmap=z+z2 ;ch=check_multiplicity(clnmap,0.5,/plot) ;print,ch,' contours' ;wait,1 ; ;z2=shift(z,9,10) ;clnmap=z+z2 ;ch=check_multiplicity(clnmap,0.5,/plot) ;print,ch,' contours' ;wait,1 ; ;z2=shift(z,10,11) ;clnmap=z+z2 ;ch=check_multiplicity(clnmap,0.5,/plot) ;print,ch,' contours' ; ;end ; ;