!********************************************************************************************* ! Set nominal working point and chromaticities for bare lattice WITH physical apertures !********************************************************************************************* &rpn_load filename=settings.sdds load_parameters=1 &end !---------------------------------------- ! Transmute RFCAs into DRIFTs ! These are for elettra_* lattices !---------------------------------------- !&transmute_elements name = RFC*, type = RFCA, new_type = "DRIF", !&end &transmute_elements name = CEN_IDVC*, new_type = "DRIF", &end !----------------------------------------------------------------------------------------------------------------------------------------- ! elettra_20141117.lte is standard DBA lattice, including skew quads and aperture restrictions / IDs ! elettra_20150630.lte is for Elettra low emittance optics, quad strengths by E. Karantzoulis ! Elettra_M-bend_V6_20150116.lte is for Elettra2.0 project, multibend by E.Karantzoulis, translated to a detailed lattice for Elegant !----------------------------------------------------------------------------------------------------------------------------------------- &run_setup lattice = ./lattice.lte rootname = elettra0 default_order = "(order_transport)", use_beamline = RING p_central = "(p_central)" output = %s.out sigma = %s.sig centroid = %s.cen final = %s.fin magnets = %s.mag parameters = %s.param semaphore_file = %s.done &end &run_control n_steps = 1 n_passes = 1 &end !---------------------- ! Correct tunes !--------------------- !----------------------------------------------------------------------------------------------------------------------------------------- ! elettra_20140117.lte is tuned at (14.300,8.200) and tune feedback works with quadfamilies (Q2,Q3) ! elettra_20150630.lte is tuned at (XXX,XXX) and tune feedback works with quadfamilies (XXX,XXX) ! Elettra_M-bend_V6_20150116.lte is tuned at (XXX,XXX) and tune feedback works with quadfamilies (XXX,XXX) !----------------------------------------------------------------------------------------------------------------------------------------- &correct_tunes quadrupoles = "Q2_S* Q3_S*" tune_x = "(nux)" tune_y = "(nuy)" n_iterations = 100 correction_fraction = 0.1 max_correction_fraction = 0.9 step_up_interval = 0.1 tolerance = 1e-5 strength_log = "%s.qst" change_defined_values = 1 use_perturbed_matrix = 0 &end !------------------------------ ! Correct linear chromaticity !------------------------------ &chromaticity sextupoles = "SF_S* SD_S*" dnux_dp = "(chromx)" dnuy_dp = "(chromy)" correction_fraction = 0.8 n_iterations = 50 strength_limit = 60 strength_log = %s.ssl change_defined_values = 1 &end !------------------------------------------------------------- ! Compute closed orbit, just to be sure the optics is correct !------------------------------------------------------------- &closed_orbit output = %s.clo closed_orbit_accuracy = 1e-8 closed_orbit_iterations = 500 iteration_fraction = 0.1 &end !------------------------------------------------------------- ! Compute Twiss parameters !------------------------------------------------------------- &twiss_output filename="%s.twi" concat_order = "(order_transport)", higher_order_chromaticity = 1 quick_higher_order_chromaticity = 1 leading_order_driving_terms_only = 1 matched = 1, radiation_integrals = 1 output_at_each_step = 1, statistics = 1 &end &rf_setup filename = %.rf; set_for_each_step = 1; near_frequency = 499.654e6; total_voltage = 1.68e6 &end &bunched_beam &end &track center_on_orbit = 1 center_momentum_also = 1 &end &save_lattice filename = %s.new &end !********************************************************************************************************************************** ! Track particle with variable initial momentum offset in order to find out where the ! integer and half-integer resonances get crossed !********************************************************************************************************************************** &run_setup lattice = elettra0.new use_beamline = ring, rootname = elettra1 p_central = "(p_central)", default_order = "(order_transport)", final = %s.fin, semaphore_file = %s.done1 &end &alter_elements name=MAL, item=ON_PASS, value=0 &end &alter_elements name=MAL, item=DX, value=1e-6 &end &alter_elements name=MAL, item=DY, value=1e-6 &end &closed_orbit output = %s.clo closed_orbit_accuracy = 1e-8 closed_orbit_iterations = 500 iteration_fraction = 0.1 &end &run_control n_passes = 128 n_indices = 1 &end !------------------------------ ! Vary the initial momentum !------------------------------ &vary_element name=MAL, item=DP, initial="(momentum_minus)", final="(momentum_plus)", index_number=0, index_limit="(momentum_steps)" &end &twiss_output filename="%s.twi" concat_order = "(order_transport)", matched = 1, radiation_integrals = 1 output_at_each_step = 1, statistics = 1 &end !&rf_setup filename = %.rf; set_for_each_step = 1; near_frequency = 499.654e6; total_voltage = 1.68e6 !&end &bunched_beam &end &track center_on_orbit=1 center_momentum_also = 1; &end &save_lattice filename = %s.new &end !********************************************************************************************************************************** ! Track particle with variable horizontal initial amplitude in order to find out where the ! integer and half-integer resonances get crossed !********************************************************************************************************************************** &run_setup lattice = elettra0.new use_beamline = ring, rootname = elettra1a p_central = "(p_central)", default_order = "(order_transport)", final = %s.fin, semaphore_file = %s.done1 &end &alter_elements name=MAL, item=ON_PASS, value=0 &end &closed_orbit output = %s.clo closed_orbit_accuracy = 1e-8 closed_orbit_iterations = 500 iteration_fraction = 0.1 &end &run_control n_passes = 128 n_indices = 1 &end !------------------------------ ! Vary the initial momentum !------------------------------ &vary_element name=MAL, item=DX, initial="(xmin)", final="(xmax)", index_number=0, index_limit=21 &end &twiss_output filename="%s.twi" concat_order = "(order_transport)", matched = 1, radiation_integrals = 1 output_at_each_step = 1, statistics = 1 &end !&rf_setup filename = %.rf; set_for_each_step = 1; near_frequency = 499.654e6; total_voltage = 1.68e6 !&end &bunched_beam &end &track center_on_orbit=1 center_momentum_also = 1; &end &save_lattice filename = %s.new &end !********************************************************************************************************************************** ! Track particle with variable vertical initial amplitude in order to find out where the ! integer and half-integer resonances get crossed !********************************************************************************************************************************** &run_setup lattice = elettra0.new use_beamline = ring, rootname = elettra1b p_central = "(p_central)", default_order = "(order_transport)", final = %s.fin, semaphore_file = %s.done1 &end &alter_elements name=MAL, item=ON_PASS, value=0 &end &closed_orbit output = %s.clo closed_orbit_accuracy = 1e-8 closed_orbit_iterations = 500 iteration_fraction = 0.1 &end &run_control n_passes = 128 n_indices = 1 &end !------------------------------ ! Vary the initial momentum !------------------------------ &vary_element name=MAL, item=DY, initial="(ymin)", final="(ymax)", index_number=0, index_limit=21 &end &twiss_output filename="%s.twi" concat_order = "(order_transport)", matched = 1, radiation_integrals = 1 output_at_each_step = 1, statistics = 1 &end !&rf_setup filename = %.rf; set_for_each_step = 1; near_frequency = 499.654e6; total_voltage = 1.68e6 !&end &bunched_beam &end &track center_on_orbit=1 center_momentum_also = 1; &end &save_lattice filename = %s.new &end &stop &end