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_xspec

D17 LAMP Book

FUNCTION d17_xspec,win,spix,bkg=bkg,method=method,mbeam=mbeam,snorm=snorm,xaxis=xaxis,lambda=lambda,sanoff=sanoff

    LAMP function to extract the specular intensity from a workspace.
    It also (correctly) calculates the errors and weights by the number of pixels
        in each range

    NECESSARY VARIABLES:
    win = the input workspace, loaded through mload
    spix = two element array with the left and right pixels that limit the
        width of the specular ridge

    OPTIONAL VARIABLES:
    bkg = two column times n row element array that define the background pixels
    method = a string stating the type of background subtraction you would like to do.  
        May also involve rebinning the data.
        The choices are:
            'smpl' = keeps the data in (x-pixel, san) space,
                     integrates the counts within a certain range of x-pixels for each row,
                     and subtracts backgrounds calculated by row from the data .
                 This is the default, and is useful for narrow, well-defined specular reflectivity with no significant off-specular.
            'tth' = Converts the data in (twotheta, san) space,
                     assumes that theta_in = twotheta/2 and calculates Qz based on this,
                     but subtracts backgrounds calculated by row from the data.

                 This is useful for messy reflectivity peaks with no significant off-specular

                    (e.g. bent and/or faceted substrates)
                 This option will rebin the data in Qz.
            'q' = converts the data in to (pi-pf, pi+pf) space,
                    interpolates the data on to the central pixel,
                    and subtracts backgounds interpolated on to the same Qz.
                This is useful for samples with large off-specular
                    (e.g. rough multilayers)
                This option will rebin the data in Qz.
    mbeam = the number with a main beam measurement.  
        This is a NECESSARY VARIABLE if 'tth' or 'q' are chosen for the method
    snorm = normalization to slit sizes.  A string input is required.
        Two options are possible:
            'none'= no normalization (default choice)
            'q'   = divides the intensities by Q (equivalent to dividing by sin(theta))
            's2'  = divides the intensities by S2W
            's2q' = divides the intensities by S2W*Q (equivalent to dividing by sin(theta))
            's2s3'= divides by S2W*S3W
    xaxis = a choice of the final x-axis values
        You may choose the x-axis in Qz (xaxis = 'q')    (default choice)
                      or theta_in (xaxis='san')
    lambda = the wavelength.  If unspecified, the wavelength will be taken from the data parameters
    sanoff = an offset in the sample angle in degrees.  
        This will be ADDED to the recorded sample angle
        You may specify 'auto' here for the program to guess for you
        Default is sanoff=0 for 'smpl', and is 'auto' for 'tth' and 'q'

    OUTPUT VARIABLES
    wout is the workspace containing the specular intensity, background subtracted,
        with the x-axis = the y axis for win

    e.g. type at LAMP interface:

   w2=d17_xspec(w1,[60,85])

            (extracts the data between x-pixels 60 and 85 and integrates as a function of SAN)

   w2=d17_xspec(w1,[60,85],bkg=[[50,59],[86,90]])

            (as above, also integrates between 50-59 and 86-90 and takes this as the background)
        w2=d17_xspec(w1,[60,85],bkg=[11,59],method='tth',mbeam=22189,xaxis='q',lambda=5.513,sanoff='auto')

            (the full monty!)