Reflectometer D17

D17 is the first ILL dedicated reflectometer and it has been designed to be as flexible as possible in resolution and modes of operation. The instrument is suitable for the analysis of surface structures in solids and solid/liquid interfaces. Horizontal surface experiments, such as free liquids, will suffer from a severe restriction in Q-range and flux and are thus not recommended for this instrument.

Back to ILL Homepage
www > Instruments & Support > Instruments & groups > D17 > Documentation > D17 LAMP Book > d17_xyconvert

D17 LAMP Book

FUNCTION d17_xyconvert,win,oaxes,mainbeam,lambda=lambda,sanoff=sanoff, datp=datp

    LAMP function to convert a workspace's coordinates for the (x,y) pixels to numbers with physical meaning.

Works for both monochromatic and TOF data sets

        For monochromatic data, the input workspace must have (comes automatically when created using mload):
            x-pixel on the x-axis
            SAN or DAN on the y-axis
        Monochromatic data may be 3D

        For TOF data, the input workspace must have (comes automatically when D17 TOF data is loaded in to LAMP):
            x-pixel on the x-axis
            wavelength on the y-axis
        TOF data must be 2D


    NECESSARY INPUT:
    win=input workspace
    oaxes=the output axes, put as a string
        Allowable options are:
            'qxqz' = qx (x-axis) vs. qz (y-axis)
            'pipf' = pi-pf (x-axis) vs. pi+pf (y-axis)
          the above options are available for TOF and monochromatic data sets
            'tito' = theta out (x-axis) vs. theta in (y-axis)
            'stth' = two theta (x-axis) vs san (y-axis)
          the above options are only available for monochromatic data sets
            'ltth' = two theta (x-axis) vs wavelength (y-axis)
          the above option is only available for TOF datasets
    mainbeam=data file for the main beam, used to calibrate twotheta

    OPTIONAL INPUT:
    lambda=wavelength settings.  This has two possibilities:
        Monochromator data: this is the actual wavelength, a single number.
          This should be stored with the data, but you have the
          option here of forcing it to another value
            e.g. lambda = 5.325
        TOF data: this is a two element array with the minimum and maximum
          wavelengths for the calculation
            e,g. lambda = [2,20] (this happens to be the default)
    sanoff=an offset in SAN, which can exist if the sample angle calibration
        is out.  This value is SUBTRACTED from the instrument-stored value
        of SAN to find the correct value for theta_in

        For an attempt to automatically find sanoff, use sanoff='auto'
        Otherwise, equate sanoff to a number (default is 0)

datp=a structured array, generated in LAMP, that carries the workspace information with it.  Only necessary if d17_xyconvert is called from within another subroutine

    e.g. type at LAMP interface:
        w2=d17_xyconvert(w1,'qxqz',97936,sanoff='auto')