Ejemplo n.º 1
0
 def __init__(self, exptime, cams, doTest=False, **kwargs):
     SpsSequence.__init__(self, **kwargs)
     self.expose(exptype='object',
                 exptime=exptime,
                 cams=cams,
                 duplicate=1,
                 doTest=doTest)
Ejemplo n.º 2
0
    def __init__(self,
                 exp_time_0,
                 positions,
                 duplicate,
                 cams,
                 dcbOn,
                 dcbOff,
                 doTest=False,
                 **kwargs):
        SpsSequence.__init__(self, **kwargs)
        timedLamps0 = [(k, v) for k, v in exp_time_0.items()]

        for position in positions:
            calcExptime = [
                defocused_exposure_times_no_atten(exptime, position)
                for lamp, exptime in timedLamps0
            ]
            calcTimedLamps = dict([
                (lamp, exptime)
                for (lamp, __), exptime in zip(timedLamps0, calcExptime)
            ])
            self.add(actor='sps',
                     cmdStr='slit',
                     focus=position,
                     abs=True,
                     cams=cams)
            self.expose('arc',
                        exptime=calcTimedLamps,
                        cams=cams,
                        duplicate=duplicate,
                        doTest=doTest)
Ejemplo n.º 3
0
    def __init__(self,
                 exptime,
                 positions,
                 duplicate,
                 cams,
                 dcbOn,
                 dcbOff,
                 doTest=False,
                 **kwargs):
        SpsSequence.__init__(self, **kwargs)

        if any(dcbOn.values()):
            self.head.add(actor='dcb', cmdStr='arc', **dcbOn)

        if any(dcbOff.values()):
            self.tail.add(index=0, actor='dcb', cmdStr='arc', **dcbOff)

        for motorA, motorB, motorC in positions:
            self.add(actor='sps',
                     cmdStr='ccdMotors move',
                     a=motorA,
                     b=motorB,
                     c=motorC,
                     microns=True,
                     abs=True,
                     cams=cams)
            self.expose(exptype='arc',
                        exptime=exptime,
                        cams=cams,
                        duplicate=duplicate,
                        doTest=doTest)
Ejemplo n.º 4
0
    def __init__(self,
                 exptime,
                 positions,
                 duplicate,
                 cams,
                 dcbOn,
                 dcbOff,
                 doTest=False,
                 **kwargs):
        SpsSequence.__init__(self, **kwargs)

        if any(dcbOn.values()):
            self.head.add(actor='dcb', cmdStr='arc', **dcbOn)

        if any(dcbOff.values()):
            self.tail.add(index=0, actor='dcb', cmdStr='arc', **dcbOff)

        for position in positions:
            self.add(actor='sps',
                     cmdStr='slit',
                     focus=position,
                     abs=True,
                     cams=cams)
            self.expose(exptype='arc',
                        exptime=exptime,
                        cams=cams,
                        duplicate=duplicate,
                        doTest=doTest)

        self.tail.add(actor='sps', cmdStr='slit', focus=0, abs=True, cams=cams)
Ejemplo n.º 5
0
    def __init__(self,
                 exptime,
                 duplicate,
                 cams,
                 doTest=False,
                 window=False,
                 **kwargs):
        SpsSequence.__init__(self, **kwargs)
        self.seqtype = f'{self.seqtype}_windowed' if window is not False else self.seqtype

        self.expose(exptype='object',
                    exptime=exptime,
                    cams=cams,
                    duplicate=duplicate,
                    doTest=doTest,
                    window=window)
Ejemplo n.º 6
0
    def __init__(self,
                 exptime,
                 pixels,
                 doMinus,
                 duplicate,
                 cams,
                 dcbOn,
                 dcbOff,
                 doTest=False,
                 **kwargs):
        SpsSequence.__init__(self, **kwargs)

        if any(dcbOn.values()):
            self.head.add(actor='dcb', cmdStr='arc', **dcbOn)

        if any(dcbOff.values()):
            self.tail.add(index=0, actor='dcb', cmdStr='arc', **dcbOff)

        end = int(1 / pixels)
        start = -end + 1 if doMinus else 0
        for x in range(start, end):
            for y in range(start, end):
                self.add(actor='sps',
                         cmdStr='slit dither',
                         x=x * pixels,
                         y=y * pixels,
                         pixels=True,
                         abs=True,
                         cams=cams)
                self.expose(exptype='arc',
                            exptime=exptime,
                            cams=cams,
                            duplicate=duplicate,
                            doTest=doTest)

        self.tail.add(actor='sps',
                      cmdStr='slit dither',
                      x=0,
                      y=0,
                      pixels=True,
                      abs=True,
                      cams=cams)
