forked from mfacorcoran/ogip
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathogip_check
executable file
·26 lines (21 loc) · 1.31 KB
/
ogip_check
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#! /usr/bin/env python
#
# Note that the -W is required in order to avoid python's warnings
# module from supressing repeated messages, which we would actually
# want to see from possibly the same wrong keywords in different files
# or exensions...
#
from ogip_check import ogip_check
if __name__== "__main__":
import argparse
import sys
parser = argparse.ArgumentParser()
parser.add_argument("input", type=str, help="Input file to test")
parser.add_argument('-t','--type', type=str, help="Type: one of TIMING, SPECTRAL, CALDB, ARF, RMF",default=None)
parser.add_argument('-l', "--logfile", type=argparse.FileType('w'),default = sys.stdout)
parser.add_argument("-v", "--verbosity", type=int, default=2,help="Default is 2. A smaller value suppresses detailed evaluation of failed requirements.")
parser.add_argument("--vonly", type=bool, default=False, help="FITS verification only, no OGIP standards check.")
parser.add_argument("--meta_key",type=str,help="Key that defines meta data that replaces standard OGIP dictionaries. Specify, e.g., 'rxte'. Try 'ogip_check_dir -h' for more information.",default="default")
args = parser.parse_args()
status= ogip_check(args.input,args.type,args.logfile,args.verbosity,dtype=None,vonly=args.vonly,meta_key=args.meta_key)
exit(status.status)