Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Inconsistent quadrupole b1_gradient after issuing cavity phase & quad b1_gradient adjustments #74

Open
MichaelEhrlichman opened this issue May 22, 2024 · 3 comments

Comments

@MichaelEhrlichman
Copy link

pytao_bug_mwe.tar.gz

Example output:

$ ls                                                                                                                
bug.py  bugreport.lat                                                                                                                                                                                   
$ ./bug.py 1                                                                                                        
Issuing commands with tao.cmds and then set uni 1 recalculate.  Bug evident.                                                                                                                            
model b1_gradient:  0.0700389223336539                                                                                                                                                                  
model b1_gradient:  8.17823368208077                                                                                                                                                                    
model b1_gradient:  10.0                                                                                                                                                                                
model b1_gradient:  10.0
$ ./bug.py 2
Issuing commands with tao.cmds and then set glo lattice_calc_on=T.  Bug evident.
model b1_gradient:  0.0700389223336539
model b1_gradient:  8.17823368208077
model b1_gradient:  10.0
model b1_gradient:  10.0
$ ./bug.py 3
Issuing commands with tao.cmds with suppress_lattice_calc=F.  No bug.
model b1_gradient:  0.0700389223336539
model b1_gradient:  10.0
model b1_gradient:  10.0
model b1_gradient:  10.0
$ ./bug.py 4
Issuing commands by iterating tao.cmd.  No bug.
model b1_gradient:  0.0700389223336539
model b1_gradient:  10.0
model b1_gradient:  10.0
model b1_gradient:  10.0
@MichaelEhrlichman
Copy link
Author

MichaelEhrlichman commented May 22, 2024

MWE also copied to lnx201.lns.cornell.edu at /home/ehrlichm/for_dcs/91/MWE.

@ChristopherMayes
Copy link
Contributor

This looks like a Tao problem, not a PyTao problem:

tao -lat bugreport.lat -noplot -startup commands.tao 
[MESSAGE | 2024-MAY-30 16:46:04] tao_init:
    OpenMP active with number of threads: 10
Using startup file: commands.tao

Tao: set global lattice_calc_on = F

Tao: set ele CAV1 phi0 = -0.1

Tao: set ele Q1 b1_gradient = 10.0

Tao: set global lattice_calc_on = T

Tao: sho value ele::q1[b1_gradient]
     8.1782336820807657E+00

cmds.tao:

set global lattice_calc_on = F
set ele CAV1 phi0 = -0.1
set ele Q1 b1_gradient = 10.0
set global lattice_calc_on = T
sho value ele::q1[b1_gradient]

@MichaelEhrlichman report to @DavidSagan

@MichaelEhrlichman
Copy link
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants