Example #1
0
def main():
    from runbrick import run_brick, get_parser, get_runbrick_kwargs

    parser = get_parser()
    # subset number
    parser.add_argument('--mjd-period',
                        type=float,
                        help='How long to make periods (in days), default 30',
                        default=30)
    parser.add_argument('--subset',
                        type=int,
                        help='Which period of MJDs to keep?  Default 0',
                        default=0)
    opt = parser.parse_args()
    if opt.brick is None and opt.radec is None:
        parser.print_help()
        return -1
    survey, kwargs = get_runbrick_kwargs(opt)
    if kwargs in [-1, 0]:
        return kwargs
    survey = SurveySubset(opt.mjd_period,
                          opt.subset,
                          survey_dir=opt.survey_dir,
                          output_dir=opt.outdir)
    run_brick(opt.brick, survey, **kwargs)
    return 0
Example #2
0
def main():
    from runbrick import run_brick, get_parser, get_runbrick_kwargs

    parser = get_parser()
    # subset number
    parser.add_argument('--subset',
                        type=int,
                        help='COSMOS subset number [0 to 4, 10 to 12]',
                        default=0)
    opt = parser.parse_args()
    if opt.brick is None and opt.radec is None:
        parser.print_help()
        return -1

    print('Forcing --no-blacklist')
    opt.blacklist = False

    survey, kwargs = get_runbrick_kwargs(opt)
    if kwargs in [-1, 0]:
        return kwargs

    survey = CosmosSurvey(survey_dir=opt.survey_dir,
                          subset=opt.subset,
                          output_dir=opt.outdir)

    run_brick(opt.brick, survey, **kwargs)
    return 0
Example #3
0
def main():
    from runbrick import run_brick, get_parser, get_runbrick_kwargs

    parser = get_parser()
    # subset number
    parser.add_argument('--subset',
                        type=int,
                        help='COSMOS subset number [0 to 4]',
                        default=0)
    opt = parser.parse_args()
    if opt.brick is None and opt.radec is None:
        parser.print_help()
        return -1

    print('Forcing --no-blacklist')
    opt.blacklist = False

    kwargs = get_runbrick_kwargs(opt)
    if kwargs in [-1, 0]:
        return kwargs

    decals = CosmosDecals(decals_dir=opt.decals_dir, subset=opt.subset)
    kwargs['decals'] = decals

    # runbrick...
    run_brick(opt.brick, **kwargs)
    return 0
Example #4
0
def main():
    from runbrick import run_brick, get_parser, get_runbrick_kwargs

    parser = get_parser()
    # subset number
    parser.add_argument('--subset',
                        type=int,
                        help='COSMOS subset number [0 to 4, 10 to 12]',
                        default=0)
    opt = parser.parse_args()
    if opt.brick is None and opt.radec is None:
        parser.print_help()
        return -1

    optdict = vars(opt)
    verbose = optdict.pop('verbose')
    subset = optdict.pop('subset')
    survey, kwargs = get_runbrick_kwargs(**optdict)
    if kwargs in [-1, 0]:
        return kwargs

    import logging
    if verbose == 0:
        lvl = logging.INFO
    else:
        lvl = logging.DEBUG
    logging.basicConfig(level=lvl, format='%(message)s', stream=sys.stdout)

    survey = CosmosSurvey(survey_dir=opt.survey_dir,
                          subset=subset,
                          output_dir=opt.output_dir)
    print('Using survey:', survey)
    #print('with output', survey.output_dir)

    print('opt:', opt)
    print('kwargs:', kwargs)

    run_brick(opt.brick, survey, **kwargs)
    return 0
Example #5
0
def main():
    from runbrick import run_brick, get_parser, get_runbrick_kwargs

    parser = get_parser()
    # subset number
    parser.add_argument("--subset", type=int, help="COSMOS subset number [0 to 4, 10 to 12]", default=0)
    opt = parser.parse_args()
    if opt.brick is None and opt.radec is None:
        parser.print_help()
        return -1

    print("Forcing --no-blacklist")
    opt.blacklist = False

    survey, kwargs = get_runbrick_kwargs(opt)
    if kwargs in [-1, 0]:
        return kwargs

    survey = CosmosSurvey(survey_dir=opt.survey_dir, subset=opt.subset, output_dir=opt.outdir)

    run_brick(opt.brick, survey, **kwargs)
    return 0
Example #6
0
def main():
    from runbrick import run_brick, get_parser, get_runbrick_kwargs
    
    parser = get_parser()
    # subset number
    parser.add_argument('--subset', type=int, help='COSMOS subset number [0 to 4]', default=0)
    opt = parser.parse_args()
    if opt.brick is None and opt.radec is None:
        parser.print_help()
        return -1

    print('Forcing --no-blacklist')
    opt.blacklist = False

    kwargs = get_runbrick_kwargs(opt)
    if kwargs in [-1,0]:
        return kwargs

    decals = CosmosDecals(decals_dir=opt.decals_dir, subset=opt.subset)
    kwargs['decals'] = decals
    
    # runbrick...
    run_brick(opt.brick, **kwargs)
    return 0