# total = cnt['succ'] + cnt['failed'] # succses = next(succ) - 2 # failure = next(failed) - 2 # logger.info('Total files: {}, success: {}, failed: {}'.format( # total, cnt['succ'], cnt['failed'])) return if __name__ == '__main__': """""" import argparse import sys from aux_gps import configure_logger from aux_gps import get_var from pathlib import Path # first check for GCORE path: if get_var('GCORE') is None: raise ValueError('Run source ~/GipsyX-1.1/rc_GipsyX.sh first !') logger = configure_logger(name='axis-gipsyx') parser = argparse.ArgumentParser( description= 'a command line tool for preparing and running rinex files with gipsyX software.' ) optional = parser._action_groups.pop() required = parser.add_argument_group('required arguments') # required.add_argument( # '--savepath', # help="a full path to save the raw output files, e.g., /home/ziskin/Work_Files/PW_yuval/gipsyx_resolved/TELA", # type=check_path) required.add_argument( '--rinexpath', help=
# optional.add_argument('--iqr_k', help='iqr k data filter criterion', # type=float) # optional.add_argument('--db', help='database to download rinex files from.', # choices=['garner', 'cddis']) # required.add_argument('--delete', action='store_true') # its False # required.add_argument('--backup', action='store_true') # its False # metavar=str(cds.start_year) + ' to ' + str(cds.end_year)) # optional.add_argument('--half', help='a spescific six months to download,\ # e.g, 1 or 2', type=int, choices=[1, 2], # metavar='1 or 2') parser._action_groups.append(optional) # added this line args = parser.parse_args() # for arg in vars(args): # print(arg, getattr(args, arg)) # sys.exit() pwpath = Path(get_var('PWCORE')) workpath = Path(get_var('PWORK')) axis_path = Path(get_var('AXIS')) if axis_path is None: raise ValueError('Put source code folder at $PWCORE') # get all the names of israeli gnss stations: isr_stations = pd.read_csv(pwpath / 'stations_approx_loc.txt', delim_whitespace=True) isr_stations = isr_stations.index.tolist() # get all the names of AXIS GNSS station: axis_stations = read_axis_stations(axis_path) axis_stations = axis_stations.index.tolist() # if workpath is None: # raise ValueError('Put source code folder at $PWORK') # # get the names of the stations in workpath: # stations = path_glob(workpath, '*')
# cd to the workpath / station and run nohup with the usual args check_python_version(min_major=3, min_minor=6) parser = argparse.ArgumentParser( description='a command line tool for ' + 'copying post proccessed gipsyx nc files' + 'to home directory structure') optional = parser._action_groups.pop() required = parser.add_argument_group('required arguments') # remove this line: optional = parser... required.add_argument('--station', help="GPS station name four lowercase letters,", nargs='+', type=check_station_name) parser._action_groups.append(optional) # added this line args = parser.parse_args() pwpath = Path(get_var('PWCORE')) workpath = Path(get_var('PWORK')) if pwpath is None: raise ValueError('Put source code folder at $PWCORE') # get all the names of israeli gnss stations: isr_stations = pd.read_csv(pwpath / 'stations_approx_loc.txt', delim_whitespace=True) isr_stations = isr_stations.index.tolist() if workpath is None: raise ValueError('Put source code folder at $PWORK') # get the names of the stations in workpath: stations = path_glob(workpath, '*') stations = [x.as_posix().split('/')[-1] for x in stations if x.is_dir()] if args.station is None: print('station is a required argument, run with -h...') sys.exit()
optional.add_argument('--iqr_k', help='iqr k data filter criterion', type=float) optional.add_argument('--db', help='database to download rinex files from.', choices=['garner', 'cddis']) required.add_argument('--delete', action='store_true') # its False required.add_argument('--backup', action='store_true') # its False # metavar=str(cds.start_year) + ' to ' + str(cds.end_year)) # optional.add_argument('--half', help='a spescific six months to download,\ # e.g, 1 or 2', type=int, choices=[1, 2], # metavar='1 or 2') parser._action_groups.append(optional) # added this line args = parser.parse_args() # for arg in vars(args): # print(arg, getattr(args, arg)) # sys.exit() pwpath = Path(get_var('PWCORE')) workpath = Path(get_var('PWORK')) if pwpath is None: raise ValueError('Put source code folder at $PWCORE') # get all the names of israeli gnss stations: isr_stations = pd.read_csv(pwpath / 'stations_approx_loc.txt', delim_whitespace=True) isr_stations = isr_stations.index.tolist() if workpath is None: raise ValueError('Put source code folder at $PWORK') # get the names of the stations in workpath: stations = path_glob(workpath, '*') stations = [x.as_posix().split('/')[-1] for x in stations if x.is_dir()] if args.task is None: print('task is a required argument, run with -h...') sys.exit()