slaclab / lcls-tools

Python tools for LCLS: post processing data, PV handling, pulling archive settings, etc.
Apache License 2.0
2 stars 21 forks source link

Adding quad length to yaml files #186

Open nneveu opened 2 months ago

nneveu commented 2 months ago

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:

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

nneveu commented 2 months ago

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 commented 2 months ago

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 commented 2 months ago

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