From 02897936be8ce52fc5883dd85970be1fde6f2dbf Mon Sep 17 00:00:00 2001 From: Avinash Kumar Date: Sat, 12 Aug 2023 12:15:25 +0300 Subject: [PATCH] add ASCII to CLI bump version 0.0.5.2 --- README.md | 33 ++++++++++++++++----------------- humans.txt => humans.MD | 0 setup.cfg | 2 +- setup.py | 2 +- src/rgbmaker/cli.py | 8 ++++---- 5 files changed, 22 insertions(+), 23 deletions(-) rename humans.txt => humans.MD (100%) diff --git a/README.md b/README.md index 97405c2..557b88f 100644 --- a/README.md +++ b/README.md @@ -18,6 +18,8 @@ $ pip install rgbmaker # Usage ```bash $ rgbmaker -h +usage: rgbmaker [-h] [-p POSITION] [-r RADIUS] [-i IMAGESOPT] [-n NAME] [-a ARCHIVES] [-k KIND] [-s SPIDX_FILE] [-px PIXELS] [-A ANNOT] + [-S FLUX_LIST] [-S_e FLUX_ERROR] [-freq FREQ_LIST] _ _ | | | | @@ -28,30 +30,27 @@ $ rgbmaker -h __/ | |___/ - -usage: rgbmaker [-h] [-p POSITION] [-r RADIUS] [-i IMAGESOPT] [-n NAME] [-a ARCHIVES] [-k KIND] [-s SPIDX_FILE] - [-px PIXELS] [-A ANNOT] - A python package which communicates to different -astronomical services and fetches fits and numerical data. +astronomical services and fetches fits and numerical data + optional arguments: -h, --help show this help message and exit -p POSITION, --position POSITION - (Required) The object name or the coordinates of the object in the FK5 (J2000) system. Ex: "14 09 48.86 - -03 02 32.6", M87, NGC1243, without quotes. + (Required) The object name or the coordinates of the object in the FK5 (J2000) system. Ex: "14 09 48.86 -03 02 + 32.6", M87, NGC1243, without quotes. -r RADIUS, --radius RADIUS - (Required) (default = 0.12) (float) The size of the image in degrees, this size will be used for the field - of view in the resultant image. For reference, in the night sky, the moon is about 0.52 degrees across. + (Required) (default = 0.12) (float) The size of the image in degrees, this size will be used for the field of + view in the resultant image. For reference, in the night sky, the moon is about 0.52 degrees across. -i IMAGESOPT, --imagesopt IMAGESOPT (default=2)(string)(values=1,2,3) IOU ROR Optical (option = 1) Composite Contours on DSS2R (option = 2) - -n NAME, --name NAME (Optional) (default=Anonymous) (string) Your name will be displayed on the image enabling mentors, - professors, fellow students to be able to recognize your work. Credit is important! + -n NAME, --name NAME (Optional) (default=Anonymous) (string) Your name will be displayed on the image enabling mentors, professors, + fellow students to be able to recognize your work. Credit is important! -a ARCHIVES, --archives ARCHIVES - (default=1)(string) This option currently offers access to the NVAS image archive. Selecting this option - will return the top 5 results from NVAS (if exists). These can be downloaded as .imfits files - -k KIND, --kind KIND (default='base64') choose from base64, plot, png, jpg to show base64 of resultant image, plot on output, - save png/jpg files + (default=1)(string) This option currently offers access to the NVAS image archive. Selecting this option will + return the top 5 results from NVAS (if exists). These can be downloaded as .imfits files + -k KIND, --kind KIND (default='base64') choose from base64, plot, png, jpg to show base64 of resultant image, plot on output, save + png/jpg files -s SPIDX_FILE, --spidx_file SPIDX_FILE (Default=None) enter path to spidx.fits file that contains spectral index data. -px PIXELS, --pixels PIXELS @@ -59,9 +58,9 @@ optional arguments: -A ANNOT, --annot ANNOT (default=True) remove any annotation by setting this to False. -S FLUX_LIST, --flux_list FLUX_LIST - (Optional) (Default=None) Takes input as list for spectral index calculation. + (Optional)(list)(Default=None) Takes input as list for spectral index calculation. -S_e FLUX_ERROR, --flux_error FLUX_ERROR - (Optional) (Default=None) Takes input as list for spectral index calculation. + (Optional)(list)(Default=[0,0]) Takes input as list for spectral index calculation. -freq FREQ_LIST, --freq_list FREQ_LIST (Optional) (Default=None) Takes input as list for spectral index calculation. ``` diff --git a/humans.txt b/humans.MD similarity index 100% rename from humans.txt rename to humans.MD diff --git a/setup.cfg b/setup.cfg index 8d54ea6..b0a6785 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,6 +1,6 @@ [metadata] name = rgbmaker -version = 0.0.5.1.1 +version = 0.0.5.2 author = Avinash Kumar author_email = avialxee@gmail.com description = A python package which communicates to different astronomical services and fetches fits and numerical data. diff --git a/setup.py b/setup.py index 808e005..5359934 100644 --- a/setup.py +++ b/setup.py @@ -5,7 +5,7 @@ setup( name = 'rgbmaker', - version = '0.0.5.1.1', + version = '0.0.5.2', url='https://github.com/avialxee/rgbmaker', author='Avinash Kumar', author_email='avialxee@gmail.com', diff --git a/src/rgbmaker/cli.py b/src/rgbmaker/cli.py index 2729bdc..2da2361 100644 --- a/src/rgbmaker/cli.py +++ b/src/rgbmaker/cli.py @@ -13,14 +13,13 @@ def cli_ASCII(): __/ | |___/ - +A python package which communicates to different +astronomical services and fetches fits and numerical data """ return ascii_rgbmaker -parser = argparse.ArgumentParser('rgbmaker',description="""A python package which communicates to different -astronomical services and fetches fits and numerical data. -""", formatter_class=argparse.RawDescriptionHelpFormatter) +parser = argparse.ArgumentParser('rgbmaker',description=cli_ASCII(), formatter_class=argparse.RawDescriptionHelpFormatter) parser.add_argument('-p', '--position', type=str, help="""(Required) The object name or the coordinates of the object in the FK5 (J2000) system. Ex: "14 09 48.86 -03 02 32.6", M87, NGC1243, without quotes.""") @@ -54,6 +53,7 @@ def cli_ASCII(): args=parser.parse_args() def cli(): + position=args.position or "" radius=args.radius or float(0.12) imagesopt=args.imagesopt or 2