This clip_ code has its own section because it is a rather klugy patch. Nearly all of my image processing codes handle a max dimension of 2048 pixels. For images that are larger (up to 4096) I wrote this patch to allow a trim. The usual gfortran FITS read codes in fits2048A.f are embellished with (a local) fits4096A.f. QWith this I I can read the large image and then write out a sub-2048 images using the fits writer in fits2048A.f. This is not an optimal solution, but it gets me by in most cases.
In the above example I have trimmed an image larger that 2048 on a side.
clip_bigtrim.sh Usage: clip_bigtrim.sh a.fits 1 100 200 400 o.fits arg1 - input FITS image arg2 - imin (min x pixel for cut) arg3 - imax (max x pixel for cut) arg4 - jmin (min y pixel for cut) arg5 - jmax (max y pixel for cut) arg6 - output image name % clip_bigtrim.sh BIG.fits 100 300 200 400 b.fits I have returned from fitsw2048. % ccdsize BIG.fits 2128 1032 % ccdsize b.fits 201 201