(e) Extract EUVI Subimages in a Selected Field-of-View



In the previous task (d) we downloaded a time sequence of full-size EUVI images, which are stored in the variables IMAGES and INDEX. Now we wish to extract a sequence of subimages within a restricted field-of-view. The procedure EUVI_FOV lets you select a field-of-view (FOV) interactively on the screen and extracts the corresponding sequence of subimages into the array IMAGES_FOV. Pointing offsets up to a maximum misalignment of MISMAX are automatically corrected by cross-correlation of the shifted subimages (by +/- MISMAX pixels in x- and y-direction) at various times compared with the subimage at the first selected time.

IDL>
help,images,index
IMAGES DOUBLE = Array[2048, 2048, 13]
INDEX STRUCT = -> SECCHI_HDR_STRUCT Array[13]
color=0 ;0=automated scaling of min/max, 1=interactive
mismax=10 ;10=maximum expected misalignment offset (in units of pixels)
euvi_fov,images,color,fov,images_fov,index,mismax


Let us suppose that you clicked the bottom left corner (BLC) and the top right corner (TRC) like this:



Then you can check the image coordinates of your chosen FOV and the resulting datacube of the corresponding subimages:
print,fov
512 798 870 954
help,images_fov
IMAGES_FOV DOUBLE = Array[359, 157, 13]


which means that you selected the x-range of [i1:i2=512:870] pixels and the y-range of [j1:j2=798:954] pixels. The 4-number array FOV contains these four pixel numbers FOV=[i1,j1,i2,j2], in the same format as the IDL keyword !P.POSITION. So the subarray has images of the size nx=(i2-i1+1)=(870-512+1)=359 and ny=(j2-j1+1)=954-798+1=157. You can play the reduced movie as:
window,1,xsize=359,ysize=157
for i=0,12 do begin &tv,bytscl(images_fov(*,*,i)) &wait,1 &endfor