I think we should align the output of the yellow pages with how the ElementHolders are arranged inside the accelerator now. My thinking is the following:
- The user loads a configuration file created by someone else (likely a maintainer in their lab).
- They use
accelerator.yellow_pages to list what has been created and understand what is available for them to use.
- From this they directly get an idea for what to do next if they want to get a specific device/array for a specific mode.
This is the current output from the yellow pages after I loaded the configuration for the integration test:
Controls:
live
.
Simulators:
design
.
Arrays:
QF_001 (pyaml.arrays.magnet_array) size=1
SF_001 (pyaml.arrays.magnet_array) size=1
QD_001 (pyaml.arrays.magnet_array) size=1
SD_001 (pyaml.arrays.magnet_array) size=1
QF_002 (pyaml.arrays.magnet_array) size=1
SF_002 (pyaml.arrays.magnet_array) size=1
QD_002 (pyaml.arrays.magnet_array) size=1
SD_002 (pyaml.arrays.magnet_array) size=1
QF_003 (pyaml.arrays.magnet_array) size=1
SF_003 (pyaml.arrays.magnet_array) size=1
QD_003 (pyaml.arrays.magnet_array) size=1
SD_003 (pyaml.arrays.magnet_array) size=1
QF_004 (pyaml.arrays.magnet_array) size=1
SF_004 (pyaml.arrays.magnet_array) size=1
QD_004 (pyaml.arrays.magnet_array) size=1
SD_004 (pyaml.arrays.magnet_array) size=1
QF_005 (pyaml.arrays.magnet_array) size=1
SF_005 (pyaml.arrays.magnet_array) size=1
QD_005 (pyaml.arrays.magnet_array) size=1
SD_005 (pyaml.arrays.magnet_array) size=1
QF_006 (pyaml.arrays.magnet_array) size=1
SF_006 (pyaml.arrays.magnet_array) size=1
QD_006 (pyaml.arrays.magnet_array) size=1
SD_006 (pyaml.arrays.magnet_array) size=1
QF_007 (pyaml.arrays.magnet_array) size=1
SF_007 (pyaml.arrays.magnet_array) size=1
QD_007 (pyaml.arrays.magnet_array) size=1
SD_007 (pyaml.arrays.magnet_array) size=1
QF_008 (pyaml.arrays.magnet_array) size=1
SF_008 (pyaml.arrays.magnet_array) size=1
QD_008 (pyaml.arrays.magnet_array) size=1
SD_008 (pyaml.arrays.magnet_array) size=1
QF_009 (pyaml.arrays.magnet_array) size=1
SF_009 (pyaml.arrays.magnet_array) size=1
QD_009 (pyaml.arrays.magnet_array) size=1
SD_009 (pyaml.arrays.magnet_array) size=1
QF_010 (pyaml.arrays.magnet_array) size=1
SF_010 (pyaml.arrays.magnet_array) size=1
QD_010 (pyaml.arrays.magnet_array) size=1
SD_010 (pyaml.arrays.magnet_array) size=1
QF_011 (pyaml.arrays.magnet_array) size=1
SF_011 (pyaml.arrays.magnet_array) size=1
QD_011 (pyaml.arrays.magnet_array) size=1
SD_011 (pyaml.arrays.magnet_array) size=1
QF_012 (pyaml.arrays.magnet_array) size=1
SF_012 (pyaml.arrays.magnet_array) size=1
QD_012 (pyaml.arrays.magnet_array) size=1
SD_012 (pyaml.arrays.magnet_array) size=1
QF_013 (pyaml.arrays.magnet_array) size=1
SF_013 (pyaml.arrays.magnet_array) size=1
QD_013 (pyaml.arrays.magnet_array) size=1
SD_013 (pyaml.arrays.magnet_array) size=1
QF_014 (pyaml.arrays.magnet_array) size=1
SF_014 (pyaml.arrays.magnet_array) size=1
QD_014 (pyaml.arrays.magnet_array) size=1
SD_014 (pyaml.arrays.magnet_array) size=1
QF_015 (pyaml.arrays.magnet_array) size=1
SF_015 (pyaml.arrays.magnet_array) size=1
QD_015 (pyaml.arrays.magnet_array) size=1
SD_015 (pyaml.arrays.magnet_array) size=1
QF_016 (pyaml.arrays.magnet_array) size=1
SF_016 (pyaml.arrays.magnet_array) size=1
QD_016 (pyaml.arrays.magnet_array) size=1
SD_016 (pyaml.arrays.magnet_array) size=1
Cell1 (pyaml.arrays.element_array) size=4
Cell2 (pyaml.arrays.element_array) size=4
Cell3 (pyaml.arrays.element_array) size=4
Cell4 (pyaml.arrays.element_array) size=4
Cell5 (pyaml.arrays.element_array) size=4
Cell6 (pyaml.arrays.element_array) size=4
Cell7 (pyaml.arrays.element_array) size=4
Cell8 (pyaml.arrays.element_array) size=4
Cell9 (pyaml.arrays.element_array) size=4
Cell10 (pyaml.arrays.element_array) size=4
Cell11 (pyaml.arrays.element_array) size=4
Cell12 (pyaml.arrays.element_array) size=4
Cell13 (pyaml.arrays.element_array) size=4
Cell14 (pyaml.arrays.element_array) size=4
Cell15 (pyaml.arrays.element_array) size=4
Cell16 (pyaml.arrays.element_array) size=4
.
Diagnostics:
BETATRON_TUNE (pyaml.diagnostics.tune_monitor)
.
From this I can understand that I need to do something like accelerator.design to read from the simulator which is already very nice, but after that I would guess accelerator.design.QF_001 which is not the interface. Instead I need to do accelerator.design.magnets.get("QF_001").
If the yellow pages would show the categories corresponding to the element holders maybe the interface would be easier for the users to understand and remember?
I think we should align the output of the yellow pages with how the
ElementHoldersare arranged inside the accelerator now. My thinking is the following:accelerator.yellow_pagesto list what has been created and understand what is available for them to use.This is the current output from the yellow pages after I loaded the configuration for the integration test:
From this I can understand that I need to do something like
accelerator.designto read from the simulator which is already very nice, but after that I would guessaccelerator.design.QF_001which is not the interface. Instead I need to doaccelerator.design.magnets.get("QF_001").If the yellow pages would show the categories corresponding to the element holders maybe the interface would be easier for the users to understand and remember?