Ejemplo n.º 7
0
    def __init__(self,
                 exp_time_0,
                 positions,
                 duplicate,
                 cams,
                 dcbOn,
                 dcbOff,
                 doTest=False,
                 **kwargs):
        SpsSequence.__init__(self, **kwargs)
        att_value_0 = dcbOn['attenuator']

        if any(dcbOn.values()):
            self.head.add(actor='dcb', cmdStr='arc', **dcbOn)

        if any(dcbOff.values()):
            self.tail.add(index=0, actor='dcb', cmdStr='arc', **dcbOff)

        for position in positions:
            exptime, attenuator = defocused_exposure_times_single_position(
                exp_time_0=exp_time_0[0],
                att_value_0=att_value_0,
                defocused_value=position)
            if att_value_0 is not None:
                self.add(actor='dcb',
                         cmdStr='arc',
                         attenuator=attenuator,
                         timeLim=300)

            self.add(actor='sps',
                     cmdStr='slit',
                     focus=position,
                     abs=True,
                     cams=cams)
            self.expose(exptype='arc',
                        exptime=exptime,
                        cams=cams,
                        duplicate=duplicate,
                        doTest=doTest)

        self.tail.add(actor='sps', cmdStr='slit', focus=0, abs=True, cams=cams)
Ejemplo n.º 8
0
    def __init__(self,
                 exptime,
                 duplicate,
                 cams,
                 dcbOn,
                 dcbOff,
                 doTest=False,
                 **kwargs):
        SpsSequence.__init__(self, **kwargs)

        if any(dcbOn.values()):
            self.head.add(actor='dcb', cmdStr='arc', **dcbOn)

        if any(dcbOff.values()):
            self.tail.add(index=0, actor='dcb', cmdStr='arc', **dcbOff)

        self.expose(exptype='arc',
                    exptime=exptime,
                    cams=cams,
                    duplicate=duplicate,
                    doTest=doTest)
Ejemplo n.º 9
0
    def __init__(self,
                 exptime,
                 duplicate,
                 cams,
                 dcbOn,
                 dcbOff,
                 doTest=False,
                 window=False,
                 **kwargs):
        SpsSequence.__init__(self, **kwargs)
        self.seqtype = f'{self.seqtype}_windowed' if window is not False else self.seqtype

        if any(dcbOn.values()):
            self.head.add(actor='dcb', cmdStr='arc', **dcbOn)

        if any(dcbOff.values()):
            self.tail.add(index=0, actor='dcb', cmdStr='arc', **dcbOff)

        self.expose(exptype='flat',
                    exptime=exptime,
                    cams=cams,
                    duplicate=duplicate,
                    doTest=doTest,
                    window=window)
Ejemplo n.º 10
0
    def __init__(self,
                 position,
                 duplicate,
                 cams,
                 timedLamps,
                 doTest=False,
                 **kwargs):
        """Acquire a hexapod repeatability grid.

        Args
        ----
        positions : vector of `float`
          the positions for the slit dither and shift grid.
          Default=[0.05, 0.04, 0.03, 0.02, 0.01, 0, -0.01, -0.02, -0.03, -0.04, -0.05]
        duplicate : `int`
          the number of exposures to take at each position.

        Notes
        -----
        The cams/sm needs to be worked out:
          - with DCB, we can only illuminate one SM, and only the red right now.
          - with pfiLamps, all SMs will be illuminated, but probably still only red.

        """
        SpsSequence.__init__(self, 'hexapodStability', **kwargs)
        if not timedLamps:
            timedLamps = dict(argon=45)

        positions = position[::-1]

        self.add('sps', 'slit', focus=0.0, abs=True)
        self.add('sps', 'slit dither', x=0.0, y=0.0, abs=True, cams=cams)
        self.expose('arc',
                    exptime=timedLamps,
                    cams=cams,
                    duplicate=duplicate,
                    doTest=doTest)
        for pos in positions:
            # Move y once separately
            self.add('sps',
                     'slit dither',
                     y=round(pos, 5),
                     abs=True,
                     cams=cams)
            for pos in positions:
                self.add('sps',
                         f'slit dither',
                         x=round(pos, 5),
                         abs=True,
                         cams=cams)
                self.expose('arc',
                            exptime=timedLamps,
                            cams=cams,
                            duplicate=duplicate,
                            doTest=doTest)
        self.add('sps', 'slit dither', x=0.0, y=0.0, abs=True, cams=cams)
        self.expose('arc',
                    exptime=timedLamps,
                    cams=cams,
                    duplicate=duplicate,
                    doTest=doTest)
Ejemplo n.º 11
0
 def __init__(self, duplicate, cams, doTest=False, **kwargs):
     SpsSequence.__init__(self, **kwargs)
Ejemplo n.º 12
0
 def __init__(self, duplicate, cams, doTest=False, **kwargs):
     SpsSequence.__init__(self, **kwargs)
     self.expose(exptype='bias',
                 cams=cams,
                 duplicate=duplicate,
                 doTest=doTest)