SP - Find info on diffraction pattern spots

(9/25/06)

PURPOSE

Finds the intensities at all the points of a lattice or at a single point or finds the center and radius of a ring, e.g. of spots from a powder diffraction pattern.

USAGE

.OPERATION: SP

.OPTION L/S/R:
[Enter 'L' to find the lattice parameters and the intensities of all the spots in a lattice,
'S' to find the intensities of one or more spots one-at-a-time, or
'R' to find the radius and center of a ring, e.g. for a powder pattern.
Entering a character other than 'L', 'S' or 'R' ends the operation.]

.SIZE FACTOR: 4
[Enter the reduction factor used to create the reflection document file in WEB (see Note 2). Entering a value of 0 ends the operation.]

.INPUT: LAT001
[Enter the name of the image file with the spots to be measured.]

.REFLECTION LIST: WIN001
[Enter the name of a document file to be used for selecting the spot(s) to be measured.]

.FIRST KEY FOR REFL LIST (0 TO RETURN): 3
[Enter the key corresponding to the index of the first spot you want to measure--it is helpful to have a printed output of the window file.]

.MODE: MAX(1)/CNTR OF DEN(2)//NO BK CORR(-): 2
[Choose the method used to determine the intensities. Either the position of the maximum value or the center of gravity within the window is used to calculate the subsequent window positions. If MODE > 0, a linear background subtraction is performed before the calculations; if MODE < 0, no background is subtracted.]

.WINDOW SIZE(ODD #): 25,35
[Enter two numbers (odd works best, but is not necessary) for the size of the window you wish to use. If the second number is 0, it is reset equal to the first, i.e. a square window. The intensity is calculated for the mode and window size chosen; then you are prompted for a new window size. To find the intensity of another reflection, enter '0' as the first number.]

NEXT KEY FOR REFL LIST (0 TO RETURN): 5 [Enter the next key number. Continue in this fashion until you have measured all the spots you want at each of the window sizes you want; then enter '0' to return.]

.SIZE FACTOR: 4
[Enter the reduction factor used to create the reflection document file in WEB (see Note 2). Entering a value of '0' ends the operation.]

.INPUT: LAT001
[Enter the name of the image file with the spots to be measured.]

.DO YOU WANT A WINDOW POSITION DOCUMENT? (Y/N): Y
[If you want to examine windows around one or more of the measured spots, enter 'Y'. If you will want to use the 'S' option to measure the intensities of individual spots, enter 'Y'.]

.DO YOU WANT A PATTERSON FUNCTION DOCUMENT? (Y/N): Y
[If you want to list the intensities for H and K less than or equal to 16, answer 'Y'. A procedure has been written to produce a 33-by-33 image from such a document. The operation 'PW' can then be used to produce a Patterson function.]

.WINDOW SIZE: 41,41
[Enter NX,NY for the width and height of windows within which the intensities will be measured. If one number is entered, the window will be NX by NY. If no numbers are entered, or if the first number entered is 0, you are returned to ".OPERATION:".]

.MODE: MAX(1)/CNTR OF DEN(2)//NO BK CORR(-): 2
[Choose the method used to determine the lattice vectors and the intensities. Either the position of the maximum value or the center of gravity within the window is used to calculate the lattice parameters. If MODE > 0, a linear background subtraction is performed before the calculations; if MODE < 0, no background is subtracted.]

.REFLECTION DOC.: RFL001
[Enter the name of the document file in which you have stored the indices and positions of three reflections to be used to calculate the lattice parameters.]

.MAX RADIUS,MIN RADIUS: 1500,50
[Enter the largest distance from the lattice center to which you want to extend the measurement and the closest such distance. If the first value entered is less than the second, the message 'MAX RADIUS LESS THAN MIN RADIUS; TRY AGAIN!' appears, and you must re-enter the two values.]

.REFLN. INDEX FOR REL. INT.: 8,4
[Enter the H- and K-indices of a spot which will be divided into the measured intensities to give relative values.]

.DOCUMENT FILE: WIN001
[If you answered Y to the window position query, enter the name of the document file in which you want to store the information about the positions and sizes of the windows used to determine the lattice and measure the intensities. At the conclusion of the operation, the total number of window positions listed will be put into register X34.]

.DOCUMENT FILE: PAT001
[If you answered 'Y' to the Patterson function document query, enter the name of the document file in which you want to store the intensity data for producing the image for which PW will give the Patterson function.]

.NUMBER OF SPOTS (3<M<21): 5
[Enter the number of spots to be used in calculating the center and radius of the ring.]

SPOT DOCUMENT: RFL001 [Enter the name of the document file in which you have stored the indices and positions of reflections to be used to calculate the center and radius of the ring. This document file must be in the same format as that produced by the REFLECTION command in the program WEB: a heading record and three records with the key (integer), 5, key (floating), H-index, K-index, SAM position, ROW position (all floating).]

This option makes one calculation and then exits the operation.

NOTES

  1. The reflection and spot document files must be in the same format as that produced by the REFLECTION command in the program WEB: a heading record and three records with the key (integer), 5, key (floating), H-index, K-index, X-position, Y-position (all floating).

  2. The reflection list format must be the same as that of the window document produced by the 'L' option: a heading record and document records with a key (integer), 6, H-index, K-index, X-position, Y-position and NX and NY window sizes (all floating). N.b. the window positions are the upper left coordinates of a window centered on the H,K spot.

  3. The reflection list document file is searched sequentially, so you will encounter an error if the keys are not entered in ascending order.

  4. If fewer than three spots are to be used in option 'R', you are returned to ".OPERATION:"; if there are three spots, the appropriate equations are solved exactly; if there are more than three and fewer than twenty spots, a circle is least-squares-fitted to the coordinates of the spots; and if there are more than twenty spots, only the first twenty are used.

  5. This operation has not been used here in years. If you have problems please contact us.

SUBROUTINES

LATICE, SOLVE, SPOTWT, PLNEDG, SINGLE, WFTCIRC

CALLER

DIFF1O