Exemplo n.º 1
0
    def OnInit(self):
        from platform import python_version
        import matplotlib

        print("Versions:")
        print("  Python     : ", python_version())
        print("  wxPython   : ", wx.__version__)
        print("  MatPlotLib : ", matplotlib.__version__)

        # Initialize IOTA instance
        args, phil_args = parse_command_args().parse_known_args()
        input_dict, phil, msg = init.initialize_interface(
            args, phil_args, True)

        # Initialize Main window
        self.frame = MainWindow(
            None,
            -1,
            title="IOTA v.{}".format(iota_version),
            input_dict=input_dict,
            phil=phil,
            msg=msg,
        )
        self.frame.place_and_size(set_size="v_default",
                                  set_by="mouse",
                                  center=True)

        # Show main window
        self.frame.Show(True)

        self.SetTopWindow(self.frame)
        return True
Exemplo n.º 2
0
    def OnInit(self):

        from platform import python_version
        print('Python  : ', python_version())
        print('wxPython: ', wx.__version__)

        # Initialize IOTA instance
        args, phil_args = parse_command_args().parse_known_args()
        input_dict, phil, msg = init.initialize_interface(
            args, phil_args, True)

        # Initialize Main window
        self.frame = MainWindow(None,
                                -1,
                                title='IOTA v.{}'.format(iota_version),
                                input_dict=input_dict,
                                phil=phil,
                                msg=msg)
        self.frame.place_and_size(set_size=True, set_by='mouse', center=True)

        # Show main window
        self.frame.Show(True)

        self.SetTopWindow(self.frame)
        return True
Exemplo n.º 3
0
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()
Exemplo n.º 4
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',
                          out_type=args.out_type):
            input_dict, phil, msg = iota_init.initialize_interface(
                args, phil_args)
            if not (input_dict or phil):
                util.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 = iota_init.initialize_new_run(
                phil=phil, input_dict=input_dict)
            if not init_ok:
                util.iota_exit(silent=False, msg=msg)

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