Beispiel #1
0
else:
    V = 6.e6*np.ones(n_turns+1)
mpiprint("Flat top voltage %.4e V" % V[-1])
mpiprint("Momentum and voltage loaded...")

# Define general parameters
ring = Ring(C, alpha, ps[0:n_turns+1], Proton(), n_turns=n_turns)
mpiprint("General parameters set...")

# Define RF parameters (noise to be added for CC case)
rf = RFStation(ring, [h], [V[0:n_turns+1]], [0.])
mpiprint("RF parameters set...")

# Generate RF phase noise
LHCnoise = FlatSpectrum(ring, rf, fmin_s0=0.8571, fmax_s0=1.001,
                        initial_amplitude=1.e-5,
                        predistortion='weightfunction')
LHCnoise.dphi = np.load(
    os.path.join(inputDir, 'LHCNoise_fmin0.8571_fmax1.001_ampl1e-5_weightfct_6.5TeV.npz'))['arr_0']
LHCnoise.dphi = np.ascontiguousarray(LHCnoise.dphi[0:n_turns+1])
mpiprint("RF phase noise loaded...")

# FULL BEAM
bunch = Beam(ring, n_particles, N_b)
beam = Beam(ring, n_particles*n_bunches, N_b)
bigaussian(ring, rf, bunch, 0.3e-9, reinsertion=True, seed=seed)
bunch_spacing_buckets = 10

for i in np.arange(n_bunches):
    beam.dt[i*n_particles:(i+1) *
            n_particles] = bunch.dt[0:n_particles] + i*rf.t_rf[0, 0]*10
Beispiel #2
0
# Simulation setup -------------------------------------------------------------
print("Setting up the simulation...")
print("")

# Define general parameters
general_params = Ring(C, alpha, p_s, Proton(), N_t)

# Define RF station parameters and corresponding tracker
rf_params = RFStation(general_params, [h], [V], [0])

# Pre-processing: RF phase noise -----------------------------------------------
RFnoise = FlatSpectrum(general_params,
                       rf_params,
                       delta_f=1.12455000e-02,
                       fmin_s0=0,
                       fmax_s0=1.1,
                       seed1=1234,
                       seed2=7564,
                       initial_amplitude=1.11100000e-07,
                       folder_plots=this_directory +
                       '../output_files/EX_03_fig')
RFnoise.generate()
rf_params.phi_noise = np.array(RFnoise.dphi, ndmin=2)

print("   Sigma of RF noise is %.4e" % np.std(RFnoise.dphi))
print("   Time step of RF noise is %.4e" % RFnoise.t[1])
print("")

beam = Beam(general_params, N_p, N_b)
long_tracker = RingAndRFTracker(rf_params, beam)

print("General and RF parameters set...")
Beispiel #3
0
N_t = 200         # Number of turns to track
dt_plt = 20        # Time steps between plots

# Simulation setup -------------------------------------------------------------
print("Setting up the simulation...")
print("")

# Define general parameters
general_params = Ring(C, alpha, p_s, Proton(), N_t)

# Define RF station parameters and corresponding tracker
rf_params = RFStation(general_params, [h], [V], [0])

# Pre-processing: RF phase noise -----------------------------------------------
RFnoise = FlatSpectrum(general_params, rf_params, delta_f = 1.12455000e-02, fmin_s0 = 0, 
                       fmax_s0 = 1.1, seed1=1234, seed2=7564, 
                       initial_amplitude = 1.11100000e-07, folder_plots =
                       this_directory + '../output_files/EX_03_fig')
RFnoise.generate()
rf_params.phi_noise = np.array(RFnoise.dphi, ndmin =2) 


print("   Sigma of RF noise is %.4e" %np.std(RFnoise.dphi))
print("   Time step of RF noise is %.4e" %RFnoise.t[1])
print("")


beam = Beam(general_params, N_p, N_b)
long_tracker = RingAndRFTracker(rf_params, beam)

print("General and RF parameters set...")