Turning on pretzel and sextupoles ⇒ see Notebook 2, p44.
Source elements for chess lines ⇒ see Notebook 2, p38.
In the lattice file, raw_pretzing_13 should have coefficients that are positive.
To look at sextupoles without changing them, set minimize_moments to false.
Stu has been using pretzel_aperture set to 34 and then pushing on i_bunch and b_param_i.
Do quad work with two family sextupoles, small pretzel and maybe only one separator.
Using closed_orbit, check that dbeta/dE lloks small on the plots with a full scale of 40. (Horizontal is what matters more.) Use all h_sep -1 to get the electron equivalent.
sync_beta_path should be ~1E-10.
sync_beta_volt should be ~1E-9.
delta_beta should be ~5E0.
Only REQ, solenoid and wigglers don't scale with energy. Large changes should only be needed near them.
Change the scwigs with energy -> if going from 2.070 to 2.080 GeV and 2.080/2.070 = 1.00483 then set scwigs in lattice with wig1_14w[polarity] = 1.00483.
Change sc_q01 by 1.9% for 100MeV change in energy. So for 10MeV increase in energy, multiply sc_q01 by 1.0019.
Optimize with sc_q01 and sc_q02. (used cons_energychange.in
If necessary optimize with sex's 8 and 9 e/w.
Make an initial lattice with the separators off -- make sure the correct name is in the constraints file under initial lattice. Copy that lattice to bmad. and overlay 2 & 3 east separate from 2 & 3 west. Start the optimization with cons_scmating0.in. Turn the separators back on in new_bmad_input.
Use a constraint file with the groups. Then check that the lattice file didn't add two negative signs in the group command. Then run a constraints file with all the elements of the group and not the group(s) themselves. then take out the group commands from the lattice file.