GNU Astronomy Utilities


Previous: , Up: ImageCrop   [Contents][Index]


6.1.4 Invoking ImageCrop

ImageCrop will crop a region from an image. If in WCS mode, it will also stitch parts from separate images in the input files. The executable name is astimgcrop with the following general template

$ astimgcrop [OPTION...] [ASCIIcatalog] ASTRdata ...

One line examples:

$ astimgcrop -I catalog.txt image.fits
$ astimgcrop -W catalog.txt /mnt/data/COSMOS/*_drz.fits
$ astimgcrop --section=10:*-10,10:*-10 --hdu=2 image.fits
$ astimgcrop --ra=189.16704 --dec=62.218203 goodsnorth.fits
$ astimgcrop --xc=568.342 --yc=2091.719 --iwidth=200 image.fits

ImageCrop has one mandatory argument which is the input image name(s), shown above with ASTRdata .... You can use shell expansions, for example * for this if you have lots of images in WCS mode. If the crop box centers are in a catalog, you also have to provide the catalog name as an argument. Alternatively, you have to provide the crop box parameters with command-line options.

When in catalog mode, ImageCrop will run in parallel unless you set --numthreads=1, see Threads in Gnuastro. Note that when multiple threads are being used, in verbose mode, the outputs will not be in order. This is because the threads are asynchronous and thus not started in order. This has no effect on the output, see Hubble visually checks and classifies his catalog for a tutorial on effectively using this feature.