fscanpreset.py 1.37 KB
Newer Older
1
from bliss.scanning.scan import ScanPreset
2 3 4 5 6 7 8 9 10 11 12 13
from bliss.scanning.chain import ChainPreset

class CountMuxPreset(ChainPreset):
    def __init__(self, opmux):
        self.opmux = opmux

    def prepare(self, chain):
        self.opmux.switch("PILATUS", "COUNTER_CARD")
        self.opmux.switch("EDGE", "COUNTER_CARD")
        self.opmux.switch("MAXIPIX", "COUNTER_CARD")
        self.opmux.switch("EDGEHS", "COUNTER_CARD")
        self.opmux.switch("DIMAX", "COUNTER_CARD")
14

15
class FScanMuxPreset(ScanPreset):
16
    def __init__(self, opmux):
17
        ScanPreset.__init__(self)
18
        self.opmux = opmux
19
        self.limadevs = list()
20 21

    def set_fscan_master(self, master):
22
        self.limadevs = master.lima_used
23 24

    def start(self, scan):
25 26
        for dev in self.limadevs:
            name = dev.name
27
            if name == "pcoedge":
28
                self.opmux.switch("EDGE", "MUSST")
29
            elif name == "pilatus":
30
                self.opmux.switch("PILATUS", "MUSST")
31 32 33
                #dev._proxy.saving_format = "CBF"
                #dev._proxy.saving_suffix = ".cbf"
                #dev._proxy.saving_max_writing_task = 4
34
            elif name == "maxipix":
35
                self.opmux.switch("MAXIPIX", "MUSST")
36
            elif name == "pcoedgehs":
37
                self.opmux.switch("EDGEHS", "MUSST")
38
            elif name == "pcodimax":
39
                self.opmux.switch("DIMAX", "MUSST")