Skip to content

Commit

Permalink
Fixes to BAGELS_2
Browse files Browse the repository at this point in the history
  • Loading branch information
mattsignorelli committed Dec 4, 2023
1 parent 5a24dfd commit 68dad2a
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/Tao.jl
Original file line number Diff line number Diff line change
Expand Up @@ -120,10 +120,13 @@ function BAGELS_1(lat, phi_start, phi_step, sgn, kick=1e-5, tol=1e-8)
end

"""
BAGELS_2(lat, phi_start, phi_step, kick=1e-5)
BAGELS_2(lat, phi_start, phi_step, N_knobs; suffix="", outf="BAGELS.bmad", kick=1e-5))
Best Adjustment Groups for ELectron Spin (BAGELS) method step 2: peform an SVD of the
response matrix to obtain the best adjustment groups, based on the settings of step 1.
E.g., for only pi-bumps, use `phi_start` = pi, `phi_step` = (something large), and
`sgn` = -1. For all orthogonal kicks (equal kicks 2*pi*N apart), use `phi_start` = 0,
`phi_step` = 2*pi, `sgn` = 1.
### Input
Expand All @@ -135,7 +138,7 @@ response matrix to obtain the best adjustment groups, based on the settings of s
- `outf` -- (Optional) Output file name with group elements constructed from BAGELS, default is "BAGELS.bmad"
- `kick` -- (Optional) Coil kick, default is 1e-5
"""
function BAGELS_2(lat, phi_start, phi_step, suffix="",outf="BAGELS.bmad", kick=1e-5)
function BAGELS_2(lat, phi_start, phi_step, N_knobs; suffix="", outf="BAGELS.bmad", kick=1e-5)
path = metadata_path(lat)
if path == ""
println("Lattice file $(lat) not found!")
Expand Down

0 comments on commit 68dad2a

Please sign in to comment.