INTLAUE - INTENSITY INTEGRATION =============================== INTRODUCTION The program INTLAUE is used for integrating intensities from Laue photographs. This document in based on the instructions and hints for running INTLAUE prepared by Trevor Greenhough and Annette Shrive (the authors of the program (University of Keele)). It assumes that a good refinement has been carried out using LAUEGEN or GENLAUE. The program now handles image plate data as well as film data. New algorithms for background and spatial deconvolution and variable radial masking are now included in the program. There is also a new background histogram routine to replace the old guesswork. If a full refinement has been done in LAUEGEN then there is now an option to bypass the refinement in INTLAUE. There is an option now for Molecular Dynamics image plates which allows the polynomial based spatial distortion correction calculated by LAUEGEN to be applied in INTLAUE. There is also a new option to allow for variable radial binning. List of sections: Strategy Limitations Files Interactive Mode Batch Mode Control Data Examples Flowchart STRATEGY The recommended procedure is as follows. 1) Remember that each time you run the program, the .ge1 file is updated with new film parameters etc, so keep a copy in case you have a disaster. It is however now relatively easy to regenerate the .ge files from an LDM parameter file using LAUEGEN of the LDMGE program. 2) Try an interactive run first to make sure you have good camera constants and cf etc as the lower films need this to run well (If you have refined all films in LAUEGEN or GENLAUE , this is not necessary). This also allows you to get suitable values for the thresholds, box size, nodal numbers etc etc. and to check the standard profiles. During this run you will see if you can proceed without inner ref. You will be able to use the FILMPLOT option for difficult films by running them NOT as A, thus getting good parameters onto the .ge1 file if you haven't already. As soon as it all starts to look good you should abandon the inner ref. 3) Run the whole pack in batch. If you have got everything right all will be well and repeating the run might even improve things! LIMITATIONS The maximum number of spots which may be integrated is 300,000. The program does not support the full range of options now available using the LDM based LAUEGEN program. The image data must be in the standard order and for image plate data, only two types are currently recognised. Whilst other image plate or CCD data may be processed using one of these options it must be noted that using the MAR image plate option assumes that the roff/toff type of distortion correction has been done in LAUEGEN. Similarly if the Molecular Dynamics option is chosen the program assumes that the SPDXY type of distortion correction has been carried out. It should also be noted that the maximum intensity which may be correctly stored is 32767 so be sure to check that the maximum intensity given towards the end of the log file does not exceed this. It should be noted that the Fortran source code uses a series of non-standard Fortran77 features. FILES laueflm.dat & .gen file: New outputs from GENLAUE now have the parameters previously stored in laueflm.dat at the end of the .gen file. Laueflm.dat may still be used; program will look first in .gen file (which will be assumed to have the same name as the .ge1/2 files) for the numbers and then in laueflm.dat if they are not in the .gen file or if there is not a .gen file. Data Control File The data control file is described below. Image Data Files The film and image-plate image files are assumed to have xf moving slowest (from low to high) and yf moving fastest (from low to high). The film data are unsigned bytes and the image-plate data are unsigned two byte integers. (Note: In some cases the image plate data may need to be byte swapped) INTERACTIVE MODE The program is run in interactive mode by typing the command: 'laue intlaue' Use the default 'terminal' as the reply to the DATA: prompt. Try and use commas (,) to separate variables input together. There is a problem with spaces occasionally in interactive mode. All the input in interactive mode can be understood by referring to the batch input data described below. BATCH MODE A data control file is prepared and the program is run by typing the command: 'laue intlaue' The name of the data control file is given in response to the DATA: prompt and the batch mode option for running the program is selected via the subsequent questions. CONTROL DATA This is in free format except where indicated. This control data is used when setting up a data control or command file for running INTLAUE in batch mode. The description of the items provides information useful when the program is run interactively and data items are requested via prompts. 1) GE_FILE name of generate files without the .ge1/.ge2/.gen 2) INREF, DIAGNOSE, LOWER_AS_A, PROFILES, WT_PROFILES, PRO+BOX, ICORR, ISTREAK, IBINV, IPLATE, IOUTREF Control parameters for Integration set by 0 for NO, 1 for YES INREF 0/1 for donot/do perform an initial refinement on the inner portion of the film (area chosen by the program). In cases where the camera constants are not well known this might prove essential on the first pass through. The added advantage of this is that an 'Average Spot' profile is produced to allow the box to be chosen correctly. The disadvantage is that it can undo a lot of the work that Genlaue has done since it uses a small number of spots in a limited area. RECOMMEND: Use this only interactively on first run to get good parameters written back to .ge1 file. DIAGNOSE 0/1 for donot/do display average spot profile in PROCESS. BE WARNED! This is nothing to do with the Inner Ref and should NOT BE USED except by the author! LOWER_AS_A 0/1 for donot/do treat lower (B-F) films as the A film. Treating lower NOT as A means (confusingly) that each is treated to some extent as an A film, with FILMPLOT option, inner and outer spot selection and refinement ( but see below). Treating AS A invokes information from the A integration, with a single refinement based on strong significant intensities from the A film integration. If there are no problems with Fiducials changing position on lower packs this is a must. If there are problems then treating films independently, usually in the initial interactive run, allows you to get the film parameters right and written to the .ge1 file for each one. PROFILES 0/1 for donot/do use Profile Fitting. Apart from radial streaks, box integration is not really an option except for those who want to speed through and see how bad Box integration is. Deconvolution won't work without profiles. WT_PROFILES 0/1 for donot/do use Variable Weighted Profiles. Using Variable weights gives a smoothly varying profile over the film rather than sticking rigidly to the standard profile within each bin. The spot profile will clearly not be constant, particularly in the chosen bins. This method is based on using Weights so use them! **** NOT ALLOWED IF STREAK IS 1 **** PRO+BOX 0/1 for donot/do carry out profile AND box integration. This may be useful if you want to compare results. Be aware that the box integration turned on here is NOT the same as that obtained if profiles are not used at all. Here there is a constant box with sophisticated BG treatment. Unless you particularly want to show which way is best the added cpu time is not worth it; stick to profiles only. ICORR 0/1 for donot/do invoke spatial deconvolution. ISTREAK 0/1 for donot/do invoke radial elliptical masking IBINV 0/1 for donot/do use variable binning IPLATE 0/1/2 for film/MAR image-plate/Molecular Dynamics image-plate data. IOUTREF 0/1 for donot/do refinement option (You must set this to 0 if IPLATE is 2 (Molecular Dynamics)) 3) NUMBIN, BGCUT, HOVLAP, HCUT, IPROMIN, IMAXOD, RAD1, RAD2 Profile Control Parameters (Only if PROFILES = 1 on card 2) and deconvolution parameters (Only if ICORR = 1 on card 2) NUMBIN Number of profile bins (5,9,17) Check standard profiles carefully. Large shifts and/or bg parameters indicate problems with Genlaue or camera constants or film parameters. If STREAK is 1, all 17 bins are radial, as opposed to the normal 17 bins. BGCUT Background level cut-off. Average background AVBG is determined by the C parameter in the profile equation during the formation of the NUMBIN standard profiles. Each spot is tested during integration for background planarity and points more than BGCUT x AVBG are rejected from the plane and the plane is recomputed. Getting this 'right' is a matter of taste, and depends on the average BG and its constancy on the film. The total number of BG points rejected serves as a guide, as does the average BG itself. If the program gives 200,000 rejections for 30,000 spots then BGCUT could probably be raised. Clearly 1000 rejections at the 15.0 level needs a lower BGCUT. ** BG replacements for overlaps are based on av bg in each bin ** HOVLAP Hat matrix change above which peak points will be temporarily removed from L.S. determination of profile scale J. Defaults to 1.1 on a good day. You should inspect your output to try and get a reasonable number of "H change rejections". A reasonable number is perhaps 15 - 25% of the PEAK points in overlapped singlets. (eg. 100,000 overlaps, peak size 100 rasters, 2,000,000 H change rejections). I WOULD STRONGLY ADVISE AGAINST MOVING FAR FROM 1.1. HCUT Standard deviation cutoff to apply to individual profile scale factors J following L.S. determination of J. Points whose J is more than this number of SDs above the mean are rejected prior to renormalised determination of the intensity. Might default to 6.0. Ive found 5 or 6 to be good numbers, but again look at your output and aim for perhaps 5-10% of total peak points in overlapped points (750,000 in the above example). IPROMIN Minimum I for inclusion in standard profiles. Overloads are automatically rejected (IMAXOD) Set this number to give a good number of contributors to the standard profile in each bin. IMAXOD Readings on image above IMAXOD are treated as overloaded RAD1 Radius of Inner circle in Bin definition. (rasters). In interactive mode this defaults to a radius giving similar numbers of spots in each of the NUMBIN bins. *** DEFAULTS ONLY CORRECT FOR 25 micron SCAN!! *** ALL SPOTS WITHIN THIS RADIUS (bin 17) for NUMBIN =17 ARE REJECTED *** RAD2 Radius of outer circle in Bin definition. (rasters). Only used if NUMBIN is 17 and STREAK is off (0) In interactive mode this will default to give equal bins based on the input or computed value of RAD1. *** DEFAULTS ONLY CORRECT FOR 25 micron SCAN!! 4) CMASK, DMASK, KMASK, BMINOR, BORDER **only include of ISTREAK set to 1 ** Variable or constant radial elliptical masking parameters Care must be taken to provide a large enough square box (SEE CARD 8) to contain the generated ellipses. Clearly in the case of elliptical masking the size of peak, bg and corner cut-off are not relevant, what is important is the full size XSIZE x YSIZE. CMASK FULL Length of major (radial) ellipse axis (mm) For the Andrews et al (1987) formulation this should be set to mosaic spread x cf, while KMASK (below) should be set to 1.0. Entry of correct DMASK is then essential. DMASK Crystal-to-film-distance in mm. This parameter has no effect for constant size elliptical masks, ie when KMASK = 0, but is used in the calculation of angular disposition when KMASK is non-zero. * soon to be taken from the .gen file * KMASK Constant defining the variable nature of the mask When KMASK is less than 0, radially decreasing streak lengths are provided based on the central length given by CMASK. When KMASK = 0, constant streak lengths of length CMASK are provided When KMASK is greater than 0, radially increasing streak lengths are provided, with the Andrews et al (1987) formulation being set for KMASK = 1.0 and CMASK = eta x cf. BMASK Full tangential width of streaks (in mm) BORDER Width of bg border round ellipse (in rasters) 5) MIN MAX THETA ** only include of IBINV set to 1 ** MIN This is the minimum streak length in mm MAX This is the maximum streak length in mm THETA This is the angle in degrees (anticlockwise from +xf) at which the maximum streak length occurs. When this option is used, the streak parameters are also used. 6) PACKNO Film pack number as specified in .ge1 file 7) PACKID (Film only) Film number (A,B,C,D,E,F) Upper or lower case 8) NUMDOD1, NUMNOD2 Numbers of nodals to include in Inner, Outer Refinements. NUMDOD1 Nodals will be keyed for inclusion in the refinement SEARCH according to multiplicity. Starting at the highest multiplicity and decreasing, multiplicities will be keyed for inclusion until at least NUMNOD1 have been included. Whether or not they are actually used depends on their intensity as defined by INMIN on card 11. This relates to inner refinement, defined by INREF, and there is a maximum of 60 spots. NUMNOD2 As for NUMNOD1 but for outer ref (or only ref as specified by INREF). While 1000 is probably a good number it may need to be adjusted to give a good number of spots (up to 256 including the best 20 from the inner ref if that has been done) which are selected on intensity by OUTMIN and OUTADD on card 12. 9) XSIZE, YSIZE, CORNER, XBG, YBG (** FORMATTED 5I5 **) Raster parameters defining the spot box. These should be set carefully. It is important that there are enough points in the background relative to the number of points in the peak. It is also important that, for Profile Fitting, the peak is not too squashed in but not too loose! Look at the standard profiles to judge this, and at the inner ref average spot if you have done INREF. In the printed box, BG points are preceded by -, ignored points by * and peak by . For ELLIPTICAL masking (card 4) ensure that XSIZE and YSIZE will accomodate the largest generated ellipse including the border! XSIZE Box size (rasters) in X including BG (XBG rasters) YSIZE Box size (rasters) in Y including BG (YBG rasters) CORNER Box Corner Cut off. Count in this number of rasters from corner of box and treat as background. XBG Background frame size in X. This number of rasters each side of the box, included in total XSIZE, will be used for the background plane. There are difficulties setting this to zero.. YBG Background frame size in Y. This number of rasters each side of the box, included in total YSIZE, will be used for the background plane. There are difficulties setting this to zero.. 10) FILMFILE The location and name of scanned image to be processed 11) XFID1, YFID1 ** omit this card for image plates ** Note that the information will not actually be used if: a) the film in question has been refined in the GENLAUE run that produced the GE file input here. BE CAREFUL - GENLAUE does not yet treat lower film refinement properly. and or b) the GE file in use was that used for a previous run of INTLAUE and outer refinement was completed. Location in film image (in rasters) of first fiducial. Note that the Fiducial search box size is set in laueflm.dat or .gen file (see note below) *** If these positions ARE input they now default to those in the .gen file, which take precedence even if you put values here. The program realises which orientation the film was scanned in from these numbers (ie it works for both old and new cassette orientations.) This 'card' will be removed asap XFID1 X position from file start of fiducial 1 (rasters) YFID1 Y position from file start of fiducial 1 (rasters) 12) INMIN (ONLY INCLUDE IF INREF SET TO 1) INMIN Threshold intensity for including spots in inner refinement. Of those selected from the list set-up by NUMNOD1, only those with an intensity greater than INMIN will be used, up to a maximum of 60 spots. Program will try and even up left and right of film. If you are using the inner ref (set INREF) then try and set this to select just under 60 thus ensuring use of the strongest spots. Weak films may require the use of a smaller number to prevent poor refinement. The best 20 are carried through to the outer ref. 13) OUTMIN, OUTADD Threshold intensity and increment for selecting spots in the outer refinement. OUTMIN Threshold intensity at film edge OUTADD Intensity increment The film will be divided into NSTRIP vertical stripes (8,10,12.. depending on how many are in the search list as defined by NUMNOD2 ). The threshold intensities in each stripe will then be Outmin,Outmin+outadd,Outmin+Outadd+Outadd.....,Out-min ie Outmin at the edges, Outmin+((NSTRIP/2)-1)*Outadd in the two central stripes. Try and set these numbers to get a good number of spots in each stripe, bearing in mind that the toal over all bins is 256 (less 20 if INREF is set) with an equal number in each. setting OUTMIN too low will result in weak spots being picked up at the edges, and setting OUTADD too low will give weak spots at the centre. Try and adjust to give just below the maximum in each bin, unless the film is weak when a smaller number (ie strong only) should be selected. To get a constant threshold across the film input this threshold OUTMIN as -ve with OUTADD = 0 (e.g. -1.0) 14) NEXT_MOVE (NEXT,END ,STOP) (** A4 **) For Laue processing the END option is not useful as it suggests that the current .ge1 file has more film packs. NEXT proceed to next lower film in the pack MUST BE FOLLOWED BY CARDS: 10 (film file name) 11 (Fid 1) (Film only) 12 if INREF=1 and LOWER_AS_A=0 13 if LOWER_AS_A=0 Repeat cards 14,9,(11),(12),(13) for each lower film STOP End of this run EXAMPLES *** EXAMPLE DATA INPUT *** IP, molecular dynamics, rad+binv, outref, deconv 5330 ! ge file 0 0 0 1 0 0 1 1 1 2 1 ! on:profiles,deconv,streak,binv,ip2,out_ref 17,0.033,1.2,5.2,1000,64000,200 ! numbin,deconv_params,ipromin,ipromax 2.5,200.,0.0,1.0,2.0 ! radial mask (a,cf,K,b,border) 2.5,1.0,70.0 ! variable binning (max,min,theta) 30 ! pack id 60,400 ! num nodals in 'refinement' 31 31 13 4 4 ns5330.img 3,2 ! outer thresh (even if out_ref off) STOP *** EXAMPLE DATA INPUT *** film, rad+binv, noref, deconv 5330 ! ge file 0 0 0 1 0 0 1 1 1 0 0 ! on: profiles,deconv,streak,binv,film 17,0.033,1.2,5.2,1000,64000,200 ! numbin,deconv_params,ipromin,ipromax 2.5,200.,0.0,1.0,2.0 ! radial mask (a,cf,K,b,border) 2.5,1.0,70.0 ! variable binning (max,min,theta) 30 ! pack id A ! film letter 300,1000 ! num nodals in 'refinement' 31 31 13 4 4 ns5330.img 3,2 ! outer thresh (even though out_ref off) STOP FLOWCHART INTLAUE FLOW DIAGRAM START | Input files .ge1, .ge2, .gen digitised film image file | | - - - - - - - | | | | | 'Inner' refinement of parameters | | | - -<- - - - - | |<----------------------------------- | | - - - - - - - | | | | | | | 'Outer' refinement of parameters | | | | | - -<- - - - - | | | | Write improved parameters to .ge1, .ge2 files | | | Collect density | | | Form profiles - A film only, normally | | | Fit profiles, write intensities to .ge1, .ge2 files | | | Output summary, statistics | | | Any more films in pack? -----[YES]-------------- (end with F) | [NO] | END - - - - Interactive use only, not batch