Esempio n. 1
0
    def __init__(self, name, id_gap_scannable, id_rowphase1_scannable,
                 id_rowphase2_scannable, id_rowphase3_scannable,
                 id_rowphase4_scannable, id_jawphase_scannable, 
                 pgm_energy_scannable,
                 gap, rowphase1, rowphase2, rowphase3, rowphase4, jawphase_poly):

        EnergyScannableBase.__init__(self, name, id_gap_scannable,
            id_rowphase1_scannable, id_rowphase2_scannable,
            id_rowphase3_scannable, id_rowphase4_scannable,
            id_jawphase_scannable, pgm_energy_scannable,
            gap, rowphase1, rowphase2, rowphase3, rowphase4, jawphase_poly)
Esempio n. 2
0
    def __init__(self, name, id_gap_scannable, id_rowphase1_scannable,
                 id_rowphase2_scannable, id_rowphase3_scannable,
                 id_rowphase4_scannable, id_jawphase_scannable,
                 pgm_energy_scannable, gap, rowphase1, rowphase2, rowphase3,
                 rowphase4, jawphase_poly):

        EnergyScannableBase.__init__(
            self, name, id_gap_scannable, id_rowphase1_scannable,
            id_rowphase2_scannable, id_rowphase3_scannable,
            id_rowphase4_scannable, id_jawphase_scannable,
            pgm_energy_scannable, gap, rowphase1, rowphase2, rowphase3,
            rowphase4, jawphase_poly)

        # Do some minimal sanity checking on the _poly's.
        assert (type(jawphase_poly) == type(Poly([])))
Esempio n. 3
0
    def __init__(self, name, id_gap_scannable, id_rowphase1_scannable,
                 id_rowphase2_scannable, id_rowphase3_scannable,
                 id_rowphase4_scannable, id_jawphase_scannable,
                 pgm_energy_scannable, energyPositions):

        EnergyScannableBase.__init__(
            self, name, id_gap_scannable, id_rowphase1_scannable,
            id_rowphase2_scannable, id_rowphase3_scannable,
            id_rowphase4_scannable, id_jawphase_scannable,
            pgm_energy_scannable,
            dict((energy, position.gap)
                 for (energy, position) in energyPositions.items()),
            dict((energy, position.rowphase1)
                 for (energy, position) in energyPositions.items()),
            dict((energy, position.rowphase2)
                 for (energy, position) in energyPositions.items()),
            dict((energy, position.rowphase3)
                 for (energy, position) in energyPositions.items()),
            dict((energy, position.rowphase4)
                 for (energy, position) in energyPositions.items()),
            dict((energy, position.jawphase)
                 for (energy, position) in energyPositions.items()))

        self.energyPositions = energyPositions
Esempio n. 4
0
    def __init__(self,
                 name,
                 id_gap_scannable,
                 id_rowphase1_scannable,
                 id_rowphase2_scannable,
                 id_rowphase3_scannable,
                 id_rowphase4_scannable,
                 id_jawphase_scannable,
                 pgm_energy_scannable,
                 pol_angle_scannable_name,
                 angle_min_Deg,
                 angle_max_Deg,
                 angle_threshold_Deg,
                 energy_min_eV,
                 energy_max_eV,
                 gap_from_energy=None,
                 rowphase1_from_energy=None,
                 rowphase2_from_energy=None,
                 rowphase3_from_energy=None,
                 rowphase4_from_energy=None,
                 jawphase_from_energy=None,
                 gap_from_angle=None,
                 rowphase1_from_angle=None,
                 rowphase2_from_angle=None,
                 rowphase3_from_angle=None,
                 rowphase4_from_angle=None,
                 jawphase_from_angle=None):

        self.pol_angle_scannable_name = pol_angle_scannable_name
        self.angle_min_Deg = angle_min_Deg
        self.angle_max_Deg = angle_max_Deg
        self.angle_threshold_Deg = angle_threshold_Deg
        self.energy_min_eV = energy_min_eV
        self.energy_max_eV = energy_max_eV

        self.angle_Deg = 0

        # For each value, ensure that one and only one value is specified
        assert ((gap_from_energy == None) != (gap_from_angle == None))
        assert ((rowphase1_from_energy == None) !=
                (rowphase1_from_angle == None))
        assert ((rowphase2_from_energy == None) !=
                (rowphase2_from_angle == None))
        assert ((rowphase3_from_energy == None) !=
                (rowphase3_from_angle == None))
        assert ((rowphase4_from_energy == None) !=
                (rowphase4_from_angle == None))
        assert ((jawphase_from_energy == None) !=
                (jawphase_from_angle == None))

        EnergyScannableBase.__init__(
            self, name, id_gap_scannable, id_rowphase1_scannable,
            id_rowphase2_scannable, id_rowphase3_scannable,
            id_rowphase4_scannable, id_jawphase_scannable,
            pgm_energy_scannable, gap_from_energy, rowphase1_from_energy,
            rowphase2_from_energy, rowphase3_from_energy,
            rowphase4_from_energy, jawphase_from_energy)

        self.gap_from_angle = EnergyScannableBase.ValueLookup(
            gap_from_angle, "deg")
        self.rowphase1_from_angle = EnergyScannableBase.ValueLookup(
            rowphase1_from_angle, "deg")
        self.rowphase2_from_angle = EnergyScannableBase.ValueLookup(
            rowphase2_from_angle, "deg")
        self.rowphase3_from_angle = EnergyScannableBase.ValueLookup(
            rowphase3_from_angle, "deg")
        self.rowphase4_from_angle = EnergyScannableBase.ValueLookup(
            rowphase4_from_angle, "deg")
        self.jawphase_from_angle = EnergyScannableBase.ValueLookup(
            jawphase_from_angle, "deg")