Personal tools
You are here: Home documentation MRC Software MRC Headers ttboxk
Document Actions

ttboxk

by Admin last modified 2008-10-30 08:21

prints out amplitudes & phases in N * N boxes from a Fourier transform, fully corrected for contrast transfer function in tilted image.

C*******************************************************************************
C
C TTBOXK : prints out amplitudes & phases in N * N boxes from a 
C          Fourier transform, fully corrected for contrast transfer function
C          in tilted image.
C
C          Version  1.01    9 Dec 1985  RH
C                   1.02   14 Feb 1986  RH  SEGMNT option.
C                   1.03   18 Nov 1987  JMB Rectangular images
C                   1.04   12 Jul 1988  RH  Newstyle plot output & IQ=9 added.
C                   1.05   10 Sep 1988  RH  Increase TITLE to 68 bytes.
C                   1.06    2 Jan 1989  RH  ICTFBXMAX upped to 120,NMAX to 2000.
C                   1.07   24 Jan 1989  RH  IQ=8 now plotted as a small dot.
C                   2.00    3 Jan 1992  RH  Convert to UNIX for Alliant
C                   2.01    6 Oct 1992  RH  Extra column on output - dummy
C                   2.02   21 Mar 1993  RH  minor bug pi=3.1415926
C                   3.00   24 Sep 1999  RH  changed background definition -> TTBOXA
C                   4.00   28 Aug 2000  RH  convert to plot2000 (postscript O/P)
C                   4.01   13 Jun 2001  TSH P2K_FONT needed string terminator
C                   4.02   29 Oct 2001  RH  change filenames to CHARACTER*80
C                   5.00   30 Oct 2005  HS  2dx
C
C  The change to TTBOXA on 24.9.99 was made to eliminate the effect that has
C  been observed by those who have been applying a rather tight box to the
C  image area (to select the best regions), which is that the number of "good"
C  spots tends to increase as the area boxed decreases, but in a way which does
C  not indicate better data (e.g. high IQ spots occur at ridiculously high
C  resolution).  This was due to a different algorithm being used for peak and
C  background in the calculation of the IQ value of the spots, such that when
C  adjacent pixels in the transform are correlated, as occurs with images
C  containing only a small boxed area, the ratio of peak to background increases
C  slightly giving an appearance of improvement where none actually occurs.
C  This has been corrected from version 3.00 onwards by changing the background
C  calculation so that it uses the same algorithm as the peak.  The change has
C  a very small effect on unboxed transforms but effectively eliminates the
C  spurious spots on heavily boxed images with IQ values of 3 or even 2 where
C  there is in reality only noise.  An additional fudge-factor of 1.10 has been
C  applied in the subroutine GET_RMSBK to make the signal-to noise ratio of
C  spots with the same IQ-value identical to that used in earlier versions of
C  TTBOX on full-size unboxed images.
C
C
C     DATACARDS ----------------------------------------------
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  4a.  LISTPTS   (A)
C  4b.  PLOTPTS   (A)
C
C  5.   ISIZEX,ISIZEY,DSTEP,XMAG,CS,KVOLT   (*)
C
C  6.   DFMID1,DFMID2,ANGAST,TLTAXIS,TLTANGL   (*)
C
C  7.   IOUT,NUMSPOT, NOH, NOK, NHOR, NVERT  (*)
C
C  8.   FILOUT only if IOUT.NE.0 -- full name of output file, formatted data.
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     ISER        serial number for run to be printed & output on IOUT.
C     TITLE       title to be printed & output on unit IOUT.
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     LISTPTS     if YES list spots whose amps and phases will be output.
C     PLOTPTS     if YES plot spots with IQ<8 using symbol size propnl to 8-IQ
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     IOUT        output unit number for serial number and title, followed by
C                  IH,IK,A,P,IQ terminated with IH=100.
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

eXTReMe Tracker