def main(): options,args = parser.parse_args(sys.argv[1:]) if len(args) < 1: parser.print_help() sys.exit(45) simname=args[0] conf=files.read_config(simname) pointings=files.read_pointings(simname) d=files.get_gsim_dir(simname) if not os.path.exists(d): os.makedirs(d) for pstruct in pointings: write_cfg(simname, pstruct, conf) write_cfg(simname, pstruct, conf, type='psf') write_wq(simname,pstruct['index'], conf, options)