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

lat_list not working with who='ele.name' #120

Open
jsberg-bnl opened this issue Feb 5, 2025 · 5 comments
Open

lat_list not working with who='ele.name' #120

jsberg-bnl opened this issue Feb 5, 2025 · 5 comments

Comments

@jsberg-bnl
Copy link

Use the lattice and starting directory as in #119. Then start python, and

import pytao
tao = pytao.Tao(quiet=True,noplot=True,startup_file='hsr-init.tao',init_file='tao.init')
tao.lat_list('*','ele.name')

I get nothing. If I use ele.ix_ele instead, everything is as expected.

@ken-lauer
Copy link
Collaborator

I can reproduce the issue. Interestingly, removing quiet=True from the Tao() kwargs yields the list of element names on my end. Does it do the same for you?

If that's the case, it may be a Bmad/Tao bug - or some subtlety that at least I haven't run into before.

@jsberg-bnl
Copy link
Author

Yup, just found the same thing. It's arguably a Bmad bug; quiet suppresses all output to the terminal, including the output of the pipe command. I would argue if someone executed the pipe command, they wanted output to the terminal no matter what. The difference between ele.name and ele.ix_ele is between how cmd and cmd_integer work. Anyhow, I'll create a bug report on bmad-ecosystem and see what David thinks...

@jsberg-bnl
Copy link
Author

David seems to want quiet to suppress text output from pipe. For now the only solution is really to stop using quiet.

@ken-lauer
Copy link
Collaborator

Seems like PyTao shouldn't support quiet mode then, as it breaks its functionality.

@ken-lauer
Copy link
Collaborator

In my limited testing, this will be closed when bmad-sim/bmad-ecosystem#1382 is incorporated into a release

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