def input_output_parser():
    ap = argparse.ArgumentParser()
    sp = ap.add_argument_group('Input and Output Arguments.')
    sp.add_argument('--input_data_files', type=str, nargs='+', help='paths to data files to calibrate.', required=True)
    sp.add_argument('--input_model_files', type=str, nargs='+', help='paths to model files to set overal amplitude and phase.')
    sp.add_argument('--input_gain_files', type=str, nargs='+', help='paths to gains to use as a staring point.')
    sp.add_argument('--resid_outfilename', type=str, default=None, help='postfix for resid output file.')
    sp.add_argument('--model_outfilename', type=str, default=None, help='postfix for foreground model file.')
    sp.add_argument('--gain_outfilename', type=str, default=None, help='path for writing fitted gains.')
    sp.add_argument('--clobber', action='store_true', default='False', help='Overwrite existing outputs.')
    sp.add_argument('--x_orientation', default='east', type=str, help='x_orientation of feeds to set in output gains.')
    sp.add_argument('--bllen_min', default=0.0, type=float, help='minimum baseline length to include in calibration and outputs.')
    sp.add_argument('--bllen_max', default=np.inf, type=float, help='maximum baseline length to include in calbration and outputs.')
    sp.add_argument('--bl_ew_min', default=0.0, type=float, help='minimum EW baseline component to include in calibration and outputs.')
    sp.add_argument('--ex_ants', default=None, type=int, nargs='+', help='Antennas to exclude from calibration and modeling.')
    sp.add_argument('--select_ants', default=None, type=int, nargs='+', help='Antennas to select exclusively for calibration and modeling.')
    sp.add_argument('--gpu_index', default=None, type=int, help='Index of GPU to run on (if on a multi-GPU machine).')
    sp.add_argument('--gpu_memory_limit', default=None, type=int, help='Limit GPU memory use to this many GBytes.')
    sp.add_argument('--precision', default=32, type=int, help='Number of bits to keep track of.')
    return ap
def input_output_parser():
    ap = argparse.ArgumentParser()
    sp = ap.add_argument_group('Input and Output Arguments.')
    sp.add_argument('--input_data_files', type=str, nargs='+', help='paths to data files to calibrate.', required=True)
    sp.add_argument('--input_model_files', type=str, nargs='+', help='paths to model files to set overal amplitude and phase.')
    sp.add_argument('--input_gain_files', type=str, nargs='+', help='paths to gains to use as a staring point.')
    sp.add_argument('--resid_outfilename', type=str, default=None, help='postfix for resid output file.')
    sp.add_argument('--model_outfilename', type=str, default=None, help='postfix for foreground model file.')
    sp.add_argument('--gain_outfilename', type=str, default=None, help='path for writing fitted gains.')
    sp.add_argument('--clobber', action='store_true', default='False', help='Overwrite existing outputs.')
    sp.add_argument('--x_orientation', default='east', type=str, help='x_orientation of feeds to set in output gains.')
    sp.add_argument('--bllen_min', default=0.0, type=float, help='minimum baseline length to include in calibration and outputs.')
    sp.add_argument('--bllen_max', default=np.inf, type=float, help='maximum baseline length to include in calbration and outputs.')
    sp.add_argument('--bl_ew_min', default=0.0, type=float, help='minimum EW baseline component to include in calibration and outputs.')
    sp.add_argument('--ex_ants', default=None, type=int, nargs='+', help='Antennas to exclude from calibration and modeling.')
    sp.add_argument('--select_ants', default=None, type=int, nargs='+', help='Antennas to select exclusively for calibration and modeling.')
    sp.add_argument('--gpu_index', default=None, type=int, help='Index of GPU to run on (if on a multi-GPU machine).')
    sp.add_argument('--gpu_memory_limit', default=None, type=int, help='Limit GPU memory use to this many GBytes.')
    sp.add_argument('--precision', default=32, type=int, help='Number of bits to keep track of.')
    return ap