示例#1
0
def main():
    master_path = configuration_validation_tool.find_one_master()  # Asks for the location of the 'master.pmc'.
    st_path = configuration_validation_tool.st_file()  # Asks for the location of the 'st.cmd'.
    raw_mcs_data = mcs_data_grab(master_path)
    st_data = motor_record_st_grab.st_match(st_path, master_path)
    mcs_data = epics_dict(raw_mcs_data)
    data = format_data(mcs_data, st_data)
    beamline = mcs_data[0]['BEAMLINE']['value']
    mcs = mcs_data[0]['CONTROLLER']['value']
    export_motor_record(data, mcs,
                        beamline)  # Exports the Motor Record to a file in the directory that the program is running.
    answer = input('Would you like to make another motor record? [Y/N]\n or type "Other" to select a different tool.\n')
    configuration_validation_tool.retry(answer, '2')
示例#2
0
def main():
    user_response = input('Do you want to search for all master.pmc files? [Y/N]\n')
    master_file_list = list()
    if user_response.lower() == 'y':
        master_file_list = configuration_validation_tool.find_all_master()
    elif user_response.lower() == 'n':
        master_file_list.append(configuration_validation_tool.find_one_master())
    else:
        print('That is not a valid answer, please try again.')
        main()
    file_data, mcs = build_file(master_file_list)
    export_label_data(mcs, file_data)
    print('Cables labels produced.')
    answer = input('Would you like to produce more cable labels? [Y/N]\n or type "Other" to select a different tool.\n')
    configuration_validation_tool.retry(answer, '3')
示例#3
0
def main():
    user_response = input('Do you want to search for all master.pmc files? [Y/N]\n')
    master_file_list = list()
    if user_response.lower() == 'y':
        master_file_list = configuration_validation_tool.find_all_master()
    elif user_response.lower() == 'n':
        master_file_list.append(configuration_validation_tool.find_one_master())
    else:
        print('That is not a valid answer, please try again.')
        main()
    file_data = list()
    for file in master_file_list:
        controller_data = import_label_data(file)
        gblv_label = raw_gblv_label(controller_data)
        file_data.append(gblv_label)
    mcs = extract_data.main(master_file_list[0], 'e_BrickN_P').irow(0)['e_BrickN_P'].strip("'")
    export_gblv_label(file_data, mcs)
    answer = input('Would you like to produce more GBLV labels? [Y/N]\n or type "Other" to select a different tool.\n')
    configuration_validation_tool.retry(answer, '4')