diff options
author | Aaron LI <aly@aaronly.me> | 2017-12-09 11:23:29 +0800 |
---|---|---|
committer | Aaron LI <aly@aaronly.me> | 2017-12-09 11:23:29 +0800 |
commit | 302fced198ae7bdef49490cd423baa106d4875ba (patch) | |
tree | 62e8344bd1138f47395f56ea0a3259983e017fea /astro/fits/crop_image.py | |
parent | 6f2851ddc0961a363cb86b27a33d547568b8093c (diff) | |
download | atoolbox-302fced198ae7bdef49490cd423baa106d4875ba.tar.bz2 |
Remove astro/fits/rescale_image.py and astro/fits/crop_image.py
Diffstat (limited to 'astro/fits/crop_image.py')
-rwxr-xr-x | astro/fits/crop_image.py | 35 |
1 files changed, 0 insertions, 35 deletions
diff --git a/astro/fits/crop_image.py b/astro/fits/crop_image.py deleted file mode 100755 index 9cfa7bf..0000000 --- a/astro/fits/crop_image.py +++ /dev/null @@ -1,35 +0,0 @@ -#!/usr/bin/env python3 -# -# Copyright (c) 2017 Aaron LI <aly@aaronly.me> -# MIT license -# - -""" -Crop out the central region of specified size from the FITS image. -""" - -import argparse - -from rescale_image import FITSImage - - -def main(): - parser = argparse.ArgumentParser( - description="Rescale a FITS image to the desired size/resolution") - parser.add_argument("-C", "--clobber", action="store_true", - help="overwrite existing output file") - parser.add_argument("-s", "--size", type=float, required=True, - help="central crop box size [deg]") - parser.add_argument("-i", "--infile", required=True, - help="input FITS image") - parser.add_argument("-o", "--outfile", required=True, - help="output cropped FITS image") - args = parser.parse_args() - - fitsimage = FITSImage(args.infile) - fitsimage.crop(size=args.size) - fitsimage.write(args.outfile, clobber=args.clobber) - - -if __name__ == "__main__": - main() |