Esempio n. 1
0
def _extract_bunch_report(data):
    info = extract_report_data(
        BUNCH_OUTPUT_FILE,
        data['models'][data['report']],
        0,
    )
    simulation_db.write_result(info)
Esempio n. 2
0
def _extract_bunch_report():
    data = simulation_db.read_json(template_common.INPUT_BASE_NAME)
    if data['models']['bunchSource']['inputSource'] == 'sdds_beam':
        file = 'bunchFile-sourceFile.{}'.format(data['models']['bunchFile']['sourceFile'])
    else:
        file = 'elegant.bun'
    info = extract_report_data(file, data['models'][data['report']], data['models']['bunch']['p_central_mev'], 0)
    simulation_db.write_result(info)
Esempio n. 3
0
def _extract_bunch_report():
    data = simulation_db.read_json(template_common.INPUT_BASE_NAME)
    if data['models']['bunchSource']['inputSource'] == 'sdds_beam':
        file = 'bunchFile-sourceFile.{}'.format(
            data['models']['bunchFile']['sourceFile'])
    else:
        file = 'elegant.bun'
    info = extract_report_data(file, data['models'][data['report']],
                               data['models']['bunch']['p_central_mev'], 0)
    simulation_db.write_result(info)
Esempio n. 4
0
def _extract_twiss_report(data):
    report = data['models'][data['report']]
    report['x'] = 's'
    report['y'] = report['y1']
    info = extract_report_data(
        'twiss_output.filename.sdds',
        report,
        0,
    )
    simulation_db.write_result(info)