def setup_parser(iam='gaperture'): """Defines command line arguments.""" parser = argparse.ArgumentParser(description="Generate a light curve") parser = gargs.common_args(parser,iam) parser.add_argument("-a", "--aperture", action="store", dest="radius", help="Aperture radius in decimal degrees", type=float) parser.add_argument("-i", "--inner", action="store", dest="annulus1", help="Inner annulus radius for background subtraction", type=float) parser.add_argument("-o", "--outer", action="store", dest="annulus2", help="Outer annulus radius for background subtraction", type=float) parser.add_argument("--annulus", action="store", type=ast.literal_eval, dest="annulus", help="Annulus inner and outer radius definition as '[inner,outer]'") parser.add_argument("-f", "--file", "--outfile", "--csvfile", action="store", type=str, dest="csvfile", help="CSV output file") parser.add_argument("--stamp", action="store", type=str, dest="stamp", help="Filename for a JPEG preview stamp of the targeted region.") parser.add_argument("--addhdr", action="store_true", dest="addhdr", help="Add command line and column names to the top of the .csv file.") parser.add_argument("--iocode", action="store", dest="iocode", default="wb", help="The iocode to be past to the cvs writer. Don't much with this.", type=str) parser.add_argument("--bgmaskdepth", action="store", dest="maskdepth", help="Depth of the background mask in AB Magnitudes.", type=float, default=20.0) parser.add_argument("--bgmaskradius", action="store", dest="maskradius", help="Radius of background mask in n sigmas (assuming Gaussians)", type=float, default=1.5) return parser
def setup_parser(iam='gmap'): parser = argparse.ArgumentParser(description="Generate images / maps.") parser = gargs.common_args(parser,iam) parser.add_argument("--angle", "-a", action="store", type=float, dest="angle", default=None, help="The angle subtended in both RA and DEC in degrees.") parser.add_argument("--raangle", action="store", type=float, dest="raangle", help="The angle of sky in degrees that the right ascension subtends. "+ "Overrides --angle.",default=None) parser.add_argument("--decangle", action="store", type=float, dest="decangle", default=None, help="The angle of sky in degrees that the declination subtends. "+ "Overrides --angle.") parser.add_argument("--count", action="store", type=str, dest="cntfile", default=None, help="File name (full path) for the count image.") parser.add_argument("--intensity", action="store", type=str, dest="intfile", default=None, help="File name (full path) for the intensity image.") parser.add_argument("--count_coadd", action="store", type=str, dest="cntcoaddfile", default=None, help="File name (full path) for the count coadd image.") parser.add_argument("--intensity_coadd", action="store", type=str, dest="intcoaddfile", default=None, help="File name (full path) for the intensity coadd image.") parser.add_argument("--memlight", action="store", type=float, dest="memlight", default=100., help="Reduce server-side memory usage "+ "by requesting data in chunks of no more than this depth in seconds.") parser.add_argument("--response", action="store", type=str, dest="rrfile", help="File name (full path) for the response image.", default=None) return parser
def setup_parser(iam='gfind'): parser = argparse.ArgumentParser(description="Locate available data.") parser = gargs.common_args(parser,iam) parser.add_argument("--alt", "--gaper", action="store_true", dest="gaper", default=False, help="Format the output so that it can "+ "be copied and pasted directly into a gMap or gAperture command line?") parser.add_argument("--total", "--exponly", action="store_true", dest="exponly", default=False, help="Report only the total raw "+ "exposure time available in the database.") parser.add_argument("--quiet", action="store_true", dest="quiet", help="Suppress all information to STDOUT.", default=False) return parser
def setup_parser(iam='gfind', parser=None): """ If a parser object is not provided, make one here. """ if parser is None: parser = argparse.ArgumentParser(description="Locate available data.") parser = gargs.common_args(parser,iam) parser.add_argument("--alt", "--gaper", action="store_true", dest="gaper", default=False, help="Format the output so that it can "+ "be copied and pasted directly into a gMap or gAperture command line?") parser.add_argument("--total", "--exponly", action="store_true", dest="exponly", default=False, help="Report only the total raw "+ "exposure time available in the database.") parser.add_argument("--quiet", action="store_true", dest="quiet", help="Suppress all information to STDOUT.", default=False) parser.add_argument("--predicted", "--future", action="store_true", dest="predicted", help="Reported an estimate of the available"+ "exposure _after the GR6/7 data is fully populated_.") return parser
def setup_parser(iam="gmap"): parser = argparse.ArgumentParser(description="Generate images / maps.") parser = gargs.common_args(parser, iam) parser.add_argument( "--angle", action="store", type=float, dest="angle", default=None, help="The angle subtended in both RA and DEC in degrees.", ) parser.add_argument( "--count", action="store", type=str, dest="cntfile", default=None, help="File name (full path) for the count image.", ) parser.add_argument( "--raangle", action="store", type=float, dest="raangle", help="The angle of sky in degrees that the right ascension subtends. " + "Overrides --angle.", default=None, ) parser.add_argument( "--decangle", action="store", type=float, dest="decangle", default=None, help="The angle of sky in degrees that the declination subtends. " + "Overrides --angle.", ) parser.add_argument( "--skyrange", action="store", dest="skyrange", type=ast.literal_eval, help="Two element list of ra and dec ranges. " + "Equivalent to separately setting --raangle and decangle.", ) parser.add_argument( "--intensity", action="store", type=str, dest="intfile", default=None, help="File name (full path) for the intensity image.", ) parser.add_argument( "--memlight", action="store", type=float, dest="memlight", default=100.0, help="Reduce server-side memory usage " + "by requesting data in chunks of no more than this depth in seconds.", ) parser.add_argument( "--response", action="store", type=str, dest="rrfile", help="File name (full path) for the response image.", default=None, ) return parser