def _extract_bunch_report(data): info = extract_report_data( BUNCH_OUTPUT_FILE, data['models'][data['report']], 0, ) simulation_db.write_result(info)
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)
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)
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)