diff options
author | Aaron LI <aly@aaronly.me> | 2018-06-13 22:29:34 +0800 |
---|---|---|
committer | Aaron LI <aly@aaronly.me> | 2018-06-13 22:29:34 +0800 |
commit | 3d06b6de4b7a7523de5afdde2cf7f61ca141f996 (patch) | |
tree | baf85a23c5b20dda81be1b74ce11d8c1de6da223 | |
parent | 0b8efb96f2dfe34876c7ffbc9f6bf42c44b88ec6 (diff) | |
download | atoolbox-3d06b6de4b7a7523de5afdde2cf7f61ca141f996.tar.bz2 |
astro/fitscube.py: Add command aliases: new (create), crp (corrupt)
-rwxr-xr-x | astro/fits/fitscube.py | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/astro/fits/fitscube.py b/astro/fits/fitscube.py index 9be744e..a2ec032 100755 --- a/astro/fits/fitscube.py +++ b/astro/fits/fitscube.py @@ -503,9 +503,10 @@ def main(): parser_info.set_defaults(func=cmd_info) # sub-command: "create" - parser_create = subparsers.add_parser("create", help="create a FITS cube") - parser_create.add_argument("-C", "--clobber", dest="clobber", - action="store_true", + parser_create = subparsers.add_parser( + "create", aliases=["new"], + help="create a FITS cube from a series of images/slices") + parser_create.add_argument("-C", "--clobber", action="store_true", help="overwrite existing output file") parser_create.add_argument("-U", "--data-unit", dest="unit", help="cube data unit (will overwrite the " + @@ -568,7 +569,7 @@ def main(): # sub-command: "calibrate" parser_cal = subparsers.add_parser( - "calibrate", + "cal", aliases=["calibrate"], help="calibrate z-axis slice/channel responses by fitting " + "a polynomial") parser_cal.add_argument("-n", "--dry-run", dest="dryrun", @@ -605,7 +606,7 @@ def main(): # sub-command: "corrupt" parser_crp = subparsers.add_parser( - "corrupt", + "crp", aliases=["corrupt"], help="corrupt z-axis slice/channel responses by applying " + "random gain coefficients") exgrp_crp = parser_crp.add_mutually_exclusive_group(required=True) |