esrf

Beamline Instrument Software Support
SPEC Macro documentation: [ Macro Index | BCU Home ]

centrebeam.mac
See other macros in category: MX
Description:
    Finds beam center (MX beamlines)
Documentation:
    DESCRIPTION


    DEPENDENCIES
    safshut.mac id.mac mxcollect.mac

Macros:
    centrebeam_setup
    Usage: centrebeam_setup


    centrebeam
    Usage: centrebeam
    Find the centre of the beam as function of the transmition factor. Start with 100 percent and divide by two until only one beam found. Take the backlight out and choose average zoom factor.

    _init_zoom
    Usage: _init_zoom (zoomHo, cameraHo)
    Get the zoomMne average zoom factor, the X and Y pixel/mm values, the frame grabber device and the image width and height.

Internal Macros:
    _centrebeam
    Usage: _centrebeam (trans)
    Find the centre of the beam as function of the transmition factor. Divide the factor by two until only one beam found.

    _cb_xml_read
    Usage: _cb_xml_read (ho, path)
    Read the parameters from the hardware object XML fileho, found in directory path. Return 0 if OK, -1 if error.

    _get_zoom
    Usage: _get_zoom ()
    Read the zoomfactor and calculate the X and Y pixel/mm values. Return 0 if OK , -1 if error.

    _set_zoom
    Usage: _set_zoom (zoomfactor)
    Move the zoom to the zoomfactor position. Read the Y and Z pixel/mm values.

    _get_tab_slits
    Usage: _get_tab_slits (slitboxHo,exptableHo)
    Get the slitbox vertical and horizontal motor names, as well as the experimental table translation and height motors.

    _mv_tab_slits
    Usage: _mv_tab_slits (dy,dz)
    Move the slitbox vertical motors and the exptable height by dz mm. Move the slitbox horizontal motors and the exptable translation motor by dy mm.

    centrebeam_savstat
    Usage: centrebeam_savstat () %MDES% Save the initial state.


    centrebeam_prepare
    Usage: centrebeam_prepare ()
    Actions taken at the begining of the centrebeam procedure.

    centrebeam_cleanup
    Usage: centrebeam_cleanup ()
    Actions taken if ^C pressed.

    centrebeam_accept
    Usage: centrebeam_accept ()
    Resets the zoom and transmission, closes the safety shutter. Count if needed to get the i0 counts after the centring, before resizing the beam (useful if other procedures use centrebeam).

    isdigit
    Usage: isdigit (val)
    Check if val is a digit. Return 0 if yes, -1 if not.

    dummy_defs
    Usage: dummy_defs ()
    Define dummy macros to avoid error in spec if microdiff not used.

Filename: id23.mac
Author: M.Guijarro/A.Beteva $Revision: 1.30 $$Date: 2011/04/04 14:46:35 $
Last mod.: 06/06/2012 17:52 by beteva