Open Hespe opened 3 months ago
Good point. I thought about class-specific prefixes at some point in the past, but then didn't do it for some reason. I don't remember why. I tried to find an issue where I may have written this down, but didn't find one.
Right now I'm inclined to vote for removing the unsung instances. It's the simpler solution, but I don't know if it's the better one.
@cr-xu, do you have thoughts on this?
In many element classes, there are unused instances and imports of
UniqueNameGenerator
, e.g. in https://github.com/desy-ml/cheetah/blob/a35fc03f6b15571232e934f9b21aca2c0b2ea4ae/cheetah/accelerator/dipole.py#L14 since the names are generated in the superclassElement
.The unused instances could either be removed or changed to a more specific prefix and employed for overwriting the generic unique name from
Element
.