Models: beamline state enum now has a function called display name to give uniform strings whenever needed

This commit is contained in:
appleb_m committed 2026-04-23 10:58:24 +02:00
1 parent 9938ba74a0
commit 43105ebc3b
1 file changed
+15 -1
+15 -1
View File
@@ -550,7 +550,21 @@ class BeamlineStateEnum(Enum):
BeamLocation = 7
Moving = 8
RobotSampleExchange = 9
# Busy state is used whenever transition between two states happen or mounting/data collection procedure happens
XtalSnapshot = 10
def display_name(self) -> str:
return {
BeamlineStateEnum.Maintenance: "Maintenance",
BeamlineStateEnum.SampleExchange: "Sample exchange",
BeamlineStateEnum.SampleAlignment: "Sample alignment",
BeamlineStateEnum.DataCollection: "Data collection",
BeamlineStateEnum.DewarTransfer: "Dewar transfer",
BeamlineStateEnum.XrayFluorescence: "X-ray fluorescence",
BeamlineStateEnum.BeamLocation: "Beam location",
BeamlineStateEnum.Moving: "Moving",
BeamlineStateEnum.RobotSampleExchange: "Robot sample exchange",
BeamlineStateEnum.XtalSnapshot: "Xtal snapshot",
}.get(self, "-")
class DAQOperation(str, Enum):