Пример #1
0
def Main():

    arguments = parse_commandline(sys.argv[1:])
    # TODO: validate CL-arguments
    lmc_file_path = arguments['<lmc-file>']

    try:
        user_configuration = parse_user_lmc_file(lmc_file_path)
        tc = Taskcreator(user_configuration)
        tasklist = tc.create_tasks()
        for task in tasklist:
            task.run()
    except KeyboardInterrupt:
        print("Shutdown requested...exiting")
    sys.exit(0)
Пример #2
0
def test_createtask_dipolestudy_fixed_angularrange_userconfdict():
    """
    Create a dipolestudy task with fixed angular range from a dictionary and
    let it execute.
    """
    user_conf_dict = {
        'dipolestudy': {'angularrange': fixed_angular_range.copy(),
                        'spectralpoint': spectralpoint.copy()},
        'materials': [ag.copy(), air.copy()],
        'stack': [airlayer1.copy(),
                  elayer_green.copy(),
                  airlayer2.copy(),
                  aglayer.copy()],
        'emitters': [e_green.copy()]
    }
    tc = Taskcreator(user_conf_dict)
    tasks = tc.create_tasks()
    for task in tasks:
        task.run()