startup/42-ESM_monochromator.py
def change_offsets(self, grating, branch):
        '''
        This routine is used to change the grating and M2 mirror offsets using set.

        Given a set of grating offset,mirror offset and the number of line per mm used by the PGM software
        this routine updates the offset PV's but first setting the calibration PV to "set" then returning
        it to 'use' afterwards.

        PARAMETERS
        ----------

        grating : str
            The lines per mm of the grating to use, can be '300', '600', '800' or '1200'.

        branch : str
            The beamline branch which is to be used, can be 'A' (default) or 'B'.

        '''

        yield from mv(PGM.Mirror_Pitch_set, 1 , PGM.Grating_Pitch_set, 1)

        yield from mv(PGM.Mirror_Pitch_off, float(self.M2_Offset[branch][grating]) ,
                      PGM.Grating_Pitch_off, float(self.Grt_Offset[branch][grating]),
                      PGM.Grating_lines,float(grating) )

        yield from mv(PGM.Mirror_Pitch_set, 0 , PGM.Grating_Pitch_set, 0)

        return

        This routine is used to change the grating and M2 mirror offsets using set.

        Given a set of grating offset,mirror offset and the number of line per mm used by the PGM software
        this routine updates the offset PV's but first setting the calibration PV to "set" then returning
        it to 'use' afterwards.

        PARAMETERS
        ----------

        grating : str
            The lines per mm of the grating to use, can be '300', '600', '800' or '1200'.

        branch : str
            The beamline branch which is to be used, can be 'A' (default) or 'B'.

        
This routine is used to change the grating and M2 mirror offsets using set.
Given a set of grating offset,mirror offset and the number of line per mm used by the PGM software
this routine updates the offset PV's but first setting the calibration PV to "set" then returning
it to 'use' afterwards.

PARAMETERS



branch : str
The beamline branch which is to be used, can be 'A' (default) or 'B'.
This routine is used to change the grating and M2 mirror offsets using set . Given a set of grating offset mirror offset and the number of line per mm used by the PGM software this routine updates the offset PV ' s but first setting the calibration PV to " set " then returning it to ' use ' afterwards . PARAMETERS branch : str The beamline branch which is to be used can be ' A ' ( default ) or ' B ' .
def change_offsets(self, grating, branch):
        yield from mv(PGM.Mirror_Pitch_set, 1 , PGM.Grating_Pitch_set, 1)
        yield from mv(PGM.Mirror_Pitch_off, float(self.M2_Offset[branch][grating]) ,
                      PGM.Grating_Pitch_off, float(self.Grt_Offset[branch][grating]),
                      PGM.Grating_lines,float(grating) )
        yield from mv(PGM.Mirror_Pitch_set, 0 , PGM.Grating_Pitch_set, 0)
        return
def change_offsets ( self , grating , branch ) : yield from mv ( PGM . Mirror_Pitch_set , 1 , PGM . Grating_Pitch_set , 1 ) yield from mv ( PGM . Mirror_Pitch_off , float ( self . M2_Offset [ branch ] [ grating ] ) , PGM . Grating_Pitch_off , float ( self . Grt_Offset [ branch ] [ grating ] ) , PGM . Grating_lines , float ( grating ) ) yield from mv ( PGM . Mirror_Pitch_set , 0 , PGM . Grating_Pitch_set , 0 ) return
This routine is used to change the grating and M2 mirror offsets using set.
This routine is used to change the grating and M2 mirror offsets using set .
'''
        This routine is used to change the grating and M2 mirror offsets using set.

        Given a set of grating offset,mirror offset and the number of line per mm used by the PGM software
        this routine updates the offset PV's but first setting the calibration PV to "set" then returning
        it to 'use' afterwards.

        PARAMETERS
        ----------

        grating : str
            The lines per mm of the grating to use, can be '300', '600', '800' or '1200'.

        branch : str
            The beamline branch which is to be used, can be 'A' (default) or 'B'.

        '''
self
grating
branch