pro boxp4,x1,x2,y1,y2,scam ;Extracts subimages of pore P4 to be used in sonic filter, ; movies etc. ;x1,y1 = lower left corner coordinates of the selected box. ;x2,y2 = lower left corner coordinates of the selected box. ;scam = string 'a' or 'b' to select the camera ;---------------------------------------------------------- ;parametros de entrada a modificar con editor init=1 ;first frame numim=220 ;number of frames n=1280 ;dimension en x m=1032 ;dimension en y st1a=string(scam+'_ser23/'+scam+'_ser23.') ;input st1b=string(scam+'_ser23/p4.') ;output ;--------------------------------------------------------- im1=intarr(n,m) FOR i = 0,numim-1 DO BEGIN dcn=strtrim(i+init,2) print,'Copying/extracting image ',st1a+dcn,' to ',st1b+dcn openr,1,st1a+dcn readu,1,im1 close,1 bb=im1(x1:x2,y1:y2) openw,1,st1b+dcn writeu,1,bb close,1 ENDFOR end