spacetelescope / astrocut

Tools for making image cutouts from sets of TESS full frame images
https://astrocut.readthedocs.io
25 stars 12 forks source link

cutout location is not in image footprint - multi-extension image #111

Open sengle01 opened 1 year ago

sengle01 commented 1 year ago

Hello,

I'm trying to create a cutout from a cfht megaprime image. I've confirmed the target is on one of the chips, but the software keeps telling me it isn't. I've tried using the extension = 'all' option, but I assume I'm just not handling the multi-extension file correctly.

The target appears on different chips in some of the images, so I was hoping I wouldn't need to determine which one (which extension) I need on each image.

Let me know if you have any suggestions, or if you've seen this issue before.

Thank you and all the best, Scott

I'm currently trying to run the code from a Win10 machine, Anaconda, in a Jupyter notebook. The image (~340MB) can be obtained from here

from astrocut import fits_cut from astropy.io import fits from astropy.coordinates import SkyCoord

input_files = ['714745p.fits.fz.part']

center_coord = SkyCoord.from_name('[HS80] B337') cutout_size = 500

cutout_file = fits_cut(input_files, center_coord, cutout_size, extension = 'all', single_outfile=True)
print(cutout_file)