View on GitHub

IRAF Community Distribution

IRAF maintained by the community

Home | Installation | Packages | X11IRAF | PyRAF | Forum

Cropping .fit files?

nwj781 wrote on Jul 08, 2008

How can I crop down a .fit file containing roughly 50,000 stars to a 300x300 pixel image? I was told that ccdproc's trim function could do it, but it only appears to trim the bias section of the image.

Cheers,
Neil

Mike Fitzpatrick wrote on Jul 08, 2008

You can simply use an image section to copy out the region of interest to a new file, e.g.

cl> imcopy bigim[500:799,100:399] small.fits


will copy the specified section to a new image. Note that you need to specify the ".fits" extension explicitly if you're using something earlier than v2.13 or else set your 'imtype' variable to ".fits" in your login.cl file.

-Mike

nwj781 wrote on Jul 08, 2008

Thank you. Thank you very much so. You just made my job much easier ha ha... This definitely beats running psf analysis on 29000 stars.

Thank you.

P.S.
Thank you.

Last post on Jul 08, 2008