Skip to content

String representation for Accelerator object #148

@gubaidulinvadim

Description

@gubaidulinvadim

Description, motivation and use case
String representation is missing for the Accelerator object. One should be able to see, for example, what control modes are available and some common properties between the modes, like the energy.

Proposed solution
Implement repr and/or str for Accelerator object.

Example
The example demonstrates the issue, not the solution.

In [4]: sr
Out[4]: <pyaml.accelerator.Accelerator at 0x75e725327e30>

In [5]: print(sr)
<pyaml.accelerator.Accelerator object at 0x75e725327e30>

In [6]: sr.design
Out[6]: Simulator(name='design', lattice='../soleil_lattice_2_pyaml/tests/SOLEIL_II_V3631_sym1_V001_database_rf.m', mat_key=None, linker=<pyaml.lattice.attribute_linker.PyAtAttributeElementsLinker object at 0x75e72782faa0>)

In [7]: sr.live
Out[7]: TangoControlSystem(name='live', tango_host='localhost:11000', debug_level=None, lazy_devices=True, scalar_aggregator='tango.pyaml.multi_attribute', vector_aggregator=None, timeout_ms=3000)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions