;select subimage from an input image given xstart and ystart : pixels ;are symetrically removed from the input image according to these ;parameters ;same as select_rect_image without astrometry function select_rect_image_no_astr, image, xstart, ystart nx_image = n_elements(image[*,0]) ny_image = n_elements(image[0,*]) ;keep only pixels in center of image according to xystart ;size of output image nx = nx_image -2*xstart ny = ny_image -2*ystart ;shift to get to fist pixel shift = ny_image*ystart+xstart ;1D array of subscripts given the size of the output image use_x = shift+lindgen(nx) ;replicate it to get an array use_xy = cmreplicate(use_x, [ny]) ;create additionnal shifts (in x direction for each line) shifts = (2*xstart+nx)*lindgen(nx) shifts_x = transpose(cmreplicate(shifts, [ny])) use = shifts_x + use_xy ;print, shifts_x res = dblarr(nx, ny) res[*] = image[use[*]] return, res end