def get_serial_CPUring(init_sim_objects_auto=True): import PyPARIS.util as pu ring = pu.get_serial_CPUring(Simulation(), init_sim_objects_auto) return ring
'mean_x', 'mean_z', 'n_macroparticles_per_slice' ] sim_content.pp.Qp_x = Qp_x if add_alpha_0_to_tune: assert (only_phase_shift) sim_content.pp.Q_x += -(factor_alpha_0_to_tune * alpha_N[0] * sim_content.pp.beta_x) / (4 * np.pi) # Disable real e-clouds sim_content.pp.enable_arc_dip = False sim_content.pp.enable_arc_quad = False # Add ring of CPU information ring_cpu = pu.get_serial_CPUring(sim_content, init_sim_objects_auto=False) assert (sim_content.ring_of_CPUs.I_am_the_master) # Initialize machine elements sim_content.init_all() # Initialize beam, slicer, monitors, multijob mode sim_content.init_master() # Get bunch, slicer, machine and monitors bunch = sim_content.bunch slicer = sim_content.slicer machine = sim_content.machine bunch_monitor = sim_content.bunch_monitor slice_monitor = sim_content.slice_monitor
import sys sys.path.append('../../../') import PyPARIS_sim_class.Simulation as sim_mod import PyPARIS.util as pu sim_content = sim_mod.Simulation( param_file='param_folder/Simulation_parameters.py') ring = pu.get_serial_CPUring(sim_content, init_sim_objects_auto=True) ring.run()