PRO mstid,da,cam,filt,exp,mode,imnum,sdev,amp @isitdos !ORDER=1 WINDOW,0 IF N_PARAMS() LT 7 THEN sdev=3 IF N_PARAMS() LT 8 THEN amp=3 rimg=INTARR(256,256,3) pimg=FLTARR(256,256,3) dimg=FLTARR(256,256,3) rdmeandk,FIX(cam),FIX(exp),dk WHILE imnum-1 LT 0 DO $ READ,'No image previous to this one; choose another: ',imnum file=STRARR(3) formstr='(A,A1,A,I1,A1,A,I1,A1,A,I2.2,2I1,I3.3,".",I3.3)' file(0)=STRING(mpaths(mode),dd,cc,cam,dd,ff,filt,dd,firstchars(mode) $ ,da,cam,filt,exp,imnum,FORMAT=formstr) file(1)=STRING(mpaths(mode),dd,cc,cam,dd,ff,filt,dd,firstchars(mode) $ ,da,cam,filt,exp,(imnum-1),FORMAT=formstr) file(2)=STRING(mpaths(mode),dd,cc,cam,dd,ff,filt,dd,firstchars(mode) $ ,da,cam,filt,exp,(imnum+1),FORMAT=formstr) FOR i=0,2 DO BEGIN print,file(i),FORM='("READING : ",A)' rdkimg,file(i),hb,ximg kh = gethd(hb) help,/st,kh.misc.tm rimg(*,*,i) = ximg(*,*) ENDFOR FOR i=0,2 DO BEGIN tmp0=rimg(*,*,i)-dk IF i EQ 0 THEN umed=mean(tmp0) pimg(*,*,i)=tmp0-MEDIAN(tmp0,5) sig=STDEV(pimg(*,*,i),mean) pimg(*,*,i)=(pimg(*,*,i)-mean)/sig cell=REPLICATE(1B,7,7) dimg(*,*,i)=DILATE((pimg(*,*,i) GT sdev),cell) IF i EQ 0 THEN u=mean ENDFOR simg=TOTAL(dimg,3) nimg=(simg GT 2) stimg=nimg*(pimg(*,*,0) GT sdev) wkimg=(rimg(*,*,0)-dk)+amp*umed*stimg stars=WHERE(stimg) tvscl,rimg(*,*,0)