コード例 #1
0
ファイル: iota_run.py プロジェクト: dials/iota
def entry_point():
    from iota.components.iota_init import initialize_interface, initialize_new_run

    args, phil_args = parse_command_args().parse_known_args()

    if args.run_path:
        from iota.components.iota_base import ProcInfo

        info = ProcInfo.from_folder(args.run_path[0])
        proc = Process.for_existing_run(info=info, out_type=args.out_type[0])
    else:
        if args.out_type == "progress":
            print(logo)

        if not args.path:
            parse_command_args().print_help()  # Print usage
            if args.default:  # Write out default params and exit
                from iota.components.iota_input import print_params

                help_out, txt_out = print_params()
                print("\n{:-^70}\n".format("IOTA Parameters"))
                print(help_out)
                iota_exit()

        with prog_message("Interpreting input", prog="UI INIT", out_type=args.out_type):
            input_dict, phil, msg = initialize_interface(args, phil_args)
            if not (input_dict or phil):
                iota_exit(silent=(args.out_type == "silent"), msg=msg)

        with prog_message(
            "Initializing run parameters", prog="PARAM INIT", out_type=args.out_type
        ):
            init_ok, info, msg = initialize_new_run(phil=phil, input_dict=input_dict)
            if not init_ok:
                iota_exit(silent=False, msg=msg)

        proc = Process.for_new_run(
            paramfile=info.paramfile, run_no=info.run_number, out_type=args.out_type
        )

    proc.run()
コード例 #2
0
ファイル: iota_run.py プロジェクト: RAPD/cctbx_project
                    print('\n'.join(self.info.summary))
                else:
                    print('\n **** NO IMAGES INTEGRATED! ****')


# ============================================================================ #
if __name__ == "__main__":

    from iota import logo
    from iota.components import iota_init

    args, phil_args = parse_command_args().parse_known_args()

    if args.run_path:
        from iota.components.iota_base import ProcInfo
        info = ProcInfo.from_folder(args.run_path[0])
        proc = Process.for_existing_run(info=info, out_type=args.out_type[0])
    else:
        if args.out_type == 'progress':
            print(logo)

        if not args.path:
            parse_command_args().print_help()  # Print usage
            if args.default:  # Write out default params and exit
                from iota.components.iota_input import print_params
                help_out, txt_out = print_params()
                print('\n{:-^70}\n'.format('IOTA Parameters'))
                print(help_out)

        with prog_message('Interpreting input',
                          prog='UI INIT',