ttboxref
Refines lattice parameters in image transform of tilted specimen
C******************************************************************************* C C TTBOXREF : Refines lattice parameters in image transform of tilted specimen. C first created from TTBOX - 15 November 1990 C last modified - see versions below. C C Version 2.00 15 Nov 1990 RH Original changes from TTBOX/MMLATREF C Version 2.01 17 Nov 1990 RH Extra format changes, annotation. C C Incorporates several aspects in the refinement - similar to MMLATREF 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 Previous TTBOX versions 1.01 9 Dec 1985 RH C from which this program 1.02 14 Feb 1986 RH SEGMNT option. C was created. 1.03 18 Nov 1987 JMB Rectangular images C 1.04 12 Jul 1988 RH C 1.05 10 Sep 1988 RH Increase TITLE to 68 bytes. C 1.06 2 Jan 1989 RH ICTFBXMAX upped to 120, etc C 1.07 24 Jan 1989 RH IQ=8 plotted as small dot. C C DATACARDS ---------------------------------------------- C C 0. NCYCLES,FSHIFT (*) C C 1. FILIN -- full name of input file (.FFT) C C 2. ISER,TITLE (I10,17A4) C C 3. GENGRID (A) C C 4. GENPTS (A) C C 5. ISIZEX,ISIZEY,DSTEP,XMAG,CS,KVOLT (*) C C 6. DFMID1,DFMID2,ANGAST,TLTAXIS,TLTANGL (*) C C 7. NUMSPOT, NOH, NOK, NHOR, NVERT (*) C C 9 RESMIN, RESMAX, XORIG, YORIG, SEGMNT (*) C C 10. if GENGRID or GENPTS : AX, AY, BX, BY (*) C C 11. if GENPTS : IH(I), IK(I) (*) C if .not.GENGRID and .not.GENPTS : IH(I), IK(I), X(I), Y(I) (*) C C C NCYCLES number of cycles of lattice parameter refinement. C FSHIFT fractional shift to be applied at end of each cycle. C ISER serial number for run C TITLE title to be printed C GENGRID if YES generate grid from lattice points (1,0) & (0,1). C GENPTS if YES individual spots requested & generated from grid C if NO all spots within RESMIN to RESMAX generated. C ISIZEX,Y size of image in x and y, checked against file-header. C DSTEP densitometer stepsize in microns. C XMAG magnification of micrograph. C CS spherical aberration coefficient in mm. C KVOLT microscope voltage in KV, used to calculate wavelength. C DFMID1 defocus in one direction (underfocus +ve) C DFMID2 defocus at 90-degs to above C ANGAST direction for DFMID1 in degrees relative to x,y in transform. C TLTAXIS direction of tiltaxis in degrees relative to x,y in transform, C should be between -90 and +90 degrees. C TLTANGL magnitude of tiltangle. C (+ve for less underfocus at start of scan(y=0)). C if tiltaxis is precisely parallel to y, then TLTANGL C should be positive for less underfocus at x=0. C NUMSPOT number of spots to be printed. C NOH, NOK number of orders of spots in H & K directions to be generated. C NHOR, NVERT box size in grid units in horizontal & vertical directions, C i.e. X & Y resp. ( up to 20 grid units in each C direction). C RESMIN, RESMAX inner & outer resolution limits in Angstroms within which C 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 SEGMNT segment of reciprocal space within which spots C must fall to be include in this run. +/- 90 C includes all spots, +45 is half data near tiltaxis C -45 is half perpendicular to tilt axis. C AX,AY,BX,BY coordinates in grid units of 1,0 & 0,1 spots C respectively. C IH, IK indices of individual spots required. C X, Y coordinates of individual spots required. C C******************************************************************************* C