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

Remove hard-coded information from the BTPS Screens #1270

Open
slactjohnson opened this issue Aug 5, 2024 · 0 comments
Open

Remove hard-coded information from the BTPS Screens #1270

slactjohnson opened this issue Aug 5, 2024 · 0 comments
Assignees

Comments

@slactjohnson
Copy link
Contributor

Current Behavior

There's some information that's hard-coded into the BTPS screens, and is duplicated by information in btps.py.

Expected Behavior

Information is not duplicated.

Context / environment

The same (or similar) information is already build into btps.py . When updating the stage mapping I fixed it in the code but forgot to do it in the screen, which caused confusion. I want to prevent this in the future.

btps.py:

ls1 = Cpt(
BtpsSourceStatus,
"LTLHN:LS1:",
source_pos=SourcePosition.ls1,
linear_prefix="LAS:BTS:MCS2:01:m1",
rotary_prefix="LAS:BTS:MCS2:01:m2",
goniometer_prefix="LAS:BTS:MCS2:01:m3",
doc="Source status for LS1 (Bay 1)"
)
ls3 = Cpt(
BtpsSourceStatus,
"LTLHN:LS3:",
source_pos=SourcePosition.ls3,
linear_prefix="LAS:BTS:MCS2:01:m15",
rotary_prefix="LAS:BTS:MCS2:01:m14",
goniometer_prefix="LAS:BTS:MCS2:01:m13",
doc="Source status for LS3 (Bay 2 1um)"
)
ls4 = Cpt(
BtpsSourceStatus,
"LTLHN:LS4:",
source_pos=SourcePosition.ls4,
linear_prefix="LAS:BTS:MCS2:01:m10",
rotary_prefix="LAS:BTS:MCS2:01:m12",
goniometer_prefix="LAS:BTS:MCS2:01:m11",
doc="Source status for LS3 (Bay 2 800m)"
)
ls5 = Cpt(
BtpsSourceStatus,
"LTLHN:LS5:",
source_pos=SourcePosition.ls5,
linear_prefix="LAS:BTS:MCS2:01:m4",
rotary_prefix="LAS:BTS:MCS2:01:m6",
goniometer_prefix="LAS:BTS:MCS2:01:m5",
doc="Source status for LS5 (Bay 3 800nm)"
)
ls6 = Cpt(
BtpsSourceStatus,
"LTLHN:LS6:",
source_pos=SourcePosition.ls6,
linear_prefix="LAS:BTS:MCS2:01:m16",
rotary_prefix="LAS:BTS:MCS2:01:m17",
goniometer_prefix="LAS:BTS:MCS2:01:m18",
doc="Source status for LS3 (Bay 3 1um)"
)
ls8 = Cpt(
BtpsSourceStatus,
"LTLHN:LS8:",
source_pos=SourcePosition.ls8,
linear_prefix="LAS:BTS:MCS2:01:m7",
rotary_prefix="LAS:BTS:MCS2:01:m8",
goniometer_prefix="LAS:BTS:MCS2:01:m9",
doc="Source status for LS8 (Bay 4)"
)

Screens:

image

Related issue: #1269

Suggested Solution

Find a way to work the information present in btps.py into the screens. btps.py uses PVs, the screens use happi.... one method should be used, not both.

@slactjohnson slactjohnson self-assigned this Aug 5, 2024
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

No branches or pull requests

1 participant