Skip to content

Commit

Permalink
Merge branch 'master' into msta
Browse files Browse the repository at this point in the history
  • Loading branch information
ZLLentz authored Jul 24, 2024
2 parents 9f22a4f + c1bfa9c commit cb21ef8
Show file tree
Hide file tree
Showing 8 changed files with 2,720 additions and 407 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
1256 Add new source lines to BTMS and BTPS
#################

API Breaks
----------
- N/A

Features
--------
- N/A

Device Updates
--------------
- btps.BtpsState: add LS3, LS4, and LS6
- btps.DestinationConfig: add LS3, LS4, and LS6
- btms_config.SourcePosition: add LS3, LS4, and LS6
- btms_config.valid_sources: add LS3, LS4, and LS6
- UI file updates to support above device updates

New Devices
-----------
- N/A

Bugfixes
--------
- btms_config.DestinationPosition: fix description of RIX IP3
- btms_config.valid_destinations: fix description of RIX IP3

Maintenance
-----------
- N/A

Contributors
------------
- slactjohnson
17 changes: 13 additions & 4 deletions pcdsdevices/lasers/btms_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,10 @@ def description(self) -> str:
"""
return {
SourcePosition.ls1: "Bay 1",
SourcePosition.ls5: "Bay 3",
SourcePosition.ls3: "Bay 2 1um",
SourcePosition.ls4: "Bay 2 800nm",
SourcePosition.ls5: "Bay 3 800nm",
SourcePosition.ls6: "Bay 3 1um",
SourcePosition.ls8: "Bay 4",
}.get(self, "Unknown")

Expand All @@ -190,7 +193,10 @@ def bay(self) -> int | None:
"""The near field camera prefix associated with this source position."""
return {
SourcePosition.ls1: 1,
SourcePosition.ls3: 2,
SourcePosition.ls4: 2,
SourcePosition.ls5: 3,
SourcePosition.ls6: 3,
SourcePosition.ls8: 4,
}.get(self, None)

Expand Down Expand Up @@ -258,7 +264,7 @@ def description(self) -> str:
# NOTE: Add new descriptions here.
return {
DestinationPosition.ld1: "Diagnostics",
DestinationPosition.ld2: "TMO IP3",
DestinationPosition.ld2: "RIX IP3",
DestinationPosition.ld4: "RIX ChemRIXS",
DestinationPosition.ld6: "RIX QRIXS",
DestinationPosition.ld8: "TMO IP1",
Expand Down Expand Up @@ -332,13 +338,16 @@ def is_top(self) -> bool:
# PV source index (bay) to installed LS port
valid_sources: tuple[SourcePosition, ...] = (
SourcePosition.ls1, # Bay 1
SourcePosition.ls5, # Bay 3
SourcePosition.ls3, # Bay 2 1um
SourcePosition.ls4, # Bay 2 800nm
SourcePosition.ls5, # Bay 3 800nm
SourcePosition.ls6, # Bay 3 1um
SourcePosition.ls8, # Bay 4
)
# PV destination index (bay) to installed LD port
valid_destinations: tuple[DestinationPosition, ...] = (
DestinationPosition.ld1, # Diagnostics box
DestinationPosition.ld2, # TMO IP3
DestinationPosition.ld2, # RIX IP3
DestinationPosition.ld4, # RIX ChemRIXS
DestinationPosition.ld6, # RIX QRIXS
DestinationPosition.ld8, # TMO IP1
Expand Down
55 changes: 51 additions & 4 deletions pcdsdevices/lasers/btps.py
Original file line number Diff line number Diff line change
Expand Up @@ -344,19 +344,38 @@ def __init__(
source_pos=SourcePosition.ls1,
doc="Settings for source LS1 (bay 1) to this destination",
)
ls3 = Cpt(
SourceToDestinationConfig,
"LS3:",
source_pos=SourcePosition.ls3,
doc="Settings for source LS3 (bay 2 1um) to this destination",
)
ls4 = Cpt(
SourceToDestinationConfig,
"LS4:",
source_pos=SourcePosition.ls4,
doc="Settings for source LS4 (bay 2 800m) to this destination",
)
ls5 = Cpt(
SourceToDestinationConfig,
"LS5:",
source_pos=SourcePosition.ls5,
doc="Settings for source LS5 (bay 3) to this destination",
doc="Settings for source LS5 (bay 3 800nm) to this destination",
)
ls6 = Cpt(
SourceToDestinationConfig,
"LS6:",
source_pos=SourcePosition.ls6,
doc="Settings for source LS6 (bay 3 1um) to this destination",
)
ls8 = Cpt(
SourceToDestinationConfig,
"LS8:",
source_pos=SourcePosition.ls8,
doc="Settings for source LS8 (bay 4) to this destination",
)
exit_valve = Cpt(BtpsVGC, "VGC:01", kind="normal", doc="Destination exit valve")
exit_valve = Cpt(BtpsVGC, "VGC:01", kind="normal",
doc="Destination exit valve")

@property
def sources(self) -> dict[SourcePosition, SourceToDestinationConfig]:
Expand All @@ -369,7 +388,8 @@ def sources(self) -> dict[SourcePosition, SourceToDestinationConfig]:
"""
return {
source.source_pos: source
for source in (self.ls1, self.ls5, self.ls8)
for source in (self.ls1, self.ls3, self.ls4, self.ls5, self.ls6,
self.ls8)
}


Expand Down Expand Up @@ -647,14 +667,41 @@ def __init__(self, *args, **kwargs):
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:m10",
rotary_prefix="LAS:BTS:MCS2:01:m12",
goniometer_prefix="LAS:BTS:MCS2:01:m11",
doc="Source status for LS3 (Bay 2 1um)"
)
ls4 = Cpt(
BtpsSourceStatus,
"LTLHN:LS4:",
source_pos=SourcePosition.ls4,
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 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)"
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,
Expand Down
Loading

0 comments on commit cb21ef8

Please sign in to comment.