mmlatref
Refinement of lattice parameters for maximum amplitude.
C MMLATREF : Refinement of lattice parameters for maximum amplitude. C First created from MMBOX -- 16.12.86 RH C Last modified -- 24.12.86 RH C C Incorporates several aspects in the refinement C 1. Maximises sum of sinc-fitted intensities. C 2. Uses weighted coefficients -- 1/(rmsbk**2+ampsinc**2) C this should maximise the number of spots with IQ>=7 C 3. Matrix diagonal has constant added to it to stabilise refinement when C transform is very strong and clean --- this may mean that shifts C greater than 1.0 will be needed if the data is very noisy. C (eg. at high resolution) C 4. Summary table printed out at end to judge progress. C 5. May be mainly good for getting just a little extra after UNBENDING. C 6. Present sinc fit is just over 2x2 box around spot centre ... this is C thought to be insignificantly different from any bigger box. C C NNBOX prints out amplitudes & phases in N * N boxes from a C Fourier transform C C DATA: C C FILIN C C ISER,TITLE (I10,15A4) C C GU (A) C C GENGRID(A) C C GENPTS (A) C C IPIXEL, IOUT,NUMSPOT, NOH, NOK, NHOR, NVERT (*) C C FILOUT only if IOUT.NE.0 C C RINNER, ROUTER, XORIG, YORIG (*) C C NCYCLES, FSHIFT, ILIST (*) C C if GENGRID : C C AX, AY, BX, BY (*) C C if .not. GENGRID : C C IH(I), IK(I), X(I), Y(I) (*) C C C ISER serial number for run to be printed & output on IOUT. C TITLE title to be printed & output on unit IOUT. C GU if YES work in grid units, otherwise in mm. C GENGRID if YES generate grid from lattice points (1,0) & (0,1) C GENPTS if YES individual spots requested & generated from grid C IPIXEL pixel size only used if .not.GU C IOUT output unit number for serial number and title, then C IH,IK,A,P,IQ terminated with IH=100. C NUMSPOT number of spots to be printed, if 0 defaults to 20. C NOH, NOK number of orders of spots in H & K direcions C NHOR, NVERT box size in mm or grid units in horizontal & C vertical directions, C i.e. X & Y resp. ( up to 20 grid units in each C direction). C RINNER, ROUTER inner & outer radius in mm or grid units within C which spots (centre of box) must fall C XORIG, YORIG X & Y phase origin shifts to be added to those C added to those read in on the transform C NCYCLES number cycles of lattice parameter refinement to do. C FSHIFT fractional shifts to be applied in lat. param. refn. C ILIST if 0, abbreviated listing, if 1 full listing printed. C AX,AY,BX,BY coordinates in mm or grid units of 1,0 & 0,1 spots C respectively C IH, IK indices of individual spot C X, Y coordinates of individual spot. C C**************************************************************************** C