LAUESCALE - WAVELENGTH NORMALISATION ==================================== INTRODUCTION The program LAUESCALE is used to calclulate a normalisation curve for a set of Laue data by scaling a set of Laue reflection data against a standard set of monochromatic data as a function of wavelength. Once calculated, the curve may be used to normalise further sets of Laue data. The program now has an option to calculate a two dimensional absorption correction surface and to iterate the wavelength normalisation and absorption correction steps. Special options are also available to handle wavelength/sign separated reference data e.g. for use in conjunction with wavelength dependent structure factor calculations. The program was written by J.W. Campbell, Daresbury Laboratory. List of sections: Data Control Cards Input and Output Files Running the Program Notes Printer Output Error Messages Program Function References Examples DATA CONTROL CARDS Data Card 1 TITLE Title (up to 70 characters) for the output file(s). If a file to be written for input to ROTAVATA/AGROVATA then this title will also be used as the batch title. Data Card 2 CODE [ GEINTYP ISPAT ] CODE is either the code NORMALISE if a set of Laue data is to be normalised against a reference set of standard (e.g. monochromatic data) or SCALE or RSCALE if a set of Laue data is to be scaled using a previously calculated normalisation curve. The RSCALE option requires an input reference reflection file so that the scaled data may be compared to this set. The SCALE option only requires the Laue data file. Normally the input Laue data file to LAUESCALE is a file created by the program AFSCALE. However, there is an alternative option to use the data from the 'A' film only directly from a '.ge1' file. To use this option, three extra parameters are given: The code 'GE' to indicate that a .ge1 file is to be read. INTYP is the integration type: = 1, box integration, = 2, profile fitted (the default) ISPAT indicates the required handling of spatially overlapped spots: = 0, Do not include spatially overlapped data = 1, Include spatially overlapped data Data Card 3 NSPGRP AMINL AMAXL RES1 RES2 TH1 TH2 BFAC NRANGE NSPGRP is the space group number. The symmetry positions for this space group are read from the CCP4 symmetry operators file and the corresponding point group symmetry matrices are read from the CCP4 point groups file. AMINL, AMAXL are cutoff limits in lambda (in Angstroms) to be applied to the Laue data on input. If zero values are given, then values of AMINL and AMAXL will be the taken as the minimum and maximum lambda values in the input Laue data. RES1, RES2 are cutoff resolution limits (in Angstroms), either order, to be applied to the Laue data on input. TH1, TH2 are cutoff limits in theta (in degrees), either order, to be applied to the Laue data on input. BFAC is a differential temperature factor between the Laue and standard data to be applied to the Laue data on input. NRANGE is the number of separate ranges of Lambda (1 to 3) to be used in the curve fitting process. Data Card 4 BMINL BMAXL BINS NFIT IFEX [IORD Q(0) ... Q(IORD)] BMINL, BMAXL are the minimum and maximum Lambda values (in Angstroms) for the range. If only one range was requested, then zero values may be given and the values will be set to AMINL and AMAXL (see data card 3). BINS may either given as the width of the Lambda bins to be used in the curve fitting (a value in Angstroms less than 1.0) or as the number of bins (a value greater than 1). The total number of bins for all the ranges must not exceed 100. NFIT is the order of the polynomial to be fitted (0 to 10) for the range. (ignored for SCALE/RSCALE options) IFEX is a flag indicating whether or not extra end of range points are to be added to the wavelength bin scale factors before curve fitting. See LAUENORM documentation for details. = 0, Do not add extra end points (the default). = 1, Add an extra end point at the low wavelength end of the range. = 2, Add an extra end point at the high wavelength end of the range. = 3, Add extra end points at both ends of the wavelength range. IORD Q0 ...Q(IORD). These values are only required if the input code on data card 2 was 'SCALE' or 'RSCALE'. They are the order of the polynomial followed by the polynomial coefficents (IORD+1 values) of the normalisation curve to be applied. If necessary the polynomial coefficients may continued on additional cards. Data Card 5 IFILE1 IFILE2 SCAL2 IWTS AWTS IWTL AWTL IWMEAN SCALIN SIGREJ NDIAG1 NDIAG2 IFILE1 is a flag = 1, Output a first reflection data file containing the merged and scaled Laue data. If the option NORMALISE was requested then the the FP and sigma(FP) values from the standard file will also be written to the output file. =-1, Output a first reflection data file containing the merged and scaled Laue data in SHELX format. =-2, Output a first reflection data file containing scaled but unmerged Laue data, including wavelength values, in SHELX format. <-1000, Output a first reflection data file containing scaled but unmerged Laue data including a batch number (= -IFILE1 -1000) and wavelength values. I and sig(I) values (divided by 100.0) are output rather than F and sig(F) values (SHELX) = 0, Do not output any of these files IFILE2 is a flag < 0, Output a second file with scaled Laue data with anomalous differences and with reflections measured at different wavelengths kept separate. > 0, Output a second file with the scaled Laue data in a form suitable for input to ROTAVATA and AGROVATA. The value of IFILE2 will be used as the batch number. = 0, Do not output a second file. SCAL2 is the value by which output intensities are to be divided for a ROTAVATA/AGROVATA compatible second output file. The default value is 20000. If IFILE2 <= 0 then the value of SCAL2 is ignored. IWTS is a flag: = 0, use weights = 1/sigma(Is)**2 when calculating the mean standard intensities for the lambda bins. (Is = standard intensity) = 1, use unit weights when calculating the mean standard intensities for the lambda bins. (This is probably the safest option to start with) > 1, use weights = 1.0 + AWTS*Is/1000 when calculating the mean standard intensities for the lambda bins. AWTS is a weighting factor used only if IWTS > 1 (see above) IWTL is a flag = 0, use weights = 1/sigma(Il)**2 when calculating the mean Laue intensities for the lambda bins. (Il = Laue intensity) = 1, use unit weights when calculating the mean Laue intensities for the lambda bins. (This is probably the safest option to start with) > 1, use weights = 1.0 + AWTS*Il when calculating the mean Laue intensities for the lambda bins. AWTL is a weighting factor used only if IWTL > 1 (see above) IWMEAN is a flag: = 0, use weights = 1/sig(Il)**2 when calculating the mean intensity values when merging the scaled Laue data for a reflection. This is the recommended value. (Il = Laue intensity) =1, use unit weights when calculating the mean intensity values when merging the scaled Laue data for a reflection. SCALIN in a scale factor by which the input intensities and their sigma values are to be multiplied when they are read in. This may be used to scale down the values if there are sigma values greater than 32767 in the Laue input data. The default value is 1.0. SIGREJ. If a value greater than 0.0 is given, the reflections with I < SIGREJ * ISIG will be rejected. The default value is 0.0 such that this rejection criterion is not applied. NDIAG1, NDIAG2 are the number of diagnostic relections to be printed when the Laue data are being collected for scaling and when the Laue data have been scaled for output respectively. Normally values of zero are given. Note: The values of IWTL, AWTL, IWTS, AWTS and NDIAG1 are ignored for the SCALE or RSCALE options. Data Card 6 NITER IUPDB IABS NQORD NRORD ISQMIN ILMIN LASTIT DIAGR DLAM ICTYP NITER is the number of iterations of the Normalisation (/absorption correction) procedur required. IUPDB is 1 if the temperature factor difference calculated at the end of the normalisation procedure is to be applied on the next iteration. If 0 then the initlai value given for BFAC on card 3 is used througout. IABS > 0 if a two dimensional absorption surface is to be calculated and 0 if no absorption correction is required. The actual value indicates the type. =1, The two parameters 'Q' and 'R' used in the absorption surface calculation are the angles whose tangents are xf/ctof and yf/ctof where xf, yf are the film coordinates and ctof is the crystal to film distance. =2, The two parameters 'Q' and 'R' used in the absorption surface calculation are the film xf and yf coordinates in mm. QQORD is the order of polynomial to be fitted in the 'Q' dimension (max of 10). Only required if IABS>0. QRORD is the order of polynomial to be fitted in the 'R' dimension (max of 10). Only required if IABS>0. ISMIN. A standard intensity will be omitted from the calculation of the absorption surface if the (unscaled) intensity is less than ISMIN. (Only required if IABS>0). ILMIN. A Laue intensity will be omitted from the calculation of the absorption surface if the (unscaled) intensity is less than ILMIN. (Only required if IABS>0). LASTIT. When absorption corrections are being carried out each iteration has a normalisation step followed by an absorption surface calculation step. If LASTIT is set to 1 then the absorption surface calculation will be omitted in the final iteration (recommended) so that the final calculation is that of a normalisation curve. Otherwise set LASTIT to 0. (Only required if IABS>0). DIAGR. Diagnostic ratio. Display rogue intensity pairs for which IS/IL>DIAGR or IL/IS>DIAGR is found when calculatng the absorption surface. (Default value = 10.0). (Only required if IABS>0). DLAM. If a value greater than 0.0 is given, then wavelength dependent reference data are used instead of the usual fully merged data. Laue and reference reflections are only considered to match if their wavelengths are within DLAM Angstroms as well as having the same indices. The option was introduced to allow the use of reference data from wavelength dependent structure factor calculations. ICTYP. Normally 0. If a value of 1 is given then 'sign separated' reference data are used instead of the usual fully merged data. Laue and reference reflections are only considered to match if they have the same sign as well as having the same indices. The option was introduced to allow the use of reference data from non-centrosymmetric (and usually wavelength dependent) structure factor calculations. Data Card 7 LABINitem1=name1 item2=name2 ... These are the MTZ assignments for the input MTZ reflection data file for the items H K L FP SIGFP where FP and SIGFP are the reference F and sigma(F) values. If DLAM>0, then there is an extra assignment for a wavelength column LAM and if ICTYP>0 there is an extra assignment for the sign column SIGN. INPUT AND OUTPUT FILES The input files are: a) The control data file b) The input Laue data file. This is a card image file with one reflection per record giving the items H K L LAMBDA THETA I SIGI. See program documentation for further details. The data are unmerged and need be in no particular order. Alternatively, if the code 'GE' is specified on Data Card 2, then the input file is a '.ge1' format file. c) The input reflection file containing the standard reflection data to be used in the normalisation in standard MTZ format. This data file must be sorted on h, k and l and must contain the unique set of indices for the point group as produced by the standard data processing programs. If one of the special options is used to have wavelength and/or sign separated reference data, the additional wavelength and/or sign columns must be present in the reference data file. The sign values are +1 and -1 for non-centrosymmetric reflections and 0 for centrosymmetric reflections. The sort order is h k l [sign] [lam]. The output files are: a) An optional first output reflection data file which may be one of the following: a) A standard MTZ format file containing the merged and scaled Laue data. If the option NORMALISE or RSCALE is selected, the output data items are H K L FS SIGFS FL SIGFL. If the option SCALE is selected, the output data items are H K L FL SIGFL. (FS and SIGFS are the F and sig(F) values for the standard data and FL and SIGFL are the F and sig(F) values for the Laue data. If a special option for wavelength/sign separated data is used then there will be additional columns LAM (wavelength) and/or SIGN (sign) written. b) A card image file containing the fully merged normalised reflection data (without anomalous) in SHELX format. (H K L F SIGF in format 3I4,2F8.2). If a special option for wavelength/sign separated data is used then there will be additional columns for wavelength (F8.4) and/or sign (I8) written. c) A card image file containing the unmerged normalised reflection data (with lambda values) in SHELX format. (H L K F SIGF LAMBDA in format 3I4,2F8.2,F8.4) d) A card image file containing the unmerged normalised reflection data (with lambda values and a batch number) in SHELX format. (H L K I SIGI BATCH LAMBDA in format 3I4,2F8.2,I4,F8.4) b) An optional second output reflection data file in MTZ format. This may be either of the following: a) A file containing scaled and partially merged Laue data. The symmetry related (I+) and (I-) pairs for the reflection are merged provided that they were measured at wavelengths within 0.1 A of each other. The output data items are H K L LAMBDA THETA FP SIGFP DANO SIGDANO. LAMBDA is the wavelength in Angstroms, THETA is the theta angle in radians and FP etc. are the F value, the sig(F) value, the anomalous difference and sig(anomalous difference) for the scaled Laue reflection data. It should be noted that this output MTZ file will be of the multirecord type as there may be more than one record present for a given reflection. This output is intended for further special processing associated with the Laue technique. b) A file suitable for input to ROTAVATA and AGROVATA containing the columns H K L S M/ISYM BATCH I and SIGI. (See documentation of ROTAVATA for further details) RUNNING THE PROGRAM Use the command 'laue lauescale' Parameters: DATA The control data file. LAUEHKL The input Laue data file. (type = .afout or .ge1) HKLIN The input MTZ standard reflection data file if required. HKLOUT The output reflection data file containing the scaled and merged reflection data. HKLOUT2 (optional) The optional second output reflection data file if required. SHELX (optional) The optional output SHELX file if required. DIAGNOSTICS FILE NAME (optional) The optional diagnostics file if required. NOTES Note 1.Internal scaling factor During the scaling process the standard intensities from the input MTZ file are divided by a preset factor of 1000 so that, in general, they should then be of comparable magnitude to the input Laue intensities. PRINTER OUTPUT Key: Il = Laue intensity, Is = Standard intensity The printer output consists of the following sections. a) Control data and reflection data details The printer output starts with details derived from the control data cards and from the input MTZ reflection data file if present. Header details for the output MTZ file(s) are then given. These are followed by counts of the number of Laue reflections read and accepted and the lambda (wavelength) limits found in the Laue data file. b) Curve fitting results (Option NORMALISE only) For each range of lambda selected, a table is given of the curve fitting Polynomial coefficients for polynomial orders from 0 to 11 (or up to the maximum number of points for the range minus one). the r.m.s. deviations for each order is given so that the user may judge whether the curve fitting order, selected via the control data, is appropriate. c) Normalisation analysis (Option NORMALISE only) For each lambda bin, the following items are given: * The bin number. * The average lambda value. * The number of reflections in the bin. * The mean intensity from the standard intensity file divided by the preset factor of 1000. * The mean Laue intensity. * The weighted mean (Laue Intensity)/(Standard Intensity) ratio. * The mean weight for the point. * The curve fitted value for the (Laue Intensity)/(Standard Intensity) ratio. A graphical output is also given to indicate the results of the curve fitting. The above table is split into sections if more than one lambda range for curve fitting was specified via the control data. Values of lambda for which extrapolated values rather than curve fitted values will be used for the scaling are then indicated. d) Analysis of the scaled Laue data For each lambda bin, the following items are given: * The bin number. * The average lambda value. * The number of Laue reflections. * The mean standard intensity (option NORMALISE only). This only includes matching reflections which may be fewer than the number of Laue reflections. * The mean scaled Laue intensity for all scaled Laue intensities. * The R-factor (option NORMALISE or RSCALE only). This is calculated as R = Sum( Il-Is )/Sum(Il+Is) (Sums over individual Laue reflections). e) Rscale calculation and B-Factor analysis This section is output, except on the last iteration, if either an absorption correction is being calcualted or if the BFAC temperature factor is to be updated. The scaling R-factor between the merged Laue data and the standard data is calculated as RSCALE = Sum( Il-Is )/Sum(Il+Is) where the sums are over all matching reflections. An analysis of the data in 10 equal bins of sin(theta)**2/lambda**2 is the given with the following items: * Bin number. * Average sin(theta)**2/lambda**2 value for the bin. * Number of Laue reflections in the bin. * Mean value of Il/Is. * Scaling R-factor between Il and Is. * Average log(Il/Is) value for the bin. From these data, a difference temperature factor between the normalised data and the standard data is then calculated and output. f) Absorption correction analysis and results This section is only present if an absorption correction is being carried out. The section starts with a list of any 'rogue' reflections with Il/Is or Is/Il ratios larger than the ratio DIAGR specified in the control data. The table gives the following information for each such reflection: * Indices. * Standard and Laue intensities. * Theta and Lambda values. * Is/Il ratio * Film xf and yf coordinates (mm from the centre) * The 'Q' and 'R' coordinates used for the absorption correction. * The corresponding 'Q' and 'R' bin numbers on a 16 by 16 grid of 'Q' and 'R'. Details of the number of reflections to be used in the absorption correction calculation and the numbers excluded because of low standard or Laue intensity values (