output.addParameter('dpp_rms', lambda: get_dpp(bunch, bunchtwissanalysis)) output.addParameter('beta_x', lambda: bunchtwissanalysis.getBeta(0)) output.addParameter('beta_y', lambda: bunchtwissanalysis.getBeta(1)) output.addParameter('alpha_x', lambda: bunchtwissanalysis.getAlpha(0)) output.addParameter('alpha_y', lambda: bunchtwissanalysis.getAlpha(1)) output.addParameter('mean_x', lambda: bunchtwissanalysis.getAverage(0)) output.addParameter('mean_xp', lambda: bunchtwissanalysis.getAverage(1)) output.addParameter('mean_y', lambda: bunchtwissanalysis.getAverage(2)) output.addParameter('mean_yp', lambda: bunchtwissanalysis.getAverage(3)) output.addParameter('mean_z', lambda: bunchtwissanalysis.getAverage(4)) output.addParameter('mean_dE', lambda: bunchtwissanalysis.getAverage(5)) output.addParameter('eff_beta_x', lambda: bunchtwissanalysis.getEffectiveBeta(0)) output.addParameter('eff_beta_y', lambda: bunchtwissanalysis.getEffectiveBeta(1)) output.addParameter('eff_epsn_x', lambda: bunchtwissanalysis.getEffectiveEmittance(0)) output.addParameter('eff_epsn_y', lambda: bunchtwissanalysis.getEffectiveEmittance(1)) output.addParameter('eff_alpha_x', lambda: bunchtwissanalysis.getEffectiveAlpha(0)) output.addParameter('eff_alpha_y', lambda: bunchtwissanalysis.getEffectiveAlpha(1)) output.addParameter('gamma', lambda: bunch.getSyncParticle().gamma()) # Pre Track Bunch Twiss Analysis & Add BunchGather outputs #----------------------------------------------------------------------- print '\n\t\tStart tracking on MPI process: ', rank turn = -1 bunchtwissanalysis.analyzeBunch(bunch) moments = BunchGather(bunch, turn, p) # Calculate bunch moments and kurtosis # Add moments and kurtosis output.addParameter('sig_x', lambda: moments['Sig_x']) output.addParameter('sig_xp', lambda: moments['Sig_xp']) output.addParameter('sig_y', lambda: moments['Sig_y'])
output.addParameter('mean_x', lambda: bunchtwissanalysis.getAverage(0)) output.addParameter('mean_xp', lambda: bunchtwissanalysis.getAverage(1)) output.addParameter('mean_y', lambda: bunchtwissanalysis.getAverage(2)) output.addParameter('mean_yp', lambda: bunchtwissanalysis.getAverage(3)) output.addParameter('mean_z', lambda: bunchtwissanalysis.getAverage(4)) output.addParameter('mean_dE', lambda: bunchtwissanalysis.getAverage(5)) output.addParameter('eff_beta_x', lambda: bunchtwissanalysis.getEffectiveBeta(0)) output.addParameter('eff_beta_y', lambda: bunchtwissanalysis.getEffectiveBeta(1)) output.addParameter('eff_epsn_x', lambda: bunchtwissanalysis.getEffectiveEmittance(0)) output.addParameter('eff_epsn_y', lambda: bunchtwissanalysis.getEffectiveEmittance(1)) output.addParameter('eff_alpha_x', lambda: bunchtwissanalysis.getEffectiveAlpha(0)) output.addParameter('eff_alpha_y', lambda: bunchtwissanalysis.getEffectiveAlpha(1)) output.addParameter('gamma', lambda: bunch.getSyncParticle().gamma()) # Pre Track Bunch Twiss Analysis & Add BunchGather outputs #----------------------------------------------------------------------- print '\n\t\tStart tracking on MPI process: ', rank turn = -1 bunchtwissanalysis.analyzeBunch(bunch) moments = BunchGather(bunch, turn, p) # Calculate bunch moments and kurtosis # Add moments and kurtosis output.addParameter('sig_x', lambda: moments['Sig_x']) output.addParameter('sig_xp', lambda: moments['Sig_xp']) output.addParameter('sig_y', lambda: moments['Sig_y'])