alpha = 1. / gamma_t / gamma_t # First order mom. comp. factor # Tracking details N_t = 1 # Number of turns to track # ----------------------------------------------------------------------------- PLOT_NO_BEAM = True # Plot settings plt.rc('axes', labelsize=12, labelweight='normal') plt.rc('lines', linewidth=1.5, markersize=6) plt.rc('font', family='sans-serif') plt.rc('legend', fontsize=12) # Logger for messages on console & in file Logger(debug=True) ring = Ring(C, alpha, p_s, Particle=Proton(), n_turns=1) rf = RFStation(ring, [h], [3.1e6], [dphi]) # SPS-equivalent for 0.57 eVs, 1.65 ns bunch = Beam(ring, N_m, N_p) bigaussian(ring, rf, bunch, sigma_dt=1.65e-9 / 4) #tau_0) # Real RF voltage rf = RFStation(ring, [h], [V], [dphi]) beam = Beam(ring, N_m * NB, N_p * NB) buckets = rf.t_rf[0, 0] * 10 for i in range(12): beam.dt[i * N_m:(i + 1) * N_m] = bunch.dt[0:N_m] + i * buckets beam.dE[i * N_m:(i + 1) * N_m] = bunch.dE[0:N_m]
IMP_RESP = True # Impulse response of travelling wave cavity FINE_COARSE = True # Beam-induced voltage on fine/coarse grid VIND_BEAM = True # Beam-induced voltage # OPTIONS TO TEST ------------------------------------------------------------- # Plot settings plt.rc('axes', labelsize=12, labelweight='normal') plt.rc('lines', linewidth=1.5, markersize=6) plt.rc('font', family='sans-serif') plt.rc('legend', fontsize=12) # Logger for messages on console & in file if LOGGING == True: Logger(debug = True) else: Logger().disable() # Set up machine parameters ring = Ring(C, alpha, p_s, Particle=Proton(), n_turns=N_t) logging.info("...... Machine parameters set!") # Set up RF parameters rf = RFStation(ring, h, V, phi, n_rf=1) logging.info("...... RF parameters set!") # Define beam and fill it beam = Beam(ring, N_m, N_b) bigaussian(ring, rf, beam, 3.2e-9/4, seed = 1234, reinsertion = True) logging.info("...... Beam set!")