Ejemplo n.º 1
0
    def BSInOut(In=True):  # pylint: disable=invalid-name
        """Move the Beam Stop in and out of the beam.

        Parameters
        ----------
        In : bool
          Whether to move the beam stop in or out
        """
        # move beamstop in or out. The default is to move in
        if In:
            gen.cset(BSY=88.5, BSZ=353.0)
        else:
            gen.cset(BSY=200.0, BSZ=0.0)
Ejemplo n.º 2
0
 def _set_choppers(lrange):
     # now set the chopper phasing to the defaults
     # T0 phase checked for November 2015 cycle
     # Running at 5Hz and centering the dip from the T0 at 50ms by
     # setting phase to 48.4ms does not stop the fast flash
     # Setting the T0 phase to 0 (50ms) does
     if lrange == "0.9-13.25":
         # This is for 0.9-13.25
         gen.cset(T0Phase=0)
         gen.cset(TargetDiskPhase=2750)
         gen.cset(InstrumentDiskPhase=2450)
     elif lrange == "0.65-12.95":
         # This is for 0.65-12.95
         gen.cset(TargetDiskPhase=1900)
         gen.cset(InstrumentDiskPhase=1600)
     else:
         raise RuntimeError("The only known lranges for the chopper "
                            "are '0.9-13.25' and '0.65-12.95'")
Ejemplo n.º 3
0
 def J1(self, temperature_1, temperature_2):
     """Run off Julabo 1"""
     self.send_pv("JULABO_01:MODE:SP", "OFF")
     sleep(1)
     self.send_pv("JULABO_02:MODE:SP", "OFF")
     gen.waitfor_move()
     gen.cset(Valve="J1")
     gen.waitfor_move()
     gen.cset(Julabo_1_Sensor="External")
     sleep(1)
     gen.cset(Julabo_2_Sensor="Internal")
     gen.waitfor_move()
     gen.cset(Internal_Setpoint_1=temperature_1)
     sleep(1)
     gen.cset(Internal_Setpoint_2=temperature_2)
     gen.waitfor_move()
     self.send_pv("JULABO_01:MODE:SP", "ON")
     sleep(1)
     self.send_pv("JULABO_02:MODE:SP", "ON")
     gen.waitfor_move()
Ejemplo n.º 4
0
 def set_aperture(size):
     if size == "":
         pass
     elif size.upper() == "SMALL":
         gen.cset(Aperture_2="SMALL")
     elif size.upper() == "MEDIUM":
         gen.cset(Aperture_2="MEDIUM")
     elif size.upper() == "LARGE":
         gen.cset(Aperture_2="LARGE")
     else:
         raise RuntimeError("Slit size {} is undefined".format(size))
Ejemplo n.º 5
0
 def setup_dae_monotest(self):
     """Setup with a mono test?"""
     self._generic_scan(tcbs=[{
         "low": 5.0,
         "high": 100000.0,
         "step": 100.0,
         "trange": 1,
         "log": 0
     }, {
         "low": 0.0,
         "high": 0.0,
         "step": 0.0,
         "trange": 2,
         "log": 0
     }])
     gen.cset(T0Phase=0)
     self.send_pv("MK3CHOPR_01: CH2: DIR: SP", "CW")
     gen.cset(TargetDiskPhase=8200)
     self.send_pv("MK3CHOPR_01: CH3: DIR: SP", "CCW")
     gen.cset(InstrumentDiskPhase=77650)
Ejemplo n.º 6
0
    def rotatebench(self, angle=0.0):
        """Move the downstream arm"""
        if self.detector_on():
            info("The detector is not turned off")
            info("Not attempting Move")
            return
        info("The detector is off")

        if angle >= -0.5:
            gen.cset(benchlift=1)
            info("Lifting Bench (20s)")
            sleep(20)

            if self.get_pv("BENCH: STATUS") == 1:
                info("Rotating Bench")
                gen.cset(bench_rot=angle)
                gen.waitfor_move()
                info("Lowering Bench (20s)")
                gen.cset(benchlift=0)
                sleep(20)
            else:
                info("Bench failed to lift")
                info("Move not attempted")
