Home
User`s Manual for elegant
Contents
1. Flag indicating that correction should employ tracking of the beam distribution rather than a single particle This is valid for trajectory correction only closed_orbit_accuracy Accuracy of closed orbit computation closed_orbit_iterations Number of iterations of closed orbit computation closed_orbit_iteration_fraction Fraction of change in closed orbit to use at each iteration use_perturbed_matrix If nonzero specifies that prior to each correction elegant shall recompute the response matrix This is useful if the lattice is changing significantly between corrections disable If nonzero the command is ignored use_response_from_computed_orbits If nonzero in plane response matrices are com puted using differences of closed orbits which is slower but may be more accurate For cross plane matrices this is always the case 28 correction_matrix_output 6 14 correction_matrix_output e type setup action command e function provide output of the orbit trajectory correction matrix amp correction_matrix_output STRING response 4 NULL NULL STRING inverse 2 NULL NULL long KnL_units 0 long BnL_units 0 long output_at_each_step 0 long output_before_tune_correction 0 long fixed_length 0 long coupled 0 long use_response_from_computed_orbits 0 amp end e response Array of incomplete filenames for SDDS output of the x and y response ma trices plus the cross
2. and m be nc for meters seconds and the dimensionless momentum respectively spiffe r z pr pz pphi t where r and z are in meters pr yy pz 2 7 Po wry c and t is in seconds If this file is to be generated by the user use the units strings described above e n_particles_per_ring For spiffe data gives the number of particles to generate for each ring of charge e selection_parameter The name of a parameter in the SDDS file to be used for selection of pages of data 82 selection_string The value of the selection_parameter selection parameter required for a page to be used E g if one has a file from the shower program containing positrons electrons and photons one might want to select only the positrons one_random_bunch A flag indicating whether for spiffe data a new random distribution should be calculated for each step of the simulation reuse_bunch A flag indicating whether to use the bunch again or not If set then the first bunch in the file is used repeatedly for as many tracking steps as requested Otherwise each bunch is used only once and the number of steps is limited to the number of bunches e g the number of pages in the file when prebunched 0 prebunched A flag indicating if zero that the entire file is one bunch and otherwise that each page in the file is a different bunch sample_interval If non zero only every sample_interval particle is u
3. cos kuz 25 217 and B Bokuy cos kyz 26 In most cases this gives results that are very close to the exact fields at a savings of 10 in computation time This is the default mode e The ideal field By Bo cos kuz 27 B Bokuy cos kyz 28 This is about 10 faster than the leading order mode but less precise Also it does not include vertical focusing so it is not generally recommended The expressions for the laser field used by this element are from A Chao s article Laser Ac celeration Focussed Laser available on line at http www slac stanford edu achao LaserAccelerationFocussed pdf The implementation cov ers laser modes TEMij where 0 lt i lt 4and0 lt j lt 4 By default if the laser wavelength is not given it is computed from the resonance condition 1 sk 29 where y is the relativistic factor for the beam and K is the undulator parameter The adaptive integrator doesn t work well for this element probably due to sudden changes in field derivatives in the first and last three poles a result of the implementation of the undulator terminations Hence the default integrator is non adaptive Runge Kutta The integration accu racy is controlled via the N STEPS parameter N_STEPS should be about 100 times the number of undulator periods The three pole factors are defined so that the trajectory is centered about x 0 and x 0 with zero dispersion This would
4. STRING x or y RMS_NOISE M double RMS noise to add to position readings double ATI AL double a o double 0 0 Filter coefficient double 0 0 Filter coefficient GROUP string NULL Optionally used to assign an element to a group with a user defined name Group names will appear in the pa rameter output file in the col umn ElementGroup This element is used together with the TFBDRIVER element to simulate a digital transverse feedback system Each TFBPICKUP element must have a unique identification string assigned to it using the ID parameter This is used to identify which drivers get signals from the pickup A 15 term FIR filter can be defined using the AO through A14 parameters The input to the filter is the turn by turn beam centroid at the pickup location The output of the filter is simply oar aiCi where C is the position from 7 turns ago Note that De ai must be zero Otherwise the system will attempt to correct the DC orbit The output of the filter is the input to the driver A10 Filter coefficient 00 00 00 00 00 0 0 Filter coefficient 0 0 Fi 00 00 00 00 00 00 element s See Section 7 2 14 of Handbook of Accelerator Physics and Engineering Chao and Tigner eds for a discussion of feedback systems 295 TMCF 9 91 TMCF A numerically integrated accelerating TM RF cavity with spatially constant fields Parallel capable yes oe i PHASE S double 00
5. ek cos sin cos wt 79 cBy cB sind cBygcos 80 k p 2cos 6 1 A 2 i sad 81 The Lorentz force on an electron is F eE 2 ec x B giving Fz e B cBy 82 Fi e B cBy 83 F e E brcBy bycBz 84 270 We see that for p 0 we have E 0 Bz 0 and cBy Eo cos wt 85 Hence for wt 0 and Eg gt O we have Fy gt 0 This explains our choice of sign and phase convention above Indeed owing to the factor of 2 we have a peak deflection of eEoL E where L is the cavity length and E the beam energy Thus if V EoL is specified in volts and the beam energy expressed in electron volts the deflection is simply the ratio of the two As a result we ve chosen to parametrize the deflection strength simply by referring to the deflecting voltage V Explanation of lt filename gt lt x gt lt y gt format Several elements in elegant make use of data from external files to provide input waveforms The external files are SDDS files which may have many columns In order to provide a convenient way to specify both the filename and the columns to use we frequently employ lt filename gt lt x gt lt y gt format for the parameter value For example if the parameter value is waveform sdds t A then it means that columns t and A will be taken from file waveform sdds The first column is always the independent variable e g time position or frequency while the second column is the depe
6. 102 sddsanalyzebeam Analyzes a beam of macro particles and produces an SDDS file con taining beam moments emittances equivalent beta functions etc The beam file is of the type written by elegant using the output field of the run_setup command or the WATCH element Program by M Borland sddsbrightness Uses twiss parameter output or data from sddsanalyzebeam to compute undulator brightness curves Program by H Shang R Dejus M Borland X Jiao sddsemitproc Analyzes quadrupole scan emittance measurement data Accepts a file containing the transport matrix for each point and measured beam sizes The file may for example be the file produced by the final field of the run_setup command The quadrupole scan can be executed inside of elegant using vary_elements Program by M Borland sddsfindresonances Uses output from frequency map analysis to find and identify reso nance lines Program by H Shang M Borland sddsfluxcurve Uses twiss parameter output or data from sddsanalyzebeam to compute undulator flux tuning curves Program by M Borland H Shang R Dejus sddsmatchtwiss Transforms a beam of macro particles to match to given beta functions and dispersion The beam file is of the type written by elegant using the output field of the run_setup command or the WATCH element Program by M Borland sddsurgent Uses algorithms from the programs US by R Dejus and URGENT by R Walker for
7. Ov 06 and Ov 06 e betax Provide the horizontal beta function plus its chromatic derivative e alphax Provide the horizontal alpha function plus its chromatic derivative e etax Provide the first and second order horizontal dispersion 7 nx 0 nx 1 6 e etapx Provide the first and second order horizontal dispersion slope e alphac Provide the first and second order momentum compaction N B if you are tracking with an rf cavity be sure that your lattice length equal to the actual circumference See the example below An example of a good lattice for use with this feature is the following Actual length of the ring dO drift 1 30 6667 Actual rf voltage and frequency rf rfca 1 0 volt 30e3 phase 180 freq c_mks 30 6667 wi watch filename s wi mode centroid ring line d0O rf w1 Any additional elements e g wakes or impedances should follow d0 No other elements repre sented by a matrix should be present An alternative for using this command is to use ILMATRIX elements in the lattice definition This is more flexible since one can include tune shifts with amplitude 43 link_control 6 27 link_control e type setup command e function overall control of element parameter links amp link_control long clear_links 1 long summarize_links 0 long verbosity 0 amp end e clear_links Clear all previously set links e summarize_links Summarize all current
8. Second order driving terms due to sextupoles and chromatic effects of quadrupoles AOP TN 2009 020 J Bengtsson and J Irwin Analytical Calculations of Smear and Tune Shift SSC 232 Feb 1990 K Bane Corrugated Pipe as a Beam Dechirper SLAC PUB 14925 April 2012 329
9. ma owej SS Ba m double oO SC a owm o B5 m double oo SS Be ow o mooo owe o Ba m oe oo SC s owe oo SSS R54 Re m 0 SSS Ra omg SSCS Re im double 0 SSS Re omo SSS au om oe oo SSCS mao f fo SCS ma m oe o SSS m o m oe oo SSS T132 _ double oo SSCS ms im double oo SS wa fogo SSS ma m oe o SSS mwa omego SSS ma m foe o SSS eo m oe o SS m foo SSS me m oe oo SSCS aao fo SSS E double 00 SS Tigi foe SSS me m oe o SSS 174 EMATRIX continued Explicit matrix input with data in the element definition rather than in a file ries oui foo SOS mea m lone o SS mes f doe oo SSS me a foe oo SSS Peta double oO SS Prat m double 00 SSS pride SSS presi double oO SS pres m double oO SS Tass S dAM double 00 SSS Pret 1 M double 00 SSS rai dowe oo OSS PTs m doe o SS ma fo POSS e E oO SSS ma m doe oo SSS A 00 SSS ma im double oo SSS A 00 SS e SSS m double oo SOS m m doe o SOS maa i oeo OSS e double oof SSS e S u m oe oo SSS e E a OSC m2 m owe oo SOS ar um doe oo SOS ma Moe oo SOS T33 m doe o SOS mao doubiefoo SOS me m foe o SSS mea owe oo SOS ma owe oo SSS S SSS 175 EMATRIX continued Explicit matrix input with data in the element definition rather than in a file rTs2 double foo PSS Tsss__ spM_ double oof SSS ma dowe oo S SS e SOS m f
10. tag To perform substitution use the syntax elegant inputfile pipe in macro tag1 valuei tag2 value2 When using this feature it is important to substitute the value of rootname in run_setup so that one can get a new set of output files assuming use of the suggested s field in all the output file names One may give the macro option any number of times or combine all substitutions in one option The name of the input file is available using the macro INPUTFILENAME elegant also allows execution of commands in the shell as part of evaluation of a namelist field To invoke this one encloses the commandline string in curly braces E g betax sdds2stream parameter betaxFinal data twi Note that the quotes are also required In this example betax is assigned the value of the parameter betaxFinal from the file data twi Frequently the commandline RPN calculator rpni is also used in this way for example betax rpnl 8 pi 2 assigns the value 8 27 to betax One possible pitfall with using rpn1 in this fashion is interpre tation of the multiplication symbol as a file wildcard by the shell For this reason the alternate multiplication operator mult is preferred e g betax rpnl 8 pi mult rather than betax rpnl 8 pi We used the program rpn1 in these examples because it is perhaps familiar However versions 17 4 and later allow direct evaluation of RPN expressions in commands whenever
11. 3 long higher_order_chromaticity 0 long higher_order_chromaticity_points 5 double higher_order_chromaticity_range 4e 4 double chromatic_tune_spread_half_range 0 long quick_higher_order_chromaticity 0 double beta_x 1 double alpha_x 0 double eta_x 0 double etap_x 0 double beta_y 1 double alpha_y 0 double eta_y 0 double etap_y 0 STRING reference_file NULL STRING reference_element NULL long reference_element_occurrence 0 long reflect_reference_values 0 long cavities_are_drifts_if_matched 1 long compute_driving_terms 0 long leading_order_driving_terms_only 0 long local_dispersion 1 filename The incomplete name of an SDDS file to which the Twiss parameters will be written Recommended value s twi matched A flag indicating if set that the periodic or matched Twiss parameters should be found output_at_each_step A flag indicating if set that output is desired at each step of the simulation output_before_tune_correction A flag indicating if set that output is desired both before and after tune correction 93 final_values_only A flag indicating if set that only the final values of the Twiss pa rameters should be output and not the parameters as a function of s statistics A flag indicating if set that minimum maximum and average values of Twiss parameters should be computed and included in output radiation_
12. Group names will appear in the pa rameter output file in the col umn ElementGroup 146 CLEAN 9 7 CLEAN Cleans the beam by removing outlier particles Parallel capable yes Defaul MODE STRING stdeviation stdeviation absdeviation or a Ae ete a xm om oo tiit tore SS n fao o0 imio yim fome 00 Limit ory orn foe o0 ioy TLIMIT e doube double 00 Limit for t am e o or GROUP string NULL Optionally used to assign an element to a group with a user defined name Group names will appear in the pa rameter output file in the col umn ElementGroup 147 CORGPIPE 9 8 CORGPIPE A corrugated round pipe commonly used as a dechirper in linacs Parallel capable yes Defaul M f dobre Tength period of corrugations lt lt ra dius recommended GAP M double gap in corrugations lt period required DEPTH a A depth of corrugations lt lt ra dius gt period recommended DT S double maximum time duration of TMAX S double EN time duration of N_BINS long kA o bins for charge his NRPA foe fo interpolate wat SMOOTHING long Use Savitzky Golay filter to SG HALFWIDTH long 4 Savitzky Golay filter half SG_ORDER long 1 Savitzky Golay filter order for CHANGE_PO J long jo change central momentum eee LONG ol ea ee allow beam longer than wake data GN PASSES i Number of passes over which to linearly ramp up the wake to full strength GROUP stri
13. NULL STRING match_parameter_value NULL long use_row 1 long use_page 1 long load_parameters 0 amp end This command is used to facilitate multi stage optimization runs by allowing convenient loading of data from SDDS files into RPN variables For example one may match the final Twiss parameters of a lattice to the parameters stored in an SDDS file from a different run e tag Option string that will be pre pended to the names of all the numerical columns in the file in order to create RPN variable names E g if the input file was from the twiss_output command and tag twi was given then RPN variables tw1 betax tw1 alphax etc would be used N B If the tag is blank then nothing is appended to the names from the file This can be dangerous since the names may conflict with the names of other variables e filename The incomplete name of the SDDS file from which to read data By default data is taken from all columns from the last row of the last page of the file This default behavior can be altered using one or more of the following parameters match_column The name of a string column to use in selecting the row from which data will be taken match_column_value The value that the column named by match_column must have to be selected from the file By default the last row with a matching value is used matching_row_number If a nonnegative value is given then the matching_row_numb
14. STRING type NULL STRING exclude NULL double value 0 STRING string_value NULL long differential 0 long multiplicative long verbose 0 long allow_missing_elements 0 long allow_missing_ parameters 0 long start_occurence 0 long end_occurence 0 double s_start 1 double s_end 1 STRING before NULL STRING after NULL 0 name A possibly wildcard containing string giving the names of the elements to alter If not specified then one must specify type item The name of the parameter to alter type A possibly wildcard containing string giving the names of element types to alter May be specified with name or by itself exclude A possibly wildcard containing string giving the names of elements to excluded from alteration value string_value The new value for the parameter Use string_value only if the parameter takes a character string as its value differential If nonzero the new value is the predefined value of the parameter plus the quantity given with value multiplicative If nonozero the new given value is the predefined value of the parameter times the quantity given with value verbose If nonzero information is printed to the standard output describing what elements are changed 13 allow_missing_elements If nonzero then it is not an error if an element matching name does not exist Normally such an occurence is an error and termin
15. Second one can use a series of dipoles with the same name In this case elegant automatically turns off interior edge effects This is true when the dipole elements directly follow one another or are separated by a MARK element Third one can use a series of dipoles with different names In this case you must also use the EDGE1_EFFECTS and EDGE2_EFFECTS parameters to turn off interior edge effects 153 CSRCSBEND 9 10 CSRCSBEND Like CSBEND but incorporates a simulation of Coherent Synchrotron radiation Parallel capable yes PM oo are Tengen ANGIE RAD double 0 0 bend angle PKI m aoe 0 0 geomet quadnapoTestrenth Ko a aube 0 0 geomet sextupole strength Ko M ome 00 geometric octupole sirength Ke m aube 0 0 geometric decapole strength PKs m aoe 0 0 weometrie T2 pole strength PK m aoue 0 0 weometrie Tpote strength Koo m aoue 0 0 weometrie 16 pote strength Ke 1 aoe 0 0 geometric 18 pole strength E2 RAD double 0 0 exit edgen RAD double rotation about incoming longi OS ee I double 00 entrance poleTace anvar IM double 0 0 exit pole face curvature C double 00 half gap between poles double 0 5 edge field integral r double 00 misalignment M aombe 00 isalignment m double 0 0 mistem double 0 0 fractional strength error RAD double error rotation about incoming longitudinal axis NKOS o a number otid NONLINEAR lon
16. for occurrence N of the defined element Element a series of symbols are created of the form Element N quantity where quantity has the following values The quantity pCentral will be available giving the reference value of Gy at the marker location The quantities Cx Cxp Cy Cyp Cs and Cdelta will be available giving coordinate centroid values from tracking to the marker location The quantities Sx Sxp Sy Syp Ss and Sdelta will be available giving coordinate rms values x ai at the marker location from tracking The quantity Particles will be available giving the number of particles tracked to the marker location The quantities sij will be available giving x x xj a at the marker location where 1 lt i lt 6andi lt 7 lt 6 The quantities betaxBeam alphaxBeam betayBeam and alphayBeam which are the twiss parameters computed from the beam moments obtained by tracking will be available The quantities Rij will be available for 1 lt i lt 6 and 1 lt j lt 6 giving the accumulated first order transport matrix to the marker location 223 e If the default matrix order as set in run_setup is 2 or greater the quantities Tijk will be available for 1 lt i lt 6 1 lt j lt 6 and 1 lt k lt j giving the accumulated second order transport matrix to the marker location e If Twiss parameter calculations are being performed via twiss_output with output_at_each_step 1
17. m ff aombe 0 0 exit pote face curvature Heap ar double 00 halEgup between poles PRINT _ double fos edge fieXd integral Dx m ae oo misaligment of entrance DY i toute oo misalignment of entrance bz m ane 0 0 misalignment of entrance CFSE aoe 0 0 fractional strength error ETILT RAD double error rotation about incoming case aa cn ig ie EDGELEFFECTS Tong I ineinde entrance edge effets EDGE EFFECTS Tong 1 ineinde exit edge effects FORDER Tong mini onder PEDGE ORDER Tong o edge matrix order TRANSPORT long use incorrect TRANSPORT equations for T436 of edge USE_BN long use B1 and B2 instead of K1 and K2 values Pe eeed Bowe K1 B1 rho where rho is bend radius Wa bani aE ekoo string NULL Oriona used to assign an element to a group with a user defined name Group names will appear in the pa rameter output file in the col umn ElementGroup When adding errors care should be taken to choose the right parameters The FSE and ETILT parameters are used for assigning errors to the strength and alignment relative to the ideal values given by ANGLE and TILT One can also assign errors to ANGLE and TILT but this has a different 251 meaning in this case one is assigning errors to the survey itself The reference beam path changes so there is no orbit trajectory error The most common thing is to assign errors to FSE and ETILT Note that when adding errors t
18. showCoordinates Gives list of element types with optional wildcards for which the local coordinate system will be shown in the viewer Default MARK WATCH e author A Petrenko BINP 134 8 Accelerator and Element Description As mentioned in the introduction elegant uses a variant of the MAD input format for describing accelerators With some exceptions the accelerator description for one program can be read by the other with no modification Among the differences e elegant does not support the use of MAD style equations to compute the value of a quantity The link_elements namelist command can be used for this purpose and is actually more flexible than the method used by MAD Also rpn style equations may be given in double quotes these are evaluated once only when the lattice is parsed e elegant does not support substitution of parameters in beamline definitions e elegant contains many elements that MAD does not have such as kick elements wake fields and numerically integrated elements e The length of an input line is not limited to 80 characters in elegant as it is in MAD However for compatibility any lattice created by elegant will conform to this limit e The maximum length of the name of an element or beamline is 100 characters elegant s lattice parser translates all input into upper case except where the input is protected by double quotes However various commands such as vary_element or lin
19. umn ElementGroup 256 RFCA 9 70 RFCA A first order matrix RF cavity with exact phase dependence Parallel capable yes 257 M VOLT ae double 0 0 peak voltage ome foo m E a a cavity Q for cavity that charges up to given voltage from 0 phase reference number to link with other time dependent elements does cavity change central mo eee E i ill T e to 1 T long runs to avoid F aE eae aa mode for determining fidu cial arrival time light tmean first pmaximum END1_FOCUS long ff Os include focusing at entrance END2_FOCUS f long long oo include focusing at exit BODY_FOCUS_MODEL STRING NULL None default or SRS sim plified Rosenzweig Serafini for standing wave N_KICKS long Number of kicks to use for kick method Set to zero for matrix method aS e O 7 PREFERENCE le time of reference parti LINEARIZE e a seal yd phase dependence LOCK_PHASE long Lock phase to given value re gardless of bunch centroid mo tion GROUP string NULL Optionally used to assign an element to a group with a user defined name Group names will appear in the pa rameter output file in the col umn ElementGroup The phase convention is as follows assuming a positive rf voltage PHASE 90 is the crest for acceleration PHASE 180 is the stable phase for a storage ring above transition without energy losses The body focusing model is based on Rosenzweig and Serafini Phys Re
20. 1 CELL LINE W1 Q1 D 2 Q2 D Q1 BL LINE 100 CELL The element W1 appears 100 times Each instance will result in a new file being produced Successive instances have names like rootname 001 w1 rootname 002 w1 rootname 003 w1 and so on up to rootname 100 w1 If instead of 03ld you used ld the names would be rootname 1 w1 rootname 2 w1 etc up to rootname 100 w1 This is generally not as convenient as the names don t sort into occurrence order The files can easily be plotted together as in sddsplot column t p w1l graph dot separate They may also be combined into a single file as in sddscombine w1 all w1 In passing note that if W1 was defined as W1 WATCH FILENAME s wl or W1 WATCH FILENAME output w1 only a single file would be produced containing output from the last instance only N B confusion sometimes occurs about some of the quantities related to the s coordinate in this file when in parameter mode Please see Section 4 above 317 WIGGLER 9 105 WIGGLER A wiggler or undulator for damping or excitation of the beam Parallel capable yes CM double 00 om SCS RADIUS M double Peak bending radius Ignored fe eee eee double Dimensionless strength pa rameter ae T Peak vertical magnetic field ee eres Ignored if K is non negative BX aoe 0 Misaligments o DY donb oo Misaligment Dz done 00 Misal
21. 1 on run_setup 94 compute_driving_terms If nonzero then resonance driving terms 29 B6 37 and tune shifts with amplitude are computed by summing over dipole quadrupole sextupole and octupole elements For dipoles only the effects of gradients and sextupole terms are included curvature effects are not present in the theory In addition these quantities may be optimized by using those names in optimization terms see list below leading_order_driving_terms_only If nonzero only the leading order driving terms are computed I e terms involving double sums over sextupole and quadrupole strengths are not computed However leading order octupole terms are computed even though they affect the same terms as the second order sextupole and quadrupole terms This option is provided because computing the higher order terms is time consuming and not always worthwhile local_dispersion Normally elegant will ignore acceleration in computing the disper sion That is the dispersion would be the local dispersion oe where 6 was the local fractional momentum deviation In a linac or other systems with rf elements one might also be interested in the global dispersion 2 where o is the energy deviation at the beginning of the system In this case set local_dispersion 0 Alternatively one may look at the Rig elements of the matrix from matrix_output The output file from this command contains the following columns gi
22. BMAPXY 9 2 BMAPXY A map of Bx and By vs x and y Parallel capable yes M doube 00 Tength Sme N jean LL ie er lee by which to multiply fe lee ha Seta el ol veshnanelinael METHOD ULL STRING NULL integration method runge kutta bulirsch stoer modified midpoint two pass modified midpoint leap frog non adaptive runge kutta FILENAME NULL STRING NULL name of file containing columns x y Fx Fy giving normalized field Fx Fy vs x y Ree fea LL ana fever rpn expression for Fx in terms i ULL STRING NULL rpn expression for Fy in terms por er ter GROUP string NULL Optionally used to assign an element to a group with a user defined name Group names will appear in the pa rameter output file in the col umn ElementGroup This element simulates transport through a transverse magnetic field specified as a field map It does this by simply integrating the Lorentz force equation in cartesian coordinates It does not incorporate changes in the design trajectory resulting from the fields I e if you input a dipole field it is interpreted as a steering element The field map file is an SDDS file with the following columns e x y Transverse coordinates in meters units should be m e Fx Fy Normalized field values no units The field is multiplied by the value of the STRENGTH parameter to convert it to a local bending radius For example if Fx y and Fy x then STRENG
23. D 2 Q2 D Q1 BL LINE 100 CELL The element H1 appears 100 times Each instance will result in a new file being produced Successive 193 instances have names like rootname 001 h1 rootname 002 h1 rootname 003 h1 and so on up to rootname 100 h1 If instead of 03ld you used ld the names would be rootname 1 h1 rootname 2 h1 etc up to rootname 100 h1 This is generally not as convenient as the names don t sort into occurrence order The files can easily be plotted together as in sddsplot column dt dtFrequency 7 h1 separate They may also be combined into a single file as in sddscombine h1 all h1 In passing note that if H1 was defined as Hi HISTOGRAM FILENAME s h1 or H1 HISTOGRAM FILENAME output hi only a single file would be produced containing output from the last instance only 194 HKICK 9 28 HKICK A horizontal steering dipole implemented as a matrix up to 2nd order Parallel capable yes Type M KICK RA 1 M a E TILT RAD double rotation about longitudinal B2 double normalized sextupole strength kick KICK 1 B2 x2 when y 0 S 7 long 0 include edge effects Fong o marro EDGE EFFECT ORDER a STEERING iong 1 use for steering _ _ s SYNCH_RAD long include classical synchrotron ice A na ec ISR long include incoherent syn chrotron radiation scatter ing LERAD doub
24. INPUTFILE con S ining timo date WXCOLUMN STRING NULL column in INPUTFILE con taining x Green function WYCOLUMN STRING NULL column in INPUTFILE con taining y Green function CHARGE C double beam charge or use CHARGE element FACTOR double 1 factor by which to multiply both wakes XFACTOR double 1 factor by which to multiply x wake 128 1 1 YFACTOR double 1 factor by which to multiply y wake number of bins for current his togram N BINS INTERPOLATE lng o interpolate wake SMOOTHING long Use Savitzky Golay filter to smooth current histogram SG HALFWIDTH long 4 Savitzky Golay filter half width for smoothing double 00 TILT RAD double X_DRIVE_EXPONENT long Exponent applied to x coordi Tine tte pres o Y_DRIVE_EXPONENT long Exponent applied to y coordi O Eine era pric o Savitzky Golay filter order for smoothing misalignment misalignment rotation about longitudinal X_PROBE_EXPONENT long Exponent applied to x coordi ee ee Y_PROBE_EXPONENT long Exponent applied to y coordi MaS A a 300 TRWAKE continued Transverse wake specified as a function of time lag behind the particle Default RAMP_PASSES long Number of passes over which to linearly ramp up the wake to full strength GROUP string NULL Optionally used to assign an element to a group with a user defined name Group names will appear in the pa rameter output file in the col umn ElementGro
25. Limits of grid of initial y coordinates for tracking ymin should typically be a small positive value so that there is some betatron oscillation from which to get the tune delta_min delta_max Limits of grid of initial 6 coordinates for tracking Not that particles are not centered around the dispersive closed orbit Hence the tracking is appropriate to simulation of dynamics from a touschek scattering event nx Number of values of x coordinate in the grid ny Number of values of y coordinate in the grid ndelta Number of values of coordinate in the grid verbosity If nonzero prints possibly useful information while running include_changes If nonzero then computes not only the tunes but also the changes in the tunes This is expressed in terms of the diffusion which is defined as d log Av Avj 1 Use of this feature results in a doubling of the number of turns tracked 39 global_settings 6 23 global_settings amp glo amp end type action command function change global settings bal_settings long inhibit_fsync 0 long echo_namelists 1 STRING log_file NULL STRING error_log file NULL long mpi_randomization_mode 1 inhibit_fsync By default elegant forces file synchronization across a network file system to ensure that users see up to date files as soon as possible In cases where a great deal of output is generated this can degrade performance Setting
26. The first four values pertain to the reference momentum JX JY and JDELTA may also be given although the defaults work for typical lattices In automatic initialization the user turns on the radiation integral feature in twiss_output causing elegant to automatically compute the above quantities This will occur only if PREF 0 The COUPLING parameter can be used to change the partitioning of quantum excitation between the horizontal and vertical planes Because the radiation integrals computation in twiss_output pertains to the horizontal plane only the user must supply either EYREF or COUPLING if non zero vertical emittance is desired The user may elect to turn off some aspects of the synchrotron radiation model These should be changed from the default values with care e DAMPING Default is 1 If set to 0 then no radiation damping effects will be included More precisely it is equivalent to setting JX JY JDELTA 1 Damping still occurs at any rf cavities since elegant works in trace space e QEXCITATION Default is 1 If set to 0 then no quantum excitation effects are included which is to say that all particles will experience the same perturbation e LOSSES Default is 1 If set to 0 no average energy losses are included There are a number of caveats that must be observed when using this element 1 If there is dispersion at the location of the SREFFECTS element the closed orbit will change because of the average mome
27. accomplished using the optimization_mode parameter Re gardless of which parameter is present unless the parameter is given a value of 1 the command operates in action mode Further if the command is used in setup mode and no relevant action command is present later in the file then the requested will not be performed Typically one wants to use these switchable commands in setup mode whenever one is simulating random errors performing a parameter scan or performing optimization When in setup mode the indicated computations will be performed repeatedly e g for each set of errors for each step in the parameter scan or for use in each evaluation of the optimization penalty function 10 6 4 Table of elegant commands and their functions alter_elementd6 5 action Change an element parameter from the command file amplification_factord6 6 Compute orbit amplification functions analyze_ma major Determine first order matrix from track y J action ing aperture_datd6 5 Define aperture using an SDDS file bunched_bean 6 9 Set up beam generation change_particld6 10 action Change the type of particle Default is electron Correct the chromaticity closed_orbit6 12 Compute the closed orbit Correct the orbit or trajectory action setup Obtain orbit trajectory correction matrix in a file Correct the tines coupled_twiss_output6 16 setup action Compute and output coupled twiss pa rameters divide_elementd6 17 Spec
28. adding errors to FSE the error is assumed to come from the power supply which means that multipole strengths also change Special note about splitting dipoles when dipoles are long it is common to want to split them into several pieces to get a better look at the interior optics When doing this care must be exercised not to change the optics elegant has some special features that are designed to reduce or manage potential problems At issue is the need to turn off edge effects between the portions of the same dipole First one can simply use the divide_elements command to set up the splitting Using this command elegant takes care of everything Second one can use a series of dipoles with the same name In this case elegant automatically turns off interior edge effects This is true when the dipole elements directly follow one another or are separated by a MARK element Third one can use a series of dipoles with different names In this case you must also use the EDGE1_EFFECTS and EDGE2_EFFECTS parameters to turn off interior edge effects 279 SCATTER 9 81 SCATTER A scattering element to add gaussian random numbers to particle coordinates Parallel capable yes XM double 0 0 rms scattering vd Torx eo m double 0 0 ms scattering level frx yo a dube 0 0 rms scattering level fory pe ees double rms scattering level for pCentral pCentral PROBABILITY Peed Probability that any particle Eo be selected for sc
29. any particle POOL O TE Prat sett Tor scasterine GROUPID long 1 Group ID number nonnega tive integer for linking once per particle behavior of multi ple elements RANDOMSIGN long If non zero then the scatter is given a random sign Useful if distribution data is one sided LIMITPERPASS long 1 Maximum number of particles that will be scattered on each pass LIMITTOTAL long 1 Maximum number of particles that will be scatter for each step PDFNAME STRING NULL Name of column containing the probability distribution function data 168 DSCATTER continued A scattering element to add random changes to particle coordinates according to a user supplied distribution function STARTONPASS ACEN Pass number to start on ees Maa a number to end on inclu sive Ignored if negative A tina NULL Optionally used to assign an element to a group with a user defined name Group names will appear in the pa rameter output file in the col umn ElementGroup 169 ECOL 9 15 ECOL An elliptical collimator Parallel capable yes cM double 00 lmgth XMAX____ M__ double 0 0___ haltaxismx YMA M do 00 hafaisiny Dx m ioe 00 misalignment DY M f double 00 misdienmen OPEN_SIDE STRING NULL which side if any is open x X y y EXPONENT long 2 Exponent for boundary equa tion 2 is ellipse YEXPONENT long y exponent for boundary equa tion 2 is ellipse If 0 defaults to EXPONE
30. beamline one pass only and beam loss information is recorded e notes A momentum aperture file is required previous using this command It should contain momentum aperture at least at each TSCATTER element and can be obtained by running momentum_aperture command The simulation can be done for a Gaussian distributed beam or an arbitrary particle distribution given by histogram file s See MHISTOGRAM When using histogram file as input it should contain data at least at each TSCATTER element This can be done by inserting a MHISTOGRAM element following each TSCATTER element With lumped 1 option a multi page SDDS file will be output automatically or you can combine individual output file into a multi page SDDS file before using this command The input particle distribution can be given in 3 ways 2D x x 2D y y 2D dt dp or 4D x x y y 2D dt dp or 6D x x y y dt dp base on user s choice We recom mend to use lower order histogram table if the original particle number which used to generate these table is not large enough The emit_ emit_dp and sigma_s is always required for running the simulation Used for Piwinski s rate Use closed value when simulate a non Gaussian distributed bunch amp touschek_scatter double charge 0 double frequency 1 double emit_x 0 double emit_nx 0 double emit_y 0 double emit_ny 0 double sigma_dp 0 double sigma_s 0 doubl
31. been changed The default mode has now been changed mode 3 see the documentation for global_settings Updated to get the correct latest result from genetic optimization by using the right popula tion group Improved population log file for multiple restarts Changes to Related Programs and Files The scripts radiationEnvelope was added It allows computing the envelope over harmon ics of brightness and flux tuning curves such as those obtained from sddsbrightness and sddsfluxcurve The program sddsfluxcurve now computes the flux in the central cone if computation of the flux density is requested The programs ibsEmittance and touschekLifetime now accept an argument giving the vertical emittance Known Bugs Problems and Limitations Setting CHANGE_T 1 on RFCA and RFCW elements can give invalid results when tracking beams with very large time spread compared to the bunch length Twiss output contains entries for the higher order dispersion tune shifts with amplitude higher order chromaticity and tune spreads due to chromaticity and amplitude even when these are not calculated which is potentially misleading The values are zero when the calcu lation is not requested Computation of closed orbits and Twiss parameters will not always include the effects of synchrotron radiation losses when these are imposed using SREFFECTS elements See the documentation for SREFFECTS for details Computation of beam moments does not include sy
32. end_name NULL double s_start 1 double s_end 1 STRING tag NULL long verbosity 0 long clear 0 amp end e match_name Optional wildcard string to match to element names for selection of elements to inculde in the analysis e start_name Name of the element at which to start analysis If the element occurs more than once the first occurrence is used e end_name Name of the element at which to end analysis If the element occurs more than once the first occurrence is used e s_start Position in meters at which to start analysis e s_end Position in meters at which to end analysis e tag Name prefix for quantities computed by the analysis The quantity names will have the form tag statistic quantity where statistic is one of min max and ave and quantity is one of betax betay etax etay alphax alphay etaxp and etayp E g if tag is region1 then one could use expressions like region1 max betax in optimization e clear If nonzero all previously defined analysis regions are deleted 92 twiss_output 6 59 twiss_output amp twi amp end type action setup command function compute and output uncoupled Twiss parameters or set up to do so ss_output STRING filename NULL long matched 1 long output_at_each_step 0 long output_before_tune_correction 0 long final_values_only 0 long statistics 0 long radiation_integrals 0 long concat_order
33. exit edge effects FORDER Tong mini onder PEDGE ORDER Tong o edge matrix order TRANSPORT long use incorrect TRANSPORT equations for T436 of edge USE_BN long use B1 and B2 instead of K1 and K2 values Pe eeed Bowe K1 B1 rho where rho is bend radius Wa bani aE ekoo string NULL Oriona used to assign an element to a group with a user defined name Group names will appear in the pa rameter output file in the col umn ElementGroup Some confusion may exist about the edge angles particularly the signs For a sector magnet we have of course E1 E2 0 For a symmetric rectangular magnet E1 E2 ANGLE 2 If ANGLE is negative then so are E1 and E2 To understand this imagine a rectangular magnet with positive 278 ANGLE If the magnet is flipped over then ANGLE becomes negative as does the bending radius p Hence to keep the focal length of the edge 1 f tan E p constant we must also change the sign of Ei When adding errors care should be taken to choose the right parameters The FSE and ETILT parameters are used for assigning errors to the strength and alignment relative to the ideal values given by ANGLE and TILT One can also assign errors to ANGLE and TILT but this has a different meaning in this case one is assigning errors to the survey itself The reference beam path changes so there is no orbit trajectory error The most common thing is to assign errors to FSE and ETILT Note that when
34. frequency while the second column is the dependent quantity 322 ZTRANSVERSE 9 107 ZTRANSVERSE A simulation of a single pass broad band or functionally specified transverse dipole impedance Parallel capable yes Defaul CHARGE double beam charge or use CHARGE element BROAD_BAND lng long ooo broad band impedance PRS Om double 0 0 shunt impedance Ra 2 R double 0 0 feanityQ Ce FREQ Hz double frequency eee TE Pee Tato nanny INPUTFILE STRING NULL name of file na T ee Lee Geka bape FREQCOLUMN foe NULL column in a ILE con eee e ZXREAL STRING NULL column in INPUTFILE con taining real impedance for x ZXIMAG STRING NULL column in INPUTFILE con taining imaginary impedance for x plane ZYREAL STRING NULL column in INPUTFILE con taining real impedance for y plane ZYIMAG STRING NULL column in INPUTFILE con taining imaginary impedance for y plane BIN e ieee a size for current histogram use 0 for autosize INTERPOLATE Waa K a E N_BINS long 128 number of bins fot current his tan MAX_N_BINS long Maximum number of bins for ee PDP toga SMOOTHING long Use Savitzky Golay filter to Pe ieee ie smooth current histogram SG_ORDER long 1 Savitzky Golay filter order for SG_HALFWIDTH long 4 Savitzky Golay filter DX m o 00 Pimisalignment id 323 ZTRANSVERSE continued A simulation of a single pass broad band or functionally specified transverse dipole impe
35. in put filename and o to repre sent the output filename ae l CSH long Use C shell for execution may VERBOSITY ee ed Set the verbosity level START_PASS long 1 Start script action on this pass Before that behaves like a drift space ON_PASS long 1 Perform script action only on this pass Other than that be haveslike a drift space DIRECTORY STRING NULL Directory in which to place in put and output files If blank the present working directory is used ROOTNAME STRING NULL Rootname for use in naming input and output files s may be used to represent the run FP rene fafa KEEP_FILES long If nonzero then script in put and output files are not deleted after use By default they are deleted DRIFT_MATRIX long If nonzero then for matrix calculations the element is treated as a drift space 283 SCRIPT continued An element that allows transforming the beam using an external script Units Default USE_PARTICLE_ID long If nonzero then the output file should use the original particle ID NO_NEW_PARTICLES If nonzero then no new parti cles will be added in the script output file User defined numerical pa rameter for command substi tution for sequence np0 User defined numerical pa rameter for command substi tution for sequence np1 User defined numerical pa me double rameter for command substi tution for sequence np2 double User defined numerical pa rameter for command s
36. in the form amp lt namelist name gt lt variable name gt lt value gt lt array name gt lt index gt lt value gt lt value gt amp end The square brackets enclose an optional component Not all namelists require variables to be given the defaults may be sufficient However if a variable name is given it must have a value Values for STRING variables must be enclosed in double quotation marks Values for double variables may be in floating point exponential or integer format exponential format uses the e character to introduce the exponent Array variables take a list of values with the first value being placed in the slot indicated by the subscript As in C the first slot of the array has subscript 0 not 1 The namelist processor does not check to ensure that one does not put elements into nonexistent slots beyond the end of the array doing so may cause the processor to hang up or crash Wildcards are allowed in a number of places in elegant and the SDDS Toolkit The wildcard format is very similar to that used in UNIX e stands for any number of characters including none e stands for any single character e lt list of characters gt stands for any single character from the list The list may include ranges such as a z which includes all characters between and including a and z in the ASCII character table The special characters and are entered
37. loss per turn 71 6 44 replace_elements replace_elements type action command function Replace old element with a newly defined element or just remove it from beamline This is a convenient way to modify lattice in an elegant run notes The modified lattice can be saved through save_lattice command Be sure to use output_seq 1 option in that command warning The element s occurrence is re calculated after each usage of this command If you need to repeat this command for SAME named element several times you have to re calculate it occurrence every time For example you want to remove Q1 at occurrence position 1 3 5 and use replace_elements twice If in the first command you use occurence 0 1 3 then in the second command you have to use occurence 0 3 since after remove of 1 3 Qls the 5th Q1 now becoming 8rd Q1 amp replace_elements amp end STRING name NULL STRING type NULL STRING exclude NULL long skip 1 long disable 0 STRING element_def NULL long total_occurrences 0 long occurrence 100 0 name Possibly wild card containing string specifying the name of the elements to be re moved or replaced type Possibly wild card containing string specifying the type of the elements to be removed or replaced exclude Possibly wild card containing string specifying the name of elements to be ex cluded from this command skip The element is
38. matrices this is always the case 29 correct_tunes 6 15 correct_tunes amp cor amp end type setup command function set up for correction of the tunes rect_tunes STRING quadrupoles NULL double tune_x 0 double tune_y 0 long n_iterations 5 double correction_fraction 0 9 double tolerance 0 long step_up_interval 0 double max_correction_fraction 0 9 double delta_correction_fraction 0 1 STRING strength_log NULL long change_defined_values 0 long use_perturbed_matrix 0 quadrupoles List of names of quadrupoles to be used Only two may be given tune_x tune_y Desired x and y tune values If not given the desired values are assumed to be the unperturbed tunes n_iterations The number of iterations of the correction to perform correction_fraction The fraction of the correction to apply at each iteration tolerance When both tunes are within this value of the desired tunes the iteration is stopped step_up_interval Interval between increases in the correction fraction max_correction_fraction Maximum correction fraction to allow delta_correction_fraction Change in correction fraction after each step_up_interval steps strength_log The incomplete name of a SDDS file to which the quadrupole strengths will be written as correction proceeds Recommended value s qst change_defined_values Changes the defined values of the qua
39. no such assumption is made N B at present this element is not presently included in beam moments computations via the moments_output command This element was requested by W Guo BNL who also assisted with the implementation and debugging 310 VKICK 9 101 VKICK A vertical steering dipole implemented as a matrix up to 2nd order Parallel capable yes KICK kick strength TILT leeches rotation about longitudinal B2 1 M double CALIBRATION EDGE_EFFECTS ORDER axis normalized sextupole strength kick KICK 1 B2 y2 include classical synchrotron radiation include incoherent syn chrotron radiation scatter ing SYNCH_RAD GROUP string NULL Optionally used to assign an element to a group with a user defined name Group names will appear in the pa rameter output file in the col umn ElementGroup vo vo o o 311 VMON 9 102 VMON A vertical position monitor accepting a rpn equation for the readout as a function of the actual position y Parallel capable yes IOo m om 00 om D m oe 00 misalignment ___ s DY m ioe 00 misiem SSS PWEIGHT doube 1 weight in correction ____ TILT ee ee rotation about longitudinal axis CALIBRATION double i calibration factor for readout ORDER long 0 matrix onder READOUT STRING NULL rpn expression for readout ac tual position supplied in vari able y CO_FITPOINT long If nonzero then
40. number re eee LASER_N long laser vertical mode number Bee ed SYNCH_RAD ae classical synchrotron A A long o Include quantum excitation include quantum excitation excitation ae 2a ORT co ULL ee a lt filename gt lt x gt lt y gt form specification of input file giv ing time dependent modula tion of the laser electric and magnetic fields TIME_OFFSET S double 0 0 Time offset of the laser profile GROUP string NULL Optionally used to assign an element to a group with a user defined name Group names will appear in the pa rameter output file in the col umn ElementGroup This element simulates a planar undulator together with an optional co propagating laser beam that can be used as a beam heater or modulator The simulation is done by numerical integration of the Lorentz equation It is not symplectic and hence this element is not recommended for long term tracking simulation of undulators in storage rings The fields in the undulator can be expressed in one of three ways The FIELD_EXPANSION parameter is used to control which method is used e The exact field given by see section 3 1 5 of the Handbook of Accelerator Physics and Engi neering B 0 22 By Bo cosh kuy cos kuz 23 and B Bosinh kuy cos kuz 24 where ku 27 2 and A is the undulator period This is the most precise method but also the slowest e The field expanded to leading order in y 1 By Bo 1 z kuy
41. order Parallel capable yes 0 0 ngih L o M_E RAD M double geometric strength saa a a Rh double field strength used if KS is S T el a PDX D e double 00 misalignment double 00 misalignment double 0 0 misalignment Tong 0 matrix orde string NULL Optionally used to assign an element to a group with a user defined name Group names will appear in the pa rameter output file in the col umn ElementGroup 288 SREFFECTS 9 87 SREFFECTS Lumped simulation of synchrotron radiation effects damping and quantum excitation for rings Parallel capable yes Data OX doublet S damping partition number JY double 1 y damping partition number Y S JDELTA double 2 momentum damping partition D DO a A Fee EXREF m double reference equilibrium x emit ba ee reference equilibrium y emit reference equilibrium frac tional momentum spread EYREF m double SDELTAREF PREF double reference momentum to which other reference values pertain E 1 DDELTAREF double reference fractional momen tum change per turn due to SR negative value a 7 00 FRACTION double 1 fraction of implied SR effect to E Mee ee DAMPING long 1 include damping less rf ef QEXCITATION Moe O imchade quantum excitation LOSSES sf long 1 include average losses CUTOFF double 100 cutoff in sigmas for gaussian random numbers INCLUDE_OFFSETS long 1 include orbit offsets
42. parentheses are used to delimite a sequence For example betax 8 2 pi Note that the quotes are also required The advantages of this method are speed no subprocess is needed lack of intermediate interpretation by the shell and persistence of the stack and variables So for example one might use betax 8 2 pi sto betax0 betay betax0 Another advantage is the ability to mix subcommands and rpn expressions as in betax sdds2stream parameter betaxFinal data twi 2 would assign to betax half the value of the parameter betaxFinal from the file data twi 6 3 Setup and Action Commands A subject of frequent confusion for elegant users is the distinction between setup and action com mands An action command causes elegant to immediately perform a specific computation or set of computations In contrast a setup command tells elegant how to perform computa tions when it later encounters a major action command one of analyze_map find_aperture frequency_map momentum_aperture optimize or track Several commands are switchable between action and setup modes These include the coupled_ twiss_output correction_matrix_output twiss_output find_aperture matrix_output and sasefel commands Except for find_aperture all of the commands that can run in both modes have the output_at_each_step parameter which is used to switch between the modes In the case of find_aperture the switch is
43. plane response matrices Recommended values in order s hrm horizontal response to horizontal correctors s vrm vertical response to vertical cor rectors s vhrm vertical response to horizontal correctors and s hvrm horizontal response to vertical correctors e inverse Array of incomplete filenames for SDDS output of the x and y inverse response matrices Recommended values s hirm and s virm e KnL_units Flag that if set indicates use of units of m KOL rather than m rad This results in a sign change for the horizontal data e BnL_units Flag that if set indicates use of units of m T m rather than m rad This is useful for linac work in that the responses are automatically scaled with beam momentum e output_at_each_step Flag that if set specifies output of the data at each simulation step By default the data is output immediately for the defined lattice e output_before_tune_correction Flag that if set specifies that when output_at_each_step is set that output shall occur prior to correcting the tunes e fixed_length Flag that if set specifies output of the fixed path length matrix e coupled If nonzero the cross plane response matrices are computed e use_response_from_computed_orbits If nonzero in plane response matrices are com puted using differences of closed orbits which is slower but may be more accurate For cross plane
44. removed or replaced at every nt specified location disable If nonzero the command is ignored element_def If NULL the specified elements are removed from the beamline If not NULL the specified elements are replaced with the new element defined here The definition of the element should be just as it would be entered in the lattice file total_occurrences occurrence These parameters are used to replace or delete specified occurrences of the element name total_occurrences specifies how many elements to replace or delete up to a maximum of 100 while the entries in the array occurrence specify the occurrences to replace or delete If total_occurrences is non zero then skip must be set to zero and the name must be the exact name no wild card matching 72 rpn_expression 6 45 rpn_expression e type action setup command e function pass an expression directly to the rpn submodule for execution amp rpn_expression STRING expression NULL amp end e expression An rpn expression This expression is executed immediately and can be used for example to read in rpn commands from a file or store values in rpn memories 73 rpn_load 6 46 rpn_load e type action setup command e function load data from SDDS file into RPN variables amp rpn_load STRING tag NULL STRING filename NULL STRING match_column NULL STRING match_column_value NULL long matching_row_number 1 STRING match_parameter
45. set links e verbosity A larger value results in more output during computations 44 link _elements 6 28 link_elements e type setup command e function assert a link between parameters of accelerator elements amp link_elements STRING target NULL STRING exclude NULL STRING item NULL STRING source NULL STRING source_position before STRING mode dynamic STRING equation NULL double minimium DBL_MAX double maximum DBL_MAX amp end e target The name of the elements to be modified by the link May contain wild cards e exclude Wildcard sequence to match to element names If a match is found the element is excluded from the link e item The parameter that will be modified e source The name of the elements to be linked to e source_position May be one of before after adjacent nearest or same occurrence e mode May be either dynamic or static A dynamic link is asserted whenever the source is changed during correction for example A static link is asserted only when an error or variation is imparted to the source and at the end of correction equation An rpn equation for the new item value in terms of the item values for the source The prior value of the item is on the top of the stack To refer to the source parameter values use the name of the parameters To refer to the initial source parameter values appen
46. simulatted scattered particles with gt m Small value will cause unstable simulation rate ignored_portion The total scattering rate ignored from tracking This will greatly in crease the tracking speed This number should be much less than the total loss rate For example if the total loss rate is 50 of the total scattering rate then ignor 5 0 05 of the scattering particles will cause some of 10 error But the simulation is greatly speed up i_start i_end The simulation will be done from the i_start to i_end TSCATTER element along the beamline do_track If non zero then scattered particles will be tracked from the location they are generated to the end of the beamline The loss property can be analysised using output or loss match_position_only If non zero then matching of the momentum aperture data to the lattice is done using the position data only s column rather than the element names Can be helpful if errors appear about files ending prematurely or data not matching overwrite_files If non zero then output files will be overwritten If set to zero then when output files are found the corresponding computations are skipped This can be used to restart a Touschek scattering run provided the output filenames are index e g of the form s 03ld los rather than s los 90 transmute_elements 6 57 transmute_elements e type setup command e function Changes the type of se
47. string neks value Choose which method to use for brightness calculations Options are borland M Borland s approximation method Fast but not as reliable as others x dejus R Dejus non zero emittance infinite N convolution method This is the default walkerinfinite R Walker s method Dejus method is derived from this method walkerfinite R Walker s method using finite N without convolution This is quite slow The device qualifier may be planar or helical neks is used to change the number of points used for finding the peak of the distribution e authors M Borland H Shang R Dejus ANL 117 7 10 sddsemitproc sddsemitproc description sddsemitproc analyzes quadrupole scan emittance measurement data It accepts a file containing the transport matrix for each data point and measured beam sizes Because sddsemitproc uses the matrix rather than a thin lens model it can analyze data from arbi trarily complex scans involving for example multiple thick lens quadrupoles The matrix data can be prepared using elegant For example the vary_element command can be used to vary one or more quadrupoles In addition the beam size data may be prepared using elegant to allow simulation of emittance measurements sddsemitproc will perform error analysis using a Monte Carlo technique A user specified number of random error sets are generated and added to all measurements Analysis is
48. subset of the RFCA elements in the beamline The selected subset is assumed to include all of the cavities that will impart net energy to the beam e name A possibly wildcard containing string giving the names of the elements to set If not given all RFCA elements are selected e start_occurence end_occurence If nonzero these give the starting and ending occur rence numbers of elements that will be set e s_start s_end If non negative these give the gaving and ending position limits for the end of element locations of elements to be set e set_for_each_step If nonzero then the setup is repeated at each simulation step In this case one must also give output_at_each_step 1 for twiss_output e near_frequency If nonzero then the rf frequency is chosen to be the closest harmonic to the given frequency e harmonic If nonzero then the rf frequency is set to the given harmonic of the revolution frequency e bucket_half_height If nonzero the voltage is computed so as to give the specified bucket half height Ap L Ug faye P ka rahE 9 where Up is the energy loss per turn a is the momentum compaction factor h is the harmonic E is the beam energy 1 F q 2 ve 1 arcsin z 4 q 70 and q is the overvoltage factor related to the rf voltage by q V Up See Wiedemann Vol 1 8 2 2 e over_voltage If nonzero the voltage is set to the given factor relative to the energy
49. tail e The bunched_beam command has a first_is_fiducial parameter that is convenient for use with the first_is_fiducial mode established by run_control If nonzero this parameter causes elegant to generate a first bunch with only one particle This is very useful if one wants to track with many particles but doesn t want to waste time fidicializing with a many particle bunch Here are some examples that may be helpful e Scanning a phase error in a linac with a bunch compressor The scan is performed using the vary_element command For this to work properly it is necessary to fidcualize the system with zero phase error Hence one must use the enumeration feature of vary_element to provide an input file with the phase errors and the file must be sorted so that the row with zero phase error is first Further one must set reset_rf_for_each_step 0 and first_is_fiducial 1 in run_control and CHANGE_PO 1 on all rf cavity elements See the bunchComp phaseSweep and bunchComp dtSweep examples e Scanning the voltage of a linac to simulate different operating energy choices at the compres sor In this case one scans the linac voltage but wants to fiducialize the system for each volt age It s a change in design not an error or perturbation One again uses vary_element but nothing special needs to be done about the order of the voltage values One must set reset_rf_for_each_step 1 and first_is_fiducial 0 in in run_control and CHAN
50. text output Recommended value s af e uncorrected_orbit_function The incomplete name of a file for an SDDS format output of the uncorrected orbit amplification function Recommended value s uof e corrected_orbit_function The incomplete name of a file for an SDDS format output of the corrected orbit amplification function Recommended value s cof e kick_function The incomplete name of a file for an SDDS format output of the kick amplification function Recommended value s kaf e name The optionally wildcarded name of the orbit perturbing elements e type The optional type name of the the orbit perturbing elements e item The parameter of the elements producing the orbit e plane The plane h or v to examine e change The parameter change to use in computing the amplification e number_to_do The number of elements to perturb e maximum_z The maximum z coordinate of the elements to perturb 15 analyze_map 6 7 analyze_map e type major action command e function find the approximate first order matrix and related quantities for an accelerator by tracking amp analyze_map STRING output NULL double delta_x 1e 6 double delta_xp 1e 6 double delta_y le 6 double delta_yp 1le 6 double delta_s 1le 6 double delta_dp 1e 6 long center_on_orbit 0 long verbosity 0 amp end e output The incomplete name of a f
51. the col umn ElementGroup This cavity provides a transverse deflection that is constant as a function of transverse coordi nates It is probably the best model for a real cavity because real cavities contain a mixture of TM and TE like modes that result in a uniform deflection For simplicity of use the deflection is specified as a voltage even though it originates in a magnetic field The magnetic field is B Boy cos wt The corresponding electric field is obtained from Faraday s law MKS units B Vx E 2 y Oy Assuming Ez Ey 0 we have E Bow sin wt The change in momenta in units of mc in passing through a slice of length AL is BoAL Ap se Sone mec Ap 0 BowxAL Ap sa mec 264 61 62 63 If we want to think in terms of a deflecting voltage we can re write this as qV Apr ma sot 67 Apy 0 68 qV Ap zkasinut 69 mc where k w c Explanation of lt filename gt lt x gt lt y gt format Several elements in elegant make use of data from external files to provide input waveforms The external files are SDDS files which may have many columns In order to provide a convenient way to specify both the filename and the columns to use we frequently employ lt filename gt lt x gt lt y gt format for the parameter value For example if the parameter value is waveform sdds t A then it means that columns t and A will be taken from file waveform sdds Th
52. the dispersive compo nent subtracted Normally these are computed but given names like betacx ecx etc whereas the uncorrected values are betax ex etc The corrected parameters are the correct ones to match a beamline to since they have the dispersive and mono energetic terms properly separated The uncorrected values are more relevant if the dispersion is spurious i e uncorrected or due to something like CSR that doesn t admit of correc tion canonical If given all computations are performed using canonical momenta qz Px po x 1 6 J1 a22 y etc e author M Borland ANL APS 115 7 9 sddsbrightness sddsbrightness e description sddsbrightness computes undulator brightness curves using Twiss parameter data from elegant or sddsanalyzebeam Several calculation methods are available examples sddsbrightness run twi run bri harmonics 3 Krange start 0 2 end 2 2 points 100 current 0 1 totalLength 2 4 periodLength 0 027 coupling 0 01 sddsanalyzebeam run out pipe out correctedOnly sddsbrightness pipe in run bri harmonics 3 Krange start 0 2 end 2 2 points 100 current 0 1 totalLength 2 4 periodLength 0 027 coupling 0 01 e synopsis sddsbrightness pipe input output twissFile SDDSoutputfile harmonics integer Krange start value end value points integer current Amps totalLength meters periodLength meters emittanceRatio value coupling value noSpectralBroadening m
53. the focal length of the edge 1 f tan E p constant we must also change the sign of F When adding errors care should be taken to choose the right parameters The FSE and ETILT parameters are used for assigning errors to the strength and alignment relative to the ideal values given by ANGLE and TILT One can also assign errors to ANGLE and TILT but this has a different meaning in this case one is assigning errors to the survey itself The reference beam path changes so there is no orbit trajectory error The most common thing is to assign errors to FSE and ETILT Note that when adding errors to FSE the error is assumed to come from the power supply which means that multipole strengths also change Special note about splitting dipoles when dipoles are long it is common to want to split them into several pieces to get a better look at the interior optics When doing this care must be exercised not to change the optics elegant has some special features that are designed to reduce or manage potential problems At issue is the need to turn off edge effects between the portions of the same dipole 158 First one can simply use the divide_elements command to set up the splitting Using this command elegant takes care of everything Second one can use a series of dipoles with the same name In this case elegant automatically turns off interior edge effects This is true when the dipole elements directly follow one another or are separ
54. the format accepted by the RANDOM_MULTIPOLES feature of the KQUAD and KSEXT elements This is the recommended data to use with elegant effective_length The effective length of the magnet in meters bore_radius The bore radius of the magnet in meters dx_pole The rms error in meters to be imparted to the horizontal position of each pole dy_pole The rms error in meters to be imparted to the vertical position of each pole dradius The rms error in meters in the bore radius 125 dx_split The rms error in meters to be imparted to the horizontal distance between the left and right sides of the magnet dy_split The rms error in meters to be imparted to the vertical distance between the top and bottom halves of the magnet dphi_halves The rms error in radians to be imparted to the relative rotation of the top and bottom halves of the magnet n_cases The number of cases to simulate default is 1000 n_harm The number of harmonics to simulate The default is 0 which results in computing all the harmonics for which Halbach indicates his treatment applies random_number_seed The initial seed for the random number generator Should be a large integer e author M Borland ANL APS 126 sddsurgent 7 15 sddsurgent e description sddsurgent uses algorithms from the program US by R Dejus and URGENT by R Walker for computatio
55. to use as an initial value 64 optimization_term 6 39 optimization_term e type setup command e function define optimization equation via individual terms amp koptimization_term STRING term NULL double weight 1 0 STRING field_string NULL long field_initial_value 0 long field_final_value 0 long field_interval 1 STRING input_file NULL STRING input_column NULL long verbose 0 amp end e term An rpn expression giving one term to be optimized If more than one optimization_term command is given then the terms are added The advantage of using this command over giving an equation via optimization_setup is that elegant will report the value of each term as it performs the optimization if a log_file is given to optimization_setup This permits determination of which terms are causing problems for the optimization Please see the entry for equation under optimization_setup for details on designing opti mization terms e weight The weight to assign to this term If zero the term is ignored e field_string field_initial_value field_final_value field_interval These pa rameters are used to perform substitution of a series of values into the string given by term This can be used to make an identical constraint at a number of instances of the same marker For example to constraint Cx to zero at instances 1 3 5 39 of marker M1 one could use koptimization_term term M1 Cx sq
56. zero the distribution is symmetric under changes of sign in the coor dinates Automatically results in a zero centroid for all coordinates e halton_sequence 3 and halton_radix 6 and optimized_halton This provides a quiet start feature by choosing Halton sequences in place of random number generation There are three new variables that control this feature halton_sequence is an array of three flags that permit turning on Halton sequence generation for the horizontal vertical or longitudinal planes For example halton_sequence 0 3 1 will turn on Halton sequences for all three planes while halton_sequence 2 1 will turn it on for the longitudinal plane only halton_radix is an array of six integers that permit giving the radix for each sequence i e x x y y t p Each radix must be a prime number One should never use the same prime for two sequences unless one randomizes the order of the sequences relative to each other see the next item If these are left at zero then elegant chooses values that eliminate phase space banding to some extent The user is cautioned to plot all coordinate combinations for the initial phase space to ensure that no unacceptable banding is present A suggested way to use Halton sequences is to set halton_radix 0 2 3 2 3 2 3 and to set randomize_order 0 2 2 2 This avoids banding that may result from choosing larger radix values optimized_halton uses the improved halt
57. 1D Bins_2D Bins_4D Bins_6D and 6 rows x x y y dt delta A non zero value in Bins_1D is a switch for doing histogram analysis in corresponding dimension and the maximum value in Bins_1D is used as bin number to do the analysis The normalization is different from HISTOGRAM as we alwayse treat bin size 1 The output file uses the general format designed for a n dimensional histogram data It must contains a column named Frequency Type double and following parameters 664 99 e ND Type long Value n e Variable Name Type string counts from 0 to ND 1 in double digits format same for all following parameters e Variable Min Type double Minimum value of variable e Variable Max Type double Maximum value of variable e Variable Interval Type double Bin size of variable e Variable Dimension Type long Total number of bins of variable Vari able Dimension Variable Max Variable Min Variable Interval 1 The data is arranged as it has a ND index counter ij p_1 i1 where iyp_1 takes value from 0 to Variable 02d ND 1 Dimension 233 MODRF 9 52 MODRF A first order matrix RF cavity with exact phase dependence plus optional amplitude and phase modulation Parallel capable yes Default nominal voltage G edule oo lomgth SSS vor v dou
58. 27 28 29 30 31 32 33 34 35 36 37 38 Z Huang et al Phys Rev ST Accel Beams 7 074401 2004 A Piwinski The Touschek effect in strong focusing storage rings DESY 98 179 Nov 1998 A Xiao et al Touschek Effect Calculation and its Application to a Transport Line Proc PAC07 3453 3455 2007 W Warnock Shielded Coherent Synchrotron Radiation and Its Effect on Very Short Bunches SLAC PUB 5375 1990 T Agoh and K Yokoya Calculation of coherent synchrotron radiation using mesh Phys Rev ST Accel Beams 7 054403 2004 P Elleaume A New Approach to Electron Beam Dynamics in Undulators and Wigglers Proc EPAC 1992 661 663 http www esrf eu Accelerators Groups InsertionDevices Software Radia J Bengtsson The Sextupole Scheme for the Swiss Light Source SLS An Analytic Ap proach SLS Note 9 97 March 7 1997 Corrections to several typos were supplied by W Guo NSLS K Fl ttmann Astra User Manual http www desy de mpyflo Astra dokumentation J Qiang et al J Comp Phys 163 434 2000 V N Aseev et al Proc PAC05 2053 2055 2005 ASCII version 39 from B Mustapha H Chi et al Mathematics and Computers in Simulation 70 2005 9 21 D Zhou et al Explicit maps for the fringe field of a quadrupole Proc IPAC10 to be published J Irwin et al Explicit soft fringe maps of a quadrupole Proc PAC95 C X Wang
59. 6 This should be fairly large in order to save time steps_back Number of steps to back up after a particle is lost relative to the last surviving 6 before continuing with a smaller step size If this is set to zero there is a risk of finding a too large momentum aperture a stable island 53 e splits Number of times to split the step size in order to refine the location of the maximum surviving momentum offsets When a particle is lost the algorithm steps back to a momentum offset where a particle survived subdivides the step size and continues searching e split_step_divisor Factor by which to subdivide the step size for each split e skip_elements Number of elements to skip before starting to compute momentum aper tures e process_elements Number of elements for which to compute momentum aperture e s_start s_end Limiting s coordinates of the elements from which tracking will start The default values will exclude no elements e include_name_pattern If given tracking will start only at the entrance to elements that match the given wildcard pattern e include_type_pattern If given tracking will start only at the entrance to elements whose type matches the given wildcard pattern e fiducialize If given an initially on energy particle is tracked before the momentum aperture search begins in order to fiducialize the reference momentum This is useful if there are synchrotron radiation lo
60. A flag indicating whether to print summary information about track ing search_path Specify a list of pathnames in which to look for input files including lat tice files wakefield input particle input etc This allows storing common input files in a convenient location without having to put the location into every filename element _divisions Specify how many pieces to split elements into Only certain elements basically those with a matrix are split Results in creation of element_divisions new elements having the same name as each split element load_balancing_on If non zero load balancing is performed for parallel mode This can result in non deterministic results if the load balancing is different on two otherwise identical runs Load balancing variations may occur in heterogeneous clusters clusters with multiple users or for other reasons In such situations turning off load balancing can be useful if for example one is performing parameter scans and wishes to eliminate spurious sources of variation 79 6 49 amp sas amp end sasefel sasefel type setup action command function set parameters for computation of SASE FEL gain and other properties efel STRING output NULL STRING model Ming Xie double beta 0 double undulator_K 3 1 double undulator_period 0 033 double slice_fraction 0 0 long n_slices 0 output The incomplete filename of an SDDS file to which outp
61. ATE SMOOTHING long interpolate wake Use Savitzky Golay filter to smooth current histogram Savitzky Golay filter half width for smoothing SG HALFWIDTH long misalignment misalignment Linearize phase dependence LINEARIZE LSC Include longitudinal space charge impedance LSC_BINS long 1025 Number of bins for LSC calcu lations LSC_LINTERPOLATE eee eo Interpolate computed LSC wake LSC_LOW_FREQUENCY_CUTOFFO double 1 Highest spatial frequency at which low frequency cutoff fil ter is zero If not positive no low frequency cutoff filter is applied Frequency is in units of Nyquist 0 5 binsize LSC_LOW_FREQUENCY_CUTOFF1 double 1 Lowest spatial frequency at which low frequency cutoff filter is 1 If not given defaults to LOW_FREQUENCY_CUTOFH1 261 a o SG_ORDER long 1 Savitzky Golay filter order for smoothing 0 0 00 Oo o RFCW continued A combination of RFCA WAKE TRWAKE and LSCDRIFT Parameter Name Dein sn en ENC COTO FREQUENCY_CUTOFFO double Spatial frequency at which smoothing filter begins for LSC If not positive no fre quency filter smoothing is done Frequency is in units of Nyquist 0 5 binsize LSC_HIGH_FREQUENCY_CUTOFF1 double Spatial frequency at which smoothing filter is 0 for LSC If not given defaults to HIGH_FREQUENCY_CUTOF LSC_RADIUS_FACTOR ee 1 7 ce radius is WAKES_AT_END long wake kicks at end of seg ment for backward compati aol GROUP str
62. Depending on the value of FRINGE_TYPE the fringe fields are modeled as contained within the length L inset type or extending symmetrically outside the length L fixed strength type For inset type fringe fields the length of the hard core part of the quadrupole is L 1 FFRINGE For fixed strength type fringe fields the length of the hard core is L 1 FFRINGE 2 In the lat ter case the fringe gradient reaches 50 of the hard core value at the nominal boundaries of the magnet This means that the integrated strength of the magnet does not change as the FFRINGE parameter is varied This is not the case with inset type fringe fields A more recent implementation of fringe field effects is based on integrals and is invoked by setting FRINGE_TYPE to integrals However this method provides a first order matrix only This is based on publications of D Zhuo et al 34 and J Irwin et al B5 as well as unpublished work of C X Wang ANL The fringe field is characterized by 10 integrals given in equations 19 20 and 21 of 34 However the values input into elegant should be normalized by K or K as appropriate For the exit side fringe field let s be the center of the magnet so be the location of the nominal end of the magnet for a hard edge model and let s2 be a point well outside the magnet Using Ky ne s to represent the hard edge model and Ky s the actual field profile we define the nor
63. ECTS FRINGE_TYPE FFRINGE wo m o o o a oe oo o e oe oo woo woo woo wo wo double For non integrals mode frac tion of length occupied by lin ear fringe region IOP IiP I2P 245 QUAD continued A quadrupole implemented as a matrix up to 3rd order LAMBDA2M M double 0 0 lambda2 fringe integral RADIAL long If non zero converts the quadrupole into a radially focusing lens string NULL Optionally used to assign an element to a group with a user defined name Group names will appear in the pa rameter output file in the col umn ElementGroup This element simulates a quadrupole using a matrix of first second or third order By default the element has hard edges and constant field within the defined length L However this element supports two different methods of implementing fringe fields Which method is used is determined by the FRINGE_TYPE parameter The first method is based on a third order matrix formalism and the assumption of linear fringe fields To invoke this method one specifies inset or fixed strength for the FRINGE_TYPE parameter and then provides a non zero value for FFRINGE If FFRINGE is zero the default then the magnet is hard edged regardless of the setting of FRINGE_TYPE If FFRINGE is positive then the magnet has linear fringe fields of length FFRINGE L 2 at each end That is the total length of fringe field from both ends combined is FFRINGE L
64. FACTOR a double i INPUT_FILE N_KICKS PERIODS 309 The input file has the following columns e x Horizontal position in meters e y Vertical position in meters e xpFactor Horizontal kick factor Cy in T m This factor is defined by equation 5a in 27 In particular Ax C H where H is the beam rigidity in T m e ypFactor Vertical kick factor C in T m This factor is defined by equation 5b in 27 In particular Ay Cy H where H is the beam rigidity in T m The values of x and y must be laid out on a grid of equispaced points It is assumed that the data is ordered such that x varies fastest This can be accomplished with the command sddssort column y increasing column x increasing input1 sdds input2 sdds where inputi sdds is the original unordered file and input2 sdds is the new file which would be used with UKICKMAP The data file is assumed to result from integration through a full device If instead one integrates through just a single period of a full device one must multiply FIELD_FACTOR by N where N is the number of periods in the full device It also makes a certain amount of sense to set N_KICKS equal to N elegant performs radiation integral computations for UKICKMAP and can also include radiation effects in tracking This feature has limitations namely that the radiation integral computations assume the device is horizontally deflecting However in tracking
65. Fapertre DOO a oe 00 ilie Doo m oe 00 misalignment Kx m ioe 00 horizontal wave number i o OE ee Ce aoe aer ie e 0 fl ation Tatar PHASE_REFERENCE long phase reference number to link with other time dependent elements N N STEPS o long 100 number of kicks o of kicks To STRING runge EO integration method sn NS E kutta bulirsch stoer non adaptive runge kutta modi fied midpoint FIDUCIAL STRING t median ee Taedia anin aravej irs light e g t median GROUP string NULL Optionally used to assign an element to a group with a user defined name Group names will appear in the pa rameter output file in the col umn ElementGroup 307 TWPL 9 99 TWPL A numerically integrated traveling wave stripline deflector Parallel capable yes faut o Pe PRAMP TIMB 5 doube 1009 time to ramp to full strenth NOST fs foe 0 0 oft oframpstat ime VOLTAGE double maximum ET between plates due to ramp STATICVOLTAGE V double 00 static component of voltage _ TILT double rotation about longitudinal axis ACCURACY __ doube 010001 integration accuracy PxMAX m double 000 x halfaperture MAK double 0 0 EA to link with other time dependent elements N_STEPS ae ee of steps for nonadap ee fe integration METHOD Ce runge kutta integration method runge kutta bulirsch stoer non adaptive runge kutta modi fied midpoint pee l STRING t median v
66. GE_PO 1 on all rf cavity elements See the bunchComp energySweep example e Simulation of phase and voltage jitter In this case one uses the error_elements command to impart errors to the PHASE and VOLT parameters of rf cavity elements However the first beam through the system must not see any errors This is accomplished by setting no_errors_for_first_step 1 in error_control One can also optionally use a 1 particle beam for fiducialization by setting first_is_fiducial 1 in bunched_beam In addition one must set reset_rf_for_each_step 0 and first_is_fiducial 1 in run_control and CHANGE_PO 1 on all rf cavity elements See the bunchCompJitter jitter example 6 Namelist Command Dictionary The main input file for an elegant run consists of a series of namelists which function as commands Most of the namelists direct elegant to set up to run in a certain way A few are action commands that begin the actual simulation FORTRAN programmers should note that unlike FORTRAN namelists these namelists need not come in a predefined order elegant is able to detect which namelist is next in the file and react appropriately 6 1 Commandline Syntax The commandline syntax for elegant is of the form elegant inputfile pipe in rpnDefns filename macro tagl value1 tag2 value2 inputfile is the name of the command input file which is a series of namelist commands directing the calculations Alternatively one may give the p
67. Input file name of the 4D histogram table of transverse plane Has to be used together with ZDist FullDist Input file name of the 6D histogram table If present all other tables are ignored bunch The incomplete name of an SDDS file to which the phase space coordinates of the simulated scattered particles are to be written Recommended value s 03ld bun If 03ld or the equivalent is not provided then only the last simulated bunch is kept One bunch for one TSCATTER element loss The incomplete name of an SDDS file to which the original and final phase space coordinates of the lost simulated scattered particles are to be written Recommended value s 03ld los Used together with do_track 1 89 distribution The incomplete name of an SDDS file to which the one dimension histogram of simulated scattered particles are to be written Recommended value s 03ld dis initial The incomplete name of an SDDS file to which the one dimension histogram of simulated particles before scattering are to be written Recommended value s 03ld ini output The incomplete name of an SDDS file The loss rate is summarized along the beamline and the average loss rate particles per second per meter at each location 1 m step is written to this file Recommended value s 03ld out nbins Bin number used for the distribution and initial table n_simulated The total number of
68. KSEXT and MULT which include energy dependence to all orders Also note that by default all elements are computed to second order only You must change the default _order parameter on run _setup to 3 in order to use the third order matrices for alpha magnets quadrupoles and sextupoles You may also use the ORDER parameter on individual element definitions Table 2 Meaning of the various driving terms 29 97 track 6 60 track amp tra amp end type major action command function track particles ck long center_on_orbit 0 long center_momentum_also 1 long offset_by_orbit 0 long offset_momentum_also 1 long soft_failure 1 long use_linear_chromatic_matrix 0 long longitudinal_ring_only 0 long stop_tracking_particle_limit 1 center_on_orbit A flag indicating whether to center the beam transverse coordinates on the closed orbit before tracking center_momentum_also A flag indicating whether to center the momentum coordinate also offset_by_orbit A flag indicating whether to offset the transverse beam coordinates by the closed orbit before tracking Similar to center_on_orbit but the initial centroids of the beam are preserved The beam is simply displaced by the closed orbit rather than being centered on it of fset_momentum_also A flag indicating whether to also offset the beam momentum to the momentum of the closed orbit If the start_from_centroid or start_from_dp_c
69. M double 00 geometrie 18pole strongth E RAD double 00 entrance edge nge CRAD double 00 exit edge ange EQ TILT RAD double rotation about incoming longi ee eee ein a_i toate 0 0 entrance pole tace curvature m im aoe 0 0 exit pote face curvature FHGAP a doubte 00 half gap between poles PAINT _ double 0 5 edge ietd integral PDX double 0 0 misalignment DY Fou 000 mistig O double 00 fractional strength error ETILT RAD double error r rotation about incoming Linc ned ied all Salma Ks os a number of kicks o NONLINEAR long 1 include nonlinear field compo E ccc SYNCH_RAD long include classical synchrotron Onan A e Samoa o ooe EDGE1 EFFECTS long 1 include entrance edge effects EDGE2_EFFECTS fe ome 1 include exit edge effects EDGE_ORDER long 1 order to which to include edge effects 150 CSBEND continued A canonical kick sector dipole magnet FRINGE long Include fringe effects 1 lin INTEGRATION ORDER ong a integration onder Cora EDGE1_KICK_LIMIT double 1 maximum kick entrance edge ee ee ieee EDGE2_KICK_LIMIT double 1 maximum kick exit edge can E ee eee FSE USE_BN use b lt n gt instead of K lt n gt EXPANSION_ORDER fd Order of field expansion O auto K1 bl rho where rho is bend radius K6 ojo 5 5 0g double double double T double double Be M ik include incoherent syn chrotron radi
70. NT GROUP string NULL Optionally used to assign an element to a group with a user defined name Group names will appear in the pa rameter output file in the col umn ElementGroup 170 EDRIFT 9 16 EDRIFT Tracks through a drift with no approximations Exact DRIFT Parallel capable yes cM oe oo Tmgth GROUP string NULL Optionally used to assign an element to a group with a user defined name Group names will appear in the pa rameter output file in the col umn ElementGroup 171 ELSE 9 17 ELSE Not implemented Parallel capable yes Defaul GROUP string NULL Optionally used to assign an element to a group with a user defined name Group names will appear in the pa rameter output file in the col umn ElementGroup 172 EMATRIX 9 18 EMATRIX Explicit matrix input with data in the element definition rather than in a file Parallel capable yes L M double Length used only for position computation ANGLE RAD double Angle used only for position computation Dx m ioe 0 0 misalignment DY M __ double 0 0 misiem Dz M__ double 0 0 misalignment TE RAD double 0 0 Tta YAW RAD double 0 0___ Yaw angle PITON RAD double 0 0 Pitch angle Q on DELTAP R R12 R14 R16 R22 R2 R25 R 173 EMATRIX continued Explicit matrix input with data in the element definition rather than in a file Be m owe joo SSCS Ba m ie joo
71. Normally one specifies the higher order components of the field with the K1 K2 K3 and K4 parameters The field expansion in the midplane is B x Bo 1 Xf Kapo gn By setting the USE_bN flag to a nonzero value one may instead specify the b1 through b4 parameters which are defined by the expansion B x Bo 1 Xf bagn This is convenient if one is varying the dipole radius but wants to work in terms of constant field quality Setting NONLINEAR 0 turns off all the terms above K_1 or b_1 and also turns off effects due to curvature that would normally result in a gradient producing terms of higher order Edge effects are included using a first or second order matrix The order is controlled using the EDGE_ORDER parameter which has a default value of 1 N B if you choose the second order matrix it is not symplectic Incoherent synchrotron radiation when requested with ISR 1 normally uses gaussian distri butions for the excitation of the electrons Setting USE_RAD_DIST 1 invokes a more sophisticated algorithm that uses correct statistics for the photon energy and number distributions In addition if USE_RAD_DIST 1 one may also set ADD_OPENING_ANGLE 1 which includes the photon angular distribution when computing the effect on the emitting electron Some confusion may exist about the edge angles particularly the signs For a sector magnet we have of course E1 E2 0 For a symmetric rectangular magnet E1 E2 ANGLE 2 If ANGLE is ne
72. Optionally used to assign an element to a group with a user defined name Group names will appear in the pa rameter output file in the col umn ElementGroup For the NIBEND element there are various fringe field models available In the following descrip tions lf is the extend of the fringe field which starts at z 0 for convenience in the expressions Also K T Fy z 1 Fy z dz is K Brown s fringe field integral commonly called FINT where g is the full magnet gap and F B Bo Bo being the value of the magnetic field well inside the magnet e Linear fringe field Fy 26a 32 Fo yFy 33 Fa 1 6Kq 34 For this model the user specifies FINT and HGAP only e Cubic spline fringe field Fy Faz Fp y Fa 3 z 35 F 2F z 3F z2 y 36 Fa 3 4 37 Fm 2 38 lp 70Kg 9 39 For this model the user specifies FINT and HGAP only e Tanh like fringe field ah 1 9 Fy zQ tanh Faz z yFasechFaz tanh Faz 40 239 1 yFysechF z sechF z 11 sinh Faz sinh 3F z 41 24 1 1 Fy zy Fasech Faz z yFasech Faz sechFaz 2 cosh 2Fyz 42 1 ggg V FesechFaz sech Fa2 33 26 cosh 2Faz cosh4F z 43 Fa 1 2Kg 44 lp P Fa 45 For this model the user specifies FINT and HGAP along with the parameter FP1 which is the quantity P in the last equation It determines the length of the fringe field that is integrated e Quintic spline fringe fie
73. PA eae N_BINS long 128 number of bins for current his Poe Wd MAX_N_BINS long Maximum number of bins for Da a WAKES ie STRING NULL filename for output of wake WAKE_INTERVAL long 1 interval in passes at which to output wake WAKE_START long pass at which to start to out WAKE_END long 2147483647 pass at which to stop to output ee ee AREA_WEIGHT long use area weighting in assigning FINTERPOLATE ong o interpolate wake SMOOTHING long Use Savitzky Golay filter to SG_ORDER long 1 Savitzky Golay filter order for SG_HALFWIDTH long 4 Savitzky Golay filter 320 ZLONGIT continued A simulation of a single pass broad band or functionally specified longitudinal impedance REVERSE_TIME_ORDER long Reverse time order of particles eT TP ee pat FACTOR double Factor by which to ST a a Pee ON_PASS long pass which icaa eka e ee impedance aise start RAMP_PASSES long Number of passes over which to linearly ramp up the impedance to full strength HIGH_FREQUENCY_CUTOFF0 double Frequency at which smoothing filter begins If not positive no frequency filter smoothing is done Frequency is in units of Nyquist 0 5 binsize HIGH_FREQUENCY_CUTOFF1 double 1 Frequency at which smoothing filter is 0 If not given defaults to HIGH_FREQUENCY_CUTOF GROUP string NULL Optionally used to assign an element to a group with a user defined name Group names will appear in the pa rameter output file in the col umn ElementGr
74. RFRACTION double fraction of lowest momentum fee eee eee UPPERFRACTION double fraction of highest momentum cet Erin foe a FIXPLIMITS long fix the limits in p from LOW ERFRACTION and UPPER FRACTION applied to first beam BEAMCENTERED long if nonzero center for DELTALIMIT is average beam momentum sn ooo Mog 1021 number of bins O GROUP string NULL Optionally used to assign an element to a group with a user defined name Group names will appear in the pa rameter output file in the col umn ElementGroup 244 QUAD 9 61 QUAD A quadrupole implemented as a matrix up to 3rd order Parallel capable yes Default E length nooo geometric strength P M woo RT T vooo TILT RA ouble rotation about longitudinal mM ane o0 mitm double 00 misalignment M aoe 0 0 misalignment FSE doube 00 fractional strength error A 00 i A 00 HKICK R VKICK R M 1 M M M M E RAD ion ki HCALIBRATION calibration factor for horizon hana VCALIBRATION double 1 calibration factor for vertical ee ee eee al dl M D D horizontal correction kick D vertical correction kick double ORDER 1 include entrance edge effects 1 include exit edge effects STRING fixed strength type of fringe inset fixed strength or integrals HSTEERING lng Jo o gt use for horizontal steering VSTEERING lng Jo o gt use for vertical steering EDGE1_EFFECTS EDGE2_EFF
75. SCII version of TRACK is assumed elegant2genesis This program performs slice analysis of particle output files which are suitable for use with the SDDS compliant APS version of GENESIS I4 This program is part of the SDDS toolkit See the SDDS toolkit manual for documentation Program by R Soliday and M Borland haissinski Computes the steady state longitudinal distribution in an electron storage ring Requires as input a file containing the Twiss parameters around the ring such as that provided by the twiss_output command Program by L Emery and M Borland ibsEmittance Computes local intra beam scattering rates for both storage ring and linac Also computes the equlibrium transverse and longitudinal emittances of a beam in an electron storage ring resulting from the combination of quantum excitation damping and intra beam scattering Requires as input a file containing the Twiss parameters such as that provided by the twiss_output command Program by L Emery M Borland and A Xiao impact2elegant Tranlates IMPACT T BI output into elegant conventions impact2sdds Translates IMPACT T output files into SDDS for easier postprocessing madto Translates an elegant style lattice file or a MAD file with some restrictions into formats accepted by other programs such as COSY PARMELA PATPET PATRI CIA TRANSPORT and XORBIT Will also generate an SDDS file containing lattice data Program by M Borland
76. T 0 1m one would use max betax 10 1 segt V1 V2 T selt Returns a nonzero value if and only if value V7 is less than value V2 The returned value is V V2 T Typically used to constrain a value from below E g to limit a beta function to greater than 3 m with a tolerance of 0 1 m one would use betax 3 1 selt V1 V2 T sene Returns a nonzero value if and only if V7 and V2 differ by more than tol If Vi gt Vo returns Vj V2 T T If Vo gt Vi returns V2 Vi T T mode May be either minimize or maximize method May be one of simplex grid powell randomwalk randomsample or sample Recommended methods are simplex and randomwalk The latter is very useful when the lattice is unstable or nearly so tolerance The convergence criterion for the optimization with a negative value indicating a fractional criterion target The value which if reached results in immediate termination of the optimization whether it has converged or not center_on_orbit A flag indicating whether to center the beam transverse coordinates on the closed orbit before tracking center_momentum_also A flag indicating whether to center the momentum coordinate also soft_failure A flag indicating if set that failure of an optimization pass should not result in termination of the optimization n_evaluations The number of allow
77. TH is the K1 quadrupole parameter e Bx By Field values in Tesla units should be T The field is still multiplied by the value of the STRENGTH parameter which is dimensionless Note the default value of STRENGTH is 0 so if you don t set it to something you ll get no effect 140 The field map file must contain a rectangular grid of points equispaced separately in x and y There should be no missing values in the grid this is not checked by elegant In addition the x values must vary fastest as the values are accessed in row order To ensure that this is the case use the following command on the field file sddssort fieldFile column y incr column x incr 141 BUMPER 9 3 BUMPER A time dependent uniform field rectangular kicker magnet with no fringe effects The waveform is in SDDS format with time in seconds and amplitude normalized to 1 Parallel capable yes ne oe a SNGEE RAD double 0 0 kick angle a Poke ee A rotation about longitudinal axis DXA double 0 0 misalignment oy raat 00 Fit double 00 misalignment ee ee B2 1 double Sextupole term a a ae ee PTIMELOFFSET S doube 00 time offset of waveform PPERIODIC og fo i waveform periodi PHASE REFERENCE long phase reference number to link with other time dependent elements FREONPASS ions o pass number to freon N_KICKS long Number of kicks to use for sim ulation 0 uses an exact result but ig
78. T_LAST_WAKE_ONLY long o output final wake only STEADY_STATE long use steady state wake equa tions 155 CSRCSBEND continued Like CSBEND but incorporates a simulation of Coherent Synchrotron radiation Default long use integrated Greens function requires STEADY_STATE 1 USEBN CC Cs 7 BN USEBN sd sitidtongg lo use b lt n gt instead of K lt n gt pee ORDER long eae Order of field expansion auto ee 1 M_ double E where rho is ae radius BESSY obo o RP BOfenO BBS double 0 0 KB BBO Booo M double 0 0 RA Bafoho Bi double 0 0 KB Bofoho ee a Bri doe 35a EE long include incoherent syn chrotron radiation scatter ing ISRIPART long Include ISR for single particle beam only if ISR 1 and ISRIPART 1 SR org Jeno CS computations poen CSR long block CSR from entering CSR DRIFT DERBENEV_CRITERION_MODE ace a E STRING disable evaluate or enforce PARTICLE_OUTPUT_FILE STRING NULL name of file for phase space PARTICLE_OUTPUT_INTERVAL long interval in kicks of output to SLICE_ANALYSIS_INTERVAL long interval Ta kicks of otit to slice analysis file from slice_analysis command LOW_FREQUENCY_CUTOFF0 double 1 Highest spatial frequency at which low frequency cutoff fil ter is zero If not positive no low frequency cutoff filter is applied Frequency is in units of Nyquist 0 5 binsize 156 CSRCSBEND continued Like CSBEND but in
79. UTPUT STRING NULL Filename for output of CSR wake vs s as computed using Stupakov s equations output of Stupakov wakes SLICE_ANALYSIS_INTERVAL long interval in kicks of output to slice analysis file from slice_analysis command 160 CSRDRIFT continued A follow on element for CSRCSBEND that applies the CSR wake over a drift oe eE use linear optics for drift eee FaN BA NULL Optionally used to assign an element to a group with a user defined name Group names will appear in the pa rameter output file in the col umn ElementGroup This element has a number of models for simulation of CSR in drift spaces following CSRCS BEND elements Note that all models allow support splitting the drift into multiple CSRDRIFT elements One can also have intervening elements like quadrupoles as often happens in chicanes The CSR effects inside such intervening elements are applied in the CSRDRIFT downstream of the element For a discussion of some of the methods behind this element see M Borland Simple method for particle tracking with coherent synchrotron radiation Phys Rev ST Accel Beams 4 070701 2001 N B by default this element uses 1 CSR kick N KICKS 1 at the center of the drift This is usually not a good choice I usually use the DZ parameter instead of N KICKS and set it to something like 0 01 meters The user should vary this parameter to assess how small it needs to be The models are as fol
80. Upper nuyChromLower and nuyChromUpper If the tune_shift_with_amplitude command was also given and one may use the sym bols dnux dAx dnux dAy dnuy dAx dnuy dAy dnux dAx2 dnux dAy2 dnux dAxAy dnuy dAx2 dnuy dAy2 dnuy dAxAy nuxTswaLower nuxTswaUpper nuyTswaLower and nuyTswaUpper If the floor_coordinates command was given one may use X Z and theta to refer to the final values of the floor coordinates If the sasefel command was given one may use variables of the form SASE lt property gt where lt property gt is one of gainLength saturationLength saturationPower or lightWavelength Finally one may use any of the names from the final output file see run_setup e g Sx x beamsize or eny y normalized emittance These refer to tracked properties of the beam The equation may be left blank in which case the user must give one or more optimization_term commands These use the same symbols of course There are several rpn functions that are useful in constructing a good optimization equation These are soft edge greater than less than and not equal functions which have the names segt selt and sene respectively The usage is as follows 60 V1 V2 T segt Returns a nonzero value if and only if value V1 is greater than V2 The returned value is Vij V2 T Typically used to constraint a quantity from above E g to limit the maximum horizontal beta function to 10m with a tolerance of
81. User s Manual for elegant Program Version 25 1 0 Advanced Photon Source Michael Borland October 4 2012 Note another source of help for elegant is the on line Users are encouraged to join and participate At minimum users should subscribe to the Bugs topic since this is where bug notifications are posted Contrary to previous practise we will no longer announce bugs via email A brief overview of elegant is also available which introduces the capabilities at a high level 1 Highlights of What s New in Version 25 1 Here is a summary of what s changed since release 25 0 1 1 Bug Fixes for Elements e There was a bug in the ECOL element when the length was nonzero and the offset DX or DY was nonzero This was fixed e To avoid numerical problems synchrotron radiation is now disabled automatically for KSEXT elements shorter than 1 um when performing beam moments calculations with radiation e In some cases the matrix for the MATR element would not get loaded prior to tracking resulting in a crash This was fixed e A bug was fixed in post adjustment of synchrotron radiation losses in the CSRCSBEND element which made extremely small errors in the results This was reported by K Amyx Tech X 1 2 Bug Fixes for Commands e Determination of the matrix for the MAPSOLENOID and TWMTA elements was broken in version 22 This was fixed 1 3 New and Modified Elements e Added the CORGPIPE element which implements a beam
82. _accuracy 1e 12 long closed_orbit_iterations 10 double closed_orbit_iteration_fraction 1 long use_perturbed_matrix 0 long disable 0 long use_response_from_computed_orbits 0 amp end In the case of array variables with dimension 2 the first entry is for the horizontal plane and the second is for the vertical plane e mode Either trajectory or orbit indicating correction of a trajectory or a closed orbit 26 method For trajectories may be one to one one to best one to next thread or global One to one and one to next are the same steering is performed by pairing one corrector with the next downstream BPM One to best attempts to find a BPM with a large response to each corrector Thread does corrector sweeps to work the beam through a beamline with apertures it is quite slow Global simply uses the global response matrix it is the best choice if the trajectory is not lost on an aperture For closed orbit must be global trajectory_output The incomplete name of an SDDS file to which the trajectories or orbits will be written Recommended value s traj or s orb corrector_output The incomplete name of an SDDS file to which information about the final corrector strengths will be written Recommended value s cor statistics The incomplete name of an SDDS file to which statistical informat
83. _optimization_setuf 6 38 Perform initial parallel optimization setup Print the clement dctionany ramp_element 46 42 Set up turn by turn ramping of elements rf_setupo 43 setup action Set up RF cavity elements for storage rings preter rpn_load6 46 action Load values from SDDS file into rpn in terpreter Sct up simulation Steps and passes run_setup 6 48 setup Define global simulation parameters and output files Evaluate SASE FEL gain ote Save new lattice file Define loading of particles rom SDDS fle semaphored6 52 setup Define file semaphores for start end of run slice_analysid6 53 Perform slice analysis along beamline Execute a command inthe shell steering_elementl6 55 setup Define element parameters as steering cor B GO transmute_elementd0 57 setup Transmute elements from one type to an ee ee ee twiss_analysid6 59 setup Define subset of beamline for twiss param a twiss_outputl6 59 setup action Set up twiss parameter and related com ee at tracK6 60 major Execute tracking of particles and other op ee tn eats tune_shift_with_amplitudd6 61 Compute tune shifts with amplitude vary_element6 62 Vary element parameters in loops Table 1 Table of elegant commands and their functions 12 6 5 alter_elements alter_elements type action command function modify the value of a parameter for one or more elements amp alter_elements amp end STRING name NULL STRING item NULL
84. _z then elegant uses sigma_dp and sigma s it additionally uses alpha_z if it is nonzero otherwise it uses dp_s_coupling For reference the relationship between them is C F Z Note that to impart a chirp that results in compression for Rgs lt 0 e g a normal four dipole chicane one must have a lt 0 or C gt 0 momentum_chirp Permits imparting an additional momentum chirp to the beam in units of 1 m E g a value of 1 indicates that a 1mm long bunch has a linear variation in momentum of 0 1 from end to end A positive chirp is needed to provide compression of a bunch with an ordinary Rsg lt 0 four dipole chicane one_random_bunch If non zero then only one random particle distribution is generated Otherwise a new distribution will be generated for every simulation step enforce_rms_values 3 Flags one for each plane indicating whether to force the distri bution to have the specified RMS properties distribution_cutoff 3 Distribution cutoff parameters for each plane For gaussian distributions this is the number of sigmas to use For other distributions except dynamic aperture this number simply multiplies the sizes This is potentially confusing and hence it is suggested that the distribution cutoff be set to 1 for nongaussian beams The exception is dynamic aperture distribution type In this case the cutoff value is the number of grid points in the dimension in question 19 e distributi
85. a and with an extension of including vertical dispersion The program can also estimate IBS growth rates for and transport line or linac beam provided special attention paid to the beam s energy change splitting RF cavities as needed examples This example computes the IBS equilibrium parameters and the contributions to the growth rates at equilibrium vs position in the APS lattice ibsEmittance aps twi aps ibs charge 5 coupling 0 02 rf voltage 9 harmonic 1296 synopsis ibsEmittance twissFile resultsFile charge nC particles value coupling value emityInput value emitInput value deltaInput value superperiods value isRing 1 0 RF Voltage MV harmonic value length mm energy MeV growthRatesOnly integrate turns number stepSize number noWarning files twissFile is a twiss parameter file from the twiss_output command of elegant You must use the radiation_integrals flag in twiss_output e switches charge particles Give the charge in nanocoulombs or the number of electrons coupling Give the emittance coupling ratio z emityInput Give the vertical emittance in meters emitInput Give the initial total emittance in meters If not specified the value from the parameter ex0 in twissFile is used deltaInput Give the initial rms fractional momentum spread If not specified the value from the parameter Sdelta0 in twissFile is used
86. abel MODE STRING coordinates coordinate parameter cen troid or fft For fft mode you may add a space and a qualifer giving the window type han ning default parzen welch or uniform X foe oie 4 include x data in coordinate Daa a Y DATA long E y data in coordinate pm pepe LONGIT_DATA long 1 include longitudinal data in ee caine tet os EXCLUDE_SLOPES long exclude slopes in coordinate Laced A A E FLUSH_INTERVAL long file flushing interval long If nonzero no ca will be Daa Da USE_DISCONNECT long If nonzero files are discon nected between each write op eration May be useful for par allel operation Ignored other wise INDEX_OFFSET pee Offset for file indices for se quential file naming GROUP neal NULL Optionally used to assign an element to a group with a user defined name Group names will appear in the pa rameter output file in the col umn ElementGroup The output filename may be an incomplete filename In the case of the WATCH point element this means it may contain one instance of the string format specification s and one occurence of an integer format specification e g ld elegant will replace the format with the rootname 316 see run_setup and the latter with the element s occurrence number For example suppose you had a repetitive lattice defined as follows Wi WATCH FILENAME s Z03ld wi1 Q1 QUAD L 0 1 K1 1 D DRIFT L 1 Q2 QUAD L 0 1 K1
87. al plane beta and alpha give b and a 196 they must both be given or both be omitted etaValue and etaSlope give the dispersion 7 and its slope a yPlane beta meters alpha value etaValue meters etaSlope value Same as xPlane except for the vertical plane zPlane deltaStDev value tStDev value correlation seconds alpha value chirp deltaStDev is og 6 4 tStDev is o t t and correlation is og 6 6 t t in terms of which the longitudinal emittance is 1 0 02 o 5 alpha is o 5 e The chirp if requested is added after generation of the beam according to the other parameters If betaGamma is given the beam is accel erated to the given average value of 8y in a idealized sense preserving the momentum spread and transforming the transverse coordinates by the factor G7 o BY desired 123 saveMatrices filename Requests saving the transformation matrices to a file loadMatrices filename Requests loading the transformation matrices from a file nowarnings Suppresses warning messages e authors M Borland H Shang ANL APS 124 7 14 sddsrandmult sddsrandmult description sddsrandmult computes the multipole errors in a quadrupole or sextupole due to various construction errors The program is based on the analysis of Halbach I6 with which I ll assume the reader is familiar Instead of separ
88. alyzebeam Several calculation methods are available e examples sddsfluxcurve run twi run bri harmonics 3 electronBeam current 0 1 coupling 0 01 undulator period 0 033 numberOfPeriods 70 kmin 0 01 kmax 2 7 points 100 pinhole distance 30 xsize 0 0025 ysize 0 001 e synopsis sddsfluxcurve pipe input output twissFile SDDSoutput file harmonics integer method methodName neks integer mode pinhole density total undulator period meters number0fPeriods integer kmin value kmax value points number electronBeam current amps coupling value emittanceRatio value pinhole distance meters xsize meters ysize meters xnumber integer ynumber integer xposition meters yposition meters nowarnings e files twissFile A Twiss output file from elegant with radiation integral calculations in cluded or an output from sddsanalyzebeam In the latter case the correctedOnly option should be used SDDSoutputFile Contains the flux data in column form For each requested har monic 2 there are columns photonEnergy and wavelengthz plus a column for the flux TotalFlux PinholeFlux or FluxDensity e switches pipe The standard SDDS Toolkit pipe option harmonics The number of harmonics to compute method string neks value Choose which method to use for calculations Options are x dejus R Dejus non zero emittance infinite N convolutio
89. amp end e quantity The quantity to be constrained given as the name of a quantity from among the optimization variables optimization covariables and the final parameters see the en try for run_setup for the last of these The optimization co variables are referred to as lt element name gt lt parameter name gt in all capital letters Other quantities such as Twiss parameters or anything else but what is listed just above are not recognized Expressions involving multiple quantities are not supported e lower upper The lower and upper limits allowed for the expression 57 optimization_covariable 6 36 optimization_covariable e type setup command e function define an element parameter to be varied as a function of optimization parameters e N B It is not possible to optimize an element if the element name starts with one of the following characters 0 1 2 3 4 5 6 7 8 9 or The reason is that elegant will attempt to make an SDDS parameter name containing the element name and these characters are disallowed at the beginning of such a name amp optimization_covariable STRING name NULL STRING item NULL STRING equation NULL long disable 0 amp end e name The name of the element e item The parameter of the element to be changed e equation An rpn equation for the value of the parameter in terms of the values of any parameters of any optimization variable These
90. and s will be available These are respectively the three position coordinates the three angle coordinates and the total arc length at the marker location The misalignment controls for this element are non functional in the sense that they do not affect the beam However when combined with external scripts and the GROUP parameter one can use this feature to implement girder misalignments using pairs of markers to indicate the ends of the girders A future version of elegant will implement this internally 224 MATR 9 47 MATR Explicit matrix input from a text file in the format written by the print_matrix command Parallel capable yes oo a O PFIKENAME __ STRING mee SSS FORDER oms 1 rariora GROUP string NULL Optionally used to assign an element to a group with a user defined name Group names will appear in the pa rameter output file in the col umn ElementGroup The input file for this element uses a simple text format It is identical to the output in the printout file generated by the tt matrix_output command For example for a 1st order matrix the file would have the following appearance description C1 C2 C3 C4 C5 C6 R1 R11 R12 R13 R14 R15 R16 R2 R21 R22 R23 R24 R25 R26 R3 R31 R32 R38 R34 R35 R36 R4 R41 R42 R43 R44 R45 R46 R5 R51 R52 R53 R54 R55 R56 R6 R61 R62 R63 R64 R65 R66 Items in normal type must be entered exactly as shown whereas those in italics must be provided by the user Th
91. ased the input file Intended to be used to increase the number of particles produced by a photoinjector simulation to improve stability of CSR and LSC simulations Can also add energy and density modulations for performing gain studies The algorithm is as follows 1 Fit a 12 order polynomial to p as a function of t Evaluate the polynomial at 10 000 equispaced points to generate a lookup table for the momentum variation with time 2 Compute the standard deviation of the momentum Psa for blocks of 2 000 successive particles Fit this data with a 12 order polynomial and evaluate it a 10 000 equispaced points to generate a lookup table for p q as a function of t 3 Create a histogram of t and smooth it with a low pass filter having a cutoff at 0 1 THz This may resulting in ringing at the ends of the histogram which is clipped off by masking with the original histogram 4 Optionally modulate the histogram H t with a sinusoid by multiplying the histogram by 1 dm cos 2rct Am where dm is the modulation depth and Am is the modulation wavelength For non zero dm this will result in a longitudinal density modulated distri bution when the histogram is used as a probability distribution and sampled to create time coordinates 5 Sample the time histogram N times using a quiet start Halton sequence with radix 2 where N is the number of desired particles The sampling operation is performed by first numerically computing the cum
92. ated by a MARK element Third one can use a series of dipoles with different names In this case you must also use the EDGE1_EFFECTS and EDGE2_EFFECTS parameters to turn off interior edge effects N B For versions 19 X and ealier splitting dipoles is not generally recommended for CSRCSBEND because the coherent synchrotron radiation computations start over at the beginning of each piece This is only acceptable when using STEADY_STATE 1 This was changed in version 20 X 159 CSRDRIFT 9 11 CSRDRIFT A follow on element for CSRCSBEND that applies the CSR wake over a drift Parallel capable yes m faob 00 length o ATTENUATION LENGTH M double exponential attenuation length for wake o om o mnk N KICKS f long 1 number of kicks if DZ is zero SPREAD Prong To Fase spreading fonction USE_OVERTAKING_LENGTH long use overtaking length for AT eS PP rescamonnescrit OL_MULTIPLIER double 1 factor by which to multiply the overtaking length to get the attenuation length USE_SALDIN54 long Use Saldin et al eq 54 NIM A 398 1997 373 394 for decay a ee SALDIN54POINTS long 1000 Number of values of position inside bunch to average for Saldin eq 54 en i tong To OS calonations E STRING 68 percentile rms 68 percentile or 90 Oo Oo BUNCHLENGTH_MODE SALDIN54_OUTPUT STRING NULL Filename for output of CSR intensity vs z as computed us ing Saldin eq 54 USE_STUPAKOV long Use treatment from G Stu STUPAKOV_O
93. ately evaluating the effect of certain types of mechanical errors it allows one to simulate several types of errors in order to get statistical distributions for the multipole perturbations examples sddsrandmult quadpert in synopsis sddsrandmult inputFile usage inputFile is a text file containing a series of namelist commands specifying the parameters of a quadrupole or sextupole the type and amplitude of the errors to include and the filenames for output Each namelist command results in a complete computation and generation of output files The namelist command is perturbations It has the following fields type A string value either quadrupole default or sextupole name An optional string value giving the name of the element This is used in preparing data for elegant SDDS_output An required string value giving the name of an SDDS file to which data for each seed will be written This file can be used to compute statistics or perform histograms elegant_output An optional string value giving the name of a text file to which elegant commands and element definitions will be written Note that this file is a mixture of commands and element definitions As such the user must manually edit the file and place the appropriate parts in the lattice file and the command file kmult_output An optional string value giving the name of an SDDS file to which data will be written in
94. ates stray fields These fields are considered perturbations in that they change the trajectory or orbit but not the floor coordinates Local stray fields LBX and LBY are referenced to the local coordinate system Global stray fields GBX GBY GBZ are referenced to the global coordinate system which coincides with the local coordinate system only at the start of the beamline unless there is no bending in which case the two systems are identical 292 TFBDRIVER 9 89 TFBDRIVER Driver for a transverse feedback loop Parallel capable no ApS TRING NULL Syste dene STRENGTH double 00 Strength factor KIOKUIMIT RAD double 00 Limit on applied i PDEEAY oes o Dey tums OUTPUT_FILE STRING NULL File for logging filter output eee ee ee mooo aoe iter coefficient PAL double 00 Filter coefficient Pax doubte 0 0 Filter coefficient PAs double 00 Filter coefficient Pad double 0 0 Filter coefficients PAB doubte 00 Filter coefficient PAG dowbte 00 Filter coefficient PAT doubte 00 Filter coefficient Pas dowbte 00 Filter coefficient PA dowbte 00 Filter coefficient PAI doe 00 Filter coefficient PALL double 00 Filter coefficient PAZ double 00 Filter coefficient xis f oome for iter oat aa done 010 Filter coefficient AoT string NULL Optionally used to assign an element to a group with a user defined name Group names will appear in the
95. ates the program allow_missing_parameters If nonzero then it is not an error if an element does not have the parameter named with item Normally such an occurence is an error and terminates the program start_occurence end_occurence If nonzero these give the starting and ending occurence numbers of elements that will be altered N B if wildcards are used occurence number counting is for each set of identically named elements separately rather than for the sequence of matched elements s_start s_end If non negative these give the gaving and ending position limits for the end of element locations of elements to be altered after The name of an element If given the alteration is applied only to elements that follow the named element in the beamline before The name of an element If given the alteration is applied only to elements that precede the named element in the beamline 14 amplification_factors 6 6 amplification_factors e type action command e function compute corrected and uncorrected orbit amplification factors and functions amplification_factors STRING output NULL STRING uncorrected_orbit_function NULL STRING corrected_orbit_function NULL STRING kick_function NULL STRING name NULL STRING type NULL STRING item NULL STRING plane NULL double change 1e 3 long number_to_do 1 double maximum_z 0 vend e output The incomplete name of a file for
96. ation scatter ing Include ISR for single particle beam only if ISR 1 and ISRIPART 1 Order of expansion of square root in Hamiltonian 0 means no expansion double ISRIPART SQRT_ORDER USE_RAD_DIST ADD_OPENING_ANGLE If nonzero overrides SYNCH_RAD and ISR causing simulation of ra diation from distributions optionally including opening angle If nonzero radiation open ing angle effects are add if USE_RAD_DIST is nonzero po I double 0 0 double 0 0 double 0 0 double 0 0 double 0 0 double 0 0 double 0 0 l a 151 CSBEND continued A canonical kick sector dipole magnet Default GROUP string NULL Optionally used to assign an element to a group with a user defined name Group names will appear in the pa rameter output file in the col umn ElementGroup This element provides a symplectic bending magnet with the exact Hamiltonian For example it retains all orders in the momentum offset and curvature The field expansion is available to fourth order One pitfall of symplectic integration is the possibility of orbit and path length errors for the reference orbit if too few kicks are used This may be an issue for rings Hence one must verify that a sufficient number of kicks are being used by looking at the trajectory closure and length of an on axis particle by tracking Using INTEGRATION_ORDER 4 is recommended to reduce the number of required kicks
97. attering GROUP ine NULL Optionally used to assign an element to a group with a user defined name Group names will appear in the pa rameter output file in the col umn ElementGroup 280 SCMULT 9 82 SCMULT Tracks through a zero length multipole to simulate space charge effects Parallel capable yes Detail GROUP string NULL Optionally used to assign an element to a group with a user defined name Group names will appear in the pa rameter output file in the col umn ElementGroup This element simulates transverse space charge SC kick using K Y Ng s formula K Y Ng FNAL private communication N B This element is not designed for space charge calculations in guns or linacs It is only intended for simulating space charge in rings The linear SC force is given by Aq oS V2TOz Ox Ox dy KaLe 222 Ay 2 86 V 20 Oy Ox dy 2Nre where Kse Sagi L is the integrating length Oz y z are rms beam size The non linear SC force is given by Aa Role PIA u x 1y nae aoe iy 205 O 2 a2 02 K Le 27 202 a ae ot iy he ie a ft ee a 87 2 05 4 2 05 74 where w z is the complex error function w z e7 2i f e g x 88 Equation 87 appear to diverge when oy oy In fact this is not true because the expressions inside the square brackets will provide zero too at oz oy to cancel the poles outside In our code we calculate this equati
98. ble oo PHASE DEG doue 00 nommat phase 500000000 rq om o fewo PHASE REFERENCE long phase reference number to link with other time dependent elements AMMAG double magnitude of amplitude mod a a AMPHASE DEG double phase of amplitude modula fee ee ee AMFREQ Az double frequency of amplitude modu fe ee AMDECAY 1 s double exponetial decay rate of ampli tude modulation PMMAG R Gael magnitude of phase modula tion PMPHASE DEG doube 00 phase of phase modulation PMFREQ Hz double 00 frequency of phase modulation PMDECAY 1 s double exponetial decay rate of phase A a FIDUCIAL STRING NULL mode for determining fidu cial arrival time light tmean first pmaximum GROUP string NULL Optionally used to assign an element to a group with a user defined name Group names will appear in the pa rameter output file in the col umn ElementGroup 234 MONI 9 53 MONI A two plane position monitor accepting two rpn equations for the readouts as a function of the actual positions x and y Parallel capable yes fc Mm o 00 length SS DX __ double 00 misian DY M do 00 misiem O WEGE doae 1 weight in correction ___ TILT L ee rotation about longitudinal axis XCALIBRATION double i calibration factor for x readout YCALIBRATION double 1 calibration factor for y readout ORDER Mos fo maro NULL XREADOUT STRING rpn expression for x readout ac
99. bunch The incomplete name of an SDDS file to which the phase space coordinates of the bunches are to be written Recommended value s bun n_particles_per_bunch Number of particles in each bunch time_start The central value of the time coordinate for the bunch matched_to_cell The name of a beamline from which the Twiss parameters of the bunch are to be computed emit_X RMS emittance for the X plane emit_nX RMS normalized emittance for the X plane Ignored if emit_X is nonzero beta_X alpha_X eta_X etap_X Twiss parameters for the X plane use_twiss_command_values If nonzero then the values for 3 a 7 and y are taken from the twiss_output command It is an error if no twiss_output command has been given Po Central momentum of the bunch sigma_dp sigma_s Fractional momentum spread 6 and bunch length Note that sigma_s is actually the length in 8z cx t so that for G lt lt 1 the length of the bunch in time will be greater than one might expect dp_s_coupling Specifies the coupling between s and 6 defined as sd a 05 emit_z beta_z alpha_z Provide another way to specify the longitudinal phase space either separately from or in combination with sigma_dp sigma_s and dp_s_coupling Basically which values elegant uses depends on what one sets to nonzero values If one sets emit_z then sigma_dp sigma_s and dp_s_coupling are ignored If one doesn t set emit
100. c and electric field components NOT RECOMMENDED See below Parallel capable yes 268 Units Default PHASE DEG TILT RAD rotation about longitudinal axis FREQUENCY HZ 2356000000 VOLTAGE V peak deflecting voltage PHASE REFERENCE phase reference number to link with other time STRING NULL lt filename gt lt x gt lt y gt form dependent elements specification of input file giv ing voltage waveform factor vs time EG done _ long noise long 1 If non negative pass on which D END PASS long 1 If non negative pass on which GROUP string NULL Optionally used to assign an element to a group with a user defined name Group names will appear in the pa rameter output file in the col umn ElementGroup NB Although this element is correct insofar as it uses the fields for a pure TM110 mode it is recommended that the RFDF element be used instead In a real deflecting cavity with entrance and exit tubes the deflecting mode is a hybrid TE TM mode in which the deflection has no dependence on the radial coordinate To derive the field expansion we start with some results from Jackson I7 section 8 7 The VOLTAGE WAVEFORM VOLTAGE PERIODIC If non zero voltage waveform is periodic with period given by time span ALIGN WAVEFORMS VOLTAGE_NOISE PHASE_NOISE GROUP_VOLTAGE_NOISE GROUP_PHASE_NOISE VOLTAGE_NOISE_GROUP PHASE_NOISE _GROUP START_PASS If non zero waveforms t 0 is align
101. c sextupole strength _ Koo Mdoe o0 seometric octupole strength Ka i 000 i AD ooo aD oo RAD double rotation about incoming longi Leela a i M aoe 00 entrance pole Tace curvature CIM doue o0 exit pote face curvature HGAP PM doube 00 hal gap between poles FINT aoe 0 5 edgefeid integral M double 00 misalignment Doo m ioe foo miem Dz um ome oo iie Te ome oo racional strength ror ETILT RAD double error rotation about incoming longitudinal axis N KICKS Teng number of Kc NONLINEAR long 1 include nonlinear field compo TPE Tine en o SYNCH_RAD long include classical synchrotron Ona oos Lata o o EDGELEFTECTS Ions 1 indude entrance edge coctis EDGE EFFECTS lons 1 indude exit edge effects PEDGE ORDER oms odee matrix order PARAXIAL om fo ase paraxial approximation TRANSPORT long use incorrect TRANSPORT METHOD STRING modified midpoint integration method modified 209 KSBEND continued A kick bending magnet which is NOT canonical but is better than a 2nd order matrix implemen tation Recommend using CSBEND instead Default GROUP string NULL Optionally used to assign an element to a group with a user defined name Group names will appear in the pa rameter output file in the col umn ElementGroup 210 KSEXT 9 38 KSEXT A canonical kick sextupole which differs from the MULT element with ORDER 2 in that it can be used for ch
102. case the arrival time of the reference particle is defined as 0 pipe input output Standard SDDS toolkit pipe option authors M Borland ANL APS 105 coreFmittance 7 2 coreEmittance e description Computes the slice emittance for 80 85 90 95 and 100 fractions of the beam e synopsis coreEmittance input inputFilename nSlices numberO0fSlices pngRoot lt string gt pngThickness lt integer gt 2 e files The input file is a particle output file from elegant or a compatible program e switches input Specify the name of the input file nSlices Optionally specify the number of longitudinal slices The default is 100 pngRoot Optionally specify the file rootname for PNG graphics files If omitted no PNG files are created pngThickness Optionally change the thickness of lines for PNG graphics The default is 2 e author X Dong 106 7 3 csrImpedance csrImpedance description Computes the steady state CSR impedance with shielding by parallel plates By default the computed impedance is for a dipole magnet that bends the beam in a complete circle synopsis csrImpedance outputFile pipe out height valueInMeters radius valueInMeters frequencyLimit maximum valueInHz minimum valueInHz n integer filter cutoffi1 cutoff2 angle radians files outputFile SDDS file containing computed impedance May be used directl
103. ced points in time However the time values should increase monotonically This element simulates a dipole kicker only For multipole kickers see the MBUMPER element Explanation of lt filename gt lt x gt lt y gt format Several elements in elegant make use of data from external files to provide input waveforms The external files are SDDS files which may have many columns In order to provide a convenient way to specify both the filename and the columns to use we frequently employ lt filename gt lt x gt lt y gt format for the parameter value For example if the parameter value is waveform sdds t A then it means that columns t and A will be taken from file waveform sdds The first column is always the independent variable e g time position or frequency while the second column is the dependent quantity 143 CENTER 9 4 CENTER An element that centers the beam transversely on the ideal trajectory Parallel capable yes Px oae conter x coordmates XP tong 1 center x coordinates Py o center y coordinates YP os 1 center y eoordinates a O SC a Dema __ long o0 center delta coordinates long o center t coordinates ORICON long compute centering T for first beam only apply to all ee PASS e If nonnegative do centering on the nth pass only iiaa i NULL Optionally used to assign an element to a group with a user defined name Group names will appear in the pa rameter out
104. ch is the default 162 CWIGGLER 9 12 CWIGGLER Tracks through a wiggler using canonical integration routines of Y Wu Duke University Parallel capable yes pa fame P00 Toad Tena pee es O B ies Lee Maximum on axis magnetic ical gaa BX a i Maximum on axis magnetic field Ignored if BLMAX is nonzero BY_MAX double Maximum on axis magnetic field Ignored if BLMAX is nonzero DXi oo isatigment Dy Fate oo satigment PZ Fate oo satigment rie obe foo Rotation about beam axis PERIODS Tong o Number of wiggler periods STEPS PER PERIOD long 10 Integration steps per period INTEGRATION ORDER long 4 Integration order 2 or 4 BY FILE STRING RUTE a of SDDS file with By BX_FILE STRING NULL of SDDS file with Bx BY_SPLIT_POLE long Use split pole expansion for Ce ee ee SYNCH_RAD long Melada classical synchrotron pom bal p e long Include incoherent syn chrotron radiation scatter ing ISRIPART long 1 Include ISR for single particle beam only if ISR 1 and ISRIPART 1 SINUSOIDAL long Ideal sinusoidal wiggler If non zero BX_FILE and BY_FILE are not used VERTICAL long If SINUSOIDAL is non zero then setting this to non zero gives a vertical wiggler De fault is horizontal 163 CWIGGLER continued Tracks through a wiggler using canonical integration routines of Y Wu Duke University Default HELICAL long Ideal helical wiggler If non zero and SINUSOIDAL is a
105. ck KICK 1 B2 x2 PACALIBRATION __ double 1 actor applied to obtain x kik VCALIBRATION double 1 factor applied to obtain y kick EDGE EFFECTS Tong 0 melude edge effects FORDER oms o matrix order O O STEERING long 1 use for steering SYNCH_RAD long include classical synchrotron ee PP E long include incoherent syn chrotron radiation scatter ing Pe tole if L 0 use this length for ra diation computations De B NULL Optionally used to assign an element to a group with a user defined name Group names will appear in the pa rameter output file in the col umn ElementGroup 202 KOCT 9 33 KOCT A canonical kick octupole Parallel capable yes Defaul 00 Im double 00 geometric strength double Eel rotation about longitudinal M axis double 00 hore radius T double field at pole tip used if bore nonzero er Top aia ge grea DY doubt 00 meme Dz M aoe 0 0__nisalignment SESS doe 00 Fractional strength error NKOS oe a Prnumber of kicks SYNCH_RAD long include classical synchrotron aac DD SYSTEMATIC_MULTIPOLES STRING NULL input file for systematic multi Pe eee ee a ee D poles INTEGRATION_ORDER long 4 integration order 2 or 4 SQRT_ORDER long Order of expansion of square root in Hamiltonian 0 means no expansion ISR long include incoherent syn chrotron radiation scatter ing ISRIPART long 1 Include ISR for s
106. closed or bit value is placed in variable lt name gt lt occurence gt yco GROUP string NULL Optionally used to assign an element to a group with a user defined name Group names will appear in the pa rameter output file in the col umn ElementGroup 312 WAKE 9 103 WAKE Longitudinal wake specified as a function of time lag behind the particle Parallel capable yes Defaul INPUTFILE STRING NULL name of file giving Green func Pe ee ee TCOLUMN STRING NULL column in INPUTFILE con fee tees ce eee WCOLUMN STRING NULL column in INPUTFILE con ee eae CHARGE C double e beam charge or use CHARGE element FACTOR factor to multiply wake by N_BINS long 128 number of bins for current his togram INTERPOLATE ions o interpolate wake __ s SMOOTHING long Use Savitzky Golay filter to smooth current histogram SG_HALFWIDTH long 4 Savitzky Golay filter half width for smoothing SG_ORDER long 1 Savitzky Golay filter order for smoothing CHANGE TO C iog o change central momentum a LONG ere eo Pe es allow beam longer than wale data AEE A PASSES M Number of passes over which to linearly ramp up the wake to full strength GROUP string NULL Optionally used to assign an element to a group with a user defined name Group names will appear in the pa rameter output file in the col umn ElementGroup The input file for this element gives the longitudinal Green functi
107. cluded e n_slices The number of slices into which to cut individual dipoles quadrupoles and sextuoples for computations 10 has been found to work for all rings tested but users are advised to ensure it is sufficient for their cases e emit_x beta_x alpha_x eta_x etap_x and related quantities for y and z If matched 0 then these specify the starting beam ellipses in all three planes This command performs several functions In the most basic form it propagates beam moments i e the 6x6 sigma matrix from the beginning to the end of a transport line including coupling from rotated elements or offset sextupoles This can be performed with or without synchrotron radiation effects in dipoles quadrupoles and sextupoles NB radiation effects are not yet included for wigglers These computations include the evolution of the trajectory due to errors and if included synchrotron radiation If desired the command will instead compute the periodic beam moments In this case the user must include an appropriate rf cavity in the lattice in order to get valid results By appropriate rf cavity we mean that it must have the right voltage frequency and phase to support stored beam It is also suggested that the user compute the closed orbit using closed_orbit so that the computations are performed on the closed orbit The results of moments computation may be subjected to optimization using values at marker elements See the doc
108. computation of undulator radiation properties including power density and intensity distributions Program by H Shang R Dejus M Borland X Jiao sddsrandmult Simulates the effect of random mechanical errors in a quadrupole or sex tupole generating multipole error data that can be used with elegant s KQUAD and KSEXT elements Program by M Borland sddssampledist This program allows creating particle distributions from user designed distribution functions It is thus a more flexible alternative to bunched_beam This program is part of the SDDS toolkit See the SDDS toolkit manual for documentation Program by M Borland and H Shang smoothDist6s Increases the number of particles in an input particle distribution At the same time smooths the distribution and adds optional energy and density modulation Intended to be used to increase the number of particles produced by a photoinjector simulation to improve stability of CSR and LSC simulations Also useful in studying the growth rate for energy and density modulations See also doubleDist6 The script spiffe2elegant allows converting the output of the PIC code spiffe to the same form as output by elegant Note that elegant will read spiffe output directly This script just allows converting the data for use with related programs such as sddsanalyzebeam touschekLifetime This program calculates Touschek lifetime using A Piwinski s formula Input files are generat
109. corporates a simulation of Coherent Synchrotron radiation Parameter Name Deuk SEE TUTOR FREQUENCY_CUTOFF1 double Lowest spatial frequency at which low frequency cutoff filter is 1 If not given defaults to LOW_FREQUENCY_CUTOFH1 HIGH_FREQUENCY_CUTOFF0 double Spatial frequency at which smoothing high frequency cutoff filter begins If not positive no frequency filter smoothing is done Fre quency is in units of Nyquist 0 5 binsize HIGH_FREQUENCY_CUTOFF1 double 1 Spatial frequency at which smoothing high frequency cutoff filter is 0 If not given defaults to HIGH_FREQUENCY_CUTOFFO CLIP_NEGATIVE_BINS long 1 If non zero then any bins with negative counts after the filters are applied have the counts set to zero WAKE_FILTER_FILE Pe eer lined Name of file supplying wake ic ca l WFF_FREQ_COLUMN igo nee Name of column opine fre quency values for wakefield fil tering data WFF_REAL_COLUMN STRING NULL Name of column supplying real values for wakefield filter ing data WFF_IMAG_COLUMN STRING NULL Name of column supplying imaginary values for wakefield filtering data GROUP string NULL Optionally used to assign an element to a group with a user defined name Group names will appear in the pa rameter output file in the col umn ElementGroup For a discussion of the method behind this element see M Borland Simple method for particle tracking with coherent synchrotron radiation Phys Re
110. crease the number of particles produced by a photoinjector simulation to improve stability of CSR and LSC simulations The algorithm is as follows For each doubling insert a new particle near every pair of existing particles in time The particle has a new t value but the same x xp y yp p as one of the original particles Bin the beam according to t into a large number of bins Randomize the assignment of p values relative to other coordinates across particles in the same bin while additionally adding a small random value to each p value synopsis doubleDist6 input name output name doublings number nt bins files input A particle distribution file such as might be used with sdds_beam output A particle distribution file such as might be used with sdds_beam switches doublings n The number of times to double the size of the distribution The number of particles in the output file is 2 times the number in the input file nt bins The number of time bins to use for momentum randomization This helps to avoid having many particles with exactly same momentum author M Borland ANL APS see also smoothDist6s 108 haissinski 7 5 haissinski e description haissinski solves the Haissinski equation for the bunch steady state longitu dinal distribution in the presence of various impedances e synopsis haissinski twissFile resultsFile wakeFunction file tC
111. currences of the element name total_occurrences specifies how many new elements to add up to a maximum of 100 while the entries in the array occurrence specify the occurrences after which to add the new elements If total_occurrences is non zero then skip must be set to zero and the name must be the exact name no wild card matching 41 6 25 insert_sceffects insert_sceffects type setup command function set up for transverse space charge calculation This feature can not work with concatenation matrix tracking N B This feature is not designed for space charge calculations in guns or linacs It is only intended for simulating space charge in rings amp insert_sceffects long amp end STRING name NULL STRING type NULL STRING exclude NULL long disable 0 long clear 0 STRING element_prefix MYSC long skip 0 long vertical 0 long horizontal 0 long nonlinear 0 uniform_distribution 0 name Possibily wild card containing string specifying the name of the elements after which to insert the space charge kick element type Possibily wild card containing string specifying the type of the elements after which to insert the space charge kick element exclude Possibily wild card containing string specifying the name of elements to be ex cluded from the insertion of the space charge kick element disable If nonzero the command is ignored clear If nonzero all pri
112. d 0 to the parameter name These names must appear in capital letters minimum maximum Minimum and maximum values that will be assigned to the target parameter 45 load_parameters 6 29 load_parameters e type setup command e function load parameters for elements from an SDDS file amp load_parameters long for amp end STRING filename NULL STRING filename_list NULL STRING include_name_pattern NULL STRING exclude_name_pattern NULL STRING include_item_pattern NULL STRING exclude_item_pattern NULL G STRING include_type_pattern NULL STRING exclude_type_pattern NULL long change_defined_values 0 long clear_settings 0 long allow_missing_elements 0 long allow_missing_ parameters 0 long allow_missing_files 0 ce_occurence_data 0 long verbose 0 long use_first 0 e filename Name possibly containing the s field of SDDS file from which to take data The file must contain some of the following columns ElementName Required string column The name of the element to change Element Parameter Required string column The name of the parameter of the element to change ParameterValue Optional double column If given gives value of the parameter named in ElementParameter for element named in ElementName Parameter ValueString Optional string column If Parameter Value is not present then this column must be present T
113. d If the value is 2 leading order cubic nonlinear effects are included If the value is 3 or higher higher order effects are included 207 KQUSE 9 36 KQUSE A canonical kick element combining quadrupole and sextupole fields Parallel capable yes L K K 4 length geometric quadrupole strength EO o Mm o KO e dou Koo e dou w 1 2 DX oo Do 00 geometric sextupole strength De DY a oe 0 0 ieme oo rotation about longitudinal axis misalignment aan fractional strength error for K1 FSE1 M double FSE2 double fractional strength error for K2 N_KICKS number of kicks SYNCH_RAD long include classical synchrotron radiation INTEGRATION ORDER long 4 integration order 2 or 4 ISR long include incoherent syn chrotron radiation scatter ing ISRIPART long 1 Include ISR for single particle beam only if ISR 1 and ISRIPART 1 MATRIXTRACKING iong 0 For testing only GROUP string NULL Optionally used to assign an element to a group with a user defined name Group names will appear in the pa rameter output file in the col umn ElementGroup 208 KSBEND 9 37 KSBEND A kick bending magnet which is NOT canonical but is better than a 2nd order matrix implemen tation Recommend using CSBEND instead Parallel capable yes cM double 00 foo TANGLE RA double 00 boada KO M doe o0 geometric quadrupole strength Kao AM doe o0 scometri
114. d dispersion This is done by computing a linear matrix for every particle The linear matrix is composed from Twiss parameters tunes ALPHAC2 double Second order momentum com paction factor 200 dispersion etc supplied by the user The user can also supply selected chromatic and amplitude derivatives of these quantities which are used to compute the individual particle s beta functions tune dispersion etc which in turn allows computing the individual particle s linear matrix Using this element is very similar to using linear chromatic matrix tracking via the setup_linear_chromatic_t command The advantage is that using LMATRIX one can split a ring into segments and place for example impedance elements between the segments This element was inspired by requests from Y Chae APS N B There is a bug related to using ILMATRIX that will result in a crash if one does not request computation of the twiss parameters If you encounter this problem just add the following statement after the run_setup command amp twiss_output matched 1 amp end 201 KICKER 9 32 KICKER A combined horizontal vertical steering magnet implemented as a matrix up to 2nd order For time dependent kickers see BUMPER Parallel capable yes ee ee ieee ERICK RAD double 0 0___ x kick angle VRIR RAD double 0 0___ y Fick angle feo er rotation about longitudinal re _ bebe ied normalized sextupole strength e g ki
115. dance DY M donb 0 0 misalignment DY S O FACTOR double 1 Factor by which to multiply x D S a E XFACTOR double 1 Factor by which to multiply x E a YFACTOR double 1 Factor by which to multiply y o e a WAKES ooo STRING NULL filename for output of wake WAKE_INTERVAL long 1 interval in passes at which to output wake WAKE_START long pass at which to start to out put wake WAKE_END long 2147483647 pass at which to stop to output E Oa Ded n START_ON_PASS long The pass on which the a impedance effects start RAMP_PASSES long Number of passes over which to linearly ramp up the impedance to full strength HIGH_FREQUENCY_CUTOFF0 double 1 Frequency at which smoothing filter begins If not positive no frequency filter smoothing is done Frequency is in units of Nyquist 0 5 binsize HIGH_FREQUENCY_CUTOFF1 double 1 Frequency at which smoothing filter is 0 If not given defaults to HIGH FREQUENCY CUTOFPO0 X_DRIVE_EXPONENT long 1 Exponent applied to x coordi sD nae te paris Y_DRIVE_EXPONENT long 1 Exponent applied to y coordi OS nner paige X PROBE_EXPONENT long Exponent applied to x coordi IOON anette partiis oo Y_PROBE_EXPONENT long Exponent applied to y coordi eee Pt ate panies o 324 ZTRANSVERSE continued A simulation of a single pass broad band or functionally specified transverse dipole impedance Default GROUP string NULL Optionally used to assign an element to a group with a use
116. dard output 132 ignoreMismatch If given then mismatch of element names between the twiss and momentum aperture files is ignored May be useful if there are zero length elements deltaLimit Give the maximum value for the momentum aperture in percent If not specified the values in the momentum aperture input file are used possibly altered by the use of the RF option with the limit qualifier If both deltaLimit and RF limit are given the smaller is enforced e author A Xiao ANL APS 133 view3dGeometry 7 18 view3dGeometry e description Allows viewing the 3D geometry of a beamline using the freewrl viewer e examples To generate 3d data and view view3dGeometry rootname aps showNames QUAD BEN showCoordinates MON To view again freewrl aps x3d e synopsis view3dGeometry rootname string showNames listOfElementTypes showCoordinates listOfElementTypes input files rootname flr Contains floor coordinate output from elegant floor_coodinates command rootname param Contains parameter output from elegant run_setup command output files rootname x3d Input data to freewrl switches rootname Gives the rootname of the run used to identify the input and output files showNames Gives list of element types with optional wildcards for which the element name will be shown in the viewer Default SBEN
117. dechirper using a corrugated pipe wakefield based on the theoretical treatment of K Bane 38 This was suggested by P Emma LBNL e If not set by the users the N_KICKS parameter of RFCA and RFCW will now be automatically set in order to ensure a sufficient number of kicks defined as 100 kicks per wavelength This may be excessive for high energy beams 1 4 1 5 Automatic selection of the number of bins and bin size for the WAKE element was modified to avoid warning messages The EDRIFT element can now be subdivided using the usual element division commands The CSRCSBEND element was improved to support the integrated Green s function method for steady state wakes This was done with the assistance of R Ryne LBNL The NIBEND element now allows positioning of the fringe region relative to the reference plane The fringe region may be inside outside or centered on the reference plane This was added after discussions with N Nakamura KEK New and Modified Commands When determining momentum aperture momentum _aperture the tunes near the aperture boundary are now recorded Changes for Parallel Version Only Changes to the parallel version are made by Y Wang ANL unless otherwise noted e In the last version we added the ability to change the randomization mode for different 1 6 1 7 processors However the default mode was not changed to one of the improved methods even though the documentation said it had
118. dividual_matrices If non zero the matrices in the SDDS file are the individual on trajectory matrices of the elements rather than the concatenated matrix of the beamline SDDS_output_match A wildcard string which element names must match in order for data to appear in the SDDS output file output_at_each_step A flag indicating whether matrix output is desired at every simu lation step start_from The optional name of the accelerator element from which to begin concate nation and output start_from_occurrence If start_from is not NULL the number of the occurrence of the named element from which to start 48 modulate_elements 6 31 modulate_elements e type setup command e function define parameters for time dependent modulation of elements e N B this feature is somewhat experimental Please use with caution and report any problems on the forum amp kmodulate_elements STRING name NULL STRING item NULL STRING type NULL STRING expression NULL STRING filename NULL STRING time_column NULL STRING amplitude_column NULL long refresh_matrix 0 long differential 1 long multiplicative 0 long start_occurence 0 long end_occurence 0 double s_start 1 double s_end 1 STRING before NULL STRING after NULL long verbose 0 amp end N B This command will produce unpredictable results when used with error_element alter_elements and load_parameters excep
119. drupole strengths This means that when the lattice is saved using save_lattice the quadrupoles will have the corrected values This would be used for correcting the tunes of a design lattice for example but not for correcting tunes of a perturbed lattice use_perturbed_matrix If nonzero requests use of the perturbed correction matrix in performing correction For difficult lattices with large errors this may be necessary to obtain correction In general it is not necessary and only slows the simulation 30 6 16 amp cou amp end coupled_twiss_output coupled_twiss_output type setup action command function set up or execute computation of coupled twiss parameters and beam sizes pled_twiss_output STRING filename NULL long output_at_each_step 0 long emittances_from_twiss_command 1 double emit_x 0 double emittance_ratio 0 01 double sigma_dp 0 long calculate_3d_coupling 1 long verbosity 0 long concat_order 2 filename The incomplete name of the SDDS file to which coupled twiss parameters and beam sizes will be written Suggested value s ctwi output_at_each_step If nonzero then this is a setup command and results in compu tations occurring for each simulation step e g for each perturbed machine if errors are included If zero then this is an action command and computations are done immediately e g for the unperturbed machine emittances_from_twiss_co
120. dto madto description madto translates an elegant style or a MAD file with some restrictions into formats accepted by other programs such as COSY PARMELA PATPET PATRICIA TRANSPORT and XORBIT Will also generate an SDDS file containing lattice data examples The following command would translate the elegant lattice file Lattice 1te into a TRANSPORT lattice file with 10mm quadrupole aperture and 5mm sextupole aperture at an energy of 1 5 GeV madto lattice lte lattice trin transport 10 5 1 5 synopsis madto inputfile outputfile patricia patpet transport quadAper mm sextAper mm p GeV c parmela quadAper mm sextAper mm p GeV c sdds p GeV c cosy quadAper mm sextAper mm p MeV c xorbit angle_tolerance value flip_k_signs magnets filename header filename ender filename files inputfile An elegant style lattice file outputfile A file containing lattice data in the chosen format switches cosy Provide data for the program COSY INFINITY This can take a little while as the program must figure out the Enge coefficients that correspond to the FINT and HGAP values for all the dipoles The user should test the output carefully patricia Provide data for the program PATRICIA patpet Provide data for the program PATPET a merging of the programs PATRI CIA and PETROS transport quadAper mm sextAper mm p GeV c Provide da
121. e one must verify that a sufficient number of kicks are being used by looking at the trajectory closure and length of an on axis particle by tracking Using INTEGRATION_ORDER 4 is recommended to reduce the number of required kicks Normally one specifies the higher order components of the field with the K1 K2 K3 and K4 parameters The field expansion in the midplane is B x Bo 1 44_ Kapo gn By setting the USE_bN flag to a nonzero value one may instead specify the b1 through b4 parameters which are defined by the expansion B x Bo 1 gt gt a This is convenient if one is varying the dipole radius but wants to work in terms of constant field quality Setting NONLINEAR O turns off all the terms above K_1 or b_1 and also turns off effects due to curvature that would normally result in a gradient producing terms of higher order Edge effects are included using a first or second order matrix The order is controlled using the EDGE_ORDER parameter which has a default value of 1 N B if you choose the second order matrix it is not symplectic Some confusion may exist about the edge angles particularly the signs For a sector magnet we have of course E1 E2 0 For a symmetric rectangular magnet E1 E2 ANGLE 2 If ANGLE is negative then so are E1 and E2 To understand this imagine a rectangular magnet with positive ANGLE If the magnet is flipped over then ANGLE becomes negative as does the bending radius p Hence to keep
122. e sp6 User defined string parameter for command substitution for sequence sp7 User defined string parameter for command substitution for sequence sp8 User defined string parameter for command substitution for sequence sp9 Optionally used to assign an element to a group with a user defined name Group names will appear in the pa rameter output file in the col umn ElementGroup e It must be executable from the commandline e It must read the initial particle distribution from an SDDS file This file will have the usual 285 columns that an elegant phase space output file has along with the parameter Charge giving the beam charge in Coulombs The file will contain a single data page e It must write the final particle distribution to an SDDS file This file should have all of the columns and parameters that appear in the initial distribution file Additional columns and parameters will be ignored as will all pages but the first The SCRIPT element works best if the script accepts commandline arguments In this case the COMMAND parameter is used to provide a template for creating a command to run the script The COMMAND string may contain the following substitutable fields 1 i Will be replaced by the name of the input file to the script elegant writes the initial particle distribution to this file 2 o Will be replaced by the name of the output file from the script elegant expects the script to write t
123. e the user need only specify the material thickness L and the radiation length XO For materials thinner than 0 001X the user must specify additional parameters namely the atomic number Z atomic mass A and mass density RHO of the material Note that the density is given in units of kg m Multiply by 10 to convert g cm to kg m In addition the simulation parameter PLIMIT may be modified To understand this parameter one must understand how elegant simulates the thin materials First it computes the expected number of scattering events per particle E opnL ie and where n is the number density of the material L is the thickness of the material Ay 2282 z3 K A fa with re the classical electron radius and a the fine structure constant The material is then broken into N slices where N E Phimiz For each slice each simulation particle has a probability E N of scattering If scattering occurs the location within the slice is computed using 226 a uniform distribution over the slice thickness For each scatter that occurs the scattering angle 0 is computed using the cumulative probability distribution F gt 8o eee This can be solved for 65 giving 0 GEE For each scatter F is chosen from a uniform random distribution on 0 1 Energy loss Energy loss simulation is very simple The energy loss per unit distance traveled x is ue E Xo Hence in traveling through a material
124. e are re arranged according to their type Note sub beamline definitions in the original lattice file will be destroyed from the output file This feature is intended to be used together with insert_elements and replace_elements 81 sdds_beam 6 51 sdds_beam e type setup command e function set up for tracking and histogram analyzing of particle coordinates stored in an SDDS file amp sdds_beam STRING input NULL STRING iput_list NULL STRING input_type elegant long n_particles_per_ring 0 STRING selection_parameter NULL STRING selection_string NULL long one_random_bunch 0 long reuse_bunch 0 long prebunched 0 long sample_interval 1 long n_tables_to_skip 0 I fo long center_transversely long center_arrival_time 0 double sample_fraction 1 double p_lower 0 0 double p_upper 0 0 long save_initial_coordinates 1 long reverse_t_sign 0 amp end e input Name of an SDDS file containing coordinates of input particles e input_type May be elegant or spiffe indicating the name of the program that wrote the input file The expected data quantities for the different types are elegant x xp y yp t p where x and y are in meters xp x and xp y are dimen sionless t is in seconds and p 8y is the dimensionless momentum If this file is to be generated by the user the expected units string in the column definitions should be m s
125. e centroid and sigma data is computed for each turn with the s coordinate increasing continuously final_pass A flag indicating whether the centroid and sigma output should be computed only from the data from the final pass By default the statistics include data from all passes default_order The default order of transfer matrices used for elements having matrices concat_order If non zero the order of matrix concatenation used print_statistics A flag indicating whether to print information as each element is tracked random_number_seed A seed for the random number generators If zero a seed will be generated from the system clock 78 correction_iterations Number of iterations of tune and chromaticity correction p_central Central momentum of the beamline about which expansions are done This is By p_central_mev Central momentum of the beamline in MeV c about which expansions are done Ignored if p_central is nonzero always_change_pO If nonzero then elegant will match the reference momentum to the beam momentum after each element For example in a beamline with radiation losses one might want to adjust downstream magnets to match the energy of the incoming beam expand_for Name of an SDDS file containing particle information from which the central momentum will be set The file contents are the same as required for elegant input with the sdds_beam namelist tracking_updates
126. e colons are important For this particular example one would set ORDER 1 in the MATR definition In general the Ci are zero except for C5 which is usually equal to the length of the element which must be specified with the L parameter in the MATR definition 225 MATTER 9 48 MATTER A Coulomb scattering and energy absorbing element simulating material in the beam path Parallel capable yes ef fome fem o o SCS ame 0 0 radiation oh EASTC long elastic scattering If zero then particles will lose energy due to material ENERGY STRAGGLE long Use simple minded energy straggling model Ignored for ELASTIC scattering ZS tong o Aomine O C i eee 00 Density aa eee 0 05 Probability cutoff for each slice a NULL Optionally used to assign an element to a group with a user defined name Group names will appear in the pa rameter output file in the col umn ElementGroup This element is based on section 3 3 1 of the Handbook of Accelerator Physics and Engineer ing specifically the subsections Single Coulomb scattering of spin 4 particles Multiple Coulomb scattering through small angles and Radiation length There are two aspects to this element scattering and energy loss Scattering The multiple Coulomb scattering formula is used whenever the thickness of the material is greater than 0 001X where Xo is the radiation length Note that this is inaccurate for materials thicker than 100X For this regim
127. e distribution_cutoff 3 3 3 3 double Momentum_Aperture_scale 0 85 G Momentum_Aperture NULL G XDist NULL G YDist NULL STRING ZDist NULL G TranDist NULL G FullDist NULL G bunch NULL 88 long long amp end STRING loss NULL STRING distribution NULL STRING initial NULL STRING output NULL long nbins 100 long n_simulated 5E6 double ignored_portion 0 01 long i_start 0 long i_end 1 long do_track 0 match_position_only 0 overwrite_files 1 long verbosity 0 charge Bunch charge in C Can not be zero frequency Bunch repeating frequency emit_x emit_y RMS emittance for the X Y plane Ignored if RMS normalized emittance is nonzero emit_nx emit_ny RMS normalized emittance for the X Y plane sigma_dp sigma_s Fractional momentum spread 6 and bunch length distribution_cutoff The number of sigmas to use at each plane for Gaussian beam Momentum_Aperture Input filename contains estimated momentum aperture at each TSCATTER element Momentum_Aperture_scale This value times the aperture value from Momentum_Aperture file sets up the limitation m of the simulation Only particles have 6 gt m will be kept And the scattering rate is calulated at this value XDist YDist ZDist Input filename of 2D histogram table of X Y and Z plane X and Y are ignored when TranDist or FullDist is present TranDist
128. e first column is always the independent variable e g time position or frequency while the second column is the dependent quantity 265 RFMODE 9 73 RFMODE A simulation of a beam driven TM monopole mode of an RF cavity Parallel capable yes PRA Ohm double 0 0 shunt impedance PRS Ohm double 0 0 shunt impedance a27 Fs rq om P00 Pravin QS FFREQ Hz doubie 0 0 Srema CHARGE C double ae beam charge or use CHARGE element NTAN V ioe 00 imiia voltage INTIAL PHASE RAD doube 00 initial phase INITIALT S double time at which INITIAL_V and ees EPS intrtat Paase te ma o aoube foo normatized Toad impedance BIN_SIZE S double bin size for current histogram Zo Ee E N_BINS long 20 number of bins for current his Ce Pe ee PRELOAD long preload cavity with steady icc I Seca PRELOAD_FACTOR double 1 multiply preloaded field by pe I ee ee RIGID_UNTIL_PASS long don t affect the beam until this aasa OE E DETUNED_UNTIL_PASS long cavity i is completely detuned PEP i pa SAMPLE_INTERVAL long passes between output RECORD STRING NULL output file for cavity fields oo l PASS e if nonzero don t accumulate a ee ia long interval in passes at which to apply PASS_INTERVAL times the field may increase speed FREQ_WAVEFORM STRING NULL lt filename gt lt x gt lt y gt form specification of input file giving frequency f0 vs time where f0 is the frequency given with the FREQ paramete
129. e same including the sign as the individual TILT values one would give to all the elements represented by 276 SAMPLE 9 79 SAMPLE An element that reduces the number of particles in the beam by interval based or random sampling Parallel capable yes FRACTION _ double T fraction to keep foe Mica P interval between sampled par Pe has mid NULL Optionally used to assign an element to a group with a user defined name Group names will appear in the pa rameter output file in the col umn ElementGroup 277 SBEN 9 80 SBEN A sector dipole implemented as a matrix up to 2nd order Parallel capable yes Po ee lt lt lt ANGIE RAD double 00 bodan KO Mdoe 00 geometrie focusing Strength Er RAD double 00 entrance edge ange RAD doube 00 exit edge ange E2 TILT RAD double rotation about incoming longi Da el led A RST aome 010 geometric sextapole strength PAT I M aoue 0 0 entrance pote face curvature m ff aombe 0 0 exit pote face curvature Heap ar double 00 halEgup between poles PRINT _ double fos edge fieXd integral Dx m ae oo misaligment of entrance DY i toute oo misalignment of entrance bz m ane 0 0 misalignment of entrance CFSE aoe 0 0 fractional strength error ETILT RAD double error rotation about incoming case aa cn ig ie EDGELEFFECTS Tong I ineinde entrance edge effets EDGE EFFECTS Tong 1 ineinde
130. easurement data The results are analyzed separately for each error set then combined to give means and error bars seed integer Seed for the random number generator Recommend a large positive odd integer less than 271 If no seed is given or if the given seed is negative then a seed is generated from the system clock resolution zResolutionm yResolutionm The resolution of the beam size mea surements in meters These values are subtracted in quadrature from the measured beam sizes to obtain the true beam sizes limitMode resolution zero reject If measured or perturbed beam sizes are less than the resolution or less than zero then errors will result One can use this option to limit minimum beam size values or reject points In general if one has to do this the measurement is probably bad deviationLimit zLevelm yLevelm Specifies the maximum deviation in meters from the fit that data points may have and still be included An initial fit is performed for each randomized set or the raw data as appropriate Outliers are then removed and the fit is repeated verbosity level Higher values of level result in more informational printouts as the program runs e author M Borland ANL APS 119 7 11 sddsfindresonances sddsfindresonances description sddsfindresonances scans frequency map analysis data and identifies reso nances examples sddsfindresonances run fma run re
131. ebeam both emittances are present and these options are ignored undulator period meters numberO0fPeriods integer kx value ky value phase value energy eV Specify undulator parameters If en ergy of first harmonic photons is given kx 0 and ky is computed corresponding to a horizontally deflecting undulator phase specifies the phase difference in degrees for a canted undulator electronBeam current Amps energy Gel spread fraction xsigma mm ysigma mm xprime mrad yprime mrad nsigma numberspeccifies electron beam parameters Only the current is needed as other data will be drawn from the input file current electron beam current in A default is 0 1A energy electron energy in Gev default is 7 0Gev spread electron energy spread xsigma horizontal RMS beam size mm ysigma vertical RMS beam size mm xprime horizontal RMS divergence mrad yprime vertical RMS divergence mrad nsigma no of standard deviations of electron beam dimensions size and diver gence to be included pinhole distance m xposition value yposition value xsize value ysize value xnumber integer ynumber integer Specifies pinhole parameters Pinhole parameters are not needed for computing on axis brilliance i e mode 3 distance distance from the source m distance 0 0 gives angular flux xposition X coordinate for center of pinhole mm or mrad for distance 0 ypo
132. ed evaluations of the optimization function If simplex optimization is used this is the number of allowed evaluations per pass n_passes The number of optimization passes made to achieve convergence simplex only A pass ends roughly when the number of evaluations is completed or the function doesn t change within the tolerance A new pass involves starting the optimization again using step sizes determined from the range of the simplex and the factor simplex_pass_factor n_restarts The number of complete restarts of the optimization simplex only This is an additional loop around the n_passes loop The difference is that a restart involves using the optimized result but the original step sizes It is highly recommended that this feature be used if convergence problems are seen restart_worst_term_factor restart_worst_terms Often when there are convergence problems it is because a few terms are causing difficulty Convergence can often be obtained by increasing the weighting of these terms If restart_worst_term_factor is positive then elegant will multiply the weight of the restart_worst_terms largest terms by this factor at the beginning of a restart 61 matrix_order Specifies the highest order of matrix elements that should be available for fitting Elements up to third order are available for the terminal point of the beamline and up to secod order for interior fit points Names for first second and third
133. ed from twiss_output and momentum_aperture Program by A Xiao track2sdds Translates output files including phase space files from version 39 of TRACK with ASCII output 32 into SDDS 103 e track2mag Uses TRACK output files to create a file similar to the magnets outupt file from elegant This gives a profile of the beamline that can be plotted with other data e The scripts makeSkewResponseCP and correctCoupling can be used to compute the cross plane response matrices for skew quadrupoles and to perform coupling correction using those matrices e tt view3dGeometry Uses freewrl viewer to display 3D geometry of a lattice 104 7 1 astra2elegant astra2elegant description Converts ASCII particle output from ASTRA to a binary SDDS file suitable for use with elegant This program is recommended over the astra2sdds program on the ASTRA website because the latter produces ASCII SDDS files that are quite slow to read synopsis astra2elegant inputFile LoutputFile centerReference pipe input output files inputFile ASCII particle output file from ASTRA outputFile SDDS file containing phase space data May be used directly with elegant switches centerReference Normally astra2elegant offsets the arrival time of all particles by the arrival time of the reference particle This behavior can be suppressed by giving the centerReference option In that
134. ed with first bunch arrival time Rms fractional noise level for voltage Rms fractional noise level for Rms noise level for phase Group number for voltage D D 269 longitudinal electric field for a TM mode is just E 2iEoV p cos ei 70 where p is an integer d is the length of the cavity and we use cylindrical coordinates p z The factor of 2z represents a choice of sign and phase convention We are interested in the TM110 mode so we set p 0 In this case we have E E 0 71 and using CGS units l H 2iEy 52 x Vet 72 For a cylindrical cavity the function Y for the m 1 aximuthal mode is U p o Ji kp cos 73 where k x11 R x1 is the first zero of J x and R is the cavity radius We don t need to know the cavity radius since k w c where w is the resonant frequency By choosing cos for the aximuthal dependence we ll get a magnetic field primarily in the vertical direction In MKS units the magnetic field is gt 2QEo _ J k gt OJ k B Gan sind cos patie f 74 p Op Using mathematica we expanded these expressions to sixth order in k p Here we present only the expressions to second order Taking the real parts only we now have E Egkpcos sinwt 75 k p cB Eo 2e sin cos wt 76 3k2 2 cBy Epo L cos cos wt 77 The Cartesian components of B can be computed easily cB cB cos cBgsing 78 E
135. ee A light e g t median aaraa string NULL Optionally used to assign an element to a group with a user defined name Group names will appear in the pa rameter output file in the col umn ElementGroup PHASE REFERENGE REFERENCE E phase reference number 308 UKICKMAP 9 100 UKICKMAP An undulator kick map e g using data from RADIA Parallel capable yes bar doubt P00 Tena st fees feet rotation about longitudinal axis DX M dobe 00 misalignment __ s DY m E FIELD_FACTOR Factor by which to multiply the x and y values in the in put file TRING NULL Name of SDDS file with undu ine aa e E Number of kicks into which to a n long Number of TEI for ra diation integral computations only KREF double Reference value of un dulator parameter K KREF FIELD_FACTOR is used for radiation integral calculations only assuming period L PERIODS SYNCH_RAD long include classical synchrotron mee Loge ISR long include incoherent syn chrotron radiation scatter ing GROUP string NULL Optionally used to assign an element to a group with a user defined name Group names will appear in the pa rameter output file in the col umn ElementGroup This element provides simulation of undulators using kick maps 27 A script km2sdds is provided with the elegant distribution to translate RADIA 8 output into SDDS for use by elegant Hi 00 ee Factor by which to multiply ee XY_
136. efield data then elegant either exits default or issues a warning if ALLOW_LONG_BEAM is nonzero In the latter case that part of the beam that is furthest from tmean is ignored for computation of the wake If the user has specified a fixed number of bins not recommended then elegant centers those bins on tmean Otherwise the binning range encompasses tmin At to tmaz At where At is the spacing of data in the wake file Create the arrival time histogram If any particles are outside the histogram range issue a warning If SMOOTHING is nonzero smooth the arrival time histogram Convolve the arrival time histogram with the wake function Multiply the resultant wake by the charge and any user defined factor Apply the energy changes for each particle This is done in such a way that the transverse momentum are conserved If CHANGE_PO is nonzero change the reference momentum of the beamline to match the average momentum of the beam 314 WATCH 9 104 WATCH A beam property motion monitor allowed modes are centroid parameter coordinate and fft Parallel capable yes 315 FRACTION double 1 fraction of particles to dump INTERVAL long 1 interval for data output in Fee dee E STARTPASS oms fo pas on which to start _ END_PASS long 1 pass on which to end inclu sive Ignored if negative F e a output filename possibly in eae see below TABEL S a STRING output
137. eld deflector using an approximate analytical solution FOR LOW ENERGY PARTICLES Parallel capable no Dotan TILT RAD double rotation about longitudinal axis double 1e 09 length of ramp 0 01 PNSECTIONS Tong 10 mmber ofsections PHASE REFERENCE long phase reference number to link with other time dependent elements DxO a aoe o0 misiem O M double 0 0 misalignment ____ _ _ GROUP string NULL Optionally used to assign an element to a group with a user defined name Group names will appear in the pa rameter output file in the col umn ElementGroup 275 ROTATE 9 78 ROTATE An element that rotates the beam about the longitudinal axis Parallel capable yes Defaul ree fea bias ee rotation about longitudinal axis a ial i NULL Optionally used to assign an element to a group with a user defined name Group names will appear in the pa rameter output file in the col umn ElementGroup The sign convention for the TILT parameter is confusing on this element In particular a positive TILT rotates the beam counter clockwise about the longitudinal axis This is the opposite sense to rotations of elements where a positive TILT rotates the element clockwise about the longitudinal axis Hence if one wanted to rotate a series of elements by 0 1 rad one could do the following ROT1 ROTATE TILT 0 1 ROT2 ROTATE TILT 0 1 BL line ROT1 ROT2 The TILT value for ROT1 is th
138. ely as well based on the fall off for a rectangular current 161 distribution The length of this rectangular bunch is taken to be twice the bunch length computed according to the BUNCHLENGTH_MODE parameter see below If your bunch is nearly rectangular then you probably want BUNCHLENGTH_MODE of 90 percentile e Exponential attenuation of a CSR wake with unchanging shape There are two options here First you can provide the attenuation length yourself using the ATTENUATION_LENGTH parameter Second you can set USELOVERTAKING_LENGTH 1 and let elegant compute the overtaking length for use as the attenuation length In addition you can multiply this result by a factor if you wish using the OL_MULTIPLIER parameter e Beam spreading model This model is not recommended It is based on the seemingly plau sible idea that CSR spreads out just like any synchrotron radiation thus decreasing the intensity The model doesn t reproduce experiments The Saldin 54 and overtaking length models rely on computation of the bunch length which is controlled with the BUNCHLENGTH_MODE parameter Nominally one should use the true RMS but when the beam has temporal spikes it isn t always clear that this is the best choice The choices are rms 68 percentile and 90 percentile The last two imply using half the length determined from the given percentile in place of the rms bunch length I usually use 68 percentile whi
139. en if no match ing elements are found after The name of an element If given the error is applied only to elements that follow the named element in the beamline before The name of an element If given the error is applied only to elements that precede the named element in the beamline 34 error_control 6 19 error_control e type setup command e function overall control of random errors amp error_control long clear_error_settings 1 WW oO long summarize_error_settings W fo long no_errors_for_first_step STRING error_log NULL double error_factor 1 amp end e clear_error_settings Clear all previous error settings e summarize_error_settings Summarize current error settings If non zero then the com mand has no other function except showing a summary of the current error settings e no_errors_for_first_step If non zero then there will be no errors for the first step This can be useful for fiducialization of phase and momentum profiles e error_log The incomplete name of a SDDS file to which error values will be written Recommended value s erl e error_factor A value by which to multiply the error amplitudes in all error commands The proper use of this command can be confusing A typical sequence will be as follows error_control clear_error_settings 1 error_log s erl amp end amp error_element kend amp error_element kend amp
140. entroid parameters are used on the closed_orbit command this flag should be set to 0 otherwise one will offset the beam central momentum by its own value soft_failure If there is an error during tracking e g a failure of orbit correction continue to produce file output This creates essentially empty slots in the files corresponding to the failed steps use_linear_chromatic_matrix For each particle a first order matrix is computed for the particular momentum offset of the particle using the linear chromaticity and linear dependence of the beta functions on momentum longitudinal_ring_only Tracks longitudinal coordinates only for a ring stop_tracking_particle_limit If a non negative is given then elegant will stop track ing when the number of particles falls below the given value It will be as if all the particles were lost 98 tune_shift_with_amplitude 6 61 tune_shift_with_amplitude e type setup command e function prepare for computation of tune shifts with amplitude e note must be given prior to the twiss_output command e methods Method 1 tune shifts with amplitude are computed via tracking a series of particles at different amplitudes or by a matrix method NAFF is used to determine the tunes from the tracking data It is the user s responsbility to optimize the parameters to ensure that results are reasonable Method 2 tune shifts are computed using a concatenated multi turn third order ma
141. er matching row is selected 0 is the first row 1 the second etc Otherwise the last match row is used Ignored if match_column is not given match_parameter The name of a string parameter to use in selecting the page from which data will be taken match_parameter_value The value that the parameter named by match_parameter must have to be selected from the file By default the last page with a matching value is used use_row If nonnegative specifies the row number to use starting at 0 for the first row Ignored if match_column is given 74 use_page If nonnegative specifies the page number to use starting at 1 for the first page Takes precedence over match_parameter if both are given load_parameters If nonzero specifies loading the SDDS parameter data rather than the column data 79 run_control 6 47 run_control e type setup command e function set up the number of simulation steps and passes amp run_control long n_steps 1 double bunch_frequency 0 long n_indices 0 long n_passes 1 long reset_rf_for_each_step 1 long first_is_fiducial 0 long restrict_fiducialization 0 amp end e n_steps The number of separate repetitions of the action implied by the next action command If random errors are defined this is also the number of separate error ensembles e bunch_frequency The frequency to use in calculating the time delay betwee
142. error_element amp end amp error_control summarize_error_settings 1 amp end 35 find_aperture 6 20 find_aperture e type setup major action command e function find the aperture in x y space for an accelerator amp find_aperture STRING output NULL STRING search_output NULL STRING boundary NULL STRING mode many particle double xmin 0 1 double xmax double ymin double ymax long nx 21 long ny 11 long n_splits 0 double split_fraction 0 5 double desired_resolution 0 01 long assume_nonincreasing 0 long verbosity 0 long offset_by_orbit 0 long n_lines 11 long optimization_mode 0 oO O FOR 3 e output The incomplete name of an SDDS file to send output to Recommended value G s aper e mode May be many particle single particle one line three lines or n lines Many particle searching is much faster than single particle but does not allow interval split ting to search for the aperture boundary Both many particle and single particle modes involve searching from the outside inward which improves speed but may result in including islands The line modes avoid this by searching form the origin outward Of these the one line and three line modes are special one line mode searches the line from the origin to maz Ymar three line mode searches this line plus the lines from the origin to
143. ertically deflecting wiggler as well as the horizontally deflecting wiggler given above In both cases these expansions are suitable for a wiggler with two poles that are above below or left right of the beam axis They are not always suitable for devices with more complex pole geometries Another geometry that is important is a split pole wiggler in which each pole is made from two pieces Such configurations are seen for example in devices used to produce variable polarization In such cases the expansion given above may not be appropriate Here we summarize the form of the various expansions that elegant supports For brevity we show the form of a single harmonic component Horizontal wiggler normal poles produces By only on axis Specified by setting BY_SPLIT_POLE 0 and giving BY_FILE or SINUSOIDAL 1 with VERTICAL 0 fe SORE 2 29 slated Sb 8 ky By Bo cos kzx cos kzz cosh kyy 9 By Bo where k k2 k2 Horizontal wiggler split poles produces By only on axis Specified by setting BY SPLIT POLE 1 and giving BY_FILE or SINUSOIDAL 1 with VERTICAL 0 kz cos kzz sin kyy sinh k x ky By Bo cos kyy cos kzz cosh k 2 11 Bz E Bol where k2 ke k2 Vertical wiggler normal poles produces B only on axis Specified by setting BX_SPLIT_POLE 0 and giving BX_FILE or SINUSOIDAL 1 with either VERTICAL 1 or HELICAL 1 B Bo cos kyy cos kzz cosh k x 12 By ies ky c
144. ethod string device string neks value e files twissFile A Twiss output file from elegant with radiation integral calculations in cluded or an output from sddsanalyzebeam In the latter case the correctedOnly option should be used SDDSoutputFile Contains the brightness data in column form For each requested harmonic i there are columns photonEnergy wavelengthi and Brightnessi e switches pipe The standard SDDS Toolkit pipe option harmonics The number of harmonics to compute Krange start value end value points integer The range of the K parameter for the undulator and the number of points to compute on that range current Amps The current in amperes If one gives the average current one gets the average brightness totalLength meters The total length of the undulator in meters periodLength meters The period length of the undulator in meters emittanceRatio value coupling value In the case of a twiss output file from elegant which does not contain the vertical emittance one must supply one of these options If emittanceRatio R is given y o R and z o If coupling k is given s 0 1 k and ey k x o is the equilibrium emittance from the twiss output of elegant In the case of twiss output from sddsanalyzebeam both emittances are present and these options are ignored 116 method string device
145. evant Specification of systematic and random multipole errors is supported through the SYSTEMATIC_MULTIPOLES and RANDOM_MULTIPOLES fields These fields give the names of SDDS files that supply the multipole data The files are expected to contain a single page of data with the following elements 1 Floating point parameter referenceRadius giving the reference radius for the multipole data 2 An integer column named order giving the order of the multipole The order is defined as Npoles 2 2 so a quadrupole has order 1 a sextupole has order 2 and so on 3 Floating point columns an and bn giving the values for the normal and skew multipole strengths respectively These are defined as a fraction of the main field strength measured at the reference radius R an ph ae where m 2 is the order of the main field and n is the order of the error multipole A similar relationship holds for the skew multipoles For random multipoles the values are interpreted as rms values for the distribution Apertures specified via an upstream MAXAMP element or an aperture_input command will be imposed inside this element with the following rules limitations e If apertures from both sources are present the smallest is used e The apertures are assumed to be rectangular even if the ELLIPTICAL qualifier is set for MAXAMP 212 LMIRROR 9 39 LMIRROR A mirror for light optics Parallel capable yes Data PRX m loe oo vadius in horizonta
146. ferent longitudinal phase parameters PHASE_1 2 3 4 The photon energy can be varied by a non zero D_GAP value 192 HISTOGRAM 9 27 HISTOGRAM Request for histograms of particle coordinates to be output to SDDS file Parallel capable yes Defaul FILENAME STRING filename for histogram output possibly incomplete see be baie 4a low PINS FIXED_BIN_SIZE long if nonzero bin size is fixed af toms fa i ean ee Y DATA Tong i histogram y andy LONGIT DATA fst Pit 9 BIN_SIZE_FACTOR double multiply compel bin size by this factor before histogram ming NORMALIZE long normalize histogram with bin ESTO EE ra pra eee Lie 7 If nonzero no output will be e E Seet o n eal Males NULL Optionally used to assign an element to a group with a user defined name Group names will appear in the pa rameter output file in the col umn ElementGroup The output filename may be an incomplete filename In the case of the HISTOGRAM point element this means it may contain one instance of the string format specification s and one occurence of an integer format specification e g ld elegant will replace the format with the rootname see run_setup and the latter with the element s occurrence number For example suppose you had a repetitive lattice defined as follows H1 HISTOGRAM FILENAME s Z031d h1 Q1 QUAD L 0 1 K1 1 D DRIFT L 1 Q2 QUAD L 0 1 K1 1 CELL LINE H1 Q1
147. fined name Group names will appear in the pa rameter output file in the col umn ElementGroup 302 TWISS 9 96 TWISS Sets Twiss parameter values Parallel capable yes PALPHAX __ double 0 0 horizontal alpha function PETAX M done 0 0___ horizontal eta function PETAXP doue 0 0___ slope of horizontal eta function PALPHAY __ double 0 0 vertical alpha function E U A O ETP __ double 0 0___ slope of vertical eta function F SRE BEAM ae compute transformation from tracked beam properties in stead of Twiss parameters FROM_OVALUES long if non zero transformation is from the 0 values provided in the element definition COMPUTE_ONCE long compute transformation only for first beam or lattice func tions APPLY Ce long apply correction only on first foe PA pass through for each beam VERBOSE long if non zero print extra infor o ao mation about transformations long o Jif non zero if non zero element is ignored is if non zero element is ignored Poe double initial horizontal beta me ee ALPHAXO double initial horizontal alpha a tion if FROM_OVALUES E ETAXO double initial horizontal eta function if FROM_OVALUES nonzero 303 TWISS continued Sets Twiss parameter values ETAXPO double initial slope of horizontal eta function if FROM_OVALUES nonzero feed Faia initial vertical beta Pt LE ARON VALUES nome ALPHAYO double initial vertical alpha a
148. for 2d dt deltaP his togram output possibly in complete see below FILE4D STRING NULL filename for 4d x x y y his togram output possibly in Tr complete see below FILE6D STRING NULL filename for 6d x x y y dt deltaP histogram output pos isi sibly incomplete see below INPUT_BINS STRING NULL Name of SDDS file contains in eS S petite D a Fe STARTPASS Tong Osan pas ontpat NORMALIZE long normalize histogram with cee long If nonzero no aie will be Leen A S TP ea o LUMPED long If nonzero T results at ele ments with same name will be output to a single multipage SDDS file GROUP string NULL Optionally used to assign an element to a group with a user defined name Group names will appear in the pa rameter output file in the col umn ElementGroup This element is used to generate multiple dimension 1 2 4 or 6 histogram output of particle 232 coordinates The calculation is set up through output filename FILE1D FILE2DH FILE2DV FILE2DL FILE4D FILE6D They may be an incomplete filename see HISTOGRAM for detail If LUMPED set to non zero then results are directed to a multi page SDDS file with each page contains data of same elements MHISTOGRAM but at difference occurrence instead of multiple SDDS files In this case the ld in filename is ignored The bin number used to do histogram analysis is given through a SDDS file from INPUT_BINS It contains 4 columns Bins_
149. ft with amplitude closed orbit beam moments driving terms and other computations The optimization variables or covariables may appear in the equation in the form lt element name gt lt parameter name gt all in capital letters In addition initial values of variables and covariables are available in the form lt element name gt lt parameter name gt 0 Data from MARK elements with FITPOINT 1 and from beam position monitors with CO_FITPOINT 1 may be used via symbols of the form elementName occurenceNum parameterName See the documentation for the MARK MONI HMON and VMON elements for detailed discussion and listing If response matrix calculation is requested response matrix values are available in variables with names PlaneR_bpmName occurence_corrNametoccurence corrParam where Plane is H 59 horizontal or V vertical and corrParam is the parameter of the corrector used for changing the orbit e g HKICK or VKICK for a KICKER element If cross plane response matrix calculation is requested response matrix values are available in variables with names BpmPlaneCorrPlaneR_bpmName occurence_corrName occurence corrParam where BpmPlane and CorrPlane are H horizontal or V vertical and corrParam is the pa rameter of the corrector used for changing the orbit e g HKICK or VKICK for a KICKER element Many quantities are made available for optimization if twiss_output command is given with output_at_each_step 1 Final Tw
150. g Use of rpn in any of these modes is extremely straightforward Use of the program in its stand alone form is the best way to gain familiarity with it Once one has entered rpn entering help will produce a list of the available operators with brief summaries of their function Also the rpn definitions file rpn defns distributed with elegant gives examples of most rpn operation types Like all RPN calculators rpn uses stacks In particular it has a numeric stack a logical stack and a string stack Items are pushed onto the numeric stack whenever a number token is entered or whenever an operation concludes that has a number as its result items are popped from this stack by operations that require numeric arguments Items are pushed onto the logical stack whenever a logical expression is evaluated they are popped from this stack by use of logical operations that require logical arguments e g logical ANDing or by conditional branch instructions Items enclosed in double quotes are pushed onto the string stack items are popped from this stack by use of operations that require string arguments e g formatted printing rpn supports user defined memories and functions To create a user defined memory one simply stores a value into the name as in 1 sto unity the memory is created automatically when rpn detects that it does not already exist To create a user defined function enter the udf command rpn will prompt for the fu
151. g 1 include nonlinear field compo eee ee eee LINEARIZE long use linear matrix instead of DEP Tepe tear o o SYNCH_RAD long include classical synchrotron On O e A o o EDGE1 EFFECTS long 1 include entrance edge effects 154 CSRCSBEND continued Like CSBEND but incorporates a simulation of Coherent Synchrotron radiation EDGE2_EFFECTS include exit edge effects O EDGE ORDER long 1 order to which to include edge effects PE 4 INTEGRATION_ORDER lng f 4 integration order 2 or 4 BINS lng lo number of bins for CSR wake BIN ONCE long bin only at the start of the dipole BIN_RANGE_FACTOR double 1 2 Factor by which to increase the range of histogram com pared to total bunch length Large value eliminates binning problems in CSRDRIFTs SG_HALFWIDTH long Savitzky Golay filter half width for smoothing current histogram If less than 1 no SG smoothing is performed SG_ORDER long 1 Savitzky Golay filter order for smoothing current histogram SGDERIV_HALFWIDTH long Savitzky Golay filter half width for taking derivative of current histogram Defaults to SG_HALFWIDTH if positive or else 1 SGDERIV ORDER long 1 Savitzky Golay filter order for taking derivative of current histogram TRAPAZOIDINTEGRATION long 1 Select whether to use trapazoid rule integration default or a simple sum OUUTE STRING NUEE output file or CSR wakes OUTPUT_INTERVAL long 1 interval in kicks of output to OUTPUT_FILE OUTPU
152. g indicating whether to find a closed orbit with the same length as the design orbit by changing the momentum offset start_from_recirc A flag indicating whether to compute the closed orbit from the re circulation recirc element in the beamline In general if one has a recirculation element one should give this flag 24 e verbosity A larger value results in more printouts during the computations 25 correct 6 13 correct e type setup command e function set up for correction of the trajectory or closed orbit amp correct STRING mode trajectory STRING method global STRING trajectory_output NULL STRING corrector_output NULL STRING statistics NULL double corrector_tweek 2 1e 3 1e 3 double corrector_limit 2 0 0 double correction_fraction 2 1 1 double correction_accuracy 2 le 6 1e 6 long remove_smallest_SVs 2 0 0 long keep_largest_SVs 2 0 0 double minimum_SV_ratio 2 0 0 long auto_limit_SVs 2 1 1 long threading_divisor 2 100 100 double bpm_noise 2 0 0 double bpm_noise_cutoff 2 1 0 1 0 STRING bpm_noise_distribution 2 uniform uniform long verbose 1 long fixed_length 0 long fixed_length_matrix 0 long n_xy_cycles 1 long minimum_cycles 1 long n_iterations 1 long prezero_correctors 1 long track_before_and_after 0 long start_from_centroid 1 long use_actual_beam 0 double closed_orbit
153. gative then so are E1 and E2 To understand this imagine a rectangular magnet with positive ANGLE If the magnet is flipped over then ANGLE becomes negative as does the bending radius p Hence to keep the focal length of the edge 1 f tan E p constant we must also change the sign of Ei When adding errors care should be taken to choose the right parameters The FSE and ETILT parameters are used for assigning errors to the strength and alignment relative to the ideal values given by ANGLE and TILT One can also assign errors to ANGLE and TILT but this has a different meaning in this case one is assigning errors to the survey itself The reference beam path changes so there is no orbit trajectory error The most common thing is to assign errors to FSE and ETILT Note that when adding errors to FSE the error is assumed to come from the power supply which 152 means that multipole strengths also change Special note about splitting dipoles when dipoles are long it is common to want to split them into several pieces to get a better look at the interior optics When doing this care must be exercised not to change the optics elegant has some special features that are designed to reduce or manage potential problems At issue is the need to turn off edge effects between the portions of the same dipole First one can simply use the divide_elements command to set up the splitting Using this command elegant takes care of everything
154. ggler peri ee STEP long 1 Number of normal periods to ORDER long Order 3 including the 3rd or der terms Otherwise using 2nd order formula END_POLE long 1 The ending poles are treated as 2 half periods at each sides of the wiggler with reducing field strength such as 0 25 0 75 0 75 0 25 Periods has to gt 2 SIMON oe o neue shim convection INPUT_FILE STRING NULL Name of SDDS file with By harmonic data given at GAPO and equal longitudinal phases SHIM_INPUT STRING NULL Name of SDDS file with shim field integral harmonic data given at GAPO SYNCH_RAD long Include classical synchrotron Di a a E ISR long Include incoherent syn chrotron radiation scatter ing 190 GFWIGGLER continued Tracks through a wiggler using generate function method of J Bahrdt and G Wuestefeld BESSY Berlin Germany Defaul ISRIPART long Include ISR for single particle beam only if ISR 1 and aaa aa as Presi Offset of magnet row center in con e ES GAPO ar double 0 0 Nominal magnetic gap Nominal magnetic gap gap D_GAP double Delta gap actual gap nomi nal gap PHASE _1 RAD double Longitudinal phase of the first row top right Longitudinal phase of the sec ond row top left Longitudinal phase of the third row bottom left 4 fies double Longitudinal phase of the fourth row bottom right aan ie A higher value requires more computations GROUP string NULL Optionally u
155. grals natural emittance floor coordinates beam moments etc It also has the ability to optimize results of tracking using a user supplied function of the beam parameters at one or more locations This permits solution of a wide variety of problems from matching a kicker bump in the presence of nonlinearities to optimizing dynamic aperture by adjusting sextupoles elegant provides several methods for determining accelerator aperture whether dynamic or physical One may do straightforward tracking of an ensemble of particles that occupies at uniform grid in x y space One may also invoke a search procedure that finds the aperture boundary A related feature is the ability to determine the frequency map for an accelerator to help identify aperture limiting resonances In addition to using analytical expressions for the transport matrices elegant supports compu tation of the first order matrix and linear optics properties of a circular machine based on tracking A common application of this is to compute the tune and beta function variation with momentum offset by single turn tracking of a series of particles This is much more efficient than for example tracking and performing FFTs though elegant will do this also This both tests analytical ex pressions for the chromaticity and allows computations using accelerator elements for which such expressions do not exist e g a numerically integrated bending magnet with extended fringe fields A c
156. grid or sample optimization e disable If nonzero the covariable is ignored e force_inside If nonzero the initial value is forced inside the allowed range defined by the lower_limit and upper_limit parameters 66 print_dictionary 6 41 print_dictionary e type action command e function print dictionary of supported accelerator elements amp print_dictionary STRING filename NULL long SDDS_form 0 amp end e filename The name of a file to which the dictionary will be written By default the output is in AT exXformat e SDDS_form If non zero then the output is in SDDS format 67 ramp_elements 6 42 ramp_elements e type setup command e function define parameters for time dependent ramping of elements e N B this feature is somewhat experimental Please use with caution and report any problems on the forum amp modulate_elements STRING name NULL STRING item NULL STRING type NULL long start_pass 0 long end_pass LONG_MAX double start_value 0 double end_value 0 long differential 1 long multiplicative 0 long start_occurence 0 long end_occurence 0 double exponent 1 double s_start 1 double s_end 1 STRING before NULL STRING after NULL long verbose 0 amp end N B This command will produce unpredictable results when used with error_element alter_elements modulate_elements and load_parameters except when change_defi
157. gth in vertical plane _ M double 0 0 misalignment FT double 0 0 misalignment ___ _ M double 0 0 misalignment ____ t DZ i RAD double misalignment rotation about D a ee Longe we RAD double misalignment rotation about cE ee ees PITCH RAD double misalignment rotation about coe eee Oe teens son a NULL GROUP string Optionally used to assign an element to a group with a user defined name Group names will appear in the pa rameter output file in the col umn ElementGroup DZ 219 MAGNIFY 9 43 MAGNIFY An element that allows multiplication of phase space coordinates of all particles by constants Parallel capable yes mo oe ico for x cordate Me double Tactor for x coordinates PMY deji factor for y coordinates PMYP_____ __ double 1 Tactor for y coordinates a o a m l Lae 1 factor pCentral rin ol nia NULL Optionally used to assign an element to a group with a user defined name Group names will appear in the pa rameter output file in the col umn ElementGroup 220 MALIGN 9 44 MALIGN A misalignment of the beam implemented as a zero order matrix Parallel capable yes DeO o oeoo oS Deo o o J oeoo e DO m oe oo eS Doo m oe oo ey Doo m oe oo foe Doo s foe oo aS a CT e es mee aa es oe a F PORE MODIFY MATRIX MODIFY RRK a the matrix even if a eee GROUP ee NULL Optionally used to assign an element to a group w
158. h items i e which element parameters to include and which to exclude from loading include_type_pattern exclude_type_pattern Wildcard patterns to be used in select ing respectively which element types e g QUAD DRIFT to include and which to exclude from loading change_defined_values Changes the defined values of the parameters This means that when the lattice is saved using save_lattice the parameters will have the altered values Also if one wants to alter the values for all steps of the simulation one must set this flag Note that the ElementOccurence data is normally ignored if change_defined_values is nonzero This is because there is only one definition of each element even if it is used multiple times This behavior can be altered with the next control force_occurence_data If set then occurence data is used even in change_defined_values mode use_first It is possible that the input file will contain multiple lines for any given pa rameter In this case elegant will by default process all lines For example if the lines give differential values then all would be included However if the lines give absolute values then the last one will overwrite the previous values this flag allows overriding the behavior in this case to force elegant to use the first value This can have speed advantages for cases where there are many identical occurences of the same element clear_settings If set clear all
159. h save_lattice command Be sure to use output_seq 1 option in that command amp insert_elements amp end STRING name NULL STRING type NULL STRING exclude NULL double s_start 1 double s_end 1 long skip 1 long disable 0 long add_at_end 0 STRING element_def NULL long total_occurrences 0 long occurrence 100 0 name Possibly wild card containing string specifying the names of the elements after which the new element is inserted A list of comma or space separated names may be given type Possibly wild card containing string specifying the type of the elements after which the new element is inserted exclude Possibly wild card containing string specifying the names of elements to be ex cluded from the specification skip New elements are inserted at every nt specified location s_start s_end If positive these give the starting and ending s locations for insertion of new elements Note that the s locations are not updated as elements are inserted but only after completion of all insertions covered by a single command disable If nonzero the command is ignored add_at_end If nonzero the element is also inserted to the end of the beamline element_def The definition of the new element should be just as it would be entered in the lattice file total_occurrences occurrence These parameters are used to insert the new elements after specified oc
160. hase of the first harmonic should be 0 or v in order to have matched dispersion e The three wave numbers normalized to ky 27 Aw where Ay is the wiggler period These are given in columns KxOverkw KyOverkw and KzOverkw 164 In Version 17 3 and later for matrix computations elegant uses a first order matrix derived from particle tracking when it encounterse a CWIGGLER Tests show that this gives good agree ment in the tunes from tracking and Twiss parameter calculations For radiation integrals an idealized sinusoidal wiggler model is used with bending radius equal to Bp Bo gt gt Cmn for each plane Energy loss energy spread and horizontal emittance should be estimated accurately elegant allows specifying field expansions for on axis By and By components so one can model a helical wiggler However in this case one set of components should have 6 0 or Ozn 7 while the other should have 6 7 2 Using Wu s code the latter set will not have matched dispersion Our modified version solves this by delaying the beginning of the field components in question by A 4 and ending the field prematurely by 3 4 This causes all the fields to start and end at the crest which ensures matched dispersion The downside is that the typically vertical wiggler component is missing a full period of field One can turn off this behavior by setting FORCE_MATCHED 0 Additional field expansions Y Wu s code included field expansions for a v
161. hat work with elegant Most are SDDS compliant so they will also work with any program that reads or writes appropriate SDDS data The fol lowing is a brief description of each program Full descriptions for most programs are available on subsequent pages Most programs will return a help message if the program name is given with no arguments astra2elegant Converts ASCII particle output from ASTRA 30 to a binary SDDS file suitable for use with elegant This program is recommended over the astra2sdds program on the ASTRA website because the latter produces ASCII SDDS files that are quite slow to read and does not perform the correct computations for low energy beams coreEmittance Computes the slice emittance for the beam core e g 80 of the beam Program by X Dong csrImpedance Computes the shielded steady state CSR impedance for a dipole magnet The output can be used immediately with elegant s ZLONGIT element Program by Y Wang H Shang and M Borland doubleDist6 Increases the number of particles in a particle input file by successively doubling the number Intended to be used to increase the number of particles produced by a photoinjector simulation to improve stability of CSR and LSC simulations See also smoothDist6 elegant2astra This program translates elegant phase space files into ASTRA for mat elegant2track This program translates elegant phase space files into TRACK 32 for mat The A
162. he final particle distribution to this file 3 npo np1 Anp9 Will be replaced by the value of Numerical Parameter 0 1 9 This can be used to pass to the script values that are parameters of the element definition For example if one wanted to vary parameters or add errors to the parameter one would use this facility 4 spo sp1 4sp9 Will be replaced by the value of String Parameter 0 1 9 This can be used to pass to the script values that are parameters of the element definition Here s an example of a SCRIPT COMMAND myScript input i output o accuracy np0 type sp0 In this example the script myScript takes four commandline arguments giving the names of the input and output files an accuracy requirement and a type specifier By default elegant will choose unique temporary filenames to use in communicating with the script The actual command when executed might be something like myScript input tmp391929 1 output tmp391929 2 accuracy 1 5e 6 type scraper where for this example I ve assumed NPO 1 5e 6 and SPO scraper If you have a program e g a FORTRAN program that does not accept commandline argu ments you can easily wrap it in a Tcl Tk simple script to handle this Alternatively you can force elegant to use specified files for communicating with the script This is done using the ROOTNAME INPUT_EXTENSION and OUTPUT_EXTENSION parameters So if your program was cra
163. he settings are in force until another MAXAMP element is seen This can introduce unexpected behavior when beamlines are reflected For example consider the beamline L1 LINE L2 LINE MA1 MAXAMP X_MAX 0 01 Y_MAX 0 005 MA2 MAXAMP X_MAX 0 01 Y_MAX 0 002 BL1 LINE MA1 L1 MA2 L2 BL LINE BL1 BL1 This is equivalent to BL LINE MA1 L1 MA2 L2 L2 MA2 L1 MA1 Note that the aperture MA1 is the aperture for all of the first instance of beamline L1 but that MA2 is the aperture for the second instance L1 This is probably not what was intended To prevent this it is recommended to always use MAXAMP elements in pairs BL1 LINE MA2 MA1 L1 MA1 MA2 L2 BL LINE BL1 BL1 228 which is equivalent to BL LINE MA2 MA1 L1 MA1 MA2 L2 L2 MA2 MA1 L1 MA1 MA2 Now both instances of L1 have the aperture defined by MA1 and both instances of L2 have the aperture defined by MA2 229 MBUMPER 9 50 MBUMPER A time dependent multipole kicker magnet The waveform is in SDDS format with time in seconds and amplitude normalized to 1 Parallel capable yes m Fone foa en ae EST double geometric strength 1 m rder TILT EEA rotation about longitudinal axis DxO m oe 00 miie wo a toute foo mitem Dz m _ double 00 misaiemmeat TMEOFSEI 5 doube 00 time offset of waveform ORDER long multipole order where 1 is quadrupole 2 is sextupole etc PERO oe o i waveform p
164. he small amplitude tunes x1 y1 The initial x and y amplitudes to user for determining the tune shifts These values should be small enough to ensure linearity in the tune shift grid_size Size of the grid of points in x and y lines_only If nonzero then instead of a full set of grid_size particles only two lines of particles with x 0 and or y 0 are tracked In this case no A x AJ terms are computed except for i 0 or j 0 However in addition to being faster the results may be more reliable e g OV OAy Ovy OAz may be more closely satisfied sparse_grid If nonzero then instead of a full set of grid_size particles a sparse grid of particles is tracked Will save time at some expense in accuracy spread_only Compute the tune spread only and don t bother with the tune shift coeffi cients These tune spreads can be optimized and appear in the twiss output file under the names nuxTswaLower nuxTswaUpper and similarly for the y plane This is the recommended way to reduce tune shift with amplitude as the tune spread is more reliable than the coef ficients of the expansion Particles that get lost are automatically ignored in both types of computations nux_roi_width nuy_roi_width Widths of the region of interest for x and y tunes As the grid is filled in elegant finds the tune for each tracked particle on the grid Successive tune values are looked for in the region of the given width arou
165. he string data will be scanned if necessary to obtain a value for the parameter ParameterMode Optional string column If given for each row the value must be one of absolute differential ignore or fractional The meaning of these modes is as follows absolute mode means the given value is used as the new value for the parameter differential mode means the given value is added to the existing value for the parameter ignore mode means the value is ignored fractional mode means the existing value is increased by the product of the given value and the existing value i e the given value is a fractional change Unless change_defined_values is set successive pages of the file are used for successive steps of the simulation Several elegant commands generate output that may be used on a sub sequent run with load_parameters among these are the tune and chromaticity correction com mands and the run_setup command parameters output 46 filename_list A list of filenames which may be given in place of filename If used each file in the list is treated as if it was separately supplied with an individual load_parameters command include_name_pattern exclude_name_pattern Wildcard patterns to be used in select ing respectively which elements to include and which to exclude from loading include_item_pattern exclude_item_pattern Wildcard patterns to be used in select ing respectively whic
166. hese columns may be from elegant e g Sx and Sy if one wants to simulate an emittance measurement Note that the theory behind the emittance measurement is strictly correct only for true RMS beamsize measurements Use of FWHM or some other measure will give unreliable results 118 outputfile A file containing one page for each page of inputfile The parameters of outputfile give the measured geometric rms emittance sigma matrix and Twiss parame ters of the beam in the horizontal and vertical planes If error sets were requested using nErrorSets then there are also parameters giving the error bars sigma s of the measured values e switches sigmaData cName yName Supplies the names of the columns in inputfile from which the x and y rms beam sizes are to be taken Default values are Sx and Sy which are the data provided by elegant errorLevel valueInm gaussian nSigmas uniform Supplies the standard de viation of random errors to be added to the measured beam sizes for Monte Carlo error analysis errorData zName yName May be used to supply the names of columns in the input file that contain the error level for each measurement This is an option instead of using errorLevel which allows varying the measurement error for each point nErrorSets number The number of sets of random errors to generate and add to the measurements Each error set is used to perturb the original m
167. hich smoothing filter begins If not positive no frequency fil ter smoothing is done Fre quency is in units of Nyquist 0 5 binsize HIGH_FREQUENCY_CUTOFF1 double 1 Spatial frequency at which smoothing filter is 0 If not given defaults to HIGH_FREQUENCY_CUTOFFO0 214 LSCDRIFT continued Longitudinal space charge impedance Default RADIUS_FACTOR double 1 7 LSC radius is Sx Sy 2 RADIUS_FACTOR LSC long 1 Include longitudinal space charge impedance If zero acts like ordinary drift GROUP string NULL Optionally used to assign an element to a group with a user defined name Group names will appear in the pa rameter output file in the col umn ElementGroup This element simulates longitudinal space charge in a drift space using the method described in 22 This is based on the longitudinal space charge impedance per unit length iZo krp Zise k 21 acl nkr ii y K x If L is 0 and LEFFECTIVE is not then the element provides a LSC kick with impedance given by ZiscLef fective This can be used to insert an LSC kick that integrates the longitudinal space charge effect of a section of a lattice This should be used only for cases where there is very little relative longitudinal motion of particles 215 LSRMDLTR 9 41 LSRMDLTR A non symplectic numerically integrated planar undulator including optional co propagating laser beam for laser modulation of the electron beam Para
168. histogram E ee rama N_BINS long 20 number of bins for current his ee ee ee Peete eee gee pass USE_SYMM_DATA long e Symm columns from URMEL output file eee Lees factor by which to multiply er it peda a OFF ais If gt 0 cutoff frequency Modes above this frequency are ig nored re FILE eer NULL Output file for voltage in each eee FLUSH_INTERVAL Lie terval in passes at which to pose es ictouput dita RAMP_PASSES long Number of passes over which to linearly ramp up the impedance to full strength GROUP string NULL Optionally used to assign an element to a group with a user defined name Group names will appear in the pa rameter output file in the col umn ElementGroup This element is similar to RFMODE but it allows faster simulation of more than one mode Also the mode data is specified in an SDDS file This file can be generated using the APS version of URMEL or by hand It must have the following columns and units 1 Frequency The frequency of the mode in Hz Floating point 2 Q The quality factor Floating point 3 ShuntImpedance or ShuntImpedanceSymm The shunt impedance in Ohms defined as V2 2 P Floating point By default Shunt Impedance is used However if the parameter USE_SYMM_DATA is non zero then ShuntImpedanceSymm is used The latter is the full cavity shunt impedance that URMEL computes by assuming that the input cavity used is one half of a symmetric cavi
169. hod instead of random numbers FORCE_MATCHED_TWISS long Force computations to be done with twiss parameters of the beamline not the beam SRING ong i storage rng e T 1 Interval in passes at which to DNAN o FILENAME ie STRING NULL GROUP string NULL Optionally ied to assign an element to a group with a user defined name Group names will appear in the pa rameter output file in the col umn ElementGroup This element is used for simulating intra beam scattering IBS effect The IBS algorithm is based on the Bjorken and Mtingwa s I5 formula and with an extension of including vertical dispersion It can be used for both storage ring and Linac To initialize IBS calculation one or more IBSCATTER elements must be inserted into the beamline elegant calculates the integrated IBS growth rates between IBSCATTERs or from beginning of the beamline to the first IBSCATTER then scatter particles at each IBSCATTER element Beam s parameters are updated for use in downstream elements This method requires that IBSCATTER can not be installed at the beginning of beamline The number of other elements between IBSCATTERs or from the beginning of beamline to the first IBSCATTER has to be 2 or more For storage ring an IBSCATTER must be installed at the end of beamline Because the IBS growth rates are energy dependent special caution is needed for calculations with accelerating beam The user needs to split their accelerating cavity
170. ice functions at the exit of the TWISS element Setting COMPUTE_ONCE to a non zero value specifies that elegant should compute the transformation matrix only once i e for the first set of computed lattice functions By default the transformation is applied to the beam only the first time it passes the element Setting APPLY_ONCE to a zero will result in application of the transformation at each pass Beam Ellipse Based Transformation If FROM_BEAM is non zero the the initial values for the transformation are computed from a beam This provides a way to transform the beam ellipse to the desired twiss parameters irrespective of the lattice The results from twiss_output will not necessarily be matched downstream of this 304 element Only if the beam ellipse and lattice ellipse are the same will this occur By default each time a new beam is generated the transformation will be updated to maintain the desired beam ellipse at the exit of the TWISS element Setting COMPUTE_ONCE to a non zero value specifies that elegant should compute the transformation matrix only once i e for the first beam it sees By default the transformation is applied to the beam only the first time it passes the element Setting APPLY_ONCE to a zero will result in application of the transformation at each pass This would make sense for example if the TWISS element was filling in for a section of a ring It wouldn t make sense if the TWISS element was being used to
171. ify division of elements into pieces Define errors fora st of elements error_control6 19 setup Set up and control error generation pro SEEEeEEE OT find_aperturd6 20 setup major Determine the transverse e g dynamic ee ti pre ES floor_coordinated6 2 Compute and output floor coordinates frequency mag6 22 Compute and output frequency map action global_settingd6 23 Change global settings insert_sceffectq6 24 Insert elements into the lattice at many places Insert space charge Kick elements linear_chromatic_tracking_setuf6 26 Set up for fast tracking with chromatic ef fects link_contro 6 27 Control linking of element parameters link_element 6 28 Define link between parameters of two el ements load_parameterd6 29 setup action Load element parameters from SDDS file setup action Output transfer matrix along beamline modulate_elementd6 31 Set up time dependent modulation of ele ments moments_output6 32 setup action Compute coupled beam moments with P P P P radiation option momentum aperturdq 33 major Determine s dependent momentum aper action ture 11 opt imizd6 34 major Execute an optimization action optimization_covariab1d6 36 Define a dependent parameter for opti mization optimization_setup6 37 Perform initial optimization setup optimization_tern6 39 Define a term of penalty function optimization_variab1d6 40 Define an optimization variable i 39 parallel
172. igment rer double 0 0 Rotation about beam axis Poes fong o Number of wiggler pols FOCUSING long 1 If 0 turn off vertical focusing this is unphysical GROUP string NULL Optionally used to assign an element to a group with a user defined name Group names will appear in the pa rameter output file in the col umn ElementGroup This element simulates a wiggler or undulator There are two aspects to the simulation the effect on radiation integrals and the vertical focusing Both are included as of release 15 2 of elegant N B at present this element is not included in computations of beam moments moments_output command If the number of poles should be an odd integer we include half strength end poles to match the dispersion but only for the radiation integral calculation For the focusing we assume all the poles are full strength i e a pure sinusoidal variation If the number of poles is an even integer no special end poles are required but we make the unphysical assumption that the field at the entrance exit of the device jumps instantaneously from 0 full field to full field 0 The radiation integrals were computed analytically using Mathematica including the variation of the horizontal beta function and dispersion For an odd number of poles half strength end poles are assumed in order to match the dispersion of the wiggler For an even number of poles half length end poles are assumed i e we sta
173. ile for SDDS output Recommended value s ana File contents A series of dumps each consisting of a single data point containing the centroid offsets for a single turn the single turn R matrix the matched Twiss parameters tunes and dispersion functions e delta_X The amount by which to change the quantity X in computing the derivatives that give the matrix elements e center_on_orbit A flag directing the expansion to be made about the closed orbit instead of the design orbit e verbosity The larger this value the more output is printed during computations 16 aperture_data 6 8 aperture_data e type setup command e function specify a file from which to take x and y aperture data vs s e note this command is also available under the name aperture_input amp aperture_data STRING input NULL long periodic 1 long persistent 0 long disable 0 amp end e input Name of SDDS file supplying the aperture data The following columns are all required in double or float type with units of m meters 1 s Distance along the central trajectory 2 xHalfAperture Half aperture in the horizontal 3 yHalfAperture Half aperture in the vertical 4 xCenter Center of the aperture in the horizontal 5 yCenter Center of the aperture in the vertical e periodic If non zero the aperture is a periodic function of s with period equal to the range of the data e persi
174. in track ing see below GROUP string NULL Optionally used to assign an element to a group with a user defined name Group names will appear in the pa rameter output file in the col umn ElementGroup This element is intended for storage ring modeling only and provides a fast alternative to element by element modeling of synchrotron radiation It should be used with care because the results will not necessarily be self consistent This is particularly an issue when there is dispersion at the location of the SREFFECTS element There are several types of storage ring simulation in which one may want to use this element 289 e Simulation of instabilities or other dynamics where radiation damping or quantum excitation is important e Simulation of dynamics with an rf cavity when the synchronous phase is significantly different from 180 degrees so that average radiation losses must be included e Computation of dynamic and momentum aperture in the presence of radiation damping The major parameters JX JY EXREF SDELTAREF DDELTAREF and PREF can be supplied explic itly by the user or filled in by elegant if the twiss_output command is given with radiation_integrals 1 In explicit initialization the user supplies the quantities EXREF EYREF SDELTAREF DDELTAREF and PREF These are respectively the reference values for the x plane emittance y plane emittance fractional momentum spread energy loss per turn and momentum
175. ing NULL Optionally used to assign an element to a group with a user defined name Group names will appear in the pa rameter output file in the col umn ElementGroup This element is a combination of the RFCA WAKE and TRWAKE elements As such it provides combined simulation of an rf cavity with longitudinal and transverse wakes as well as longitudinal space charge For the wakes the input files and their interpretation are identical to WAKE and TRWAKE except that the transverse and longitudinal wakes are interpreted as the wakes for a single cell of length given by the CELL_LENGTH parameter Users should read the entries for WAKE TRWAKE and RFCA for more details on this element This element simulates longitudinal space charge using the method described in 22 This is based on the longitudinal space charge impedance per unit length iZi kr kr Zisc k En i a ZK 60 b Y Y 262 RFDF 9 72 RFDF A simple traveling or standing wave deflecting RF cavity Parallel capable yes eo PHASE DEG double 00 phase SS TILT RAD double rotation about longitudinal axis FREQUENCY double 2856000000 frequency VOLTAGE V double 00 voltage FE oe o0 Fractional Strength Eror time offset adds to phase N_KICKS i lng Jo number of a 0 autoscale PHASE_REFERENCE long phase aoe number to link with other time dependent elements STANDING_WAVE Lee aa nonzero then cavi
176. ingle particle beam only if ISR 1 and ISRIPART 1 GROUP string NULL Optionally used to assign an element to a group with a user defined name Group names will appear in the pa rameter output file in the col umn ElementGroup 203 KPOLY 9 34 KPOLY A thin kick element with polynomial dependence on the coordinates in one plane Parallel capable yes COEFFICIENT coefficient of polynomial TILT RAD double axis wo double 0 0 misalignment __ double 0 0 misalignment ______ _ DZ double 0 0 misalignment rotation about longitudinal FACTOR additional factor to apply ORDER iong o order of polynomial PLANE f STRING plane to kick x y GROUP string NULL Optionally used to assign an element to a group with a user defined name Group names will appear in the pa rameter output file in the col umn ElementGroup 204 KQUAD 9 35 KQUAD A canonical kick quadrupole which differs from the MULT element with ORDER 1 in that it can be used for tune correction Parallel capable yes OoOo o y p oe K1 1 M double geometric strength M I M A M M M A A axis bore radius pole tip field used if bore nonzero misalignment misalignment EE e 00 00 Sle We halle DPX TM double 0 0 misali DPY TM double foo misali DZ double 00 misalignment FSE OTC double 00 fractional strength error HKICK RAD double 0 0 horizontal correctio
177. integrals A flag indicating if set that radiation integrals should be computed and included in output N B Radiation integral computation is not correct for systems with vertical bending nor does it take into account coupling See the moments_output command if you need such computations beta_X alpha_X eta_X etap_X If matched is zero the initial values for the X plane concat_order Order of matrix concatenation to use for determining matrix for computa tion of Twiss parameters Using a lower order will result in inaccuracy for nonlinear lattices with orbits and or momentum errors However for on momentum conditions with zero orbit it is much faster to use concat_order 1 higher_order_chromaticity If nonzero requests computation of the second and third order chromaticity To obtain reliable values the user should use concat_order 3 in this namelist and the highest available order for all beamline elements elegant computes the higher order chromaticity by finding the trace of off momentum matrices obtained by con cantenation of the matrix for higher_order_chromaticity_points values of 6 over the full range higher_order_chromaticity_range If quick_higher_order_chromaticity is nonzero then a quicker concatenation method is used that gives the second order chromatic ity only chromatic_tune_spread_half_range Half range of for which the chromatic tune spread is computed The results are available in for optimizati
178. into a radially GROUP string NULL Optionally used to assign an element to a group with a user defined name Group names will appear in the pa rameter output file in the col umn ElementGroup This element simulates a quadrupole using a kick method based on symplectic integration The user specifies the number of kicks and the order of the integration For computation of twiss parameters and response matrices this element is treated like a standard thick lens quadrupole i e the number of kicks and the integration order become irrelevant Specification of systematic and random multipole errors is supported through the SYSTEMATIC_MULTIPOLES and RANDOM_MULTIPOLES fields These fields give the names of SDDS files that supply the multipole data The files are expected to contain a single page of data with the following elements 1 Floating point parameter referenceRadius giving the reference radius for the multipole data 2 An integer column named order giving the order of the multipole The order is defined as Npoles 2 2 so a quadrupole has order 1 a sextupole has order 2 and so on 3 Floating point columns an and bn giving the values for the normal and skew multipole strengths respectively These are defined as a fraction of the main field strength measured at the reference radius R a F where m 1 is the order of the main field and n is the order of the error multipole A similar relationship holds for the skew multip
179. into several pieces so that y has no large changes between elements 197 The user can examine the calculation through an optional SDDS output file filename The file has a multiple page structure Each slice at pass 7 at each IBSCATTER element occupies one page Each page contains integrated IBS growth rates between IBSCATTERs or from beginning of the beamline to first IBSCATTER as parameters and local rates for elements in between as tabular data 198 ILMATRIX 9 31 ILMATRIX An Individualized Linear Matrix for each particle for fast symplectic tracking with chromatic and amplitude dependent effects Parallel capable yes L M double Length used for position and ee eee time of flight computation PNOX fome oo orron ne noy aoubie NUXIM double First chromatic derivative of ae enh ee First chromatic derivative of Second chromatic derivative of Second chromatic derivative of Po ieverteal tne NUY1M double Third chromatic derivative of Third chromatic derivative of First amplitude derivative of nc norontl tune wrt Ax double double NUXIAY double First amplitude derivative of First amplitude derivative of Pe iae vertical tone we Ay On momentum horizontal beta function NUY1AY double BETAX double On momentum vertical beta function First chromatic derivative of oT fonzonta beta fnction First chromatic derivative of vertical beta function M BETAY M double BETAX1IM M doub
180. ion about the trajectories or orbits and corrector strengths will be written Recommended value s SCOr corrector_tweek 2 The amount by which to change the correctors in order to compute correction coefficients for transport lines The word tweak is misspelled tweek in the code The default value 1 mrad may be too large for systems with small apertures If you get an error message about tracking failed for test particle try decreasing this value corrector_limit 2 The maximum strength allowed for a corrector correction_fraction 2 The fraction of the computed correction strength to actually use for any one iteration correction_accuracy 2 The desired accuracy of the correction in terms of the RMS BPM values remove_smallest_SVs keep_largest_SVs minimum_SV_ratio auto_limit_SVs These parameters control the elimination of singular vectors from the inverse response matrix which can help deal with degeneracy in the correctors and reduce corrector strength By default the number of singular vectors is limited to the number of BPMs which is a basic condition for stability this can be defeated by setting auto_limit_SVs to 0 for the desired planes Set remove_smallest_SVs to require removal of a given number of vectors with the smallest singular values this is ignored if auto_limit_SVs is also requested and would remove more SVs Set keep_largest_SVs to require keeping at most a given numbe
181. ipe in option allowing elegant to be fed a stream of commands by another program or script The rpnDefns option allows providing the name of the RPN definitions file as an alternative to defining the RPN_DEFNS environment variable The macro option allows performing text substitutions in the command stream Multiple macro options may be given Usage is described in more detail below 6 2 General Command Syntax Each namelist has a number of variables associated with it which are used to control details of the run These variables come in three data types 1 long for the C long integer type 2 double for the C double precision floating point type 3 STRING for a character string enclosed in double quotation marks All variables have default values which are listed on the following pages STRING variables often have a default value listed as NULL which means no data this is quite different from the value which is a zero length character string long variables are often used as logical flags with a zero value indicating false and a non zero value indicating true On the following pages the reader will find individual descriptions of each of the namelist commands and their variables Each description contains a sequence of the form amp lt namelist name gt lt variable type gt lt variable name gt lt default value gt amp end This summarizes the parameters of the namelist Note however that the namelists are invoked
182. is typically invoked using a command usually a C shell script that can both run elegant and post process the output The post processing is often handled by a lower level script that is called from the demo script These lower level scripts are good models for the creation of customized scripts for user applications The examples are organized into a number of directories and subdirectories In each area the user will find a Notebook file a simple ASCII file that describes the example and how to run it Many examples for storage ring simulations reside in the PAR subdirectory The PAR Particle Accumulator Ring is a small storage ring in the APS injector that is good for quick examples because of its size Here s a helpful tip in searching the examples on UNIX LINUX systems suppose one wants to find an example of the frequency_map command One can search all the elegant command files very quickly with this command find name ele xargs fgrep frequency_map Similarly to find all examples that use CSBEND elements one could use find name lte xargs fgrep i csbend 326 11 The rpn Calculator The program rpn is a Reverse Polish Notation programmable scientific calculator written in C It is incorporated as a subprogram into elegant and a number of the SDDS programs It also exists as a command line program rpnl which executes its command line arguments as rpn operations and prints the result before exitin
183. is related to the gradient g in the ae 0 0 size of seraper puk Do wo a o magnet and the central momentum py by By JEJ 5 Emazlm o 7s01986 The path length of the central particle is 2 554 maz Because an alpha magnet has large dispersion at the midplane it is often used for momentum filtration in addition to bunch compression The dispersion at the center is given by the simple relation 1 Rig g7 mar 6 138 To use an alpha magnet for momentum filtration in elegant one must split the alpha magnet into two pieces One may then either use the scraper features of the ALPH element or other elements such as SCRAPER or RCOL To split an alpha magnet one uses the PART parameter E g First half with momentum filter between 5 and 2 5 AL1 ALPH XMAX 0 11 PART 1 DP1 0 05 DP2 0 025 Second half AL2 ALPH XMAX 0 11 PART 2 AL LINE AL1 AL2 As just illustrated the parameters DP1 and DP2 may be used to filter the momentum by pro viding fractional momentum deviation limits These are implemented in a physical fashion by computing the corresopnding horizontal position deviations and imposing these as limits on the particle coordinates One may also do this directly using the XS1 and XS2 parameters which specify maximum acceptable deviations from the nominal horizontal position XS1 is the allowed deviation on the low energy side while XS2 is the allowed deviation on the high energy side 139
184. is used because in order to perform automatic initialization elegant has to compute the optics functions However it must determine the closed orbit to compute the optics functions The solution to this is for the user to pre compute the twiss parameters and radiation integrals using twiss_output with output_at_each_step 0 The user is free to subsequently give twiss_output with output_at_each_step 1 to obtain the results on the closed orbit 5 Computation of Twiss parameters does not fully include the effects of synchrotron radiation losses when these are imposed using SREFFECTS elements If PREF 0 automatic initialization these effects are completely missing If PREF is non zero then elegant will use the DDELTAREF parameter to compute the energy offset from the element and thus its effect on the beam trajectory 291 STRAY 9 88 STRAY A stray field element with local and global components Global components are defined relative to the initial beamline direction Parallel capable yes EO fm ome oo o EBX Z double 0 0 oeii EBY T double 0 0 Toca By SSSSC S GBX T double 0 0 ebi GBY T double 0 0 global By _ S d Bz r double 0 0 global Bz FORDER long 0 matrix order SS S GROUP string NULL Optionally used to assign an element to a group with a user defined name Group names will appear in the pa rameter output file in the col umn ElementGroup This element simul
185. is usually preferrable to specifying the number of divisions particularly when the elements divided may be of different lengths If zero then divisions should be nonzero e clear If nonzero all prior division specifications are deleted 32 error_element 6 18 error_element e type setup command e function assert a random error defintion for the accelerator amp error_element STRING name NULL STRING element_type NULL STRING item NULL STRING type gaussian double amplitude 0 0 double cutoff 3 0 long bind 1 long bind_number 0 longn bind_across_names 0 long post_correction 0 long fractional 0 long additive 1 long allow_missing_elements 0 STRING after NULL STRING before NULL amp end e name The possibly wildcarded name of the elements for which errors are being specified e element_type An optional possibly wildcarded string giving the type of elements to which the errors should be applied E g element_type MON would match all beam position monitors If this item is given then name may be left blank e item The parameter of the elements to which the error pertains e type The type of random distribution to use May be one of uniform gaussian or plus_or_minus A plus_or_minus error is equal in magnitude to the amplitude given with the sign randomly chosen e amplitude The amplitude of the errors e cutoff The cut
186. iss parameters e g betax alphax etax The names are the same as the column names in the twiss output file Statistics of Twiss parameters in the form lt statistic gt lt parameter name gt where lt statistic gt is min max ave p99 p98 or p96 p99 is the 99t pencentile value a similarly for p98 and p96 Tunes and chromaticities via symbols nux dnux dp and corresponding symbols for y First and second order momentum compaction factors via symbols alphac and alphac2 If radiation integral computation is requested one may use ex0 and Sdelta0 for the equilibrium emittance and momentum spread plus J lt plane gt and tau lt plane gt for the damping partition and damping time where lt plane gt is x y or delta One may also use I1 through I5 for the individual radiation integrals If compute_driving_terms 1 then the quantities h11001 h00111 h20001 h00201 hi0002 h21000 h30000 h10110 h10020 h10200 h22000 h11110 h00220 h31000 h40000 h20110 h11200 h20020 h20200 h00310 h00400 dnux dJx dnux dJy and dnuy dJy may be used Table P explains the meaning of the terms The coupling integral and emittance ratio due to x y coupling may be accessed using the symbols couplingIntegral and emittanceRatio See section 3 1 4 4 of I9 If higher order chromaticity is requested then one may use the symbols dnux dp2 dnux dp3 dnuy dp2 dnuy dp3 etax2 etax3 etay2 etay3 nuxChromLower nuxChrom
187. ith a user defined name Group names will appear in the pa rameter output file in the col umn ElementGroup The default value of the PASS parameter 1 means that the misalignment is imposed on the beam every pass This is appropriate for static misalignments When using the MALIGN element to kick the beam for beam dynamics studies in rings PASS gt 0 is required If PASS 0 closed orbit computation and correction will include the effect of the kick however matrix based computations by default will not set FORCE_MODIFY_MATRIX 1 to change this If PASS gt 0O then closed orbit computation and correction do not include the kick which is probably what is desired in beam dynamics studies in rings 221 MAPSOLENOID 9 45 MAPSOLENOID A numerically integrated solenoid specified as a map of Bz Br vs z r Parallel capable yes cM oe 00 o Dx m doe 00 mislim DY m ae 00 misiem ETET RAD doube 00 misalignment PEYAW RAD doube 0 0 misalignment PEPITCH RAD doube 00 misalignment N STEPS long number of steps for nonadap tive integration INPUTFILE STRING NULL SDDS file containing Br Bz vs r z Each page should have values for a fixed r RCOLUNN STRING NULL column containing r values ZCOLUMN STRING NULL column containing z values Oo E BRCOLUMN STRING NULL column containing Br values BZCOLUMN STRING NULL column containing Bz values FACTOR double 0 0001 factor by
188. k_elements that accept element names as input do not perform any translation Hence when referring to element names in commands the user must enter the names in upper case unless they are protected by double quotes in the lattice file When the lattice file is very complex it is sometimes convenient to separate it into several files These can then be imported into a main lattice file using the INCLUDE directive as in INCLUDE parti lte INCLUDE part2 1lte The rules for naming elements and beamlines are as follows e The name should start with an alphabetic character i e a z A Z e The name may contain any of the following characters in addition to alphabetic characters and numbers 7 amp _ CLI 1 lt gt werb e The name should not contain any of the following e The name should not contain spaces tabs or non printing characters If using unusual characters in a name it is a good idea to enclose the name in double quotes This is required if is in the name elegant s print_dictionary command allows the user to obtain a list of names and short descriptions of all accelerator elements recognized by the program along with the names units types and default values of all parameters of each element The present output of this command is listed in the next section The reader is referred to the MAD manual for details on sign conventions for angles focusing strength and so forth Comme
189. king may be performed using matrices of selectable order canonical kick elements numer ically integrated elements or any combination thereof For most elements second order matrices are available matrix concatenation can be done to any order up to third Canonical kick ele ments are available for bending magnets quadrupoles sextupoles and higher order multipoles all of these elements also support optional classical synchrotron radiation losses Among the numer ically integrated elements available are extended fringe field bending magnets and traveling wave accelerators A number of hybrid elements exist that have first order transport with exact time dependence e g RF cavities Some of the more unusual elements available are third order alpha magnets 5 4 time dependent kicker magnets voltage ramped RF cavities beam scrapers and beam analysis screens Several elements support simulation of collective effects such as short range wakefields res onator impedances intra beam scattering coherent synchrotron radiation and the longitudinal space charge impedance A wide variety of output is available from tracking including centroid and sigma matrix output along the accelerator phase space output at arbitrary locations turn by turn moments at arbitrary locations histograms of particle coordinates coordinates of lost particles and initial coordinates of transmitted particles In addition to tracking internally generated pa
190. l 1 Figure 1 Illustration of coordinate system and magnet definition 186 sddsprintout para ftable input sdd ND 3 Variable00Name X Variable01Name y VariableO2Name Z Variable00Min 1 700000e 02 Variable01Min m 5 000000e 03 m m Variable02Min 0 000000e 00 Variable00Max m 1 700000e 02 Variable01Max m 5 000000e 03 Variable02Max m 1 250000e 01 Variable00lnterval m 1 000000e 03 Variable01Interval m 1 000000e 03 Variable02Interval m 1 250000e 0 Variable00Dimension 35 Variable01Dimension 11 Variable02Dimension 101 sprintout col ftable input page 2 By field x_index y_index z_index Frequency if 0 0 1 100 1 0 10 100 1 1 10 100 1 34 10 100 1 Figure 2 Example of SDDS input file The column x_index y_index z_index is not the necessary part it s shown here just for clarifying how the data is arranged 187 FTRFMODE 9 25 FTRFMODE One or more beam driven TM dipole modes of an RF cavity with data from a file Parallel capable yes Description FILENAME STRING NULL S BIN_SIZE bin size for current histogram Pee ede ee N_BINS 20 number of bins for current his Ce ee RIGID_UNTIL_PASS don t affect the beam until this pass USES YMM_DATA long use Symm columns from PDX toate o0 misalignment DY M DY O O XFACTOR double 1 factor by which to multi
191. l plane RY M double 0 0 radius in vertical plane M M RAD double M M angle of incidence in horizon tal plane DX aouble 0 0 misalignment DY m deoo misiem 00 misalignment TILT RAD double misalignment rotation about ia laos YAW RAD double misalignment rotation about Sd PITCH RAD double misalignment rotation about dae eee tester horizontal axis NULL GROUP string Optionally used to assign an element to a group with a user defined name Group names will appear in the pa rameter output file in the col umn ElementGroup 213 LSCDRIFT 9 40 LSCDRIFT Longitudinal space charge impedance Parallel capable yes in Oe ae LEFFECTIVE M double 0 0 effective length used if L 0 BINS long number of bins for current AL togram pee Few Use Savitzky Golay filter to smooth current histogram in ing Savitzky Golay filter half width for smoothing current histogram Ce ORDER ey Savitzky Golay filter order for eae smoothing current histogram INTERPOLATE eee ee a e LOW_FREQUENCY_CUTOFF90 double Highest spatial E at which low frequency cutoff fil ter is zero If not positive no low frequency cutoff filter is applied Frequency is in units of Nyquist 0 5 binsize LOW_FREQUENCY_CUTOFF1 double Lowest spatial frequency at which low frequency cutoff filter is 1 If not given defaults to LOW_FREQUENCY_CUTOF HIGH_FREQUENCY_CUTOFFO0 double 1 Spatial frequency at w
192. latter appear in the equation in the form lt element name gt lt parameter name gt in all capital letters The original values of all variables and covariable may be accessed via names like lt element name gt lt parameter name gt O e disable If nonzero the covariable is ignored 58 optimization_setup 6 37 optimization_setup e type setup command e function define overall optimization parameters and methods amp optimization_setup STRING equation NULL STRING mode minimize STRING method simplex double tolerance 0 01 double target 0 long center_on_orbit 0 long center_momentum_also 1 long soft_failure 1 long n_passes 2 long n_evaluations 500 long n_restarts 0 long matrix_order 1 STRING log file NULL STRING term_log_file NULL long output_sparsing_factor 0 long balance_terms 0 double restart_worst_term_factor 1 long restart_worst_terms 1 long verbose 1 long balance_terms 0 double simplex_divisor 3 double simplex_pass_range_factor 1 long include_simplex_id_scans 1 long start_from_simplex_vertex1 0 long restart_random_numbers 0 amp end e equation An rpn equation for the optimization function expressed in terms of any pa rameters of any optimization variables the final parameters of the beam as recorded in the final output file available in the run_setup namelist and selected quantities from Twiss parameter tune shi
193. ld to third order in y Fy Fa Fp Fez y z 3Fa 6Fpz 10F 2 46 F y 3Faz 4Fp2 5F2 y Fa 4Fyz 10F 2 47 Fa 10 48 Fy 15 l4 49 F OG 50 lp 231Kg 25 51 For this model the user specifies FINT and HGAP only e Enge model with 3 coefficients a E a ee 52 oe 1 e 1 422 D a3 z D ae ee 4 Fy h E sy 53 qa 1 3 1 5 F y y Fg 4 mY 54 where FO Da The user may choose engel enge3 or enge5 where the number indicates the order of the expansion of F with respect to y The need only specify FINT and HGAP The Enge parameters are then automatically deter mined to give the correct linear focusing However if user gives non zero value for FP2 then FINT and HGAP are ignored FP2 FP3 and FP4 and taken as the Enge coefficients a1 a2 and a3 respectively 240 NISEPT 9 57 NISEPT A numerically integrated dipole magnet with a Cartesian gradient Parallel capable yes _ eee oo ace TANGLE RAD double 0 0 bendage E RAD double 0 0 entrance edge angle Bl 1 M_ double normalized gradient K1 B1 L ANGLE QIREF double o from septum at which D ep i AN ToN a oome 0 00 Fringe fed eng ooma t e 0001 a egy METHOD STRING E integration method runge kutta bulirsch stoer modified midpoint two pass modified midpoint leap frog non adaptive runge kutta poe ese linear fri
194. le BETAY1M M double On momentum horizontal al pha function NUY1AX double First amplitude derivative of the vertical tune wrt Ax 199 ILMATRIX continued An Individualized Linear Matrix for each particle for fast symplectic tracking with chromatic and amplitude dependent effects Default ALPHAY double On momentum vertical alpha Pea ae flint ALPHAX1M double First chromatic derivative of cic ice ee pee ALPHAY1M double First chromatic derivative of ee eee ETAX M double On momentum horizontal eta ee ee ee ETAPX M double On momentum horizontal eta Pee eee ETAY M double On momentum vertical eta ee ee ee ee ETAPY M double On momentum vertical eta E ie eS ee ed ETAX1 M double First chromatic derivative of E EO tonto ton ETAPX1 M double First chromatic derivative of ee ee eee ETAY1 M double First chromatic derivative of a ETAPY1 M First chromatic derivative of double ALPHAC double First order momentum com paction factor Rotation angle about the lon gitudinal axis If zero then particles that CROSS_RESONANCE long cross an integer or half integer resonance are considered lost GROUP string NULL Optionally used to assign an element to a group with a user defined name Group names will appear in the pa rameter output file in the col umn ElementGroup This element allows fast symplectic tracking of transport through a periodic cell with chromatic and amplitude dependent tunes beta functions an
195. le if L 0 use this length for ra diation computations GROUP string NULL Optionally used to assign an element to a group with a user defined name Group names will appear in the pa rameter output file in the col umn ElementGroup 195 HMON 9 29 HMON A horizontal position monitor accepting a rpn equation for the readout as a function of the actual position x Parallel capable yes IOo m om 00 om D m doe 00 iie DY m ioe 00 misiem SSS PWEIGHT doube 1 weight in correction ____ TILT ee ee rotation about longitudinal axis CALIBRATION double i calibration factor for readout ORDER long 0 matrix onder READOUT STRING NULL rpn expression for readout ac tual position supplied in vari able x CO_FITPOINT long If nonzero then closed or bit value is placed in variable lt name gt lt occurence gt xco GROUP string NULL Optionally used to assign an element to a group with a user defined name Group names will appear in the pa rameter output file in the col umn ElementGroup 196 IBSCATTER 9 30 IBSCATTER A simulation of intra beam scattering Parallel capable no FACTOR double 1 factor by which to multiply even es etre tg CHARGE C double beam charge or use CHARGE element Dx o ong Yao span scattering Dyo Tong _ do yeplane seattermg PDO tong arpan scattering NSLICE long The number of slices per bunch SMOOTH ia Use smooth met
196. le particle and line modes split_fraction If interval splitting is done how the interval is split desired_resolution If interval splitting is done fraction of xmax xmin to which to resolve the aperture Ignored for all but single particle mode assume_nonincreasing If this variable is non zero the search assumes that the aperture at y sign y x Ay is no larger than that at y This results in tracking of fewer particles but may give a pessimistic result Used only for single and multi particle modes offset_by_orbit A flag indicating whether to offset the transverse beam coordinates by the closed orbit before tracking The default value is zero for backward compatibility but the recommended value is 1 verbosity A larger value results in more printouts during computations n_lines In n lines mode the number of lines to search optimization_mode If non zero then find_aperture is a setup command and can be used with elegant s internal optimizer The quantity Area is defined giving the area of the dynamic aperture for use in the penalty function This is available only for the line search modes 37 floor_coordinates 6 21 floor_coordinates e type action command e function compute floor coordinates for an accelerator amp floor_coordinates STRING filename NULL double XO 0 0 double ZO 0 0 double thetaO 0 0 long include_vertices 0 long vertices_only 0 long magnet_ce
197. lected elements which may be used to turn off unneeded diagnostics and speed up tracking when concatenation is being used e notes Any number of these commands may be given Not effective unless given prior to run_setup The only property of the original element that is preserved is the length For example transmuting a SBEN into a CSBEN will not have the expected result amp transmute_elements STRING name NULL STRING type NULL STRING exclude NULL STRING new_type DRIF long disable 0 long clear 0 amp end e name Possibily wild card containing string specifying the elements to which the transmu tation specification is to be applied e type Possibily wild card containing string specifying the element types to which the trans mutation specification is to be applied e exclude Possibily wild card containing string specifying elements to be excluded from the specified transmutation Does not affect elements transmuted due to other specifications e new_type Type into which specified elements will be transmuted e disable If nonzero the command is ignored e clear If nonzero all prior transmutation specifications are deleted 91 twiss_analysis 6 58 twiss_analysis e type setup command e function analyze Twiss parameters within a user defined region for purposes of optimization amp twiss_analysis STRING match_name NULL STRING start_name NULL STRING
198. length s Two ways to specify the nominal bunch length harmonicCavity Voltage V factor harmonicFactor Specifies a harmonic cavity voltage and the ratio of the harmonic cavity frequency to the main frequency superPeriods number Number of superiods of the lattice specified in twissfile to simulate If one has an N cell ring but only gives 1 cell in the input this value should be N If one gives the whole ring this value should be 1 energy GeV Beam energy If not given the value in the twissfile is used 109 integrationParameters deltaTime s points number startTime s iterations number fraction value tolerance value Integration parameters which must be set deltaTime is the time interval for wake function and charge density evaluation points is the number of time points while startTime is the time relative to synchronous phase at which the time region starts These values must be set by the user based on knowledge of the likely bunch length For the others we suggest 1000 iterations a fraction of 0 01 and a tolerance of 107 e authors L Emery M Borland ANL APS 110 7 6 ibsEmittance ibsEmittance e description ibsEmittance computes growth rates and equilibrium emittances for electron rings due to intrabeam scattering IBS It will also integrate the growth rates to show the time evolution of the emittances The IBS algorithm is based on the Bjorken and Mtingwa s formul
199. literally by preceeding the character by a backslash e g In many places where a filename is required in an elegant namelist the user may supply a so called incomplete filename An incomplete filename has the sequence s imbedded in it for which is substituted the rootname The rootname is by default the filename less the extension of the lattice file The most common use of this feature is to cause elegant to create names for all output files that share a common filename but differ in their extensions Post processing can be greatly simplified by adopting this naming convention particularly if one consistently uses the same extension for the same type of output Recommended filename extensions are given in the lists below When elegant reads a namelist command one of its first actions is to print the namelist back to the standard output This printout includes all the variables in the namelist and their values Occasionally the user may see a variable listed in the printout that is not in this manual These are often obsolete and are retained only for backward compatibility or else associated with a feature that is not fully supported Use of such undocumented features is discouraged elegant supports substitution of fields in namelists using the commandline macro option This permits making runs with altered parameters without editing the input file Macros inside the input file have one of two forms lt tag gt or
200. llel capable yes OoOo o m foe oo O oS Bo r oe o0 O o __ _ PERIODS ome o Number of undulator periods METHOD NULL STRING non adaptive runge kutta integration method runge kutta bulirsch stoer modified midpoint two pass modified midpoint leap frog non adaptive runge kutta FIELD EXPANSION NULL STRING ideal exact or leading terms ACCURACY NULL Integration accuracy for adap tive integration Not recom mended POLE FACTOR1 double 0 1557150345504 Strength factor for the first and last pole POLE_FACTOR2 double 0 380687012288581 Strength factor for the second POLE_FACTOR3 double 0 802829337348179 Strength factor for the third LASER_WAVELENGTH M double Laser wavelength If zero the wavelength is calculated from the resonance condition N_STEPS long Number of integration steps for non adaptive integration CASER PEAK POWER double LASER W0 M double 1 laser spot size at waist wo V 20 V20y LASER PHASE 00 o LASER_XO M double laser horizontal offset at center fee ode ee Ld LASER_YO M double laser vertical offset at center of ee ee ee i eee 216 LSRMDLTR continued A non symplectic numerically integrated planar undulator including optional co propagating laser beam for laser modulation of the electron beam Default LASER Z0 M double offset of waist position from center of wiggler TASERTIT RA doube 00 Teer LASER M long laser horizontal mode
201. llel_optimization_setup STRING method simplex double random_factor 1 long n_iterations 10000 long max_no_change 10000 long population_size 100 STRING population_log NULL long print_all_individuals 0 long output_sparsing_factor 1 STRING crossover twopoint method May be one of genetic hybridsimplex or swarm If the default simplex method is chosen all the processors will do the same optimization as the serial version if there is only one particle for optimization tracking or do optimization tracking in parallel if the number of particles is larger than the number of CPUs All algorithms can be used for global optimization swarm is recommended when there is sufficient computation resource available so it can reach the optimization target fast hybridsimplex is recommended when the initial point is close to the optimal result genetic can be chosen for a global optimizer with a random start point 0 should be avoided for any initial coordinate random_factor The factor to scale the step size for both parallel swarm and genetic methods n_restarts For the parallel hybridsimplex method this number should be set larger than 1 so the the best result across all processors can be used for the next restart The parameter is not used for the swarm method n_iterations The maximal number of generations iterations for the parallel genetic and particle swa
202. lowing in order of decreasing sophistication and accuracy e G Stupakov s extension of Saldin et al Set USELSSTUPAKOV 1 The most advanced model at present is based on a private communication from G Stupakov SLAC which extends equation 87 of the one dimensional treatment of Saldin et al NIM A 398 1997 373 394 to include the post dipole region This model includes not only the attenuation of the CSR as one proceeds along the drift but also the change in the shape of the wake This model has the most sophisticated treatment for intervening elements of any of the models For example if you have a sequence CSRCSBEND CSRDRIFT CSRDRIFT and compare it with the sequence CSRCSBEND CSRDRIFT DRIFT CSRDRIFT keeping the total drift length constant you ll find no change in the CSR induced energy modulation The model back propagates to the beginning of the intervening element and performs the CSR computations starting from there This is the slowest model to run It uses the same binning and smoothing parameters as the upstream CSRCSBEND If run time is a problem compare it to the other models and use only if you get different answers e M Borland s model based on Saldin et al equations 53 and 54 Set USE_SALDIN54 1 This model computes the fall off of the CSR wake from the work of Saldin and coworkers as described in the reference above It does not compute the change in the shape of the wake The fall off is computed approximat
203. lso non zero BX_FILE and BY_FILE are not used FORCE_MATCHED long 1 Force matched dispersion for first harmonics If non zero start and end of magnetic field will be inset from the ends of the device if phase is not 0 or T FIELD OUTPUT STRING NULL Name of file to which field samples will be written Slow so use only for debugging VERBOSITY long A higher value requires more detailed printouts related to computations GROUP string NULL Optionally used to assign an element to a group with a user defined name Group names will appear in the pa rameter output file in the col umn ElementGroup N B at present this element is not included in computations of beam moments moments_output command This element simulates a wiggler or undulator using a modified version of Ying Wu s canonical integration code for wigglers To use the element one must supply an SDDS file giving harmonic analysis of the wiggler field The field expansion used by the code for a horizontally deflecting wiggler is Y Wu Duke University private communication By Bo 5 Cmn cos kri cosh kymy cos kznz Ozn 7 m n where Bo is the peak value of the on axis magnetic field the Cmn give the relative amplitudes of the harmonics the wavenumbers statisfy kar k k2 and Ozn is the phase The file must contain the following columns e The harmonic amplitude Cmn in column Cmn e The phase in radians in column Phase The p
204. m pee oor pen fe eee initial vertical eta function ee Sees ey oe Gall ine initial slope of vertical eta function if FROM_OVALUES nonzero GROUP string NULL Optionally used to assign an element to a group with a user defined name Group names will appear in the pa rameter output file in the col umn ElementGroup This elements allows transformation of the twiss parameters of a beam with a first order matrix The matrix is computed in various ways based on initial and final twiss parameters Depending on how you set it up the final twiss parameters for your beam may not be the twiss parameters you specify The twiss parameter values BETAX BETAY etc specified in the element definition specify the target values of the transformation To completely specify the transformation one must know the initial values as well Lattice Function Based Transformation If FROM_BEAM is zero which is the default then the initial values are taken from the incoming lattice functions computed by twiss_output This provides a way to transform the lattice functions between two parts of a transport line without designing intervening optics A beam that is matched at the beginning of the transport line will remain matched A beam that is mismatched at the beginning of the transport line will not be matched after the TWISS element By default each time the twiss parameters are recomputed the transformation is updated to maintain the desired latt
205. m elegant written entirely in the C programming language uses a variant of the MADB input format to describe accelerators which may be either transport lines circular machines or a combination thereof Program execution is driven by commands in a namelist format This document describes the features available in elegant listing the commands and their arguments The differences between elegant and MAD formats for describing accelerators are listed A series of examples of elegant input and output are given Finally appendices are included describing the post processing programs 3 1 Program Philosophy For all its complexity elegant is not a stand alone program For example most of the output is not human readable and elegant itself has no graphics capabilities These tasks are handled by a suite of post processing programs that serve both elegant and other physics programs These pro grams collectively known as the SDDS Toolkit 8 9 provide sophisticated data analysis and display capabilities They also serve to prepare input for elegant supporting multi stage simulation Setting up for an elegant run thus involves more than creating input files for elegant per se A complicated run will typically involve creation of a post processing command file that processes elegant output and puts it in the most useful form typically a series of graphs Users thus have the full power of the SDDS Toolkit the resident command interpreter e g
206. m_number_seed 987654321 long correction_iterations 1 double p_central 0 0 double p_central_mev 0 0 long always_change_pO 0 STRING expand_for NULL long tracking_updates 1 long echo_lattice 0 STRING search_path NULL long element_divisions 0 long load_balancing_on 0 amp end e lattice Name of the lattice definition file e echo_lattice If nonzero the lattice input is echoed to the standard output as the lattice is parsed This can help detect certain problems with the lattice that cause elegant to crash e use_beamline Name of the beamline to use e rootname Filename fragment used in forming complete names from incomplete filenames By default the filename minus extension of the input file is used 77 output The incomplete name of an SDDS file into which final phase space coordinates will be written Recommended value s out centroid The incomplete name of an SDDS file into which beam centroids as a function of s will be written Recommended value s cen sigma The incomplete name of an SDDS file into which the beam sigma matrix as a function of z will be written Recommended value s sig N B confusion sometimes occurs about some of the quantities related to the s coordinate in this file Please see Section J above final The incomplete name of an SDDS file into which final beam and transport pa rameters will be written Recommended
207. malized difference as k s Ki s Kine s Ki si Thus k s K s Ko using the notation of Zhou et al The integrals to be input to elegant are defined as f i kod a f koda 55 246 iz k s s s9 3ds s Az f asf Ikke 8 s s Normally the effects are dominated by i and if 247 f dea i x if i k s s 90 8ds it ds is dstk s k s s s QUFRINGE 9 62 QUFRINGE An element consisting of a linearly increasing or decreasing quadrupole field Parallel capable yes peak geometric strength TILT RAD double rotation about longitudinal axis wo vo Dx m ooe o0 misin D vo FE doe 0 0__ fractional strength ror DIRECTION oms o entrance Iet ORDER __ ong o matrix order GROUP string NULL Optionally used to assign an element to a group with a user defined name Group names will appear in the pa rameter output file in the col umn ElementGroup 248 RAMPP 9 63 RAMPP A momentum ramping element that changes the central momentum according to an SDDS format file of the momentum factor vs time in seconds Parallel capable yes Default WAVEFORM STRING NULL lt filename gt lt x gt lt y gt form specification of input file giv ing momentum factor vs time GROUP string NULL Optionally used to assign an element to a group with a user defined name Group names will appear in the pa rameter output file in the col um
208. match the beam from a transport line to a ring 305 TWLA 9 97 TWLA A numerically integrated first space harmonic traveling wave linear accelerator Parallel capable yes oe ee a lt PHASE RAD double 00 phase CTIME OFFSET 5 doube 00 tme offset adds to phase Ez vm double 00 emici BS0ENOD r doube 00 solenoid i ACCURACY doube 00001 integration accuray KMA m oe 00 xhalFapertwe Yua m oe 00 y halFaperture DxO a oe 00 ilie D m ioe 00 miem BEA WVE due i phase voce ALPHA I M doube 00 feid attenvation facor PHASE REFERENCE long phase reference number to link with other time dependent elements N ee long number of steps for nonadap FOCUSSING ee l include focusing effects METHOD STRING runge kutta integration method runge kutta bulirsch stoer non adaptive runge kutta modi fied midpoint e Leone t median ie ear at ra ala CHANGE_PO long element change central enp p GROUP string NULL Optionally used to assign an element to a group with a user defined name Group names will appear in the pa rameter output file in the col umn ElementGroup 306 light TWMTA 9 98 TWMTA A numerically integrated traveling wave muffin tin accelerator Parallel capable yes eine eg PHASE RAD double 00 phase Ez Vm double 0 0 dei O PACCURAGY doube 00001 integration accuracy XUA m ioe 00 x halFapertwe Yua m oe 00 y hal
209. maz 0 and 0 maz For n line mode the number of lines is set with the n_lines parameter With n gt 3 n lines are explored from 0 0 to max 8iN 9 Ymar cos 0 where 0 takes values from pi 2 to 1 2 In these modes the output file contains a parameter called Area which gives the area of the dynamic aperture Also still recognized are other modes namely five line seven line nine line and eleven line search_output The incomplete name of an SDDS file for output of detailed information on each tracked particle single particle mode only Recommended value s apso 36 boundary The incomplete name of an SDDS file for the boundary points of the aperture search Recommended value s bnd Valid for many and single particle modes xmin xmax ymin ymax Region of the aperture search The minimum values are relevant only for many and single particle modes nx For many and single particle modes the number of x values to take in initial search For line modes this determines the initial x and y step sizes via Atv amp maz nz and Ay Ymax Na ny For many and single particle modes the number of y values to take in search Ignored for line modes n_splits If positive the number of times to do interval splitting Interval splitting refers to searching between the original grid points in order to refine the results This is done only for sing
210. mmand If nonzero then the values of the horizontal emit tance and the momentum spread are taken from the uncoupled computation done with the twiss_output command In this case the user must issue a twiss_output command prior to the coupled_twiss_output If zero then the values of the horizontal emittance and the momentum spread are taken from the parameters emit_x and sigma_dp respectively verb emit_x Gives the horizontal emittance if enittances_from_twiss_command 0 emittance_ratio Gives the ratio of the x and y emittances Used to determine the vertical emittance from the horizontal emittance Note that the computation is not self consistent I e the user is free to enter any emittance ratio desired whether it is consistent with the machine optics or now sigma_dp Gives the momentum spread if emittances_from_twiss_command 0 gma_dp p This feature was added to elegant using code supplied by V Sajaev based on Ripkin s method The code computes the coupled lattice functions then uses the supplied emittance emittance ratio and momentum spread to compute the beam sizes bunch length if rf is included and beam tilt 31 divide_elements 6 17 divide_elements e type setup command e function define how to subdivide certain beamline elements e notes Any number of these commands may be given Not effective unless given prior to run_setup The element_divisions field in run_setup provides a si
211. mn containing Br values for solenoid map If omitted data is assumed to be for r 0 and an on axis expansion is performed SOLENOID_FACTOR lend factor by which to multiply solenoid fields Maii O a tos SOLENOID DY M doube 00 misalignment SNODD M aoe o0 mtem SOLENOID EMIT RAD double 00 misalignment SOLENOID EYAW RAD double 00 misalignment SOLENOID EPITOH RAD double 00 misalignment BX STRAY double 00 Uniform stray horizontal field BY_STRAY double 00 Uniform stray vertical field ACCURACY foe 0 0001 METHOD STRING runge kutta integration method runge kutta bulirsch stoer non adaptive runge kutta modi fied midpoint e A a t median e A light FIELD_TEST_FILE STRING NULL cei for output of test peor fran an i re GROUP string NULL Optionally used to assign an element to a group with a user defined name Group names will appear in the pa rameter output file in the col umn ElementGroup 273 RIMULT 9 76 RIMULT Multiplies radiation integrals by a given factor Use to compute emittance for collection of various types of cells Parallel capable yes FACTOR _ double 1___ faotr SS GROUP string NULL Optionally used to assign an element to a group with a user defined name Group names will appear in the pa rameter output file in the col umn ElementGroup 274 RMDF 9 77 RMDF A linearly ramped electric fi
212. mpler but less flexible method of performing element division At present these element types may be divided QUAD SBEN RBEN DRIF SEXT Only effective if given prior to the run_setup command e warnings Using save_lattice and element divisions together will produce an incorrect lattice file Element subdivision may produce unexpected results when used with load_parameters or parameters saved via the parameter entry of the run_setup command If you wish to load parameters while doing element divisions or if you wish to load parameters from a run that had element divisions in effect you should not load length data for any elements that are or were split The name and item pattern features of load_parameters are helpful in restricting what is loaded amp divide_elements STRING name NULL STRING type NULL STRING exclude NULL long divisions 0 double maximum_length 0 long clear 0 amp end e name A possibly wildcard containing string specifying the elements to which this specifi cation applies e type A possibly wildcard containing string specifying the element types to which this specification applies e exclude A possibily wildcard containing string specifying elements to be excluded from the specification e divisions The number of times to subdivide the specified elements If zero then maximum_length should be nonzero e maximum_length The maximum length of a slice This
213. n t be true with the standard two pole termination which might cause problems overlapping the laser with the electron beam The laser time profile can be specified using the TIME_PROFILE parameter to specify the name of an SDDS file containing the profile If given the electric and magnetic fields of the laser are multiplied by the profile P t Hence the laser intensity is multiplied by P t By default t 0 in the profile is lined up with t in the electron bunch This can be changed with the TIME_OFFSET parameter A positive value of TIME_OFFSET moves the laser profile forward in time toward the head of the bunch Explanation of lt filename gt lt x gt lt y gt format Several elements in elegant make use of data from external files to provide input waveforms The external files are SDDS files which may have many columns In order to provide a convenient way to specify both the filename and the columns to use we frequently employ lt filename gt lt x gt lt y gt format for the parameter value For example if the parameter value is waveform sdds t A then it means that columns t and A will be taken from file waveform sdds The first column is always the independent variable e g time position or frequency while the second column is the dependent quantity 218 LTHINLENS 9 42 LTHINLENS A thin lens for light optics Parallel capable yes M double 00 focal length in horizontal plane M double 0 0 focal len
214. n ElementGroup Explanation of lt filename gt lt x gt lt y gt format Several elements in elegant make use of data from external files to provide input waveforms The external files are SDDS files which may have many columns In order to provide a convenient way to specify both the filename and the columns to use we frequently employ lt filename gt lt x gt lt y gt format for the parameter value For example if the parameter value is waveform sdds t A then it means that columns t and A will be taken from file waveform sdds The first column is always the independent variable e g time position or frequency while the second column is the dependent quantity 249 RAMPRF 9 64 RAMPRF A voltage phase and or frequency ramped RF cavity implemented like RFCA Parallel capable yes Type Demi Tc m oe 00 length SSS vor V__ double 0 0___ nominal voltage PHASE DEG double 0 0 homma phase FREQ 500000000 long phase reference number to link with other time dependent elements STRING NULL lt filename gt lt x gt lt y gt form specification of input file giv ing voltage waveform factor vs time PHASE WAVEFORM STRING NULL lt filename gt lt x gt lt y gt form specification of input file giv ing phase offset vs time re quires FREQ WAVEFORM PHASE REFERENCE VOLT WAVEFORM FREQ_WAVEFORM STRING NULL lt filename gt lt x gt lt y gt form specification of in put file giving frequenc
215. n SDDS file containing beam moments emittances equivalent beta functions etc The beam file is of the type written by elegant using the output field of the run_setup command or the WATCH element examples sddsanalyzebeam run out run analysis synopsis sddsanalyzebeam pipe input output inputfile Loutputfile nowarnings correctedOnly canonical files inputfile An SDDS file containing the columns x xp y yp t and p giving the six phase space coordinates for a set of macroparticles This file can be produced from elegant for example using the output field of the run_setup command the bunch field of the bunched_beam command or the WATCH element in coordinate mode outputfile An SDDS file containing columns giving moments emittances equivalent Twiss parameters and so on for the macro particles Each row of this file corresponds to a page of the input file The names and meanings of the columns are identical to what is used for elegant s final output file from the run_setup command The file from elegant however stores the results as parameters instead of columns to convert outputfile to that convention use the SDDS toolkit program sddsexpand e switches pipe The standard SDDS Toolkit pipe option nowarnings Suppressses warning messages correctedOnly If given only the corrected twiss parameters and emittances are computed and output The corrected twiss parameters have
216. n a file Tess fojo Ooo GROUP string NULL Optionally used to assign an element to a group with a user defined name Group names will appear in the pa rameter output file in the col umn ElementGroup 178 EMITTANCE 9 19 EMITTANCE Applies a linear transformation to the beam to force the emittance to given values Parallel capable yes Default EMITX horizontal emittance EMITY vertical emittance EMITNX M double 1 horizontal normalized emit tance EMITNY vertical normalized emittance GROUP string NULL Optionally used to assign an element to a group with a user defined name Group names will appear in the pa rameter output file in the col umn ElementGroup This element allows changing the emittance of a beam during tracking It is intended to be used to modify the emittance slightly to agree with for example experimental measurements The LCLS provides an example application we track a beam from a photo injector simulation through a laser undulator beam heater and then through the entire linac The beam emittance and twiss parameters are measured at a diagnostic downstream of the laser heater We can insert an EMITTANCE element and a TWISS element at the location of the diagnostic to force the beam properties to the exact values that are measured This compensates for imperfect modeling of the photo injector while allowing us to conveniently model the system between the photo injector and the poi
217. n file such as might be used with sdds_beam e switches factor number Factor by which to multiply the number of particles rippleAmplitude value Density ripple amplitude in percent energyMod value Energy modulation amplitude in percent The wavelength is fixed at 1 um rippleWavelength value Density ripple and energy modulation wavelength in microns betaSlices n Number of longitudinal slices to use for analysis of twiss parame ters The twiss parameters of the beam will vary step wise from slice to slice This discontinuous variation may cause problems e g unstable behavior smoothPases num Presently ignored e author M Borland ANL APS e see also doubleDist6 131 touschekLifetime 7 17 touschekLifetime e description touschekLifetime computes Touschek lifetime using A Piwinski s formula p3 24 e examples touschekLifetime aps life twiss aps twi aper aps aper part 2e10 coupling 0 01 length 6 e synopsis touschekLifetime outputFile twiss twissFile aperture momentumApertureFile charge nC particles value coupling value emityInput value RF Voltage MV harmonic value limit length mm emitInput valueInMeters deltaInput value verbosity value ignoreMismatch deltaLimit valueInPercent e files outputFile Contains resulting Touschek lifetime e switches twiss A twiss parameter file from elegant You must u
218. n kick 0 0 verti o o A VKICK calibration factor for horizon calibration factor for vertical HCALIBRATION Meese ac OE E ed l double HSTEERING VSTEERING N_KICKS SYNCH_RAD D 1 1 4 number of kicks include classical synchrotron eee aang o a SYSTEMATIC_MULTIPOLES STRING NULL input file for systematic multi ee ea RANDOM _MULTIPOLES STRING NULL input file for random multi Ce ee ee STEERING_MULTIPOLES STRING NULL input file for multipole content INTEGRATION_ORDER SQRT_ORDER Order of expansion of square root in Hamiltonian 0 means no expansion ISR include incoherent syn chrotron radiation scatter ing 205 KQUAD continued A canonical kick quadrupole which differs from the MULT element with ORDER 1 in that it can be used for tune correction Data ISRIPART long Include ISR for single particle beam only if ISR 1 and ISRIPART 1 EDGE2EFFECTS Tong 0 include exit edge effects pa Paani 00 ngs toga cap M double 00 1 fringe integral pep double 0 0 t fringe integral Be Moule 0 0 i3 fringe integral double 0 0 lambda t hinge mtegral double 0 0 10 finge integral double 00 H finge integral double 00 2 finge intera TM i doube 00 gt Finge rieg vo mir LAMBDA2M lambda2 fringe integral M M M M BM _ M M RADIAL long If non zero converts the E el focusing lens quadrupole
219. n method This is the default x walkerinfinite R Walker s method Dejus method is derived from this method neks is used to change the number of points used for finding the peak of the distribution e mode pinhole density total Specify whether to compute the flux through a pinhole the flux density or the total flux 121 undulator period meters number0fPeriods integer kmin value kmax value points number Specify undulator parameters points is the number of K values to use on the interval Kimin K maz electronBeam current amps coupling value emittanceRatio value Specify pa rameters of the electron beam The current defaults to 0 1 A Either the coupling or emittance ratio must be given unless the input file contains the parameter ey0 or the column ey pinhole distance meters xsize meters ysize meters xnumber integer ynumber integer xposition meters yposition meters Specify the parame ters of the pinhole Required for mode pinhole By default xnumber 20 ynumber 20 xposition 0 and yposition 0 authors M Borland H Shang R Dejus ANL 122 sddsmatchtwiss 7 13 sddsmatchtwiss e description sddsmatchtwiss transforms a beam of macro particles to match to given beta functions and dispersion This can be useful in taking macro particle data from one simulation and using it in another For example a beam file from PARMELA could be given the right beta functions for use wi
220. n of undulator radiation properties including power density and intensity distributions e examples Take particle data from a tracking run and compute the power density using a 1 mm by 1 mm pinhole for a 72 period 3 3 cm period undulator set for a 5 keV first harmonic sddsanalyzebeam run out pipe out correctedOnly sddsurgent pipe in power sdds electronbeam current 0 025 calc method dejus mode powerDensity us pinhole dist 30 xsize 1 ysize 1 xnum 100 ynum 100 undulator period 0 033 number 72 energy 5e3 e synopsis sddsurgent inputFile outputFile calculation mode modeString method methodString harmonics integer undulator period meters number0fPeriods integer kx value ky value phase value energy eV electronBeam current Amp energy GeV spread fraction xsigma mm ysigma mm xprime mrad yprime mrad nsigma number pinhole distance m xposition value yposition value xsize value ysize value xnumber integer ynumber integer alpha steps integer delta value omega steps integer delta value nphi integer us photonEnergy maximum eV minimum eV points number nowarnings coupling value emittanceRatio value e files inputFile A Twiss output file from elegant with radiation integral calculations included or an output from sddsanalyzebeam In the latter case the correctedOnly option should be used with sddsanalyzebeam outputFile Contains the output data which varies depe
221. n repetitions e n_indices The number of looping indices for which to expect definitions in subsequent vary_element commands If nonzero then n_steps is ignored e n_passes The number of passes to make through the beamline per repetition e reset_rf_for_each_step If nonzero the rf phases are established anew for each bunch tracked Should be zero to simulate phase and timing jitter e first_is_fiducial If nonzero the first bunch seen is taken to establish the reference phases and momentum profile If zero each bunch is treated as a new fiducializing bunch e restrict_fiducialization If nonzero then momentum profile fiducialization occurs only after elements that are intended change the momentum such as rf cavities If zero then each element is fiducialized to the average momentum of the beam 76 run_setup 6 48 run_setup e type setup command e function set global parameters of the simulation and define primary input and output files amp run_setup STRING lattice NULL STRING use_beamline NULL STRING rootname NULL STRING output NULL STRING centroid NULL STRING sigma NULL STRING final NULL STRING acceptance NULL STRING losses NULL STRING magnets NULL STRING semaphore_file NULL STRING parameters NULL long combine_bunch_statistics 0 long wrap_around 1 long final_pass 0 long default_order 2 long concat_order 0 long print_statistics 0 long rando
222. nchrotron radiation effects from CWIGGLER WIGGLER or UKICKMAP elements The file created with the parameters field of run_setup does not contain any non numerical parameters of the lattice e When transmute_elements is used to turn a sextupole into a quadrupole several prob lems are seen Some of the quadrupole parameters are filled with garbage values When alter_elements or save_lattice are subsequently used elegant crashes These problems were reported by V Sajaev ANL Computation of radiation integrals does not include the effect of steering magnets There is a bug related to using ILMATRIX that will result in a crash if one does not request computation of the twiss parameters If you encounter this problem just add the following statement after the run_setup command amp twiss_output matched 1 amp end 2 Credits Contributors to elegant include M Borland W Guo R Soliday V Sajaev C Wang Y Wang Y Wu and A Xiao Contributors to related programs include M Borland R Dejus L Emery A Petrenko H Shang Y Wang A Xiao and B Yang R Soliday is responsible for multi platform builds and distribution Of course we also appreciate the many suggestions comments and bug reports from users 3 Introduction elegant stands for ELEctron Generation ANd Tracking a somewhat out of date description of a fully 6D accelerator program that now does much more than generate particle distributions and track the
223. nction name and the text that forms the function body To invoke a UDF simply type the name A file containing rpn commands can be executed by pushing the filename onto the string stack and invoking the operator rpn supports more general file I O through the use of functions that mimic the standard C I O routines Files are identified by integer unit numbers with units 0 and 1 being permanently assigned to the terminal input and terminal output respectively 327 References 1 10 11 12 13 14 15 16 17 18 19 20 21 B W Kernighan and D M Ritchie The C Programming Language Prentice Hall Englewood Cliffs N J second edition 1988 H Grote F C Iselin The MAD Program Version 8 1 CERN SL 90 13 AP June 1991 K L Brown R V Servranckx First and Second Order Charged Particle Optics SLAC PUB 3381 July 1984 M Borland A High Brightness Thermionic Microwave Electron Gun SLAC Report 402 February 1991 Stanford University Ph D Thesis H A Enge Achromatic Mirror for Ion Beams Rev Sci Inst 34 4 1963 M Borland private communication W H Press et al Numerical Recipes in C Cambridge University Press Cambridge 1988 M Borland A Self Describing File Protocol for Simulation Integration and Shared Postpro cessors Proc 1995 PAC May 1 5 1995 Dallas Texas pp 2184 2186 1996 M Borland A Universal Postprocessing T
224. nd the previous tune value This prevents jumping from the main tune peak to another peak which can happen when the tune spectrum has many lines scale_down_factor scale_up_factor scale_down_limit scale_up_limit scaling_iterations These control automatic scaling of the amplitudes If elegant sees a tune shift larger than scale_down_limit it will decrease x0 or y0 by the factor scale_down_factor If elegant sees a tune shift smaller than scale_up_limit it will increase x0 or y0 by the factor scale_up_factor Suggestion if you find yourself playing with these values and the initial amplitudes in order to get reliable TSWA coefficients try just using the tune spread verbose If nonzero information about the progress of the algorithm is printed to the screen use_concatenation If nonzero then tracks with the concatenated matrix instead of element by element The order of the concatenated matrix is given by the concat_order control in twiss_output The user should experiment with this option to see if the results are reliable for a particular lattice 100 vary_element 6 62 vary_element e type setup command e function define an index and or tie a parameter of an element to it e N B It is not possible to vary an element if the element name starts with one of the following characters 0 1 2 3 4 5 6 7 8 9 or The reason is that elegant will attempt to make an SDDS parameter name containing the elemen
225. ndent quantity 271 RFTMEZO 9 75 RETMEZO A TM mode RF cavity specified by the on axis Ez field Parallel capable yes a PHASE RAD double 00 phase EZ_PEAK od double Peak on axis longitudinal elec tric field TIME_OFFSET a ioe ea time offset adds to phase PHASE_REFERENCE long phase number to link to other time dependent elements DX dT aonb oo misalignment Do M dme oo migm Dz M doe 00 misiemo ETT RAD dobe 00 misalignment EYW RAD doe o0 misalignment PEPITCH RAD doube 00 misaigomet N STEPS long 100 number of steps for nonadap tive integration RADIAL ORDER long 1 highest order in off axis expan CHANGE_PO long does element change central Di cn INPUTFILE STRING NULL file containing Ez vs z at r 0 le containing Bz vs z at 120 T vs z at r 0 maom ne st EZCOLUMN STRING NULL column containing Ez values SOLENOID_FILE file containing map of Bz and Br vs z and r Each page con tains values for a single r STRING NULL column containing z values for solenoid map SOLENOID_RCOLUMN E GIT column containing r values for SOLENOID ZCOLUMN solenoid map If omitted data is assumed to be for r 0 and an on axis expansion is per formed 272 RFTMEZO continued A TM mode RF cavity specified by the on axis Ez field Defaul aad een ce column containing Bz values fee ie solenoid map NA eed ieee NULL colu
226. nding on the calculation mode Use sddsquery to view the file contents e switches pipe The standard SDDS Toolkit pipe option calculation mode modeString method methodString harmonics integer Choose which calculation to perform and what method to us as well as the number of undulator harmonics to compute Values for modeString are x 1 fluxDistribution Angular spatial flux density distribution 2 fluxSpectrum Angular spatial flux density spectrum 3 brightness brilliance On axis brilliance spectrum 127 x 4 pinholeSpectrum Flux spectrum through a pinhole x 5 integratedSpectrum Flux spectrum integrated over all angles x 6 powerDensity Power density and integrated power Values for methodString are x 1 Non zero emittance finite N x 2 Non zero emittance infinite N x 3 WalkerFinite Zero emittance finite N 4 Dejus Non zero emittance infinite N convolution Dejus with us only x 14 WalkerInfinite Non zero emittance infinite N convolution Walker with tt us only emittanceRatio value coupling value In the case of a twiss output file from elegant which does not contain the vertical emittance one must supply one of these options If emittanceRatio R is given y o R and z o If coupling k is given s 0 1 k and ey k z o is the equilibrium emittance from the twiss output of elegant In the case of twiss output from sddsanalyz
227. ne may have trouble constructing an initial simplex if the range of the variables is large Setting this control to a value less than 1 may help include_simplex_1d_scans If nonzero optimizer performs single variable scans prior to starting simplex optimization This is usually a good idea but in some cases it will cause problems For example if your design is on the edge of being unstable you may get some many errors from the initial steps that the single variable optimizer can t continue Disabling the single variable scans will sometimes solve this start_from_simplex_vertex1 If nonzero optimizer uses the initial simplex vertex as the starting point for each new 1d scan Otherwise it uses the result of the previous scan restart_random_numbers If nonzero the random number generators used by elegant are reset for each evaluation of the optimization function This is valuable if one is optimizing tracking results that involve random processes e g ISR or scattering 62 parallel_optimization_setup 6 38 parallel_optimization_setup amp par amp end type setup command for Pelegant only function define overall parallel optimization parameters and methods N B In addition to the optimization parameters used in the optimization_setup command several new parameters are added for parallel optimization User should replace optimiza tion_setup with parallel_optimization_setup and append necessary parameters a
228. ned_values 1 It should work properly with link_elements in turn by turn mode when the source element is ramped but not when the target element is ramped e name A possibly wildcard containing string giving the names of the elements to modulate If not specified then one must specify type e item The name of the parameter to modulate e type A possibly wildcard containing string giving the names of element types to modulate May be specified with name or by itself e start_pass end_pass The starting and ending pass istart and tieng for the ramp For passes less than start_pass the ramp value is start_value For passes greater than end_pass the ramp value is end_value e start_value end_value The end point values S start and E end of the ramp 68 exponent The exponent p for the variation of values between the start and end of the ramp The ramp function R i is fe ae p RO B 8 e 2 tend start Note that i 0 on the first pass differential multiplicative Determine how the amplitude function A t is used to obtain the new value of the parameter There are four cases vo R i default R i vo voR i oR i start_occurence end_occurence If nonzero these give the starting and ending occur rence numbers of elements that will be modulated N B if wildcards are used occurrence number counting is for each set of identically named elements separately rather
229. ng NULL Optionally used to assign an element to a group with a user defined name Group names will appear in the pa rameter output file in the col umn ElementGroup This element implements the longitudinal wake for a corrugated pipe using a model by K Bane 38 The method used is identical to that for the WAKE element The only difference is that instead of providing a file to specify the wake one specifies the parameters of Bane s model as described above Setting the N_BINS and TMAX paramaters to 0 is recommended This results in auto scaling of e RADIOS fr fiore PERIOD double 148 the number of bins and the time spacing of the wake to ensure sufficient length to cover the beam and a sufficiently fine time step to resolve the oscillations in the wake As with WAKE the default degree of smoothing SG_HALFWIDTH 4 may be excessive It is suggested that users vary this parameter to verify that results are reliable if smoothing is employed SMOOTHING 1 149 CSBEND 9 9 CSBEND A canonical kick sector dipole magnet Parallel capable yes ie aoe E ANGIE RAD double 00 bodan Kio M doe 00 geometrie quadrupole strength Kao Mdoe 00 eeometrie sextupole strength Kso mM double 00 geometric octupole strength Kao doe 00 geometrie decapole strength Koo Mdoe 0 0___ geometvie 12pole strongth Ke M doe 00 geometrie TEpole strength Koo doe 00 geometrie I6pole strength Kso 1
230. ng final_values_only 0 long verbosity 0 long matched 1 long equilibrium 1 long radiation 1 long n_slices 10 double emit_x 0 double beta_x 0 double alpha_x 0 double eta_x 0 double etap_x double emit_y double beta_y double alpha_y 0 double eta_y 0 double etap_y 0 double emit_z double beta_z double alpha_z 0 gt ooo 0 0 filename The incomplete name of a file to which the moments results will be written Recommended value s mom output_at_each_step A flag indicating if set that computations and or output is desired at each step of the simulation output_before_tune_correction A flag indicating if set that output is desired both before and after tune correction final_values_only A flag indicating if set that only the final values of the Twiss pa rameters should be output and not the parameters as a function of s verbosity Larger numbers result in an increasing amount of informational output to the standard output stream matched A flag indicating if set that the periodic or matched moments should be found 5l e equilibrium A flag indicating if set that the equilibrium moments should be found If matched 1 and equilibrium 0 then the initial twiss parameters are computed from the periodic solution for the beamline e radiation A flag indicating if set that synchrotron radiation effects should be in
231. nge model hard edge lin ear cubic spline tanh quintic m mie NULL Optionally used to assign an element to a group with a user defined name Group names will appear in the pa rameter output file in the col umn ElementGroup 241 OCTU 9 58 OCTU An octupole implemented as a third order matrix Parallel capable yes Type geometric strength TILT Pee rotation about longitudinal axis 3 DZ M doube 00 misalignment DZ PSE dome 0 0 fractional strength error ORDER long 0 matrixorder GROUP string NULL Optionally used to assign an element to a group with a user defined name Group names will appear in the pa rameter output file in the col umn ElementGroup 242 PEPPOT 9 59 PEPPOT A pepper pot plate Parallel capable yes E lt PRAD M done 0 0 hole rads TRANSMISSION double 0 0 transmission of material TILT RAD double rotation about longitudinal axis THETARNS RAD double 00 rms scattering fom material N N HOLES lt N HOLES Ing long ooo number of holes GROUP string NULL Optionally used to assign an element to a group with a user defined name Group names will appear in the pa rameter output file in the col umn ElementGroup 243 PEILTER 9 60 PFILTER An element for energy and momentum filtration Parallel capable yes Defaul DELTALIMIT double 1 maximum fractional momen fee ee Meee LOWE
232. nores b2 WAVEFORM STRING NULL lt filename gt lt x gt lt y gt form specification of input file giv ing kick factor vs time GROUP string NULL Optionally used to assign an element to a group with a user defined name Group names will appear in the pa rameter output file in the col umn ElementGroup This element simulates a time dependent kicker magnet as a rectangular dipole with no fringe field effects To use this element you must supply an SDDS file giving the time dependent wave form The element is called BUMPER to because HKICK VKICK KICKER are used for steering magnets The arrival time of the beam is taken to define the reference time t 0 Hence if the waveform file has the maximum amplitude at t 0 the beam will get kicked at the peak of the waveform If the waveform peaks at t tpeak then setting TIME_OFFSET equal to tpeak will ensure that the beam is kicked at the peak amplitude By default the kicker fires on the first beam passage However if FIRE_ON_PASS is used then the kicker is treated like a drift space until the specified pass If PHASE_REFERENCE is non zero then the initial timing is taken from the first time dependent 142 element that has the same PHASE_REFERENCE value This would allow for example simulating several kickers firing at the same time Delays relative to this reference time can then be given with positive adjustments to TIME_OFFSET The input file need not have equispa
233. nside this element with the following rules limitations e If apertures from both sources are present the smallest is used e The apertures are assumed to be rectangular even if the ELLIPTICAL qualifier is set for MAXAMP Fringe field effects are based on publications of D Zhuo et al 34 and J Irwin et al 35 as well as unpublished work of C X Wang ANL The fringe field is characterized by 10 integrals given in equations 19 20 and 21 of 34 However the values input into elegant should be normalized by K or K as appropriate For the exit side fringe field let s be the center of the magnet so be the location of the nominal end of the magnet for a hard edge model and let s2 be a point well outside the magnet Using Ky pe s to represent the hard edge model and Kj s the actual field profile we define the normalized difference as k s Ki s Kine s Ki si Thus k s K s Ko using the notation of Zhou et al The integrals to be input to elegant are defined as sO _ 2 i A sds g k s ds 16 Ta f R s s so ds E a doene 17 ee I i beade C MG a de 18 ea ber k ae ka a t 19 As F ds a N A ds T dstk s k sr st s 20 Normally the effects are dominated by i and if The EDGE1_EFFECTS and EDGE2_EFFECTS parameters can be used to turn fringe field effects on and off but also to control the order of the implementation If the value is 1 linear fringe effects are include
234. nt FS doube fractional strength error NKOS fom 0 maoti SYNCH_RAD long include classical synchrotron radiation FILENAME STRING NULL name of file containing multi pole data SQRT_ORDER long Order of expansion of square root in Hamiltonian 0 means no expansion GROUP string NULL Optionally used to assign an element to a group with a user defined name Group names will appear in the pa rameter output file in the col umn ElementGroup This element simulates a multipole element using a 4th order sympletic integration Specification of the multipole strength is through an SDDS file The file is expected to contain a single page of data with the following elements 1 An integer column named order giving the order of the multipole The order is defined as Npoles 2 2 so a quadrupole has order 1 a sextupole has order 2 and so on 2 A floating point column named KnL giving the integrated strength of the multipole KnL where n is the order The units are 1 m 3 A floating point column named JnL giving the integrated strength of the skew multipole Jn L where n is the order The units are 1 m The MULT element is also available which allows the same functionality without an external file 182 FRFMODE 9 23 FRFMODE One or more beam driven TM monopole modes of an RF cavity with data from a file Parallel capable yes FILENAME STRING NULL BIN_SIZE S double bin size for current
235. nt at which the emittance is measured 179 ENERGY 9 20 ENERGY An element that matches the central momentum to the beam momentum or changes the central momentum or energy to a specified value Parallel capable yes CENTRAL_ENERGY MC double 0 0 desired central gamma CENTRAL MOMENTUM MC double 00 desired central beta gamma MATCH_BEAMLINE long if nonzero beamline reference momentum is set to beam av erage momentum MATCH_PARTICLES long if nonzero beam average mo mentum is set to beamline ref erence momentum GROUP string NULL Optionally used to assign an element to a group with a user defined name Group names will appear in the pa rameter output file in the col umn ElementGroup 180 FLOOR 9 21 FLOOR Sets floor coordinates Parallel capable yes x oo X coordinate yooo ioe 00 Ycoordinate Z aouble 0 0 Zeoordinate THETA __ double 0 0 theta value peat faut 0 0 fp ame Pst double 0 0 psivale O TT string NULL Optionally used to assign an element to a group with a user defined name Group names will appear in the pa rameter output file in the col umn ElementGroup 181 FMULT 9 22 FMULT Multipole kick element with coefficient input from an SDDS file Parallel capable yes Defaul TILT RAD double re rotation about longitudinal axis PDX double 0 0 misalignment Do m ioe 0 0 misalignment Dz m ae 00 misalignme
236. nt to a group with a user defined name Group names will appear in the pa rameter output file in the col umn ElementGroup 236 MULT 9 55 MULT A canonical kick multipole Parallel capable yes Default EO m oeoo o KMO M 2 PF double 00 integrated geometric strength TILT RAD double rotation about longitudinal axis BORE M_ double double 0 0 f bore radius gt bore bore radius o B a CI integrated field at pole tip used if BORE nonzero Doo double 0 0 misatigament bya Fonte o fmen ar conne 00 Pmisigmment ACTOR double factor by which to multiply strength ORDER og multipole order N_KICKS Ps long 4 number of kicks SYNCH_RAD long include classical synchrotron radiation GROUP string NULL Optionally used to assign an element to a group with a user defined name Group names will appear in the pa rameter output file in the col umn ElementGroup This element simulates a multipole element using 4th order sympletic integration A single multipole order n is given The multipole strength is specified by giving a a L r x y 0 Bp where Bp is the beam rigidity A quadrupole is n 1 a sextupole is n 2 and so on The relationship between the pole tip field and KnL is n BripL KIS Bp where r is the bore radius 237 31 NIBEND 9 56 NIBEND A numerically integrated dipole magnet with various extended f
237. nters 0 amp end e filename The incomplete name of an SDDS file to send output to Recommended value As flr e XO ZO theta0 Initial X Z and angle coordinate of the beamline e include_vertices Flag that if set specifies including in the output the coordinates of the vertices of bending magnets e vertices_only Flag that if set specifies that output will contain only the coordinates of the vertices of bending magnets e magnet_centers Flag that if set specifies that output will contain the coordinates of the centers of all magnets By default the coordinates of the downstream end are given 38 frequency_map 6 22 frequency_map amp fre amp end type major action command function compute frequency map from tracking Note that the number of turns tracked is set by the run_control command quency_map STRING output NULL double xmin 0 1 double xmax 0 1 double ymin 1e 6 double ymax 0 1 double delta_min double delta_max long nx 21 long ny 21 long ndelta 1 long verbosity 1 long include_changes 0 0 0 output The incomplete name of an SDDS file to send output to Recommended value s fma For the parallel version particles will be listed in essentially random order If needed sddssort can be used to sort particles by initial coordinates xmin xmax Limits of grid of initial x coordinates for tracking ymin ymax
238. nts may be embedded in the lattice file by starting a line with an exclamation point Rpn expressions may be embedded separately from an element definition by starting a line with a percent sign For example 135 Define pi 1 atan 4 sto Pi Pi 40 sto myAngle Define a rectangular bend for a ring with 80 equal bends B1 SBEN L 1 0 ANGLE myAngle E1 myAngle 2 E2 myAngle 2 Note that pi is already defined in the standard defns rpn file 136 9 Element Dictionary 137 ALPH 9 1 ALPH An alpha magnet implemented as a matrix up to 3rd order PART is used to split the magnet into halves XS lt n gt and DP lt n gt allow momentum filtration at the midpoint Parallel capable yes XMAX M double size of alpha M XS1 M double inner scraper position relative M outer scraper position relative oe aka NY inner scraper fractional mo outer scraper fractional mo position of scraper puck ee DP2 XPUCK rotation about incoming longi 0 full 1 first half 2 second half matrix order 1 3 string NULL Optionally used to assign an element to a group with a user defined name Group names will appear in the pa rameter output file in the col umn ElementGroup This element provides a matrix based implementation of an alpha magnet 5 Matrices up to third order are available 4 The parameter XMAX determines the size of the alpha which
239. ntum change but it will disagree with tracking results The reason is that in tracking SREFFECTS must displace the beam to the new equilibrium orbit because otherwise there will be additional betatron motion excited and the wrong equilibrium emittance will be obtained Since the SREFFECTS element is already adding the betatron motion excitation for the entire ring elegant is forced to offset each particle by Adi to suppress any additional excitation This issue can be resolved by placing the SREFFECTS element next to the rf cavity and setting INCLUDE_OFFSETS 0 Since the average momentum change is zero from the two elements no additional betatron motion will be generated Optionally one can also use many SREFFECTS elements at equivalent locations in the lattice which will decrease the magnitude of the effect 2 When used for dynamic aperture and momentum aperture determination one should set QEXCITATION 0 Putting the rf cavity if any right next to the SREFFECTS element is a good idea to avoid spurious excitation of betatron motion 290 3 Nothing prevents including this element in a lattice when doing frequency map analysis although it probably doesn t make any sense Only the average energy loss per turn will be included Again putting an rf cavity right after SREFFECTS is a good idea 4 In versions 19 0 and later elegant includes the effect of SREFFECTS on the closed orbit This presents a dilemna when automatic initialization
240. o FSE the error is assumed to come from the power supply which means that multipole strengths also change Special note about splitting dipoles when dipoles are long it is common to want to split them into several pieces to get a better look at the interior optics When doing this care must be exercised not to change the optics elegant has some special features that are designed to reduce or manage potential problems At issue is the need to turn off edge effects between the portions of the same dipole First one can simply use the divide_elements command to set up the splitting Using this command elegant takes care of everything Second one can use a series of dipoles with the same name In this case elegant automatically turns off interior edge effects This is true when the dipole elements directly follow one another or are separated by a MARK element Third one can use a series of dipoles with different names In this case you must also use the EDGE1_EFFECTS and EDGE2_EFFECTS parameters to turn off interior edge effects 252 RCOL 9 66 RCOL A rectangular collimator Parallel capable yes e e o PXMAX__ M__ double 0 0__ halfowidth mx PYMAX M doue 00 hafwidthimy Dx a fome foo miie aes a a ores SIDE ee STRING NULL which side if any is open X y y INVERT long If non zero particles inside the aperture are lost while those outside are transmitted GROUP string NULL Optionally used to as
241. of thickness L the energy of each particle is transformed from E to Ee 4 Energy straggling This refers to variation in the energy lost by particles The model used by elegant is very very crude It assumes that the standard deviation of the energy loss is equal to half the mean energy loss This is an overestimate we think and is provided to give an upper bound on the effects of energy straggling until a real model can be developed Note one obvious problem with this if you split a MATTER element of length L into two pieces of length L 2 the total energy loss will not not change but the induced energy spread will be about 30 lower due to addition in quadrature 227 MAXAMP 9 49 MAXAMP A collimating element that sets the maximum transmitted particle amplitudes for all following elements until the next MAXAMP Parallel capable yes PXMAX M doue 00 _ xhalkapertwre_ YMA M doe 00__ yhalkaperture PELLIPTICAL iong 0 is aperture elliptical ___ EXPONENT long 2 exponent for boundary equa tion in elliptical mode 2 is a true ellipse YEXPONENT long y exponent for boundary equa tion in elliptical mode If zero defaults to EXPONENT X y y GROUP string NULL Optionally used to assign an element to a group with a user defined name Group names will appear in the pa rameter output file in the col umn ElementGroup This element sets the aperture for itself and all subsequent elements T
242. off for the gaussian random distribution in units of the amplitude Ignored for other distribution types e bind bind_number bind_across_names These parameters control binding of errors among elements which means assigning the same error contribution to several elements This occurs if bind is nonzero which it is by default If bind is negative then the sign of the error will alternate between successive elements bind_number can be used to limit the number of elements bound together In particular if bind_number is positive then a positive value of bind indicates that bind_number successive elements having the same name will have the same error value Finally by default elegant only binds the errors of objects having the same name even if they are assigned errors by the same error_element command i e 33 through a wildcard name If bind_across_names is nonzero then binding is done even for elements with different names post_correction A flag indicating whether the errors should be added after orbit tune and chromaticity correction fractional A flag indicating whether the errors are fractional in which case the amplitude refers to the amplitude of the fractional error additive A flag indicating that the errors should be added to the prior value of the parameter If zero then the errors replace the prior value of the parameter allow_missing_elements A flag indicating that execution may continue ev
243. oles For random multipoles the values are interpreted as rms values for the distribution 206 Specification of systematic higher multipoles due to steering fields is supported through the STEERING_MULTIPOLES field This field gives the name of an SDDS file that supplies the multipole data The file is expected to contain a single page of data with the following elements 1 Floating point parameter referenceRadius giving the reference radius for the multipole data 2 An integer column named order giving the order of the multipole The order is defined as Npoles 2 2 The order must be an even number because of the quadrupole symmetry 3 Floating point column an giving the values for the normal multipole strengths which are driven by the horizontal steering field an is specifies the multipole strength as a fraction of the steering field strength measured at the reference radius R an ete where m 0 is the order of the steering field and n is the order of the error multipole The bn values are deduced from the an values specifically bn an 1 The dominant systematic multipole term in the steering field is a sextupole Note that elegant presently does not include such sextupole contributions in the computation of the chromaticity via the twiss_output command However these chromatic effects will be seen in tracking Apertures specified via an upstream MAXAMP element or an aperture_input command will be imposed i
244. olumn name wColumn name model L Henry Zn Ohms R Ohm charge C particles value bunchCurrent A steps numberO0fChargeSteps outputLastStepO0nly RF Voltage V harmonic value length s harmonicCavity Voltage V factor harmonicFactor superPeriods number energy GeV integrationParameters deltaTime s points number startTime s iterations number fraction value tolerance value e files twissFile Twiss output file from elegant including radiation integral calculations resultsFile SDDS file containing computed bunch longitudinal distributions as columns along with analysis and conditions as parameters e switches wakeFunction file tColumn name wColumn name Optionally specifies the impedance as a Greens function using values in an SDDS file The time points must be equi spaced model L Henry Zn Ohms R Ohm Optionally specifies the impedance as an induc tor L or broad band value Zn along with a resistance R charge C particles value bunchCurrent A Various ways to specify the charge in each bunch steps numberO0fChargeSteps Number of values of bunch charge to compute up to the value specified with on the just described options Using more values can help convergence as the result of each prior step is used as the starting point for the new step outputLastStepOnly Requests output for the last charge step full charge only RF Voltage V harmonic value
245. ommon application of random error simulations is to set tolerances on magnet strength and alignment relative to the correctability of the closed orbit A more efficient way to do these calculations is to use correct orbit amplification factors 6 elegant the computes amplification factors and functions for corrected and uncorrected orbits and trajectories pertaining to any element that produces an orbit or trajectory distortion It simultaneously computes the amplification functions for the steering magnets in order to determine how strong the steering magnets will need to be 4 Digression on the Longitudinal Coordinate Definition A word is in order about the definition of s which we ve described as the total equivalent distance traveled First by total distance we mean that s is not measured relative to the bunch center or a fiducial particle It is entirely a property of the individual particle and its path through the accelerator To explain what we mean by equivalent distance note that the relationship between s and arrival time t at the observation point is for each particle s Gct where 8c is the instantaneous velocity of the particle Whenever a particle s velocity changes elegant recomputes s to ensure that this relationship holds s is thus the equivalent distance the particle would have traveled at the present velocity to arrive at the observation point at the given time This book keeping is required because elegant was
246. on e The always_change_p0O parameter of run_setup causes elegant to re establish the central momentum after each element when fiducializing This may be more convenient than setting the CHANGE_PO parameter on the elements themselves However it can have unexpected consequences such as changing the central momentum to match changes in beam momentum due to synchrotron radiation e run_control has three parameters that affect fiducialization which come into play when multi step runs are made Typically these are runs that involve variation of elements addition of errors or loading of multiple sets of parameters reset_rf_for_each_step If nonzero the rf phases are re established for each beam tracked If this is 1 the default the time reference is discarded after each bunch is tracked This means that bunch to bunch phasing errors due to time of flight differences would be lost first_is_fiducial The first bunch seen is taken to establish the fiducial phases and momentum profile If one is simulating for example successive beams in a fixed accelerator this should be set to 1 Otherwise the momentum reference is discarded after each bunch is tracked restrict_fiducialization If nonzero then momentum profile fiducialization oc curs only after elements that are known to possibily change the momentum It would not occur for example after a scraper that changes the average beam momentum by removing a low momentum
247. on W t versus time behind the particle The units of the wake are V C so this element simulates the integrated wake of some structure e g a cell or series of cells If you have for example the wake for a cell and you need the wake for N cells then you may use the FACTOR parameter to make the appropriate multiplication The values of the time coordinate should begin at 0 and be equi spaced A positive value of time represents the distance behind the exciting particle A positive value of W t results in energy loss A physical wake function should be positive at t 0 313 Use of the CHARGE parameter on the WAKE element is disparaged It is preferred to use the CHARGE element as part of your beamline to define the charge Setting the N_BINS paramater to 0 is recommended This results in auto scaling of the number of bins to accomodate the beam The bin size is fixed by the spacing of the time points in the wake The default degree of smoothing SG_HALFWIDTH 4 may be excessive It is suggested that users vary this parameter to verify that results are reliable if smoothing is employed SMOOTHING 1 The algorithm for the wake element is as follows 1 Compute the arrival time of each particle at the wake element This is necessary because elegant uses the longitudinal coordinate s ct Find the mean minimum and maximum arrival times tmean tmin and tmar respectively If tmax tmin is greater than the duration of the wak
248. on and in the twiss output file under the names nuxChromUpper nuxChromLower and similarly for the y plane This computation uses the chromaticities reference_file If given the name of a file from which twiss parameter data will be taken to give the starting values Ignored if matched is nonzero The file should have the beta and alpha functions with the same names as the file created by this command reference_element Element in reference_file at which to take the twiss parameter values If not given the values at the last element in reference_file are used reference_element_occurrence Ignored if reference_element is not given Otherwise the occurence number of reference_element to use If 0 the last occurence is used reflect_reference_values If nonzero reference values of a and Noy are multiplied by 1 This permits matching backwards from the reference point cavities_are_drifts_if_matched By default if matched 1 elegant treats rf cavities as drift spaces allowing the user to have a cavity in the ring definition without it affecting the lattice functions By setting cavities_are_drifts_if_matched 0 one can force elegant to use the actual matrix for the rf cavity The differences between the results are generally small but the default behavior disagrees with the results of moments_output This feature is not available for cavities that change the beam energy CHANGE_PO 1 in element definition or always_change_p0
249. on at 1 0lo and 0 990 and average the total effects To invoke the calculation one must use set up command insert_sceffects proceed run_setup and Twiss_output command proceed track 281 SCRAPER 9 83 SCRAPER A collimating element that sticks into the beam from one side only The directions 0 1 2 and 3 are from x y x and y respectively Parallel capable yes too u fome fo fem ooo o m ane 00 radiation h O or long elastic scattering If zero then particles will lose energy ENERGY STRAGGLE long Use simple minded energy straggling model Ignored for ELASTIC scattering oe o Atomic mmber at a ES ON PLIMIT ene a ae Probability cutoff for each ence POSITION M fane 0 0__ position oPedge px E ff atignmene M f double 0 0 misalignment DY M _ k INSERT_FROM ooo eo om TT from which inserted DIRECTION Ee e use insert_from in GROUP ine A Optionally used to assign an element to a group with a user defined name Group names will appear in the pa rameter output file in the col umn ElementGroup 282 SCRIPT 9 84 SCRIPT An element that allows transforming the beam using an external script Parallel capable yes Default L M double Length to be used for matrix based operations such as twiss parameter computation COMMAND STRING NULL SDDS compliant command to apply to the beam Use the se quence i to represent the
250. on sequence 33 Algorithm 659 Collected Algo rithm from ACM Derandom Algorithm is added by Hongmei CHI CS FSU It avoids the banding problem automatically and the halton_radix values are ignored e randomize_order 3 Allows randomizing the order of assigned coordinates for the pairs x x y y and t p 0 means no randomization 1 means randomize x x y y t p values independently which destroys any x x y y and t p correlations 2 means randomize x x y y and t p in pair wise fashion This is used with Halton sequences to remove banding It is suggested that that the user employ sddsanalyzebeam to verify that the beam properties when randomization is used 20 e centroid 6 Centroid offsets for each of the six coordinates e first_is_fiducial Specifies that the first beam generated shall be a single particle beam which is suitable for fiducialization See the section on Fiducialization in elegant for more discussion e save_initial_coordinates A flag that if set results in saving initial coordinates of tracked particles in memory This is the default behavior If unset the initial coordinates are not saved but are regenerated each time they are needed This is more memory efficient and is useful for tracking very large numbers of particles 21 change_particle 6 10 change_particle e type action command e function change the particle type from the default
251. on_type 3 Distribution type for each plane May be gaussian hard edge uniform ellipse shell dynamic aperture line halo gaussian For the transverse plane the interpretation of the emittance is different for the different beam types For gaussian beams the emittances are rms values For all other types e 3 times the distribution cutoff defines the edge of the beam in position space while ye 1 a7 3 times the distribution cutoff defines the edge of the beam in slope space A hard edge beam is a uniformly filled parallelogram in phase space A uniform ellipse beam is a uniformly filled ellipse in phase space A shell beam is a hollow ellipse in phase space A dynamic aperture beam has zero slope and uniform spacing in position coordinates A line beam is a line in phase space A halo gaussian beam is the part of the gaussian distribution beyond the distribution cutoff e limit_invariants If non zero the distribution cutoffs are applied to the invariants rather than to the coordinates This is useful for gaussian beams when the distribution cutoff is small e limit_in_4d If non zero then the transverse distribution is taken to be a 4 d gaussian or uniform distribution One of these must be chosen using the distribution_type control It must be the same for x and y This is useful for example if you want to make a cylindrically symmetric beam e symmetrize If non
252. oo SSS m m oe o SOS m f Si double OOS ma am double oof OSS e E SOSOSSCS m Mm oe oo SOS ma o e oe oo SSS ma um doe oo S ma o foo SOS A oO SOS Ta m double o SSS ma e oe o SSS S SSS ma owe oo SSS ma om doe oo SSS ma oeo OSS A 00 SOS pra m double 00 SSS Tas ____ A M double 00 SS Tasty double 00 SSS Tas dM double 00 SSS PTasi______1 M_ double 00 SSS a E S O aoubie 00 SSS Le pra65 dM double 00 SOS Tass ii double oo OSC n om aoe o SOS Tari E OSS m2 Mm double oo SOS S SSS S double oo SOSOSCSSCS 176 EMATRIX continued Explicit matrix input with data in the element definition rather than in a file Tess m foe oo SSS Teli double 00 SOS Ta m doe o OSS Ti oeoo SSS ma am oe o SOS C double oO SSS rts f idole oo OSC C 00 SS msa f idole oo SSCS ss om aoe oo SOS S double oo SOS Tsa2 S d A dowbie foo OSS Ts6s SiS doubie oS ma a double foo OSS OO E 1566 S d AT doubie foo OSS mer e double o SSS mer im oe o SSS mea o double oo SSS mer mm doe o SSCS Tez um doe o SSS Tes e doe o SS Tear um doe o SS mea iY i doubiefoo SOS mes um double o SSS meaa owe oo SSS mer m oe o SSS mez im oe oo SSS Tes um de o0 SSS Ter um de o SOS Tes m doe o SS C double foo SOS AT SSS Tees im doe o SOS a double foo OSS mes im double oo SSS 177 EMATRIX continued Explicit matrix input with data in the element definition rather than i
253. oolkit for Accelerator Simulation and Data Analy sis Proc 1998 ICAP Conference Sept 14 18 1998 Monterey California to be published T P Green Research Toward a Heterogeneous Networked Computer Cluster The Dis tributed Queuing System Version 3 0 SCRI Technical Publication 1994 M Borland et al Start to End Jitter Simulation of the LCLS Proceedings of the 2001 Particle Accelerator Conference Chicago 2001 M Borland and L Emery Tracking Studies of Top Up Safety for the Advanced Photon Source Proceedings of the 1999 Particle Accelerator Conference New York 1999 pg 2319 2321 M Xie Free Electron Laser Driven by SLAC LINAC S Reiche NIM A 429 1999 242 J D Bjorken S K Mtingwa Intrabeam Scattering Part Acc Vol 13 1983 115 143 K Halbach First Order Perturbation Effects in Iron Dominated Two Dimensional Symme trial Multipoles NIM 74 1 1969 147 164 J D Jackson Clasical Electrodynamics second edition G Ripken DESY Report No R1 70 04 1970 unpublished Handbook of Accelerator Physics and Engineering A Chao and M Tigner eds 1998 Ya S Derbenev J Rossbach E L Saldin V D Shiltsev Microbunch Radiative Tail Head Interaction September 1995 TESLA FEL 95 05 A Xiao et al Direct Space Charge Calculation in elegant and its Application to the ILC Damping Ring Proc PAC2007 3456 3458 328 22 23 24 25 26
254. or space charge insertions are deleted element _prefix Name under which the space charge kick will appear in the beamline skip If nonzero the given number of insertion locations are skipped If zero only one space charge kick is inserted at the end of beamline vertical horizontal nonlinear If non zero then space charge is included in the plane in question uniform_distribution Used for bi Gaussian distributed beam coasting beam i e beam that is uniform in z but gaussian in x and y Note Some users use matched_to_cell or use_twiss_command_values in the bunched_beam command Those options will erase SCMULT assignments along the beamline In this case user has to re calculate twiss using twiss_output just before tracking 42 linear_chromatic_tracking_ setup 6 26 linear_chromatic_tracking_setup e type setup command e function define chromatic variation of beta functions tunes etc for using in fast linear chromatic tracking amp linear_chromatic_tracking_setup double nux 4 1 0 0 0 double betax 2 1 0 0 0 double alphax 2 0 0 0 0 double etax 2 0 0 0 0 double etapx 2 0 0 0 0 double nuy 4 1 0 0 O double betay 2 1 0 0 0 double alphay 2 0 0 0 0 double etay 2 0 0 0 0 double etapy 2 0 0 0 0 double alphac 2 0 0 0 0 amp end e nux Provide the horizontal tune plus its first three chromatic derivatives i e Ov 06
255. order elements are of the form Rzj Tijk and Uijkl log_file A file to which progress reports will be written as optimization proceeds For SDDS data use the final output file from the run_setup namelist term_log_file This names a file to which the values of the optimization terms are written at the completion of optimization which can be convenient when large numbers of terms are used For example by using sddssort one could find which terms are contributing most to the penalty value output_sparsing factor If set to a value larger than 0 results in sparsing of output to the final file see run_setup This can make a significant difference in the optimization speed balance_terms If nonzero then all terms of the optimization expression have their weights adjusted so they make equal contributions to the penalty function This can help prevent optimization of a single term at the expense of others It is performed only for the initial value of the optimization function simplex_divisor The factor by which simplex step sizes are changed as the optimization algorithm searches for a valid initial simplex simplex_pass_range_factor When starting a new pass the simplex optimizer takes the range over the previous simplex of each variable times this factor as the starting step size for that variable This can be useful if the optimization brings the system close to an instability In such a case the simplex routi
256. originally a matrix only code using s as the longitudinal coordinate Users should keep the meaning of s in mind when viewing statistics for s for example in the sigma or watch point output files A quantity like Ss is literally the rms spread in s It is not defined as o 3 c A nonrelativistic beam with velocity spread will show no change in Ss in a drift space because the distance traveled is the same for all particles 5 Fiducialization in elegant In some tracking codes there is a fiducial particle that is tracked along with the beam This particle follows the ideal trajectory or orbit with the ideal momentum and at the ideal phase There is no fiducial particle in elegant Instead fiducialization is typically based on statistical properties of the bunch This can be performed on a bunch by bunch basis or for the first bunch seen in a run The latter method must be used if one wants to look at the effects of changing phase voltage or magnets relative to some nominal configuration Internally elegant fiducializes each element in the beamline Fiducializing an element means determining the reference momentum and arrival time or phase for that element If the reference momentum does not change along a beamline and no time dependent elements are involved then fiducialization is irrelevant All elements are fiducialized at the central momentum defined in run_setup A number of commands have parameters for controlling fiducializati
257. oriodie ___ PHASE REFERENCE long phase reference E to link with other time dependent elements FIRELONPASS os o pas number to fire on N pe Mem M of kicks to use for sim a Bias aes lt filename gt lt x gt lt y gt form specification of input file giv ing kick factor vs time GROUP string NULL Optionally used to assign an element to a group with a user defined name Group names will appear in the pa rameter output file in the col umn ElementGroup This element simulates a time dependent multipole kicker magnet To use this element you must supply an SDDS file giving the time dependent waveform The element is called MBUMPER to because HKICK VKICK KICKER are used for steering magnets The arrival time of the beam is taken to define the reference time t 0 Hence if the waveform file has the maximum amplitude at t 0 the beam will get kicked at the peak of the waveform If the waveform peaks at t tpeak then setting TIME_OFFSET equal to tpeak will ensure that the beam is kicked at the peak amplitude By default the kicker fires on the first beam passage However if FIRE_ON_PASS is used then the kicker is treated like a drift space until the specified pass 230 If PHASE_REFERENCE is non zero then the initial timing is taken from the first time dependent element that has the same PHASE_REFERENCE value This would allow for example simulating several kickers firing at the same time Delays relative
258. os kzz sink sinh k 2 13 where k2 k k2 165 Vertical wiggler split poles produces By only on axis Specified by setting BXK_SPLIT_POLE 1 and giving BX_FILE or SINUSOIDAL 1 with either VERTICAL 1 or HELICAL 1 B Bo cos kzx cos k z cosh kyy 14 B Bol ky cos kzz sin hot sinh kyy 15 where k k2 k2 166 DRIF 9 13 DRIF A drift space implemented as a matrix up to 2nd order Parallel capable yes _ at ao 00 ee ORDER ong fo ats onder GROUP string NULL Optionally used to assign an element to a group with a user defined name Group names will appear in the pa rameter output file in the col umn ElementGroup 167 DSCATTER 9 14 DSCATTER A scattering element to add random changes to particle coordinates according to a user supplied distribution function Parallel capable yes Units Defaul PLANE STRING NULL Plane to scatter xp yp dp Pe ee ap i dea FILENAME STRING NULL Name of SDDS file containing lei eseooton eio VALUENAME STRING NULL Name of column containing the independent variable for the distribution function data CDFNAME STRING NULL Name of column containing the cumulative distribution function data ONCEPERPARTICLE long If nonzero each particle can only get scattered once by this element FACTOR double 1 Factor by which to multiply the independent variable val ues PROBABILITY double 1 Probability that
259. oup This element allows simulation of a longitudinal impedance using a broad band resonator or an impedance function specified in a file The impedance is defined as the Fourier transform of the wake function Zaye ee o tH t dt 91 where i 1 W t Ofort lt 0 and W t has units of V C For a resonator impedance the functional form is ts a LO gt where R is the shunt impedance in Ohms Q is the quality factor and wp is the resonant frequency When providing an impedance in a file the user must be careful to conform to these conventions Other notes Z w 92 1 The frequency data required from the input file is not w but rather f w 27 2 The default smoothing setting SG_HALFWIDTH 4 may apply too much smoothing It is recommended that the user vary this parameter if smoothing is employed 321 Explanation of lt filename gt lt x gt lt y gt format Several elements in elegant make use of data from external files to provide input waveforms The external files are SDDS files which may have many columns In order to provide a convenient way to specify both the filename and the columns to use we frequently employ lt filename gt lt x gt lt y gt format for the parameter value For example if the parameter value is waveform sdds t A then it means that columns t and A will be taken from file waveform sdds The first column is always the independent variable e g time position or
260. pa rameter output file in the col umn ElementGroup This element is used together with the TFBPICKUP element to simulate a digital transverse feedback system Each TFBDRIVER element must have a unique identification string assigned to it using the ID parameter The same identifier must be used on a TFBPICKUP element This is the pickup from which the driver gets its signal Each pickup may feed more than one driver but a driver can use only one pickup A 15 term FIR filter can be defined using the AO through A14 parameters The output of the filter is simply ar a P where P is the pickup filter output from 7 turns ago The output of the filter is optionally delayed by the number of turns given by the DELAY parameter To some extent the DELAY is redundant For example the filter ag 0 a 1 with a delay of 0 is equivalent to a9 1 a 0 with a delay of 1 However for long delays or delays combined with many term filters the DELAY feature must be used 293 The output of the filter is multiplied by the STRENGTH parameter to get the kick to apply to the beam The KICK_LIMIT parameter provides a very basic way to simulate saturation of the kicker output See Section 7 2 14 of Handbook of Accelerator Physics and Engineering Chao and Tigner eds for a discussion of feedback systems 294 TFBPICKUP 9 90 TFBPICKUP Pickup for a transverse feedback loop Parallel capable no ID STRING NULL System identifier PLANE
261. pedance Ra 2 R QS foe oo eavity QS FREQ o m double 0 0 frequency CHARGE C double e beam charge or use CHARGE element BEER toate omae oad pe BIN_SIZE S double bin size for current histogram ee eee N_BINS long 20 number of bins for current his ans a _ PaE Cd STRING oth x yp or both SAMPLE_INTERVAL long rae between output RECORD file PER_PARTICLE_OUTPUT long If non zero then in BINLESS mode provides per particle output of RECORD data RECORD STRING NULL output file for cavity data SINGLE_PASS long if nonzero don t accumulate field from pass to pass RIGID_UNTIL_PASS Pa eee eee don t affect the beam until this pass 2 misalignment misalignment cre double factor by which to multiply shunt impedances BINLESS long If nonzero use algorithm spaced pew Lee factor by which to multiply shunt impedances that doesn t requiring binning GROUP string NULL Optionally used to assign an element to a group with a user defined name Group names will appear in the pa rameter output file in the col umn ElementGroup RAMP hee Lae Number of passes over which to linearly ramp up the impedance to full strength 4 Best for few particles widely 299 TRWAKE 9 94 TRWAKE Transverse wake specified as a function of time lag behind the particle Parallel capable yes Defaul INPUTFILE STRING NULL name of file giving Green func Be ee ee TCOLUMN STRING NULL column in
262. performed for each error set Statistics over all the error sets provide most likely values and error bars The beam parameters computed by sddsemitproc pertain to the beginning of whatever system is simulated in elegant examples elegant quadScan ele sddscollapse quadScan fin pipe out sddsxref pipe in quadScan data take SigmaX SigmaY sddsemitproc pipe in emitResults sdds synopsis sddsemitproc inputfile Loutputfile pipe input output sigmaData zName yName errorData zName yName errorLevel valueinm gaussian nSigmas uniform nErrorSets number seed integer limitMode resolution zero reject deviationLimit zLevelm yLevelm resolution zResolutionm yResolutionm verbosity Level files inputfile An SDDS file containing one or more pages with columns named Rij where ij is 11 12 33 and 34 These give elements of the horizontal and vertical transport matrices from the beginning of a system to the observation point The sigma matrix inferred will be that for the beginning of the system Typically one starts with the final file from the run_setup command in elegant and collapses it using sddscollapse Each page of inputfile corresponds to a different emittance measurement In addition to this data inputfile must also contain columns giving the rms beam sizes in x and y The user supplies the names of the columns using the sigmaData option otherwise they default to Sx and Sy T
263. phase TIME OFFSET 5 doube 00 tme offset adds to phase TILT eee rotation about longitudinal axis mooo v oe 00 oidd E Bem r oe 00 azimuthal magnetie fdd BZ fv ie o0 ongida electric hdd ACCURACY doubie 00001 f integration accuracy double 00 x halfapertmre double 00 y halfapertre x o p fome foo ften 00 misiem phase reference number to link with other time dependent elements et ie of steps for nonadap a ie integration N_STEPS METHOD S runge kutta integration method runge kutta bulirsch stoer non adaptive runge kutta modi fied midpoint Pee STRING t median eee mage al e g t median C l string NULL Optionally used to assign an element to a group with a user defined name Group names will appear in the pa rameter output file in the col umn ElementGroup Em M BE DY LM PARSE REFERENCE ne 296 light TRCOUNT 9 92 TRCOUNT An element that defines the point from which transmission calculations are made Parallel capable no DUMMY os o Po a GROUP string NULL Optionally used to assign an element to a group with a user defined name Group names will appear in the pa rameter output file in the col umn ElementGroup 297 TRFMODE 9 93 TRFMODE A simulation of a beam driven TM dipole mode of an RF cavity Parallel capable yes 298 PRA dL Ohm double 00 shunt impedance PRS Ohm fn double 0 0 shunt im
264. plitude function A t is used to obtain the new value of the parameter There are four cases differential 1 multiplicative 0 v t vo A t default differential 0 multiplicative 0 v differential 1 multiplicative 1 v differential 0 multiplicative 1 v start_occurence end_occurence If nonzero these give the starting and ending occur rence numbers of elements that will be modulated N B if wildcards are used occurrence number counting is for each set of identically named elements separately rather than for the sequence of matched elements s_start s_end If non negative these give the gaving and ending position limits for the end of element locations of elements to be modulated after The name of an element If given the modulation is applied only to elements that follow the named element in the beamline before The name of an element If given the modulation is applied only to elements that precede the named element in the beamline verbose If nonzero information is printed to the standard output as changes are made Use for debugging only since otherwise it may slow the simulation 50 6 32 amp mom amp end moments_output moments_output type action setup command function compute periodic or non periodic beam moments optionally including radiation ents_output STRING filename NULL long output_at_each_step 0 long output_before_tune_correction 0 lo
265. ply O eal A ed ee YFACTOR double 1 factor by which to multiply ee i pesanes A CUTOFF Z double If gt 0 cutoff frequency Modes above this frequency are ig nored OUTPUT_FILE STRING NULL Output file for voltage in each mode long 1 Interval in passes at which to flush output data FLUSH_INTERVAL long Number of passes over which to linearly ramp up the RAMP_PASSES impedance to full strength GROUP string NULL Optionally used to assign an element to a group with a user defined name Group names will appear in the pa rameter output file in the col umn ElementGroup This element is similar to TRFMODE but it allows faster simulation of more than one mode Also the mode data is specified in an SDDS file This file can be generated using the APS version of URMEL or by hand It must have the following columns and units 1 Frequency The frequency of the mode in Hz Floating point 2 Q The quality factor Floating point 188 3 ShuntImpedance or ShuntImpedanceSymm The shunt impedance in Ohms m defined as V 2 P x or V 2 P y Floating point By default Shunt Impedance is used However if the parameter USE_SYMM_DATA is non zero then ShuntImpedanceSymm is used The latter is the full cavity shunt impedance that URMEL computes by assuming that the input cavity used is one half of a symmetric cavity The file may also have the following columns 1 beta Normalized load impedance dimen
266. put file in the col umn ElementGroup 144 CEPL 9 5 CEPL A numerically integrated linearly ramped electric field deflector Parallel capable yes faut o Pe PRAMP TIMB 5 doube 1009 timeto ramp to full stronth NOST fs foe 0 0 oft oframpstat ime VOLTAGE double maximum ET between plates due to ramp STATICVOLTAGE V double 00 static component of voltage _ TILT double rotation about longitudinal axis ACCURACY __ doube 010001 integration accuracy PxMAX m double 000 x halfaperture MAK double 0 0 EA to link with other time dependent elements N_STEPS ae ee of steps for nonadap ee fe integration METHOD Ce runge kutta integration method runge kutta bulirsch stoer non adaptive runge kutta modi fied midpoint pee l STRING t median vee A light e g t median aaraa string NULL Optionally used to assign an element to a group with a user defined name Group names will appear in the pa rameter output file in the col umn ElementGroup PHASE REFERENGE REFERENCE E phase reference number 145 CHARGE 9 6 CHARGE An element to establish the total charge of a beam Active on first pass only If given overrides all charge specifications on other elements Parallel capable yes TOTAL eC double 0 0 total charge in beam PERPE e ae 00 iee pe i GROUP string NULL Optionally used to assign an element to a group with a user defined name
267. r field_string field_initial_value 1 field_final_value 39 field_interval 2 amp end e input_file input_column If given input_file is taken as the name of an SDDS file which is expected to have a string column named by input_column Each row of the column is taken as a separate optimization term e verbose If nonzero optimization terms are echoed to the terminal as they are created or read from the input file 65 optimization_variable 6 40 optimization_variable e type setup command e function defines a parameter of an element to be used in optimization e N B It is not possible to optimize an element if the element name starts with one of the following characters 0 1 2 3 4 5 6 7 8 9 or The reason is that elegant will attempt to make an SDDS parameter name containing the element name and these characters are disallowed at the beginning of such a name amp optimization_variable STRING name NULL STRING item NULL double lower_limit 0 double upper_limit 0 double step_size 1 long disable 0 long force_inside 0 amp end e name The name of the element e item The parameter of the element to be varied e lower_limit upper_limit The lower and upper limits allowed for the parameter If these are equal the range of the parameter is unlimited e step_size The initial step size simplex optimization or the grid size in this dimension
268. r 266 RFMODE continued A simulation of a beam driven TM monopole mode of an RF cavity Default Q_WAVEFORM STRING NULL lt filename gt lt x gt lt y gt form specification of input file giv ing qualityFactor QO vs time where QO is the quality factor given the the Q parameter RAMP_PASSES long Number of passes over which to linearly ramp up the impedance to full strength BINLESS long If nonzero use algorithm that doesn t requiring binning Best for few particles widely spaced GROUP string NULL Optionally used to assign an element to a group with a user defined name Group names will appear in the pa rameter output file in the col umn ElementGroup Explanation of lt filename gt lt x gt lt y gt format Several elements in elegant make use of data from external files to provide input waveforms The external files are SDDS files which may have many columns In order to provide a convenient way to specify both the filename and the columns to use we frequently employ lt filename gt lt x gt lt y gt format for the parameter value For example if the parameter value is waveform sdds t A then it means that columns t and A will be taken from file waveform sdds The first column is always the independent variable e g time position or frequency while the second column is the dependent quantity 267 RFTM110 9 74 REFTM110 Tracks through a TM110 mode deflecting rf cavity with all magneti
269. r defined name Group names will appear in the pa rameter output file in the col umn ElementGroup This element allows simulation of a transverse impedance using a broad band resonator or an impedance function specified in a file The impedance is defined as the Fourier transform of the wake function Z eH t dt 93 where i 1 W t Ofort lt 0 and W t has units of V C m Note that there is no factor of i in front of the integral Thus in elegant the transverse impedance is simply the Fourier transform of the wake This makes it easy to convert data from a program like ABCI into the wake formalism using sddsfft For a resonator impedance the functional form is iwr Rs BOS THE By 94 where R is the shunt impedance in Ohms m Q is the quality factor and w is the resonant frequency When providing an impedance in a file the user must be careful to conform to these conventions Other notes 1 The frequency data required from the input file is not w but rather f w 27 2 The default smoothing setting SG_HALFWIDTH 4 may apply too much smoothing It is recommended that the user vary this parameter if smoothing is employed 325 10 Examples Example runs and post processing files are available in a separate tar file The examples are intended to demonstrate program capabilities with minimal work on the user s part However they don t pretend to cover all the capabilities Each demo
270. r of a given element as a steering corrector e N B any use of this command disables the built in definition of HKICK VKICK and HVKICK elements as steering elements For trajectory correction this facility works without any additional effort by the user However it will not work for orbit correction unless the user also sets use_response_from_computed_orbits 1 in amp correct amp steering_ element STRING name NULL STRING element_type NULL STRING item NULL STRING plane h double tweek 1e 3 double limit 0 amp end e name Optional the possibly wild carded name of the element to add to the steering list If not given then element_type must be given e element_type Optional the possibly wild carded name of the element type to add to the steering list If not given then name must be given e item The parameter of the element to be varied e plane May be either h or v for horizontal or vertical correction e tweek The amount by which to change the item to compute the steering strength e limit The maximum allowed absolute value of the item 87 touschek_scatter 6 56 touschek_scatter e type setup action command e function Simulate Touschek scattering process at each TSCATTER element based on Monte Carlo method The local scattering rate is calculated by using Piwinski s formula and from the Monte Carlo simulation Scattered particles can be tracked through the entire
271. r of the largest SVs Set minimum_SV_ratio to require removal of any vectors with singular values less than a given factor of the largest singular value bpm_noise 2 The BPM noise level bpm_noise_cutoff 2 Cutoff values for the random distributions of BPM noise bpm_noise_distribution 2 May be either gaussian uniform or plus or minus verbose If non zero information about the correction is printed during computations fixed_length Indicates that the closed orbit length should be kept the same as the design orbit length by changing the momentum offset of the beam 27 fixed_length_matrix Indicates that for fixed length orbit correction the fixed length matrix should be computed and used This will improve convergence but isn t always needed n_xy_cycles Number of times to alternate between correcting the x and y planes minimum_cycles The minimum number of x y cycles to perform even if the correction does not improve n_iterations Number of iterations of the correction in each plane for each x y cycle prezero_correctors Flag indicating whether to set the correctors to zero before starting track_before_and_after Flag indicating whether tracking should be done both before and after correction start_from_centroid Flag indicating that correction should start from the beam centroid For orbit correction only the beam momentum centroid is relevant use_actual_beam
272. rations 10 double iteration_fraction 1 Il ve long fixed_length 0 long start_from_recirc 0 long verbosity 0 output The incomplete name of an SDDS file to which the closed orbits will be written Recommended value s clo output_monitors_only If non zero indicates that the closed orbit output should include only the data at the locations of the beam position monitors start_from_centroid A flag indicating whether to force the computation to start from the centroids of the beam distribution start_from_dp_centroid A flag indicating whether to force the computation to use the momentum centroid of the beam for the closed orbit This can allow computing the closed orbit for an off momentum beam then starting the beam on that orbit using the offset_by_orbit or center_on_orbit parameters of the track command In contrast to the start_from_centroid this command doesn t force the algorithm to start from the beam transverse centroids closed_orbit_accuracy The desired accuracy of the closed orbit in terms of the difference between the start and end coordinates in meters closed_orbit_iterations The number of iterations to take in finding the closed orbit iteration_fraction Fraction of computed change that is used each iteration For lattices that are very nonlinear or close to unstable a number less than 1 can be helpful Otherwise it only slows the simulation fixed_length A fla
273. ringe field models Parallel capable yes a Seon a ANGE RAD double 0 0_____ bending ande Eo RAD double 00 entrance edge ange B o RAD doe TILT double rotation about incoming longi tudinal axis vo D a a E wo f fore foo frg double ae a Cc Boae m aowe 0 0 half gap between poles peer o fr fome fo Fringe parameter anh modo FP2 double 00 atwa 0 vo vo FP FP4 F FSE o os fractional strength error eee error r rotation about incoming inca 0 0001 integration accuracy for non adaptive integration used as the step size ACCURACY METHOD STRING runge kutta integration method runge kutta bulirsch stoer modified midpoint two pass modified midpoint leap frog non adaptive runge kutta long include classical synchrotron radiation long adjust fringe boundary posi tion to make symmetric tra jectory Not done if AD JUST_FIELD is nonzero SYNCH_RAD ADJUST_BOUNDARY STRING linear fringe model hard edge lin ear cubic spline tanh quin tic engel enge3 enged 238 NIBEND continued A numerically integrated dipole magnet with various extended fringe field models Parameter Name ADJUST_FIELD long adjust central field strength to e S FUDGE_PATH_LENGTH long fudge central path enc to force it to equal the nominal length L FRINGE_POSITION long O fringe centered on refer ence plane l1 fringe inside 1 fringe outside GROUP string NULL
274. ript which allows using many workstations for simulation of storage ring dynamic and momentum aper ture frequency maps and so on Clearly use of automated postprocessing tools greatly increases the scale and sophistication of simulations possible In passing we note another philosophical point about elegant namely the goal of complete backward compatibility We consider it unacceptable if a new version of the program gives different answers than an old version unless the old version was wrong Hence there are sometimes less than ideal default settings in elegant incorrect spelling of parameters etc that are never fixed because doing so would break old input files It helps to read the manual pages carefully for the more complex features to ensure that the defaults are understood and appropriate 3 2 Capabilities of elegant elegant started as a tracking code and it is still well suited to this task elegant tracks in the 6 dimensional phase space x x y y s 6 where x y is the horizontal vertical transverse coordinate primed quantities are slopes s is the total equivalent distance traveled and 6 is the fractional momentum deviation Note that these quantities are commonly referred to as x xp y yp 8 dp in the namelists accelerator element parameters and output files dp is admittedly confusing it is supposed to remind the user of AP P Sometimes this quantity is referred to as delta Trac
275. rm optimization population_size The number of individuals to be generated for each generation iteration for the swarm and genetic method For the hybridsimplex method the number of individuals is equal to the number of processors used max_no_change The maximal number of generations in which no change in the best eval uation is allowed before the genetic method stops genetic method only 63 e n_evaluations This is not used as a stop condition in the genetic optimization The n_iterations or max_no_change can be used instead For the hybridsimplex method this is the number of allowed evaluations per restart e population_log An SDDS file to which the best individual in a population can be written after each iteration as optimization proceeds Recommended value s pop For the paral lel genetic method user can choose to print out all the individuals See print_all_individuals e print_all_individuals If nonzero all the strings in a population will be recorded in the population_log file This is supported for the genetic method only e output_sparsing_factor For genetic optimization this is used to set the frequency of printing strings in the log file with the number of generations as the interval e crossover For genetic optimization it allows the user to choose a crossover type from onepoint twopoint and uniform twopoint is the default crossover type If the dimension i
276. romaticity correction Parallel capable yes Default Uni 0 0 I double 00 geometric strength double re rotation about longitudinal M M axis double 00 bore radius T double field at pole tip used if bore nonzero pte a oe DY dou te 00 misalignment sr DZ done 00 misalignment PSE SSS double 00 Fractional strength error NKOS SSS os a number of kicks SYNCH_RAD long include classical synchrotron radiation SYSTEMATIC_MULTIPOLES 4 STRING NULL input file for systematic multi poles RANDOM _MULTIPOLES STRING NULL input file for random multi poles INTEGRATION ORDER ong 4 integration order 2 or 4 SQRT_ORDER long Order of expansion of square root in Hamiltonian 0 means no expansion ISR long include incoherent syn chrotron radiation scatter ing ISRIPART long 1 Include ISR for single particle beam only if ISR 1 and ISRIPART 1 GROUP string NULL Optionally used to assign an element to a group with a user defined name Group names will appear in the pa rameter output file in the col umn ElementGroup This element simulates a sextupole using a kick method based on symplectic integration The user specifies the number of kicks and the order of the integration For computation of twiss parameters chromaticities and response matrices this element is treated like a standard thick 211 lens sextuupole i e the number of kicks and the integration order become irrel
277. rt and end in the middle of a pole for the same reason The vertical focusing is implemented as a distributed quadrupole like term affecting ony the vertical unlike a true quadrupole The strength of the quadrupole is see Wiedemann Particle 318 Accelerator Physics II section 2 3 2 1 K 1 2p2 89 where p is the bending radius at the center of a pole The undulator is focusing in the vertical plane The wiggler field strength may be specified either as a peak bending radius p RADIUS param eter or using the dimensionless strength parameter K K parameter These are related by Kaw 90 ro 90 where y is the relativistic factor for the beam and Aq is the period length 319 ZLONGIT 9 106 ZLONGIT A simulation of a single pass broad band or functionally specified longitudinal impedance Parallel capable yes Defaul CHARGE C double beam charge or use CHARGE element BROADBAND img o broadband impedance BA Om ae 00 shunt impedance BS Ohm double 00 shunt impedance Ra 2 R double o0 eavityQ Sd Q o FREQ Hz double frequency ZREAL STRING NULL lt filename gt lt x gt lt y gt form specification of input file giv ing real part of impedance vs f BROAD_BAND 0 ZIMAG STRING NULL lt filename gt lt x gt lt y gt form specification of in put file giving imaginary part of impedance vs f BROAD_BAND 0 BIN_SIZE S double bin size for current histogram iaa
278. rtical tunes 95 dnux dp and dnuy dp The horizontal and vertical chromaticities defined as dv do dnux dp2 and dnuy dp2 The horizontal and vertical 2nd order chromaticities defined as dv d Will be zero if higher_order_chromaticity is zero dnux dp3 and dnuy dp3 The horizontal and vertical 3rd order chromaticities defined as dv dd Will be zero if higher_order_chromaticity is zero dbetax dp and dbetay dp Chromatic derivatives of the horizontal and vertical beta func tions defined as g etax2 etax3 etay2 etay3 Higher order dispersion in the horizontal and vertical planes For example for the horizontal plane the closed orbit at the end of the lattice depends on 6 according to 726 72267 Ne30 This differs from the chromaticity expansion which is given in terms of successive derivatives of v dnux dAx dnux dAy dnuy dAx dnuy dAy Tune shifts with amplitude where amplitude is defined as Ay 1 aq g bq with q x or q y These will be zero unless the tune_shift_with_amplitude command is given hi1001 h00111 h20001 h00201 h10002 h21000 h30000 hi0110 h10020 h10200 h22000 hi1110 h00220 h31000 h40000 h20110 h11200 h20020 h20200 h00310 h00400 Res onance driving terms 29 These will be zero unless compute_driving_terms is nonzero See table PB for an explanation of each term dnux dJx dnux dJy and dnuy dJy Tune shifts with amplitude from Bengtsson
279. rticle distributions elegant can track distributions stored in external files which can either be generated by other programs or by previous elegant runs Because elegant uses SDDS format for reading in and writing out particle coordinates it is relatively easy to interface elegant to other programs using files that can also be used with SDDS to do post processing for the programs elegant allows the addition of random errors to virtually any parameter of any accelerator element One can correct the orbit or trajectory tunes and chromaticity after adding errors then compute Twiss parameters track or perform a number of other operations elegant makes it easy to evaluate a large number of ensembles seeds in a single run Alternatively different ensembles can be readily run of different CPUs and the SDDS output files combined In addition to randomly perturbing accelerator elements elegant allows one to systematically vary any number of elements in a multi dimensional grid As before one can track or do other computations for each point on the grid This is a very useful feature for the simulation of experi ments e g emittance measurements involving beam size measurements during variation of one or more quadrupoles 6 Like many accelerator codes elegant does accelerator optimization It will optimize a user defined function of the transfer matrix elements up to third order beta functions tunes chro maticities radiation inte
280. s multipoles dipole quad sext oct type skew sddsfindresonances run fma run res multipoles sext oct type skew norm synopsis sddsfindresonances pipe input output inputFile output file multipoles all integer dipole quadrupole sextupole octupole type normal skew variables firstColumn secondColumn files inputFile By default frequency map analysis output file from elegant s frequency_map command or equivalent containing at minimum the columns x y nux and nuy Each page of the file is treated separately outputFile Contains the identified resonance lines one resonance line per page The file contains the columns x y nux and nuy along with parameters that identify the resonance switches pipe The standard SDDS Toolkit pipe option multipoles all integer dipole quadrupole sextupole octupole Choose what order of resonances to search for by naming the type of magnet that nominally drives it or by giving the maximum order to search all option type normal skew Specify normal or skew driven resonances Default is both variables firstColumn secondColumn Use to change the default names for the coordinate variables authors H Shang M Borland ANL 120 sddsfluxcurve 7 12 sddsfluxcurve e description sddsfluxcurve computes undulator fluxcurve curves using Twiss parameter data from elegant or sddsan
281. s one must be certain to set the phase of the rf cavity correctly It is also a good idea to track for several synchrotron oscillation periods 55 optimize 6 34 optimize e type major action command e function perform optimization e note on UNIX systems the user may press Control C to force elegant to terminate op timization and proceed as if optimization had converged To genuinely terminate the run during optimization press Control C twice This is very useful if one wants to get a look at the partially optimized result If one uses parameter saving run_setup or save_lattice one can make a new run that starts from the optimized result amp optimize long summarize_setup 0 amp end e summarize_setup A flag indicating if set that a summary of the optimization parameters should be printed 56 optimization_constraint 6 35 optimization_constraint e type setup command e function define a constraint for optimization e N B This command is disparaged It is far better to put constraints into the optimization equation via the equation parameter of optimization_setup or via optimization_term The reason is that the hard constraints imposed by optimization_constraint may make it more difficult for the optimizer to converge See the discussion of the selt and segt macros in the manual entry to optimization_setup amp optimization_constraint STRING quantity NULL double lower 0 double upper 0
282. s 2 it will be set to onepoint crossover Note e Genetic optimization in Pelegant terminates when at least one of the stopping rules specified has been met The two stopping rules are generation limit n_iterations exceeded no change in the best solution found in a given number of generations The default is to stop when the generation limit 10000 is the default value is reached While the max_no_change is more favorite to use as it will stop until the result can not be improved after a certain number of iterations 10000 is the default value The n_iterations can be set to a very large number to use this rule as the stop condition alone e step size control The mutation step size in the genetic optimization is selected from a Gaus sian distribution with mean 0 and standard deviation step_size where step _size is provided by user All the dimensions will use the same standard deviation for an iteration The step_size of the first dimension provided by user will be used as the original step size for all the dimen sions The step size will be reduced by the golden ratio 1 618 if the best value is unchanged after every 3000 iterations After every 3000 iterations since the last time the step size is reduced the step size will be increased by the golden ratio e As the genetic optimization implementation in Pelegant internally updates individuals with a relative change of the current value for a variable 0 should be avoided
283. s can be used to adjust the strength of the wakes if the location at which you place the TRWAKE element has different beta functions than the location at which the object that causes the wake actually resides The XPOWER and YPOWER parameters can be used to change the dependence of the wake on the x and y coordinates respectively of the particles Normally XPOWER 1 and YPOWER 1 This is an ordinary dipole wake in a supposedly symmetric chamber If you have an asymmetric chamber then you will have a transverse wake kick even if the beam is centered Of course you ll need a 3 D wake code like GdfidL or MAFIA to compute this wake This part of the transverse wake is described with XPOWER 0 and YPOWER 0 It will result in an orbit distortion but conceivably could have other effects such as emittance dilution If XPOWER 0 or YPOWER 0 the units for the x or y wake respectively must be V C A negative value of the wake corresponds to a kick toward negative x or y 301 TUBEND 9 95 TUBEND A special rectangular bend element for top up backtracking Parallel capable yes ee ee ANGIE RAD double 00 bend angle FE __ donble 0 0__ Tractional strength error OFFSET double horizontal offset of magnet center from arc center MAGNET_WIDTH Laie horizontal width of the magnet pole MAGNET_ANGLE fer angle that the magnet was de signed for GROUP NULL Optionally used to assign an element to a group with a user de
284. s theory 29 See documentation for tune_shift_with_amplitude for discussion and comparison with dnux dAx etc These will be zero unless compute_driving_terms is nonzero Ax and Ay The horizontal and vertical acceptance These will be zero if no apertures are defined alphac alphac2 First and second order momentum compaction The path length is s So acd ace2 L8 couplingIntegral couplingDelta and emittanceRatio These quantities are defined in section 3 1 4 4 of I9 The computations include tilted quadrupoles vertical orbit in sextupoles vertical sextupole displacement and solenoids Note that the emittance ratio does not include the effect of vertical dispersion In The n radiation integral taux tauy taudelta Radiation damping times for x y and Jx Jy Jdelta Damping partition factors for x y and ex0 enxO Horizontal equilibrium geometric and normalized emittances SdeltaO Equilibrium fractional rms energy spread UO Energy loss per turn 96 N B the higher order dispersion and higher order chromaticity are computed using the con catenated third order matrix However elegant only has third order matrices for three elements alpha magnets quadrupoles and sextupoles This may be acceptable if any dipoles for example have large bending radius Users who are concerned about these effects should perform off energy tracking using canonical elements i e CSBEND KQUAD
285. se the radiation_integrals flag in twiss_output aperture A momentum aperture file from elegant This file can contain a subset of elements of twissFile for example only Quadrupole elements However the Twiss and momentum aperture files must cover the same beamline Having one file for a part of beamline e g a few sectors and one for the entire ring will yield incorrect results charge particles Give the charge in nanocoulombs or the number of electrons coupling Give the emittance coupling ratio y x This is used to compute the horizontal and vertical emittance from the natural emittance emityInput Give the vertical emittance in meters RF Voltage MV harmonic value limit Specify rf voltage and harmonic number The limit qualifier if given means that the momentum acceptance is limited by the bucket half height N B If the data files cover only a portion of the ring using this option will give incorrect results length mm Specify the rms bunch length This is an alternative to giving rf param eters emitInput Give the initial total emittance in meters If not specified the value from the parameter ex0 in twissFile is used deltaInput Give the initial rms fractional momentum spread If not specified the value from the parameter Sdelta0 in twissFile is used verbosity If nonzero program execution information is printed to the stan
286. sed n_tables_to_skip Number of SDDS pages to skip at the beginning of the file center_transversely If non zero the transverse centroids of the distribution are made to be zero center_arrival_time If non zero the mean arrival time of particles at the start of the accelerator is set to zero sample_fraction If non unity the randomly selected fraction of the distribution to use p_lower p_upper If different the lower and upper limit on 8y of particles to use save_initial_coordinates A flag that if set results in saving initial coordinates of tracked particles in memory This is the default behavior If unset the initial coordinates are not saved but are reread from disk each time they are needed This is more memory efficient and is useful for tracking very large numbers of particles 83 semaphores 6 52 semaphores e type setup command e function set up names for semaphore files which are used to mark the start and end of program execution amp semaphores STRING started s started STRING done s done STRING failed s failed amp end e started Gives the incomplete filename of a file to create when a valid run_setup com mand is given e done Gives the incomplete filename of a file to create when the program exits without error If the file exists it is deleted when a valid run_setup command is given e failed Gives the incomple
287. sed to assign an element to a group with a user defined name Group names will appear in the pa rameter output file in the col umn ElementGroup N B at present this element is not included in computations of beam moments moments_output command This element simulates a wiggler or undulator using the generate function method given by J Bahrdt and G Wiistefeld Symplectic tracking and compensation of dynamic field integrals in complex undulator structures PRSTAB 14 040703 2011 To use the element one must supply an SDDS file giving harmonic analysis of the wiggler field The field expansion used by the code is for a wiggler working at the nominal gap and provide pure horizontal deflecting to the on axis beam See CWIGGLER horizontal wiggler with normal poles for detail explaination of the field expansion and format of the input file Besides the required columns of Cmn KxOverKw KyOverKw and KzOverKw by the CWIGGLER elements two more input columns are needed PHASE_2 RAD double PHASE_3 RAD double detailed printouts related to e The longitudinal harmonic number n in column zHarm e The horizontal harmonic number of l in column xHarm 191 If a file include all required columns from CWIGGLER and GFWIGGLER then user can use either of the both methods for simulating a horizontal planar wiggler An universal wiggler field which be used for generating an arbitrary polarization can be derived by given dif
288. settings and files being used for loading parameters allow_missing_elements If set allow elements in the file that are not in the lattice In this case the nonapplicable data is simply ignored allow_missing_parameters If set it is not an error if any element in the lattice lacks a parameter that exists in the file allow_missing files If set it is not an error if any listed file is missing verbose If set provide informational printouts about changes to parameters 47 matrix_output 6 30 matrix_output type setup action command function generate matrix output or set up to do so later amp kmatrix_output amp end STRING printout NULL long printout_order 1 long full_matrix_only 0 STRING SDDS_output NULL long SDDS_output_order 1 long individual_matrices 0 STRING SDDS_output_match NULL long output_at_each_step 0 STRING start_from NULL long start_from_occurrence 1 printout The incomplete name of a file to which the matrix output will be printed as text Recommended value s mpr printout_order The order to which the matrix is printed full_matrix_only A flag indicating that only the matrix of the entire accelerator is to be output SDDS_output The incomplete name of an SDDS file to which the matrix will be written Recommended value s mat SDDS_output_order The order to which the matrix is output in SDDS format in
289. sign an element to a group with a user defined name Group names will appear in the pa rameter output file in the col umn ElementGroup 253 RECIRC 9 67 RECIRC An element that defines the point to which particles recirculate in multi pass tracking Parallel capable yes TRECIRCELEMENT long 0 D GROUP string NULL Optionally used to assign an element to a group with a user defined name Group names will appear in the pa rameter output file in the col umn ElementGroup 254 REFLECT 9 68 REFLECT Reflects the beam back on itself which is useful for multiple beamline matching Parallel capable yes DUMMY fos o ee ee ee ees GROUP string NULL Optionally used to assign an element to a group with a user defined name Group names will appear in the pa rameter output file in the col umn ElementGroup 255 REMCOR 9 69 REMCOR An element to remove correlations from the tracked beam to simulate certain types of correction Parallel capable no xT oa remove comlations mx XP os 1 remove correlations m7 Pref remove contains x w Tong 1 remove correlations my XTT long coordinate to e move correlations a 1 2 3 4 5 6 x x y y s dP Po eee ONLY ee ee correction only for pal beam apply to all eben od NULL Optionally used to assign an element to a group with a user defined name Group names will appear in the pa rameter output file in the col
290. sionless Floating point If not given the 3 0 is assumed for all modes 2 xMode If given then only modes for which the value is nonzero will produce an x plane kick Integer If not given all modes affect the x plane 3 yMode If given then only modes for which the value is nonzero will produce an y plane kick Integer If not given all modes affect the y plane N B Unlike TRFMODE FTRFMODE does not include the longitudinal field that strictly speaking must also be excited Generally this is a very small effect It will be added in a future version In many simulations a transient effect may occur when using this element because in the context of the simulation the impedance is switched on instantaneously This can give a false indication of the threshold for instability The RAMP_PASSES parameter should be used to prevent this by slowly ramping the impedance to full strength This idea is from M Blaskiewicz BNL 189 GFWIGGLER 9 26 GFWIGGLER Tracks through a wiggler using generate function method of J Bahrdt and G Wuestefeld BESSY Berlin Germany Parallel capable yes Detail Total length oo B MAX T double Maximum on axis magnetic field at gap GAPO and equal longitudinal phases of PHASE _1 2 3 4 SHIM_SCALE double 1 Scaling factor of shim correc eee Eee Tecate Oe M ro wo Dz m aue 00 Misaligment PTET RAD double 00 Rotation about beam axis PERIODS long Total number of wi
291. sition Y coordinate for center of pinhole mm or mrad for distance 0 xsize X size of pinhole full width mm or mrad for distance 0 ysize y size of pinhole full width mm or mrad for distance 0 128 xnumber Number of subdivisions of pinhole in X max 500 ynumber Number of subdivisions of pinhole in Y max 500 nphi number Specifies number of steps in phi between 0 and 7 2 Must be less than 100 used in calculation mode 1 2 3 4 5 calculation method 1 2 alpha steps integer delta value Specifies the number of steps in angle alpha gamma theta j100 Delta specifies range of angles in alpha to be used in units of the angular equivalent to 1 N Used in mode 1 method 1 and method 3 omegasteps integer delta value Specifies the number of steps in photon energy for the natural lineshape j5000 delta specifies range of photon energies to be included in the natural lineshape in units energy of fundamental N The default value covers the range 2 N of the natural lineshape Used in mode 2 3 4 5 method 1 photonEnergy maximum eV minimum eV points number Specifies the maximum and minimum photon energy in eV and the number of energy points to be computed e authors H Shang R Dejus M Borland X Jiao ANL 129 smoothDist6 7 16 smoothDist6 e description Increases the number of particles in a particle input file by sampling a simplified distribution b
292. ss and it expected its input output in files crass in crass out then you d use Si script command crass rootname crass input_extension in amp output_extension out For purposes of computing concatenated transport matrices Twiss parameters response matri ces etc elegant will perform initial tracking through the SCRIPT element using an ensemble of 25 particles If this is not desirable then set the parameter DRIFT_MATRIX to a non zero value This will force elegant to treat the element as a drift space for any calculations that involve transport matrices Examples of where one might want to use this feature would be a SCRIPT that involves randomization e g scattering particle loss or particle creation 286 SEXT 9 85 SEXT A sextupole implemented as a matrix up to 3rd order Parallel capable yes Parameter Name 0 0 PKI 1 5 double 0 0 geometnie strength TILT rotation about longitudinal axis Dz _ double 0 0 misiem S double 0 0 fractional strength error FFRINGE double Length occupied by linear fringe regions as fraction hard edge length L FORDER o o matrix order _ d GROUP string NULL Optionally used to assign an element to a group with a user defined name Group names will appear in the pa rameter output file in the col umn ElementGroup 287 SOLE 9 86 SOLE A solenoid implemented as a matrix up to 2nd
293. sses or energy gain due to cavities in the system e verbosity Larger values result in more detailed printouts as calculations proceed Mostly for debugging e soft_failure Normally if elegant fails to find the momentum aperture it aborts If soft_failure is non zero it instead assigns a momentum aperture equal to the search limit e output_mode Normally elegant puts the values for positive and negative momentum aperture in different columns Each element thus has a single row of data in the output file If output_mode is nonzero elegant instead puts the values for positive and negative apertures in successive rows with a reduced number of columns This is mostly advantageous for the parallel version since it allows using twice as many simultaneous processors e forbid_resonance_crossing Normally elegant allows the momentum aperture search to cross integer and half integer resonances if no unstable particles are found If this is undesirable this flag can be set to 1 The idea for this command is from M Belgroune et al Refined Tracking Procedure for the SOLEIL Energy Acceptance Calculation Proceedings of PAC 2003 p 896 as implemented for TRACYIL In particular the energy aperture as a function of position around the ring is determined by tracking Starting at the beginning of the lattice and working downstream particles are tracked starting from the exit of each selected element The betatron coordinates are ini
294. stent If non zero the aperture data persists across subsequent run_setup com mands By default the aperture data is forgotten when a new run_setup command is seen e disable If non zero the command is ignored 17 bunched_beam 6 9 bunched_beam e type setup command e function set up for tracking of particle coordinates with various distributions amp bunched_beam STRING bunch NULL long n_particles_per_bunch 1 double time_start 0 STRING matched_to_cell NULL double emit_x 0 double emit_nx 0 double beta_x double alpha_x double eta_x double etap_x double emit_y i double emit_ny 0 double beta_y double alpha_y double eta_y double etap_y long use_twiss_command_values 0 double Po 0 0 double sigma_dp 0 0 double sigma_s 0 0 double dp_s_coupling 0 double emit_z 0 double beta_z 0 double alpha_z 0 double momentum_chirp 0 long one_random_bunch 1 long symmetrize 0 long halton_sequence 3 0 0 0 long halton_radix 6 0 0 0 0 0 O long optimized_halton 0 long randomize_order 3 0 0 0 long limit_invariants 0 long limit_in_4d 0 long enforce_rms_values 3 0 0 0 double distribution_cutoff 3 2 2 2 STRING distribution_type 3 gaussian gaussian gaussian double centroid 6 0 0 0 0 0 0 0 0 0 0 0 0 long first_is_fiducial 0 long save_initial_coordinates 1 amp end i ll oooorR ooo rF 18
295. superperiods value If given the number of superperiods in the lattice twissFile is taken to pertain to a single sector isRing Specify the calculation is done for stored beam isRing 1 default or trans port line linac beam isRing 0 When isRing is set to 0 the energy scaling and inte gration calculation will be disabled RF Voltage M V harmonic value Specify rf voltage and harmonic number length mm Specify the rms bunch length energy Me V Specify the beam energy By default this is taken from the pCentral parameter in twissFile 111 growthRatesOnly If given only the initial growth rates are computed Equilibrium emittance values are not computed resultsFile will contain columns of initial growth rate contributions from individual elements Without this option resultsFile would normally contain columns of growth rate contributions at equilibrium integrate turns number stepSize number If given then resultsFile con tains the result of integrating the differential equations for the emittances for the given number of turns and not the contributions of individual elements of growth rates The step size is the number of turns for each integration step and can be adjusted to get faster results The options growthRatesOnly and integrate are not compatible noWarning Removes warning messages e author A Xiao L Emery M Borland ANL APS 112 7 7 ma
296. t name and these characters are disallowed at the beginning of such a name amp vary_element long index_number 0 long index_limit 0 STRING name NULL STRING item NULL double initial 0 double final 0 long differential 0 long multiplicative 0 long geometric 0 STRING enumeration_file NULL STRING enumeration_column NULL amp end e index_number A non negative integer giving the number of the index e index_limit A positive integer giving the number of values the index will take Must be given if this index_number has not been listed in a previous vary_element command unless enumeration_file is given e name The name of an element e item The parameter of the element to vary e initial final The initial and final values of the parameter e enumeration_file Name of an SDDS file giving values for the item e enumeration_column Column of the SDDS file giving the values e differential If nonzero the initial and final values are taken as offsets from the predefined value of the parameter e multiplicative If nonzero the initial and final values are taken as multipliers to be applied to the predefined value of the parameter in order to obtain the actual initial and final values e geometric If nonzero then variation is geometric rather than arithmetic 101 7 Specialized Tools for Use with elegant A number of specialized programs are available t
297. t when change_defined_values 1 It should work properly with link_elements in turn by turn mode when the source element is modulated but not when the target element is modulated e name A possibly wildcard containing string giving the names of the elements to modulate If not specified then one must specify type e item The name of the parameter to modulate e type A possibly wildcard containing string giving the names of element types to modulate May be specified with name or by itself e expression RPN expression for the modulation amplitude A The value of the time is on top of the stack e filename Name of SDDS file from which to read modulation data if expression is not used e time_column Name of column in filename giving time data for the modulation table 49 amplitude_column Name of column in filename giving amplitude data for the modula tion Together time_column and amplitude_column define a function A t refresh_matrix Frequently there is a matrix associated with an element even if tracking through the element does not use the matrix In this case elegant doesn t normally update the matrix for the element as it modulates the element since that may involve a significant time penalty If this parameter is set to a non zero value the matrix will be updated For elements that use a matrix for tracking the matrix is always updated differential multiplicative Determine how the am
298. ta for the program TRANSPORT original style One may give apertures for the quadrupoles and sextupoles as well as the beam momentum in GeV c parmela quadAper mm sextA per mm p Ge V c Provide data for the pro gram PARMELA One may give apertures for the quadrupoles and sextupoles as well as the beam momentum in GeV c sdds p Ge V c Provide data in SDDS form One may give the beam momentum in GeV c angle_tolerance value PATPET and PATRICIA only allow sector and rectangu lar bends This tolerance in radians determines how far from sector or rectangular a bend definition may be and still get processed flip_k_signs Changes the signs of all quadrupoles 113 magnets filename Results in output of an additional SDDS file with the magnet layout This is the same file that would be generated by the magnets field of the run_setup command in elegant header filename ender filename Allow specification of files to be prepended and appended to the lattice output For example if additional commands are required prior to the lattice definition to set up the run they would be put in the header file If additional commands are needed after the lattice definition to initiate processing they would be put in the ender file e author M Borland ANL APS 114 7 8 sddsanalyzebeam sddsanalyzebeam description sddsanalyzebeam analyzes a beam of macro particles and produces a
299. te filename of a file to create when the program exits with an error If the file exists it is deleted when a valid run_setup command is given 84 slice_analysis 6 53 slice_analysis e type setup command e function set parameters for slice analysis of the beam along a beamline Also results in placing the final slice analysis at the end of the beamline in symbols for use in optimization equations The names of the symbols are the same as the names of the columns in the output file amp slice_analysis STRING output NULL long n_slices 0 double s_start 0 double s_end 1e300 long final_values_only 0 vend output The incomplete filename of the output file Recommended value is s slan n_slices Number of slices to use s_start s_end Position in beamline at which to start and stop performing slice analysis final_values_only If nonzero then slice quantities are computed only at the end of the beamline 85 subprocess 6 54 subprocess e type action command e function execute a system command in a shell amp subprocess STRING command NULL amp end e command The text of the command to execute The command may use the sequence s for substitution of the rootname as set by run_setup A literal s must be entered as Z As f 86 steering element 6 55 steering_element e type setup command e function setup for use of a given paramete
300. th a specific lattice in an elegant run saving the trouble of rematching to join the two simulations Similarly a beam from elegant could be matched into an FEL simulation e examples sddsmatchtwiss elegantBeam out FELBeam in xPlane beta 1 0 alpha 0 2 yPlane beta 0 5 alpha 0 2 e synopsis sddsmatchtwiss pipe input output inputfile outputfile saveMatrices filename loadMatrices filename xPlane beta meters alpha value etaValue meters etaSlope value yPlane beta meters alpha value etaValue meters etaSlope value zPlane deltaStDev value tStDev value correlation seconds alpha value chirp seconds betaGamma value nowarnings e files inputfile is an SDDS file containing one or more pages of data giving the phase space coordi nates of macro particles The macro particle data is stored in columns named x xp y yp and p The units are those used by elegant for the output file from run_setup the bunch file from bunched_beam and the coordinate mode output from the WATCH element The data from these columns is used together with the commandline arguments to produce new values for these columns the new values are delivered to outputfile Other columns may be present in inputfile if so they are passed to outputfile unchanged e switches xPlane beta meters alpha value etaValue meters etaSlope value Spec ifies the desired parameters for the beam in the horizont
301. than for the differential 1 multiplicative 0 v t t differential 0 multiplicative 0 v differential 1 multiplicative 1 v t J differential 0 multiplicative 1 v t sequence of matched elements s_start s_end If non negative these give the gaving and ending position limits for the end of element locations of elements to be modulated after The name of an element If given the modulation is applied only to elements that follow the named element in the beamline before The name of an element If given the modulation is applied only to elements that precede the named element in the beamline verbose If nonzero information is printed to the standard output as changes are made Use for debugging only since otherwise it may slow the simulation 69 rf_setup 6 43 rf_setup e type setup action command e function set up rf cavity frequency phase and voltage for a storage ring amp rf_setup STRING name NULL long start_occurence 1 long end_occurence 1 double s_start 1 double s_end 1 long set_for_each_step 0 double near_frequency 0 long harmonic 1 double bucket_half_height 0 double over_voltage 0 amp end This command must follow a twiss_output command that includes radiation integral compu tation since the energy loss per turn is needed to set up the rf cavities Note that the command includes features to allow selecting a
302. the UNIX shell and their favorite scripting language e g Tcl Tk at their disposal The idea is that instead of continually rewriting the physics code to for example make another type of graph or squeeze another item into a crowded table one should allow the user to tailor the output to his specific needs using a set of generic post processing programs This approach has been quite successful and is believed particularly suited to the constantly changing needs of research Unlike many other programs elegant allows one to make a single run simulating an arbitrary number of randomizations or variations of an accelerator By using the SDDS toolkit to postprocess the data the user s postprocessing time and effort do not depend on how many random seeds or situations are chosen Hence instead of doing a few simulations with a few seed numbers or values the user can simulate hundreds or even thousands of instances of one accelerator to get an accurate representation of the statistics or dependence on parameters with no more work invested than in doing a few simulations In addition complex simulations such as start to end jitter simulations LJ and top up tracking 12 can be performed involving hundreds or thousands of runs with input created by scripts depending on the SDDS toolkit These simulations make use of concurrent computing on about 20 workstation using the Distributed Queueing System I0 Another example is the elegantRingAnalysis sc
303. the pa rameter output file in the col umn ElementGroup This element is used for tracking through an arbitrary magnetic field when its values are known at regularly spaced grid points and it is hard to find a suitable model to describe it The input magnet parameter and coordinate system definition are illustrated in Figi The field data is saved in a 3 pages Bz By B2 3D histogram SDDS table see MHISTOGRAM for detail An example is shown in Figf2 This SDDS file must have one column Frequency to store the field data in Tesla and following parameters e ND Type long Value 3 66 E 6099 A an e VariableOOName Variable01Name VariableO2Name Type string Value x y e VariableOOMin VariableO1Min VariableO2Min Type double Value the minimum 185 boundary coordinates of x y z in meter VariableO2Min z_min must start from Zero Variable00Max Variable01Max VariableO02Max Type double Value the maximum 6699 669 boundary coordinates of x y z in meter VariableOOInterval Variable01Interval VariableO2Interval Type double Value of the grid size of x y z in meter Variable00Dimension Variable01Dimension Variable02Dimension Type long Value of total number of grid points in x y z For example Variable00Dimension Variable00Max Variable0OMin VariableO0OInterva
304. then the quantities alphax betax nux etax etapx and etaxp along with similarly named quantities for the vertical plane will be available giving twiss parameter values at the marker location Note that etapx and etaxp are the same being alternate names for n If radiation integrals are requested the values of the radiation integrals are available in the quantities I1 I2 etc e If coupled Twiss parameter calculations are being performed via coupled_twiss_output with output_at_each_step 1 then the quantities betax1 betax2 betay1 betay2 cetax cetay and tilt will be available These are the two beta functions for x and y the coupled dispersion values for x and y and the beam tilt e If moments calculations are being performed via moments_output with output_at_each_step 1 then the quantities sijm 1 lt i lt j lt 6 giving the 21 unique elements of the sigma matrix The quantities cm 1 lt i lt 6 are also created giving the 6 centroids from the moments computation The m on the end of the symbols is to distinguish them from the moments computed from tracking e If closed orbit calculations are being performed via correct or closed_orbit then the quantities xco yco xpco and ypco will be available giving the x and y closed orbits and their slopes respectively at the marker location e If floor coordinate calculations are begin performed via floor_coordinates then the quan tities X Y Z theta phi psi
305. this parameter to 1 will turn off synchronization until the end of the run echo_namelists By default elegant echoes all namelist input to the terminal If this parameter is set to 0 this output will be inhibited log_file By default elegant writes status information to the terminal If a filename is supplied for this parameter the output will instead go to the file On Linux and Unix using dev null will result in the output being discarded error_log_file By default elegant writes error messages to the terminal If a filename is supplied for this parameter the output will instead go to the file On Linux and Unix using dev null will result in the output being discarded mpi_randomization_mode Controls how the random numbers are seeded on multiple pro cessors 1 This is the original default which showed issues in some simulations The seed on the it processor is so 2 x i 2 The seed on the it processor is so 2 i 3 This is the new default The seed on the i processor is so i i 1 4 The seed on the it processor is so R where R is the it random integer returned by the system rand function 40 6 24 d insert_elements insert_elements type action command function Insert elements into a beamline at specified locations This is a convenient way to add elements to a beamline without modifying the lattice file notes The modified beamline can be saved throug
306. tially zero or very small while the momentum deviation is gradually increased until loss of the particle is observed This defines the momentum aperture at that location In elegant version 19 0 and later the algorithm is as follows For simplicity in wording we ll assume the momentum deviations are positive values although the method is applied separately for negative values as well 1 Start with 0 i e zero momentum offset 54 2 Track a particle to see if it gets lost If so proceed to step 4 3 Increase 6 by step size Ad and return to step 2 4 If no splitting steps remain proceed to the next step Otherwise a Change to delta s A0 where 6 is the largest 6 for which the particle survived and sp is the steps_back parameter b Divide the step size by split_step_divisor to get a new step size Ad c Set d A c d Decrement the splits remaining counter by 1 e Continue from step 2 5 Stop The momentum aperture is 6 This command can be used for both rings and transport lines For rings it is most appropriate to have an rf cavity i e an RFCA element in the lattice One should also include radiation loss using either of two methods 1 SREFFECTS element with QEXCITATION 0 To set up this element more easily one can include a twiss_output command with radiation_integrals 1 2 Use CSBEND and KQUAD elements with SYNCH_RAD 1 and ISR 0 When including radiation los
307. tion_fraction Fraction of the correction to apply at each iteration In some cases correction is unstable at this number should be reduced e n_iterations Number of iterations of the correction to perform e tolerance Stop iterating when chromaticities are within this value of the desired values e strength_log The incomplete name of an SDDS file to which the sextupole strengths will be written Recommended value s ssl e change_defined_values Changes the defined values of the sextupole strengths This means that when the lattice is saved using save_lattice the sextupoles will have the corrected values This would be used for correcting the chromaticity of a design lattice for example but not for correcting chromaticity of a perturbed lattice e strength_limit Limit on the absolute value of sextupole strength K e use_perturbed_matrix If nonzero requests use of the perturbed correction matrix in performing correction For difficult lattices with large errors this may be necessary to obtain correction In general it is not necessary and only slows the simulation 23 closed_orbit 6 12 closed_orbit amp clo amp end type setup command function set up for computation of the closed orbit sed_orbit STRING output NULL long output_monitors_only 0 long start_from_centroid 1 long start_from_dp_centroid 1 double closed_orbit_accuracy 1e 12 long closed_orbit_ite
308. to this reference time can then be given with positive adjustments to TIME_OFFSET The input file need not have equispaced points in time However the time values should increase monotonically This element simulates a quadrupole or higher order kicker only For dipole kickers see the BUMPER element Explanation of lt filename gt lt x gt lt y gt format Several elements in elegant make use of data from external files to provide input waveforms The external files are SDDS files which may have many columns In order to provide a convenient way to specify both the filename and the columns to use we frequently employ lt filename gt lt x gt lt y gt format for the parameter value For example if the parameter value is waveform sdds t A then it means that columns t and A will be taken from file waveform sdds The first column is always the independent variable e g time position or frequency while the second column is the dependent quantity 231 MHISTOGRAM 9 51 MHISTOGRAM Request for multiple dimensions 1 2 4 or 6 histogram output of particle coordinates Parallel capable no Defaul FILE1D STRING NULL filename for 1d histogram out put possibly incomplete see ee TN ica eal FILE2DH STRING NULL filename for 2d x x histogram output possibly incomplete see below FILE2DV STRING NULL filename for 2d y y histogram output possibly incomplete see below FILE2DL STRING NULL filename
309. trix This appears to be reliable for many cases we ve tested Method 3 tune shifts can be computed quickly using Bengtsson s formulae 29 by setting compute_driving_term in twiss_output For cases where all methods are valid the results will differ by a factor of 2 from the results obtained with this command Also the present command has more general validity because it includes dipole curvature effects The quantities computed are sarap where n gt 0 and m gt 0 are integers and p is or y ety A 1 ag ba with 2 or g y amp tune_shift_with_amplitude long turns 2048 double x0 1e 6 double yO 1e 6 double xi 3e 4 double y1 3e 4 long grid_size 6 long lines_only 0 long sparse_grid 0 long spread_only 0 double nux_roi_width 0 02 double nuy_roi_width 0 02 double scale_down_factor 2 double scale_up_factor 1 05 double scale_down_limit 0 01 double scale_up_limit 1e 4 long scaling_iterations 10 long use_concatenation 0 long verbose 0 long order 2 STRING tune_output NULL amp end 99 turns The number of turns to track If zero then the concatenated matrix is used instead of tracking and all other parameters of this command are irrelevant The matrix method doesn t work well with all lattices The order of the concatenated matrix is given by the concat_order control in twiss_output x0 yO The initial x and y amplitudes to use for determining t
310. tual position supplied in variables x y YREADOUT STRING NULL rpn expression for y readout actual position supplied in variables x y CO_FITPOINT long If nonzero then closed orbit values are placed in variables lt name gt lt occurence gt xco and lt name gt lt occurence gt yco GROUP string NULL Optionally used to assign an element to a group with a user defined name Group names will appear in the pa rameter output file in the col umn ElementGroup 235 MRFDF 9 54 MRFDF Zero length Multipole RF DeFlector from dipole to decapole Parallel capable yes Defaul FACTOR double 1 A factor to multiple all com a DO a Foe TILT RAD double rotation about longitudinal axis aooo aoabte oo Verically detiecting dipole Paz Vm oe oo Skew quadrupole aoo fm double 0 0 Skew sextupole aaoo Vm double 0 0 Skew octupole aooo VJ aoe 0 0 Skew decapole o BO Vm doubie 0 0 Horizontally detlocting pale PB2 Vm oe 0 0 Normal quadrupole B Vm done 0 0 Normal sexupole PB Vm aoe foo Normal octupole PBs Vj double o0 Normal decapole Prase HZ double 0 0 Dipole phase PHASEZ HZ double 00 Quadrupole phase PHASES AZ double 00 Sextupole phase PHASES HZ double 0 0 Octupote phase PHASES HZ double 00 Decapote phase PHASE_REFERENCE long phase reference number to link with other time dependent elements GROUP string NULL Optionally used to assign an eleme
311. ty 183 The file may also have the following column 1 beta Normalized load impedance dimensionless Floating point If not given the 3 0 is assumed for all modes In many simulations a transient effect may occur when using this element because in the context of the simulation the impedance is switched on instantaneously This can give a false indication of the threshold for instability The RAMP_PASSES parameter should be used to prevent this by slowly ramping the impedance to full strength This idea is from M Blaskiewicz BNL 184 FTABLE 9 24 FTABLE Tracks through a magnetic field which is expressed by a SDDS table Parallel capable yes double The effective field length mea nee PANGLE RAD double 0 0 The designed bending angie ft fo fome 0 0 The Tet Hinge Re eng double The right fringe field length L1 L L2 Total z span in the input field table double The designed entrance edge RAD double 0 0 The designed exit edge angle 2 RAD double rotation about incoming longi tudinal axis Dx m double 00 misalignment by far contre foo fmm DZ M__ double 00 misiem INPUT_FILE STRING NULL Name of SDDS file which con LES ea tg N_KICKS long Number of ick into which to D DO a ie es long Used for debugging code Not eee eee applicable to Pelegant GROUP string NULL Optionally used to assign an element to a group with a user defined name Group names will appear in
312. ty is VOLTAGE_WAVEFORM ce a lt filename gt lt x gt lt y gt form specification of input file giv ing voltage waveform factor vs time VOLTAGE_PERIODIC long If non zero voltage waveform is periodic with period given by time span ALIGN_WAVEFORMS long If non zero waveforms t 0 is aligned with first bunch arrival time VOLTAGE_NOISE Rms fractional noise level for eee TT ratage EE PHASE NOISE ss NOISE DEG 00 Rms noise Rms noise level for phase for Rms noise level for phase GROUP_VOLTAGE_NOISE double Rms fractional noise level for Seimei ON ala bal GROUP_PHASE_NOISE DEG double Rms noise level T3 phase ee E noise PHASE NOISE GROUP long Jo Group number for phase noise 263 RFDF continued A simple traveling or standing wave deflecting RF cavity Type Default long If non negative pass on which ee pT to start modeling cavity ong If non negative pass on which fee to end modeling cavity DRIFT occa long If non zero calculations in volving matrices assume this element is a drift space START_PASS END ee aT doatie 00 mialignment double 0 0 misalignment aie 0 ae SACRETC DEFLECTION long If non zero deflection is as sumed to be performed by a magnetic field rather than electric field default GROUP string NULL Optionally used to assign an element to a group with a user defined name Group names will appear in the pa rameter output file in
313. ubsti tution for sequence np3 double User defined numerical pa rameter for command substi ri ma ioe all me tution for sequence np4 User defined numerical pa rameter for command substi tution for sequence np5 User defined numerical pa rameter for command substi tution for sequence np6 User defined numerical pa rameter for command substi tution for sequence np7 User defined numerical pa rameter for command substi tution for sequence np8 amp User defined numerical pa rameter for command substi tution for sequence np9 284 SCRIPT continued An element that allows transforming the beam using an external script Type SPO This element allows expanding elegant by using external scripts or programs as elements in a beamline Here are requirements for the script L STRING ii STRING a STRING E STRING i 4 STRING Li STRING Zz STRING E STRING B STRING string NULL Default User defined string parameter for command substitution for sequence sp0 User defined string parameter for command substitution for sequence sp1 User defined string parameter for command substitution for sequence sp2 User defined string parameter for command substitution for sequence sp3 User defined string parameter for command substitution for sequence sp4 User defined string parameter for command substitution for sequence sp5 User defined string parameter for command substitution for sequenc
314. ulative distribution function C t f H t dt f H A Inverting this to obtain t C we generate each sample from H t by evaluating t U where U is a quantity on the interval 0 1 generated from the Halton sequence 6 Create samples for other coordinates by quiet sampling of gaussian distributions a Scaled transverse coordinates x and y using Halton radices 3 5 7 and 11 respectively For convenience in scaling step 9 these are defined such that the standard deviation of each coordinate is 1074 and all coordinates are uncorrelated b Scaled fractional momentum deviation using Halton radix 13 with unit standard deviation 7 Interpolate the look up tables to determine the mean Pmean and standard deviation psa of the momentum at each particle s time coordinate Use these to compute the individual particle momenta using p Pmean 1Psd 8 Compute the projected transverse rms emittances and Twiss parameters for the original beam 9 Transform the scaled transverse phase space coordinates to give the desired projected Twiss parameters in the x and y planes The x and y planes are assumed to be uncor related e synopsis smoothDist6 input name output name factor number rippleAmplitude 7 rippleWavelength microns smoothPasses num 500 energyMod betaSlices n 130 e files input A particle distribution file such as might be used with sdds_beam output A particle distributio
315. umentation for MARK for more details 52 momentum_aperture 6 33 momentum_aperture amp mom amp end type major action command function determine momentum aperture as a function of position in the lattice by tracking entum_aperture STRING output NULL double x_initial 0 double y_initial 0 double delta_negative_start 0 0 double delta_positive_start 0 0 double delta_negative_limit 0 10 double delta_positive_limit 0 10 double delta_step_size 0 01 long steps_back 1 long splits 2 long split_step_divisor 10 long skip_elements 0 long process_elements 2147483647 double s_start 0 double s_end DBL_MAX STRING include_name_pattern NULL STRING include_type_pattern NULL long fiducialize 0 long verbosity 1 long soft_failure 0 long output_mode 0 long forbid_resonance_crossing 0 output The incomplete name of a file to which the momentum aperture results will be written Recommended value s mmap x_initial y_initial The initial x and y coordinate values for tracking It is essential that y_initial be nonzero if one wants to see losses due to vertical resonances delta_negative_start delta_positive_start Starting values of scans in the negative and positive directions delta_negative_limit delta_positive_limit Limiting values of scans in the negative and positive directions delta_step_size Initial size of steps in
316. up The input file for this element gives the transverse wake Green functions W t and W t versus time behind the particle The units of the wakes are V C m so this element simulates the integrated wake of some structure e g a cell or series of cells If you have for example the wake for a cell and you need the wake for N cells then you may use the FACTOR parameter to make the appropriate multiplication The values of the time coordinate should begin at 0 and be equi spaced A positive value of time represents the distance behind the exciting particle Time values must be equally spaced The sign convention for W q being x or y is as follows a particle with q gt 0 will impart a positive kick Aq gt 0 to a trailing particle following t seconds behind if W t gt 0 A physical wake function should be zero at t 0 and also be initially positive as t increases from 0 Use of the CHARGE parameter on the TRWAKE element is disparaged It is preferred to use the CHARGE element as part of your beamline to define the charge Setting the N_BINS paramater to 0 is recommended This results in auto scaling of the number of bins to accomodate the beam The bin size is fixed by the spacing of the time points in the wake The default degree of smoothing SG_HALFWIDTH 4 may be excessive It is suggested that users vary this parameter to verify that results are reliable if smoothing is employed SMOOTHING 1 The XFACTOR and YFACTOR parameter
317. ut will be written model The name of the FEL model used At present only one model is supported the Ming Xie model is based on the simple parametrization M Xie I3 beta The value of the beta function in meters undulator_K The K parameter of the undulator undulator_period The undulator period in meters slice_fraction n_slices The fraction of beam beam contained by each analysis slice and the number of such slices By default no slice analysis is done Instead the beam is analyzed only as a whole If sLice_fraction n_slices is less than 1 then the slice analysis is centered on the median of the time distribution E g if n_slices 1 and slice_fraction 0 1 then the central 10 of the beam would be analyzed More typically one gives values such that slice_fraction n_slices is equal to 1 so that every part of the beam is analyzed There are separate values in the output file for each slice plus the whole beam and slice averaged results 80 save_lattice 6 50 save_lattice e type action command e function save the current accelerator element and beamline definitions amp save_lattice STRING filename NULL long output_seq 0 amp end e filename The incomplete name of a file to which the element and beamline definitions will be written Recommended value s new e output_seq If non zero the lattice will be saved as a single beamline sequence Elements used for the beamlin
318. v E 49 2 1599 As PHASE_REFERENCE CHANGE _PO 258 suggested by N Towne NSLS I simplified this to assume a pure pi mode standing wave The CHANGE_T parameter may be needed for reasons that stem from elegant s internal use of the total time of flight as the longitudinal coordinate If the accelerator is very long or a large number of turns are being tracked rounding error may affect the simulation introducing spurious phase jumps By setting CHANGE_T 1 you can force elegant to modify the time coordinates of the particles to subtract off NT where Tip is the rf period and N t T p 0 5 If you are tracking a ring with rf at some harmonic h of the revolution frequency this will result in the time coordinates being relative to the ideal revolution period T xh If you have multiple rf cavities in a ring you need only use this feature on one of them Also you can use CHANGE_T 1 if you simply prefer to have the offset time coordinates in output files and analysis N B Do not use CHANGE_T 1 if you have rf cavities that are not at harmonics of one another or if you have other time dependent elements that are not resonant 259 RFCW 9 71 RFCW A combination of RFCA WAKE TRWAKE and LSCDRIFT Parallel capable yes afoot CELT TENGHH double cell length used to scale wakes which are assumed to be given for a cell a a a PHASE DEG donble PFREQ Hz double 500000000 frequency Fic cavity Q for ca
319. v ST Accel Beams 4 070701 2001 and G Stupakov and P Emma SLAC LCLS TN 01 12 2001 157 Recommendations for using this element The default values for this element are not the best ones to use They are retained only for consistency through upgrades In using this element it is recommended to have 50 to 100 k particle in the simulation Setting BINS 600 and SG_HALFWIDTH 1 is also recommended to allow resolution of fine structure in the beam and to avoid excessive smoothing It is strongly suggested that the user vary these parameters and view the histogram output to verify that the longitudinal distribution is well represented by the histograms use OUTPUT_FILE to obtain the histograms For LCLS simulations we find that the above parameters give essentially the same results as obtained with 500 k particles and up to 3000 bins In order to verify that the 1D approximation is valid the user should also set DERBENEV_CRITERION_MODE evaluate and view the data in OUTPUT_FILE Generally the criterion should be much less than 1 See equation 11 of 20 In order respects this element is just like the CSBEND element which provides a symplectic bending magnet that is accurate to all orders in momentum offset The field expansion is available to fourth order One pitfall of symplectic integration is the possibility of orbit and path length errors for the reference orbit if too few kicks are used This may be an issue for rings Henc
320. value s fin N B confusion sometimes occurs about some of the quantities related to the s coordinate in this file Please see Section YJ above acceptance The incomplete name of an SDDS file into which the initial coordinates of transmitted particles will be written Recommended value s acc losses The incomplete name of an SDDS file into which information on lost particles will be written Recommended value s lost magnets The incomplete name of an SDDS file into which a magnet layout representation will be written Recommended value s mag semaphore_file The incomplete name of file that will be created just before exit from the program but only if no errors occured If the file exists it is deleted This file can be used to record the fact that the run completed without error parameters The incomplete name of an SDDS file into which parameters of accelerator elements are written N B this file does not contain any non numerical parameters of the lattice Hence it is not a complete description of the settings of the lattice combine_bunch_statistics A flag indicating whether to combine statistical information for all simulation steps If non zero then the sigma and centroid data will be combined over all simulation steps wrap_around A flag indicating whether the s coordinate should wrap around or increase monotonically in multipass simulations If zero then th
321. value of electron e N B this feature has had limited testing mostly to verify that electron tracking is not impacted by the implementation Please use with caution and be alert for suspicious results amp change_particle STRING name electron double mass_ratio 0 double charge_ratio 0 amp end e name The name of the particle to use Possible values are electron positron proton muon and custom e mass_ratio charge_ratio If the particle name is custom these parameters specify the mass and charge of the particle relative to the electron E g for an anti proton one would use a mass ratio of 1836 18 and a charge ratio of 1 22 chromaticity 6 11 chromaticity e type setup command e function set up for chromaticity correction amp chromaticity STRING sextupoles NULL double dnux_dp 0 double dnuy_dp 0 double sextupole_tweek le 3 double correction_fraction 0 9 long n_iterations 5 double tolerance 0 STRING strength_log NULL long change_defined_values 0 double strength_limit 0 long use_perturbed_matrix 0 amp end e sextupoles List of names of elements to use to correct the chromaticities e dnux_dp dnuy_dp Desired chromaticity values e sextupole_tweek Amount by which to tweak the sextupoles to compute derivatives of chromaticities with respect to sextupole strength The word tweak is misspelled tweek in the code e correc
322. ving values of quantities at the exit of each element unless otherwise noted s The arc length ElementName The name of the element ElementType The type name of the element betax and betay The horizontal and vertical beta functions alphax and alphay The horizontal and vertical alpha functions where a a psix and psiy The horizontal and vertical betatron phase advance in radians etax and etay The horizontal and vertical dispersion functions etaxp and etayp The slopes of the horizontal and vertical dispersion functions xAperture and yAperture The horizontal and vertical apertures If undefined will have a value of 10m If the beam trajectory is non zero then the aperture will be changed usually reduced accordingly Hence these are best understood as the effective apertures They are used in determining the horizontal and vertical acceptance parameters Ax and Ay pCentral0 The central momentum 8y at the entrance to the element dIn Contribution to radiation integral In Radiation integrals take account of horizontal bending only The output file contains the following parameters Note that chromatic quantities depend on the order settings of the individual elements the default order in run_setup and the concatenation order given in the twiss_output command These quantities pertain to the end of the lattice or to the lattice as a whole nux and nuy The horizontal and ve
323. vity that PHASE_REFERENCE bea phase reference number to link with other time dependent elements CHANGE_PO long does element change central emer a a a CHANGE T T f long see RFCA documentation see RFCA documentation TE n ORE T or mode for determining fidu cial arrival time light tmean first pmaximum END1_FOCUS lnag Jo include focusing at entrance END2 END2 FOCUS f long o include focusing at exit a FOCUS sonir tc ar None default or SRS sim plified Rosenzweig Serafini for standing wave N_KICKS long Number of kicks to use for kick method Set to zero for matrix method Den l long If zero longitudinal wake is TRWAKE long If zero transverse wakes are pee ft i ee l ILE i ec NULL name of file containing Green a bd Wee ee a ILE STRING NULL if WAKEFILE NULL op tional name of file containing longitudinal Green function 260 RFCW continued A combination of RFCA WAKE TRWAKE and LSCDRIFT Default TRWAKEFILE STRING NULL if WAKEFILE NULL op tional name of file containing transverse Green functions mco STRING NOTE roofumn containing time data WXCOLUMN STRING NULL column containing x Green ee E es WYCOLUMN STRING NULL column containing y Green Pee ee eee eee WZCOLUMN STRING NULL column containing longitudi iia Pa N_BINS long number of bins for current his togram INTERPOL
324. which to multiply Gee eee a BXUNIFORM double uniform horizontal field to su LE P ten on mets at BYUNIFORM double uniform vertical field to super o ee ae LUNIFORM double length of uniform field super hdl imposed on solenoid field ACCURACY 0 0001 METHOD STRING runge kutta integration method runge kutta bulirsch stoer non adaptive runge kutta modi fied midpoint GROUP string NULL Optionally used to assign an element to a group with a user defined name Group names will appear in the pa rameter output file in the col umn ElementGroup 222 MARK 9 46 MARK A marker equivalent to a zero length drift space Parallel capable yes Default double non functional misalignment e g for girder fe ee double ce functional misalignment e g for girder F a ae Supply local values of Twiss parameters moments floor coordinates matrices etc for optimization GROUP string NULL Optionally used to assign an element to a group with a user defined name Group names will appear in the pa rameter output file in the col umn ElementGroup If FITPOINT 0 this element results only in generation of additional output rows in the various files that contain output vs s For example Twiss parameters closed orbits and matrices vs s will all contain a row for each occurrence of each marker element If FITPOINT 1 the element has additional functionality in the context of optimizations In particular
325. y factor vs time requires PHASE_WAVEFORM FIDUCIAL STRING NULL mode for determining fidu cial arrival time light tmean first pmaximum GROUP string NULL Optionally used to assign an element to a group with a user defined name Group names will appear in the pa rameter output file in the col umn ElementGroup Explanation of lt filename gt lt x gt lt y gt format Several elements in elegant make use of data from external files to provide input waveforms The external files are SDDS files which may have many columns In order to provide a convenient way to specify both the filename and the columns to use we frequently employ lt filename gt lt x gt lt y gt format for the parameter value For example if the parameter value is waveform sdds t A then it means that columns t and A will be taken from file waveform sdds The first column is always the independent variable e g time position or frequency while the second column is the dependent quantity 250 RBEN 9 65 RBEN A rectangular dipole implemented as a SBEND with edge angles up to 2nd order Parallel capable yes Pep a ANGIE RAD double 00 bendange KO Mdoe 00 geometrie focusing strength Er RAD double 00 entrance edge mge RAD doube 00 exit edge ange E2 TILT RAD double rotation about incoming longi D eel ed A PRS aoa 010 geometric sextapole strength PAT I M aoue 0 0 entrance pote face curvature
326. y with elegant s ZLONGIT element as columns along with analysis and conditions as parame ters switches height The full height of the vacuum chamber in meters radius The radius of the bending magnet in meters angle The angle of the bending magnet in radians The default is 27 frequencyLimit Allows specifying the upper frequency limit required as well as the lower frequency limit for the computed impedance elegant will not accept the data if the lower limit is not 0 If the rms bunch length is then it is suggested to have the maximum frequency much greater than 1 270 n Allows specifying the number of data points to be computed The number of points computed is 2 1 which is required by elegant A reasonable value is n 10 ton 14 filter Allows specifying the starting and ending frequency for a simple low pass filter The frequencies are given as fractions of the maximum frequency The filter ramps linearly from 1 to 0 between the two cutoff values If for example the cutoff is 0 2 then the highest frequency in the impedance corresponds to a wavelength of 10 bins 2 0 2 in elegant e authors Y Wang H Shang ANL APS Based on a simplified form 26 of Warnock s formula 107 7 4 doubleDist6 doubleDist6 description Increases the number of particles in a particle input file by successively dou bling the number Intended to be used to in
Download Pdf Manuals
Related Search
Related Contents
Digicharger D2 OQ HIV1-2 Pkg Inst 04-05v4 Canon CR-25 Owner's Manual Fujitsu SCANSNAP S300M User's Manual セキュリティ が向上 ! ゴッセン カラーマスター3F Guida di montaggio Network Camera série nüvi® 2200 Yard-Man 247.77038 User's Manual Copyright © All rights reserved.
Failed to retrieve file