예제 #1
0
def main(args):
    Nargs = len(args)
    if Nargs == 0:
        print usage
        sys.exit(1)

    args, opt_args = process_args(args)
    options = process_options(opt_args)

    if options.z is None:
        if options.f26 is not None:
            options.z = np.median(options.f26.lines.z)
        else:
            options.z = 1

    filename = args[0]
    spec = barak.spec.read(filename)
    if np.isnan(spec.co).all():
        spec.co[:] = 1.
    if options.fitcontinuum:
        print(stats(spec.fl))
        spec.co = barak.spec.find_cont(spec.fl,
                                       fwhm1=options.fwhm1,
                                       fwhm2=options.fwhm2,
                                       nchunks=options.nchunks,
                                       nsiglo=options.nsig_cont)
    
    #fig = pl.figure(figsize=A4PORTRAIT)
    #fig = pl.figure(figsize=(16, 12))
    fig = pl.figure(figsize=(6, 5))
    print help
    junk = VelplotWrap(spec.wa, spec.fl / spec.co, spec.er / spec.co, fig,
                       spec.filename, options)
    pl.show()
    return junk
예제 #2
0
def main(args):
    if len(args) < 1:
        print usage
        return

    args, opt_args = process_args(args)
    options = process_options(opt_args)

    fig = plt.figure(figsize=(15, 6))
    fig.subplots_adjust(left=0.04, right=0.98)
    wrap = PlotWrap(args, fig, options)
    wrap.update()
    plt.show()