help="compute files with teleseismic data") parser.add_argument("-su", "--surface", action="store_true", help="compute files with surface waves data") parser.add_argument("-st", "--strong", action="store_true", help="compute files with strong motion data") parser.add_argument("--cgps", action="store_true", help="compute files with cGPS data") args = parser.parse_args() os.chdir(args.folder) if args.gcmt_tensor: cmt_file = args.gcmt_tensor tensor_info = tensor.get_tensor(cmt_file=cmt_file) else: tensor_info = tensor.get_tensor() data_type = [] if args.tele: data_type = data_type + ['tele_body'] if args.surface: data_type = data_type + ['surf_tele'] if args.strong: data_type = data_type + ['strong_motion'] if args.cgps: data_type = data_type + ['cgps'] modelling_prop(tensor_info, data_type=data_type)
velmodel = args.velmodel if args.velmodel else None if velmodel: velmodel = mv.model2dict(velmodel) os.chdir(args.folder) data_type = [] data_type = data_type + ['gps'] if args.gps else data_type data_type = data_type + ['strong_motion'] if args.strong else data_type data_type = data_type + ['cgps'] if args.cgps else data_type data_type = data_type + ['tele_body'] if args.tele else data_type data_type = data_type + ['surf_tele'] if args.surface else data_type default_dirs = mng.default_dirs() if args.option == 'auto': if not args.gcmt_tensor: raise RuntimeError('You must select direction of input GCMT file') tensor_info = tensor.get_tensor(cmt_file=args.gcmt_tensor) set_directory_structure(tensor_info) if args.data: for file in os.listdir(args.data): if os.path.isfile(os.path.join(args.data, file)): copy2(os.path.join(args.data, file), 'data') data_type = data_type if len(data_type) >= 1 else ['tele_body'] automatic_usgs(tensor_info, data_type, default_dirs, velmodel=velmodel, dt_cgps=0.2) if args.option == 'manual': if args.gcmt_tensor: cmt_file = args.gcmt_tensor tensor_info = tensor.get_tensor(cmt_file=cmt_file)