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

Adding quad length to yaml files #186

Open
nneveu opened this issue Aug 20, 2024 · 3 comments
Open

Adding quad length to yaml files #186

nneveu opened this issue Aug 20, 2024 · 3 comments
Assignees

Comments

@nneveu
Copy link
Member

nneveu commented Aug 20, 2024

Is your feature request related to a problem? Please describe.
In order to do emittance measurements, we need to know the effective length of the quad.

Describe the solution you'd like
Three steps are needed to add this to lcls-tools:

  • Update yaml generation script to pull quad length from cvs database.
  • Run generation script to update all yaml files.
  • Update magnet device class to include quad length property.

Describe alternatives you've considered
Not including in device class, this would require the GUI or alternative method of grabbing the quad length.

@nneveu
Copy link
Member Author

nneveu commented Aug 20, 2024

Maybe we should add this somewhere for when we need to generate the yamls:

from lcls_tools.common.devices.yaml.write import YAMLWriter

writer = YAMLWriter()
areas = writer.machine_areas
[writer.write_yaml_file(area) for area in areas] 

@MattKing06
Copy link
Collaborator

Maybe we should add this somewhere for when we need to generate the yamls:

from lcls_tools.common.devices.yaml.write import YAMLWriter

writer = YAMLWriter()
areas = writer.machine_areas
[writer.write_yaml_file(area) for area in areas] 

This could be added to generate.py in the

if __name__ == '__main__':
    ...

So you can just run python generate.py

@nneveu
Copy link
Member Author

nneveu commented Aug 23, 2024

@phys-cgarnier please add Matt's suggestion to your branch for this PR. Thanks!

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

When branches are created from issues, their pull requests are automatically linked.

3 participants