#!/usr/bin/env python

from desitarget.mtl import update_lya_1b

from argparse import ArgumentParser
ap = ArgumentParser(description="Add two observations for LyA quasars for 1B.")
ap.add_argument("--obscon",
                help="String matching ONE obscondition in the bitmask yaml file \
                (e.g. 'DARK'). Defaults to DARK.", default="DARK")
ap.add_argument('--mtldir',
                help="Full path to the directory that hosts the MTL ledgers.    \
                Default is to use the $MTL_DIR environment variable.",
                default=None)
ap.add_argument('--timestamp',
                help="Fixed time stamp at which to record updates.              \
                Default is to use NOW.",
                default=None)
ap.add_argument("--donotupdatedonefile", action='store_true',
                help="Do NOT record this action in the                          \
                mtl-done-overrides.ecsv file.")


ns = ap.parse_args()

update_lya_1b(obscon=ns.obscon, mtldir=ns.mtldir, timestamp=ns.timestamp,
              donefile=not(ns.donotupdatedonefile))
