Exemplo n.º 1
0
                    help='Stop date')
parser.add_argument('--interp',
                    type=float,
                    default=4.1,
                    help='Telemetry interpolation (secs)')
args = parser.parse_args()

start = DateTime(args.start) if args.start else (DateTime() - 360.0)
start_hist = DateTime(args.start) if args.start else DateTime('2010:001')
stop = DateTime(args.stop)

for fss_dir, get_data, start_t0 in (('fss_prim', get_fss_prim_data, start),
                                    # ('fss_sec', get_fss_sec_data, start),
                                    # ('fss_prim_hist', get_fss_prim_data, start_hist)
                                    ):
    primary = 'prim' in fss_dir
    start = DateTime(args.start or start_t0)
    print 'Processing', fss_dir, start.date, stop.date
    dat = get_data(start, stop, interp=args.interp)
    with Ska.File.chdir(os.path.join(args.out, fss_dir)):
        print ' plot_pitches'
        plot_pitches(dat, savefig=True, start=start, stop=stop, primary=primary)

    start = DateTime(args.start or start_t0)
    print 'Processing', fss_dir, start.date, stop.date
    dat = get_data(start, stop, interp=args.interp)
    with Ska.File.chdir(os.path.join(args.out, fss_dir)):
        print ' plot_pitches_any_kalman'
        plot_pitches_any_kalman(dat, savefig=True, start=start, stop=stop,
                                primary=primary)
Exemplo n.º 2
0
sys.path.insert(0, os.path.dirname(__file__))
import check_fss

parser = argparse.ArgumentParser(description='Daily FSS monitor')
parser.add_argument('--out',
                    type=str,
                    default='.',
                    help='Output data directory')
parser.add_argument('--start',
                    type=str,
                    help='Start date')
parser.add_argument('--stop',
                    type=str,
                    help='Stop date')
parser.add_argument('--interp',
                    type=float,
                    default=4.1,
                    help='Telemetry interpolation (secs)')
args = parser.parse_args()

stop = args.stop or DateTime()
start = args.start or stop - 180
dat = check_fss.get_data(start, stop, interp=args.interp)
with Ska.File.chdir(args.out):
    check_fss.plot_pitches(dat, savefig=True)

start = args.start or stop - 365
dat = check_fss.get_data(start, stop, interp=args.interp)
with Ska.File.chdir(args.out):
    check_fss.plot_pitches_any_kalman(dat, savefig=True)