Ejemplo n.º 7
0
 def LongPolariserin():  # pylint: disable=invalid-name
     """Put the long polariser for short wavelengths into the beam."""
     # gen.cset(pol_trans=100, pol_arc=-1.3)
     # Convert to angle instead of mm
     gen.cset(pol_trans=100, pol_arc=-0.069)
Ejemplo n.º 8
0
 def FOMin():  # pylint: disable=invalid-name
     """Put the frame overload mirror into the beam."""
     # gen.cset(pol_trans=0, pol_arc=-1.6)
     # Convert to angle instead of mm
     gen.cset(pol_trans=0, pol_arc=-0.084)
Ejemplo n.º 9
0
 def _configure_trans_custom(self):
     # move the transmission monitor in
     gen.cset(m4trans=0.0)
Ejemplo n.º 10
0
 def homes1(self):
     """Rehome slit1."""
     info("Homing s1")
     gen.cset(s1hgap=40, s1vgap=40)
     gen.waitfor_move()
     self._generic_home_slit("MOT:JAWS3:")
Ejemplo n.º 11
0
 def setup_dae_resonantimaging_choppers():  # pylint: disable=invalid-name
     """Set the wiring thable for resonant imaging choppers"""
     info("Setting Chopper phases")
     gen.cset(T0Phase=49200)
     gen.cset(TargetDiskPhase=0)
     gen.cset(InstrumentDiskPhase=0)
Ejemplo n.º 12
0
 def J2(temperature_1, temperature_2):
     """Run off Julabo 2"""
     gen.cset(Julabo_1_Circulator="OFF")
     sleep(1)
     gen.cset(Julabo_2_Circulator="OFF")
     gen.waitfor_move()
     gen.cset(Valve="J2")
     gen.waitfor_move()
     gen.cset(Julabo_1_Sensor="Internal")
     sleep(1)
     gen.cset(Julabo_2_Sensor="External")
     gen.waitfor_move()
     gen.cset(Internal_Setpoint_1=temperature_1)
     sleep(1)
     gen.cset(Internal_Setpoint_2=temperature_2)
     gen.waitfor_move()
     gen.cset(Julabo_1_Circulator="ON")
     sleep(1)
     gen.cset(Julabo_2_Circulator="ON")
     gen.waitfor_move()
Ejemplo n.º 13
0
 def _configure_trans_custom(self):
     gen.cset(Aperture_2="SMALL")
     gen.cset(Tx_Mon="IN")
     gen.waitfor_move()
Ejemplo n.º 14
0
 def _configure_sans_custom(self):
     gen.cset(Tx_Mon="OUT")
     gen.waitfor_move()
Ejemplo n.º 15
0
 def homecoarsejaws(self):
     """Rehome coarse jaws."""
     info("Homing Coarse Jaws")
     gen.cset(cjhgap=40, cjvgap=40)
     gen.waitfor_move()
     self._generic_home_slit("MOT:JAWS1:")
Ejemplo n.º 16
0
 def homea1(self):
     """Rehome aperture 1."""
     info("Homing a1")
     gen.cset(a1hgap=40, a1vgap=40)
     self._generic_home_slit("MOT:JAWS2:")
     gen.waitfor_move()
Ejemplo n.º 17
0
 def set_aperture(size):
     if size.upper() == "MEDIUM":
         gen.cset(a1hgap=20.0, a1vgap=20.0, s1hgap=14.0, s1vgap=14.0)
Ejemplo n.º 18
0
 def _configure_sans_custom(self):
     # move the transmission monitor out
     gen.cset(m4trans=200.0)
Ejemplo n.º 19
0
 def changer_pos(self, pos):
     return gen.cset(Changer=pos)