Beispiel #1
0
    Author: Jie ZHENG: [email protected]
    Version: 2016M (M for 2nd half of June)
    Location: Steward Observatory, University of Arizona, Tucson, AZ
"""


import sys
import args


if __name__ == "__main__" :
    a = {"tel":None, "list":None, "bias":None, "prefix":"",
         "base":"", "debug":5, "overwrite":False}
    alias = {"arg_01":"tel", "arg_02":"list", "arg_03":"bias"}
    a = args.arg_trans(sys.argv, a, alias=alias, silent=True)
    if a["tel"] is None :
        print ("""This is a shell caller for pipeline.
Syntax: 
    ./pip_bias.py [tel=]tel [list=]listfile [bias=]biasfile [prefix=prefix]
        [base=basedir] [debug=debug] [overwrite=true|false]
Arguments:
    tel: telescope name, now we have bok and xao
    list: a named argument, value is path and filename of list file
    bias: a named argument, value is path and filename of output bias file
    prefix: a prefix add to list and bias, this makes calling short
    base: a optional named argument, base directory add to filenames in list
    debug: debug info display level, for leveles, see manual, default is 5
    overwrite: a named optional bool argument, true or false
Example:
    ./pip_bias.py bok list=/data/red/bok/u/201608/J7606/list/bias.lst
Beispiel #2
0
           "\n\t{obsedfile}"
           "\n\t{equfile}"
           "\n\t{galfile}"
           "\n\t{repfile}".format(
        filelist=filelist, checkfile=checkfile, obsedfile=obsedfile,
        equfile=equfile, galfile=galfile, repfile=repfile
    ))


if __name__ == "__main__" :
    import sys
    import args

    ar = {"year":sys.maxsize, "month":sys.maxsize, "day":sys.maxsize,
          "run":"", "path":""}
    al = {"arg_01":"year", "arg_02":"month", "arg_03":"day",
          "arg_04":"run", "arg_05":"path"}
    ar = args.arg_trans(sys.argv, ar, silent=True, alias=al)

    if ar["day"] == sys.maxsize :
        print("""Syntax:
    ./xao_after_obs.py year month day [run [path]]
        year: 4-digit year
        month: month number, 1 to 12
        day: day number, 1 to 31, or extended
        run: code of run, usually as yyyymm format
        path: root path of the day
    """)
    else :
        after_obs_bok(ar["year"], ar["month"], ar["day"], ar["run"], ar["path"])