![]()
|
|
|
|||
|
|
|
|||
|
|
|
|||
|
Electronic reprints Copyright © International Union of Crystallography |
|
|
||
|
|
Introduction |
GNOM is an indirect transform program for
small-angle scattering data processing. It reads in one-dimensional scattering
curves (possibly smeared with instrumental distortions) and evaluates the
particle distance distribution function p(r) (for monodisperse systems) or the
size distribution function D(R) (for polydisperse systems). The main equations
relating the scattering intensity to the distribution functions and describing
the smearing effects can be found in the text-books (e.g. [1]). GNOM is similar
to the programs of Glatter [2], Moore [3] and Provencher [4]. There are,
however, some features, which make GNOM more convenient in application. GNOM is
a dialogue program; the user instructions presented here explain how to answer
the questions properly. The versions E4.0 and higher make use of the
"configuration file", where some or all parameters can be
pre-defined; this allows to work with GNOM in different modes, ranging from
fully interactive to batch mode. The names of the parameters in the following
description refer to the configuration file names. The algorithms used in the
program are described elsewhere [5-7]. They are based on Tikhonov's
regularisation technique [8]; several subroutines published in [9] are modified
and used in GNOM. The value of the regularisation parameter is estimated by the
program automatically using perceptual criteria [10].
table
![]()
|
|
What is new in version 4.5 |
Version 4.5 is
Linux-compatible, and Linux executable will be distributed along with the Wintel,
SGI and Alpha DEC versions.
The Linux versions requires Gnuplot for graphics. MacOS X version is also
available (Gnuplot graphics).
Minor bug in data reading
corrected (NSKIP2=1 caused failure)
![]()
|
|
What is new in version 4.4 |
Version 4.4 for Wintel
platform ( Win95/98 or WinNT) does not require Gnuplot. Instead of the
directory c:\gnom the program searches for the configuration file in the
directory C:\ATSAS directory ATSAS (stands for "All That SAS") will
contain also other programs from the EMBL program suite. It is recommended to
copy the Gnom executable to c:\ATSAS and make a shortcut to it. The program
will run from the desktop and includes file chooser to select the working
directory and input file. The last working directory is saved onto a file c:\ATSAS\gnom.ini
so that this directory will be default when the program is started again. A
classic command-line style Gnom 4.4 version for Wintel using Gnuplot is also
available.
The Unix version runs from a command line using Gnuplot as before. It is, however, recommended to make the GNOM evvironment variable pointing to $HOME/ATSAS/ and to copy the gnom.cfg file into it. This directory will contain all the EMBL program suite modules for UNIX in future.
The version 4.4 will
properly read input data files where the numbers are separated by TABs, and it
also sorts the input data within the run in ascending order of the scattering
vector (acknowledgment to V.Volkov).
![]()
|
|
What is new in version 4.3 |
Version 4.3 WILL NOT run
under DOS or Win3.x on IBM PC, it requires Win95/98 or WinNT.
Version 4.3 is a double
precision version.
Maximum numbers of :
|
|
: |
2048 |
|
|
: |
512 |
|
|
: |
101 |
Version 4.3 searches for the
input of the data stream in a smarter way. When reading in the input data, GNOM
searches for THREE valid lines containing increasing s and positive I(s). Due
to this, GNOM is able to read e.g. files in sasCIF format or those in the ILL
or LOQ format without editing.
It is possible to omit data
points at the beginning and the end of the input file(s).
The angular scale can
optionally be reduced to units of 4*pi*sin(theta)/lambda [Angstrom-1].
An option AH (or LH ) < 0
is added to emulate the case of infinite slit collimation (e.g. Kratky camera
geometry)
Both IBM-PC and UNIX
versions of GNOM4.3 now use the GNUPLOT graphics and support several printer
formats for hardcopy output.
![]()
|
|
Structure of the input file |
The input file (parameter INPUT1) is a sequential ASCII file containing the experimental
data. The first line is always treated as a problem title (comment). The
program searches for the first data line. Valid data line should contain the
momentum transfer, a non-zero intensity and, optionally, the standard deviation
on the intensity in a free format (that is, separated by blanks or commas).
After this all valid lines are treated as data. Invalid line or end-of-file are
considered as the end of the input stream. The maximum number of data points is
2048.
This data input is flexible, allowing to skip additional headers and to use the
data with or without the standard deviations. However, long files will take
some time to read (especially on VAX'es).
Modern devices allow to measure lots of data points with a small angular step.
This is not always advantageous, and may even become harmful when using
indirect methods, because all angular point give rise to separate equations,
which are, in fact, linearly dependent. Note that the angular step Delta(s) =
Dsamp / 6, where Dsamp=p/Dmax is the
sampling distance, that is claimed to be optimal. To optimise the performance,
GNOM joins neighbouring data points when it finds the number of points to be
unreasonably high.
The program can handle simultaneously two data sets corresponding to the same
sample but recorded with different conditions (see below). The second input
file (parameter INPUT2) should have the same structure. Default answer to the
question 'Input file name, second run' is NO second run.
, that the momentum transfer
is assumed to be
s = 4 p sinq / (average wavelength), where q is a half of the scattering angle.
Example
of the input file :
|
PROBLEM #13 |
|||
|
This line is skipped because of error, the next because of zero intensity : |
|||
|
0.0001 |
0.0 |
17.1 |
|
|
This is again skipped: |
|||
|
The next is the first valid data line: |
|||
|
0.05564 , |
1.2323e10 |
111111111. |
|
|
0.05574 |
1.1323e10 |
|
|
|
0.05584 |
18303353, |
1e10 , |
This is text which does not change anything! |
|
1.e-1 |
1.0323e10, |
8E8 |
It is just not read. |
|
0.07 |
0.0 |
17.1 |
|
|
The previous line indicates the end of the data set |
|||
![]()
|
|
Output files |
This is a sequential disk file where all the
information from GNOM will be printed in ASCII form (parameter OUTPUT, default
file name is gnom.out)
table
![]()
|
|
Standard deviations |
If some standard deviations (or all of them)
are not specified, negative or equal to zero, the user will be prompted for
their estimation (parameter DEVIAT). A positive number means constant relative
deviation per point. If the user enters zero (default answer), the program will
estimate the errors automatically with the help of a polynomial smoothing
procedure.
Example :
3 means that for each point with a non-positive standard deviation a relative
deviation 0.03*I is assumed, where I is the intensity in this point
table
![]()
|
|
Integral kernel and job type |
The program searches for a distribution function in real space
(characteristic function for monodisperse systems or size distribution function
for polydisperse systems). These functions are related to the experimental
intensity by corresponding Fourier transformations followed by some
convolutions representing smearing effects (if the latter exist). The integral
equation is represented as a linear system and solved with respect to the
distribution function. The matrix of the system is called "design
matrix". To evaluate it, the user must specify several parameters:
JOBTYP :
|
0 - |
Calculation of distance distribution function for a
monodisperse system (default job). |
|
1 - |
Calculation of volume distribution function D(R)=(4*p/3)*R3 N(R) for a polydisperse system of solid spheres (R is the sphere radius, N(R) relative number of particles with this radius in the system) |
|
2 - |
Calculation of size distribution function of particles with the user-supplied form factor (parameter FORFAC). In this case the form factor of particles should be supplied in a separate file. The first line of this file should contain three values in free format: NFORM - number of points in the
form factor NDIM=1 long particles, DELSR - increment in s*R units (s scattering vector, R characteristic particle size). The values of the form factor should be given in the points 0., DELSR, 2DELSR,... ...(NFORM-1)*DELSR. This should be followed by the form factor values (NFORM
values in 8E10.3 format, NFORM <2500) |
|
3 - |
Calculation of the distance distribution function of thickness assuming a monodisperse system of flat particles. The function p(r) = gammat(r) is evaluated, where gammat(r) is the characteristic function of the thickness. In this case the experimental intensity as well the errors are multiplied by s**2 which corresponds to the thickness scattering factor. |
|
4 - |
Calculation of the distance distribution function of the cross-section assuming a monodisperse system of rod-like particles. The function p(r) = gammac(r)*r is evaluated, where gammac(r) is the characteristic function of the cross section. In this case the experimental intensity as well as the errors are multiplied by s, which corresponds to the cross-section scattering factor. |
|
5 - |
Calculation of the length distribution function p(r) for a polydisperse system of long cylinders p(r) = H N(H), where H is the length of the cylinder, N(H) number of rods of the lengths H. the radius of the cylinder is assumed to be constant (see parameter RAD56 below). |
|
6 - |
Calculation of the surface distribution function p(r) for a polydisperse system of spherical shells p(r) = 4*pi*R**2*N(R), where R is the outer radius of the shell, N(R) number of shells with outer radius R. The shells are assumed to have the same relative thickness (see parameter RAD56 below). |
RMIN
(for JOB=1,2,5,6), RMAX
|
Maximum diameter of the particle |
(for JOB=0) |
|
Minimum and maximum radii of spheres |
(for JOB=1) |
|
Minimum and maximum characteristic particle sizes |
(for JOB=2) |
|
Maximum diameter of the particle thickness |
(for JOB=3) |
|
Maximum diameter of the particle cross-section |
(for JOB=4) |
|
Minimum and maximum heights of cylinders |
(for JOB=5) |
|
Minimum and maximum outer radii of shells |
(for JOB=6) |
|
- define the interval in real space, where the distribution function is assumed to be non-zero |
|
For JOB=5 or 6 , the
parameter RAD56 is to be specified:
|
JOB=5 : |
RAD56 means the radius of a cylinder (RAD56=0 means infinitely thin rods) |
|
JOB=6 : |
RAD56 means the relative thickness of a shell (its inner radius is RAD56*(outer radius). RAD56=0 means infinitely thin shells. |
Number of real space
points (parameter NREAL)
- number of points, in which the distribution function will be specified (less than 72). The default number of NR is evaluated by GNOM in order to have reasonable ratio between the number of data points and the number of parameters to be found.
Boundary conditions
(parameters LZRMIN, LZRMAX)
- it is possible to fix the values of the distribution function to zero at the ends of the interval by answering "Yes".
Kernel-storage file name
(parameter KERNEL)
- name of the file, where the design matrix is saved
![]()
|
|
Experimental conditions |
Type of experimental
set-up (parameter IDET)
The user must define the experimental conditions.
IDET=0 : no smearing,
IDET=1 : 1D-detector (slit geometry with rectangular slits is assumed),
IDET=2 : 2D-detector (the data is obtained by a circular average).
Wavelength smearing
Parameters FWHM1 and FWHM2, (valid for IDET=1 or 2) are the
Full-Width-at-Half-Maximum of the wavelength distribution function for the
first (second) data set. FWHM=0 means monochromatic radiation. If IDET=2
(2D-detector), a possibility of submitting an arbitrary wavelength profile is
foreseen. To this end, one should specify FWHM=0, and the program will try to
read the wavelength profile from the beam profile file (SPOT1 and/or SPOT2),
assuming that it follows the beam profile. If the wavelength profile is not
present monochromatic radiation is assumed.
Beam divergence in
the 1D-case (parameters AH1, AH2, AW1, AW2, LH1, LH2, LW1, LW2, valid for
IDET=2 )
In the linear case, a rectangular slit geometry is assumed, with slit-height
parameters AH - projection of the beam height in the detector plane, and AL -
height of the detector slit, and similar slit-width parameters AW and LW.
Therefore, the beam profile is assumed to be trapezoidal.

both in the direction
perpendicular and parallel to the alignment of the detector. In the former case
(slit-height effect) A=AH, L=LH; in the latter case (slit-width effect) A=AW,
L=LW. The units of AH, LH, AW, LW must be the same as for the momentum
transfer.
Beam profile files
(parameters SPOT1 and SPOT2, valid for IDET=2)
To describe the beam divergence in the 2D-case the user should specify the file
containing the "spot function", i.e. distribution of the primary beam
intensity in the 2D-detector plane (without sample), measured with the given
geometry. The function is assumed to be a square matrix, stored in a separate
file.
The file structure:
|
1st line : |
NB - number of rows (and columns) in the beam profile; |
|
2nd-(NB+1)th lines : |
each containing NB numbers, separated by blanks or commas - beam profile. |
The beam profile is used to evaluate the smearing due to
beam divergence assuming that the curve is obtained by a circular average.
Circularly averaged and normalised profile is used to this end. Additional
smearing due to the radial average of the 2D-data is assumed to be one unit in
the detector profile.
If FWHM = 0 (see above), an arbitrary wavelength profile can be specified after
the beam profile in the following way:
|
(NB+2)nd line : |
comment |
|
(NB+3)rd line : |
NW - number of points in the wavelength profile; |
|
(NB+4)th etc : |
Wavelength profile (NW values in arbitrary format). |
If FWHM = 0 and the wavelength profile is not submitted (or
improperly specified), no wavelength smearing is included.
Example :
|
7 |
1.5 |
Beam profile: Detector step=1.5*Delta(s) in the input file |
|||||
|
0. |
1. |
4. |
5. |
4. |
1. |
0. |
|
|
1. |
45. |
143. |
211. |
143. |
45. |
1. |
|
|
4. |
143. |
460. |
678. |
460. |
143. |
4. |
|
|
5. |
211. |
678. |
1000. |
678. |
211. |
5. |
|
|
4. |
143. |
460. |
678. |
460. |
143. |
4. |
|
|
1. |
45. |
143. |
211. |
143. |
45. |
1. |
|
|
0. |
1. |
4. |
5. |
4. |
1. |
0. |
|
|
Wavelength profile (will be read in if FWHM=0 has been specified) |
|||||||
|
27, |
4.59, |
0.01106 |
|
||||
|
0.00, |
30.36, |
68.16, |
175.4, |
236.1, |
240.3, |
200.3, |
174.7, |
|
139.2, |
113.9, |
112.4, |
115.9, |
109.3, |
87.42, |
65.51, |
76.43, |
|
116.7, |
125.7, |
128.0, |
106.9, |
80.50, |
62.44, |
48.11, |
49.16, |
|
43.41, |
28.76, |
0. |
|
|
|
|
|
If instrumental distortions
(especially all of them) are present, the evaluation of the design matrix may
become a time-consuming procedure. When making successive computations with the
same experimental conditions and real space limitations, one can use the same
integral kernel, if it has been already calculated. For this, one should answer
'Y' when prompted 'Is the kernel already evaluated [N]?' (parameter LKERN), and
enter after it the kernel-storage file name.
The program can handle simultaneously two runs recorded at different (or the
same) experimental conditions. The user should then supply two separate experimental
data files (first - with lower s range; however, the ranges may overlap) and
specify explicitly two sets of experimental conditions. The scale factor for
the second run (parameter COEF) is automatically evaluated by the program [7].
table
![]()
|
|
regularisation parameter |
The main question, when solving ill-posed problems is how to stabilise the
solution properly (here: how to find a positive regularisation parameter ALPHA,
which demands smoothness of the solution). A larger ALPHA emphasises the
smoothness of the distribution function and reduces the importance of the fit
to the experimental data.
This search was done in the earlier GNOM versions by the generalised
discrepancy method [8] using successive calculations with different ALPHA
values. The ALPHA was chosen so as to fulfil the well-known Chi-square
criterion: the sum of deviations of the smeared intensity, corresponding to the
given ALPHA, from the experimental values, weighted with the standard
deviations, should be equal to 1 + AN1. Here the value of AN1 is calculated by
the program and represents the degree of unconformity of the problem (it equals
to zero if NS=NR and increases with the ratio NS/NR). If AN1 is too large (AN1
> 1) warning is printed. This warning, in principle, means that the input
data/parameters are to be checked; however, it does not hinder subsequent
calculations.
In many cases, the discrepancy criterion alone can however not ensure the
correctness of the solution. Standard deviations may not be known or may be
wrong. Another criterion which can also be used is the stability of the
solution with respect to changing ALPHA. It can serve for manual [2], or
automatic [6] search, but sometimes fails as well.
table
![]()
|
|
Perceptual criteria |
In the EN.N versions the computer is instructed to get a plausible solution
basing on several criteria, like smoothness, stability, absence of systematic
deviations, etc. Some of these criteria are fulfilled by increasing ALPHA,
others - by decreasing ALPHA. A compromise is to be found. It is done as
follows.
Each criterion is expressed mathematically. For a given solution one calculates
the value of the criterion and compares with its "ideal" value. All
estimates of the parameters have the form of Gaussians

|
where A(i) - |
Expected ("ideal") value of the criterion |
|
B(i) - |
Its actual value, |
|
s(i) - |
Width of the distribution (FWHM/1.665) |
Values A(i) and s(i)
are specified a priori.
Then the total estimate is calculated as

where W(i) - Weight of the given criterion (also fixed).
Therefore, all P(i) and P are
between 0 and 1. The program searches for a maximum of the total estimate P.
The following criteria are used for estimates:
|
DISCRP |
CHI-square test in reciprocal space (using the specified standard deviations. If they are correct, should be slightly less than 1 (ideal value is taken as 0.7). Increases with ALPHA. |
|
OSCILL |
shows the smoothness of the solution. Evaluated as the ratio ||dp/dr|| / ||p|| related to this ratio for a monomodal sine function. Decreases with ALPHA. Ideal value 1.1 (for a characteristic function of a uniform sphere). Here || || denotes the function norm. |
|
STABIL |
shows the stability of the solution with respect to the change of ALPHA. Calculated as d(ln||p||)/d(ln(ALPHA)) Ideal value 0. |
|
SYSDEV |
indicates the presence of systematic deviations of the restored (smeared) curve Ires(s) from the experimental data Iexp(s). Calculated as N1 / (N/2), where N is the number of experimental points, N1 - number of changing sign of the difference (Iexp - Ires). Ideal value 1. Important parameter (unless you suspect your data has systematic deviations). Increases with ALPHA. |
|
POSITV |
relative norm of the positive part of p(r). Ideal value, of course, 1. |
|
VALCEN |
indicates the validity of the chosen interval in real space (relative norm of the central part of p(r) ). Ideal value tends to 1 (0.95 for a sphere). Much less than 1 if the interval is too wide. |
The user is asked to enter the
value of ALPHA. If this value is already known (e.g., from previous
calculations with similar data), a negative value of ALPHA can be typed and the
solution with -(ALPHA) will be evaluated. A positive ALPHA means automatic
search of ALPHA by maximising the total estimate as described below; no further
manual refinement is possible (this is convenient when using GNOM in the batch
mode). Default case (ALPHA=0) means automatic search accompanied by a graphic
representation (plot lg(ALPHA) vs TOTAL). This plot would help the user to
correct ALPHA manually in the cases where the automatic search breaks down (see
Practical advises).
The search of ALPHA works as follows. First the program finds the theoretical
maximum (Highest) ALPHA value for the given problem [8] (in the graphic
representation the Y-axis is drawn through this value) and then maximises the
total estimate with the given set of A(i), s(i)
and W(i). The default set is
|
Parameter |
DISCRP |
OSCILL |
STABIL |
SYSDEV |
POSITV |
VALCEN |
|
Weight |
1.000 |
3.000 |
3.000 |
3.000 |
1.000 |
1.000 |
|
Sigma |
.300 |
.600 |
.120 |
.120 |
.120 |
.120 |
|
Ideal |
.700 |
1.100 |
.000 |
1.000 |
1.000 |
.950 |
Here the parameters OSCILL,
STABIL and SYSDEV are considered to be most important.
The program evaluates first the grid of the TOTAL values for ALPHA < 1000*Highest
ALPHA (indicated as open circles in the plot). Then a golden section search is
performed to maximize the estimate (characters '+' on the plot).
when OSCILL is too large
while SYSDEV is already reasonable (here: OSCILL>13, SYSDEV>0.5), the
value of TOTAL is put to zero. If a zero value is encountered, the program
stops evaluating the grid, in order to avoid useless computations for too small
ALPHA values.
After the solution is found, the user may either accept it, or change the
weight/width of distribution for any criterion, or try to get a new maximum
estimate, or change the ALPHA manually. When you increase the distribution
width for a given parameter, larger deviations from the expected values are
allowed for this parameter. When you increase the weight of a parameter, it
plays a more significaht role in the estimate, therefore the solution
maximizing the estimate will be shifted to fulfill the corresponding criterion.
The changed set of parameters can be stored onto an ASCII disk file and then
used again for a similar object by entering its name when prompted 'File
containing expert parameters' (parameter EXPERT). In this file user may also
edit all the values (including "ideal" estimations).
The solution can also be plotted on the screen. The intensity plot presents
together the experimental data (astericks), the desmeared (solid) curve and the
corresponding smeared (dotted) curve. Note that for the cases JOB = 3, 4 and 5
the experimental curves are modified. Namely, for JOB=3, I(s) is multiplied by
s**2, for JOB=4 by s, for JOB=5 divided by (2*J1(s*RAD56)/s*RAD56)**2 (the
latter is the cross-section factor of a cylinder, J1(x) Bessel function of the
1-st order). These modified curves are plotted and printed onto the output
file.
The distribution plot shows the resulting correlation or size distribution
function. The radius of gyration and zero angle intensity are also evaluated in
real space using the p(r) function. Note that for the case JOB=2 the values in
real and reciprocal space may not coincide, because I(0) will be evaluated as
the NDIM-th moment of D(R), and Rg as sqrt((NDIM+2)th moment)/2I(0))
table
![]()
|
|
Error estimates |
After the solution is accepted by the user, the errors can be estimated. This
is done via a series of Monte-Carlo simulations. The standard deviations in the
p(r) function as well as in the radius of gyration and zero-angle intensity are
evaluated. The random sequence is initiated by the four-digit value of current
time (min:sec), so that slightly different values of error estimates are
obtained on exactly the same data set (the number of Monte-Carlo generations is
100).
the Monte-Carlo routines were
rewritten for the versions E3.3 and then 4.1 therefore some differences may
also exist between the results of different versions.
table
![]()
|
|
Graphics |
Graphic routines in the program use GKS or GHOST-80 (VMS or UNIX versions),
MS-Fortran 5.1 graphic package (MS-DOS version). The possibility to use the
public domain Gnuplot package also exists for the UNIX version.
GKS graphics
If you use DEC GKS assign your workstation to the logical GKS$CONID and the
workstation type to GKS$WSTYPE. (See HELP GKS)
If you want to use GNOM with other than DEC GKS implementation you have to
specify some or all of the elements of an configuration matrix stored in a
configuration file. The users of a GKS implementation are free to chose LUNs,
CONIDs, and WSTYPEs. Some implementations make a difference between the LUN of
a FORTRAN open statement and the CONID of a GKS open workstation statement.
Empty matrix elements are not used.
|
LUN - |
logical unit number |
|
CONID - |
connection identifier |
|
WSTYPE - |
workstation type |
|
|
LUN |
CONID |
WSTYPE |
|
Error log file |
cfg(1,1) |
- |
- |
|
Workstation independent segment storage |
- |
cfg(2,2) |
cfg(3,2) |
|
Used workstation |
- |
cfg(2,3) |
cfg(3,3) |
|
GKS metafile output workstation |
cfg(1,4) |
cfg(2,4) |
cfg(3,4) |
|
TEKTRONIX 4010/4014 workstation |
- |
- |
cfg(3,5) |
Example for GTS-GRAL GKS on VXDSY.DESY.DE (VT220 with TEKTRONIX emulation).
|
|
LUN |
CONID |
WSTYPE |
|
Error log file |
6 *) |
0 |
0 |
|
Workstation independent segment storage |
0 |
0 |
3 |
|
Used workstation |
0 |
6 *) |
-101 **) |
|
GKS metafile output workstation |
100 |
100 |
4 |
|
TEKTRONIX 4010/4014 workstation |
0 |
0 |
101 |
*) standard FORTRAN output unit
**) or assign -101 to logical GKS$WSTYPE. If you use a TEKTRONIX terminal with
VT220 compatible mode or vice versa the program switches automatically between
both modes by specifying the minus sign.
Assign the configuration file
specification to the logical GO_CONFIGURATION.
Separate the fifteen integers in this file by at least one blank. For example,
the GTS-GRAL GO_CONFIGURATION file is:
6 0 0 0 0 3 0 6 -101 100 100 4 0 0 101
Optionally, the plots can be saved in the device-independent form and then reproduced
on an other terminal or device. To this end, the user should enter a non-blank
file name when prompted "Metafile name [none]:". This metafile has
the default extension .GKSM and can afterwards be processed by the dialogue
GKSM interpreter (file GMI.EXE), which either displays the metafile on the
screen, or prepares device-dependent file with extension .LIS to be printed on
an output device (line printer, laser printer, plotter).
If you use the GKS metafile interpreter with a DEC GKS implementation assign
.FALSE. to the logical GMI_CONFIGURATION otherwise .TRUE.
The low-level graphic calls to GKS and the GKSM-interpreter are written by
O.Kuehnholz (GKSS Research Center, Geesthacht, Germany).
GHOST-80 graphics
It uses the pure Tektronix emulation (linked with T4010 and GRIDPLUS). The
output to the grid file is similar to the metafile output for GKS. The default
extenstion for the grid file is .GRD.
MS-Fortran graphics
CGA, EGA, VGA, Olivetti and Hercules adapters are supported (for the latter case,
one should first run the file MSHERC.COM ). The font file COURB.FON from the
MS-Fortran distribution package is assumed to be either in the working
directory, or in the c:\, or in c:\fortran\lib\ directory. If the file is not
found, no text will appear in graphic mode.
The build-in PrintScreen facility does NOT require preliminary loading of the
DOS GRAPHICS. It supports 9-pin and 24-pin Epson-compatible dot matrix
printers, as well as any HP-compatible printer recognizing HP PCL commands (HP
Laser Jet, Desk Jet, etc ). The use of the screen dump routines is controlled
by the parameter PRINTER (valid printers are EPSON09, EPSON24 and HPPCL). If
your printer is NOT compatible with either Epson or HP, use standard DOS
PrintScreen (then GRAPHICS is necessary).
after PrintScreen, no
command "Eject" is sent. The page must to be ejected manually. This
allows in some cases, e.g. when printing with HP printers on DIN A4 paper, to
have two plots on one page.
Gnuplot graphics (UNIX
version)
On UNIX machines, a possibility exists to use the public domain Gnuplot graphic
package. It is used not as a separate interactive program, but as a graphic
library. GNOM creates a sequence of data/command files in the /tmp directory
which are then executed by Gnuplot. To use the Gnuplot version of GNOM, the
following is required:
Gnuplot
version 3.0 or higher must be installed and the Gnuplot executables should be
in the PATH variable.
Environment variable GNUTERM has
to be defined according to the Gnuplot conventions. If GNUTERM is not defined,
no graphic output is produced.
If the environment variable
GNUPRINT is defined, GNOM captures each plot in the format of this printer onto
a fixed disk file named /tmp/gnu-capture. This is done after the plot is viewed
and CR is pressed. Note that this file will be OVERWRITTEN by the next screen
capture, therefore, if you need a hardcopy, the file has to be sent to the
printer or renamed BEFORE pressing CR after viewing the NEXT plot. After GNOM
finishes, the file /tmp/gnu-capture contains the LAST plot. Note also that the
GNOM variable PRINTER is dummy in the UNIX version. If GNUPRINT is not defined,
GNOM produces no screen captures.
Examples
:
If you run GNOM in a X-window
environment and want an output for the postscript printer.
Specify
%setenv GNUTERM x11
%setenv GNUPRINT postscript
If you run GNOM on a
VT-Tektronix emulation and want an output for the HP-Laserjet series II.
Specify
%setenv GNUTERM vttek
%setenv GNUPRINT hpljii
For a detailed description of
the supported terminals and printers, type 'set term' inside Gnuplot.
table
![]()
|
|
Next job |
After the job is finished, the user is asked whether to run the program again
(parameter NEXTJOB). Answering "No" stops the program.
"Yes" means new job. "Same" means that the new data set
will be calculated under the same conditions as the previous one (with the same
integral kernel).
table
![]()
|
|
On-line help |
Answering a question mark '?' followed by 'Enter' to each question gives a
short help on the parameter.
table
![]()
|
|
Configuration file |
Some or all of the parameters used by the program can be specified in the
configuration file named 'gnom.cfg'. The first line of the file is always
treated as a comment. The structure of a valid information line is shown below:
|
1-7 |
9 |
Between brackets |
Comment |
|
NAME |
Type |
Value |
|
|
PRINTER |
C |
[ HPPCL ] |
Printer type |
Here NAME is the name of the
parameter (all names are fixed), the letter in the 9-th column shows the type of
the parameter: (C - character, I - integer, R - real). The value of the
parameter must be put between square brackets (not more than 35 characters). If
the line is not valid (e.g., ] is missing, or the parameter name is wrong), it
is skipped and a warning is printed.
When GNOM is started, it first tries to find and read the configuration file in
the current directory. If the local file named 'gnom.cfg' does not exist, it
tries to read the global configuration file :
On IBM-PC, it
is always the file 'c:\gnom\gnom.cfg'
On VAX, it is 'GNOCFG:gnom.cfg',
where the logical GNOCFG defines the directory.
Example: if the command
$DEFINE GNOCFG SYS$LOGIN
is issued, the global file will be searched in the user's login directory.
On UNIX
machines, it is 'GNOCFGgnom.cfg', where GNOCFG is an environment variable.
Example: if the command
%setenv GNOCFG /usr/local/include/
is given , the global configuration file is '/usr/local/include/gnom.cfg'
If GNOM finds a non-blank value between the square brackets
for a parameter in the configuration file, this parameter is assumed to be
already defined, therefore, it will NOT be prompted interactively (the other
parameters will be asked as usually). The read-in configuration table is printed
on the screen ( ... means that the variable is not defined). The user can
either accept the values or switch to the interactive mode. GNOM assumes the
interactive mode also when neither local nor global configuration file has been
found.
Specific values for some
parameters :
Zero values of the parameters
NREAL and COEF mean that the values evaluated by the program will be accepted.
For the EXPERT and INPUT2,
'none' means NO file.
As UNIX is case-sensitive, be
careful with the file names in the configuration file for the UNIX version.
For IDET=2, if FWHM1/FWHM2 are equal
to zero, GNOM will try to find the wavelength distribution function after the
beam profile in the corresponding SPOT1/SPOT2 file.
The example of the global configuration file is shown below.
In this file only a few variables are fixed, and the program will not ask for
them. More specific configuration files can be put in the local working
directories. They can be configured in such a way, that the program will ask
only a few questions or even run in the batch mode. Examples of the local
configuration files can be found in the distribution package.
General configuration file
PRINTER C
[ HPPCL ]
Printer type
FORFAC C
[ ]
Form factor file (valid for JOB=2)
EXPERT C
[ none ]
File containing expert parameters
INPUT1 C
[ ]
Input file name (first file)
INPUT2 C
[ ]
Input file name (second file)
OUTPUT C
[ ]
Output file
PLOINP C
[ y ]
Plotting flag: input data (Y/N)
PLORES C
[ y ]
Plotting flag: results (Y/N)
EVAERR C
[ ]
Error flags: calculate errors (Y/N)
PLOERR C
[ y ]
Plotting flag: p(r) with errors (Y/N)
LKERN C
[ ]
Kernel file status (Y/N)
JOBTYP I
[ ]
Type of system (0/1/2/3/4/5/6)
RMIN R
[ ]
Rmin for evaluating p(r)
RMAX R
[ ]
Rmax for evaluating p(r)
LZRMIN C
[ ]
Zero condition at r=rmin (Y/N)
LZRMAX C
[ ]
Zero condition at r=rmax (Y/N)
KERNEL C
[ ]
Kernel-storage file
DEVIAT R
[ 0.0 ]
Default input errors level
IDET I
[ ]
Experimental set up (0/1/2)
FWHM1 R
[ ]
FWHM for 1st run
FWHM2 R [ ]
FWHM for 2nd run
AH1 R
[ ]
Slit-height parameter AH (first run)
LH1 R
[ ]
Slit-height parameter LH (first run)
AW1 R
[ ]
Slit-height parameter AW (first run)
LW1 R [ ]
Slit-height parameter LW (first run)
AH2 R
[ ]
Slit-height parameter AH (Second run)
LH2 R
[ ]
Slit-height parameter LH (Second run)
AW2 R
[ ]
Slit-height parameter AW (Second run)
LW2 R
[ ]
Slit-height parameter LW (Second run)
SPOT1 C
[ ]
Beam profile file (first run)
SPOT2 C
[ ]
Beam profile file (Second run)
ALPHA R
[ 0.0 ]
initial ALPHA
NREAL R
[ 0 ]
Number of points in real space
COEF R
[ ]
RAD56 R
[ ]
Radius/thickness (valid for JOB=5,6)
NEXTJOB C
[ ]
The configuration file may contain an arbitrary number of parameters. Not all
of them have to appear in the file: the missing parameters will be treated as
undefined. It is advisable, however, to end the configuration file with the
NEXTJOB parameter. If NEXTJOB is 'Y' or 'S', the next lines will describe the
parameters for the new job, and so on. The last line in this case should be:
NEXTJOB C [ N ] Ends the program
If you run the NEXTJOB, GNOM keeps the values which were used in the previous
job as program defaults (for character variables it is true if the number of
characters does not exceed 12).
Example: using the general configuration file above, the default output
file will be 'gnom.out' (program default); if you enter another name,
say,'mygnom.out' and then answer "Y" to the NEXTJOB question, default
output file will be 'mygnom.out'.
table
![]()
|
|
Practical advice |
This chapter has arisen as a result of practical applications of GNOM and is
based mainly on frequent user questions.
GNOM is intended to be as user-friendly as possible, that is, it normally runs
satisfactorily using the default answers. In particular, it is highly
recommended to use default value of the number of real space points .
The units in real and reciprocal space must be reciprocal to each other. Thus,
if the momentum transfer is given in reciprocal Angstroms (lambda in
angstroms), the particle sizes in real space must also be specified in
Angstroms. If you want particle sizes in nanometer, the input file must contain
momentum transfer in reciprocal nanometer. The units of the parameters
describing beam divergence should be the same as for the momentum transfer.
All the weighting functions are normalized so that the desmeared curve is on
the same scale as the smeared one. In particular, as the wavelength effects are
always relative, the wavelength distribution gets reduced to Lambda=1. This
does not mean that the program works only for this wavelength, because the
wavelength information is already contained in the s-units.
Note that wavelength effects in X-ray experiments with the conventional sources
(X-ray tubes) are normally negligible.
The rectangular slit geometry assumed for linear detectors is normally a good
approximation for practical applications. It is valid, of course, both for
linear multichannel detectors and single channel moving detectors. Note that
the slit-height function, if non-symmetric, can be symmetrized, because of the
properties of the slit-smearing integral. Asymmetries in the slit-width
function, if they exist, can be neglected, as slit-width effects are normally
small. The case of "infinitely long slit" can be covered, e.g., by
putting AH=Smax, LH=0, where Smax is the momentum transfer of the last data
point. For a more detailed description of smearing effects see, e.g. Ref[1],
Ch.9.
If you specify the maximum size so that Dmax*Smin (Smin the momentum transfer
of the first data point) is greater than Pi=3.1416926, a warning is printed.
This means that the first data point is beyond the first sampling point and the
information content may be not sufficient to obtain a reliable solution.
However, the warning does not hinder the progran continuation.
Default settings of the Expert parameters are also valid for the most
"normal" systems. In some cases it is however advisable to change the
default set to ensure reliable automatic search of ALPHA.
Typical examples are:
If you do not know standard
deviations in the experimental data, put the weight of DISCRP to zero.
If you suspect that your
distribution function is not monomodal, put the ideal value of OSCILL to M,
where M is the number of modes. For example, if you expect to have a bimodal
size distribution function (JOB=1), put OSCILL=2.
If the distribution function can
have negative peaks (say, X-ray scattering from lipoproteins in water, JOB=0),
put the weight of POSITV to zero (and OSCILL is better to put to 2 or 3, as in
previous example).
The program may fail to evaluate the constant for the second
run in the trivial case with no smearing because of poor stability of the
design matrix in this case. The user should correct the value manually.
The program explores the range
(10**3 * Hightest ALPHA) > ALPHA > (10**(-18) * Highest ALPHA)
to maximize the estimate. If the total estimate is monotonous in this range, a
warning is printed. In such cases the user can perform a manual search, or
restart the maximization from the current point. Note that normally, the
plausible range of ALPHAs is approximately 10E-6 * (Highest ALPHA).
If the solution found by the program is unacceptable, this only means that the
maximization procedure (golden section search in logarithmic ALPHA scale) is
trapped by in local minimum. The maximization can be restarted from an ALPHA in
a "plausible" range.
Another reason of getting a unacceptable solution can lie a consistency between
the data and the assumptions. In this case the user will get the warning about
AN1 and, normally, a rather low value of the maximum estimate.
By default, the program puts p(rmin)=0, p(rmax)=0. If these conditions are not
applied, non-zero p(r)'s can exist at the ends of the real space interval.
Sometimes by p(0) one can take a constant background into account (note that
for JOB=3 p(0) is normally non-zero). If you do not know Dmax, it is better
first not to fix p(rmax), because this value will help to judge whether the
chosen interval is correct (if, for example, rmax is too small, p(r) is
systematically higher than zero in the vicinity of rmax).
Model calculations show that the evaluation of the size distribution function
of cylinders (JOB=5) is a very ill-posed problem, because the scattering curves
from long cylinders are rather flat and it is not so easy to distinguish
between them in the scattering curve, as e.g. for polydisperse system of
spheres. Therefore for JOB=5 it is very important to have good measurements in
the beginning of the scattering curve where scattering from cylinders of
different length differs significantly from each other.
table
![]()
|
|
Hardware and software requirements |
IBM-PC
The program runt under Windows 9x/NT/2000.
VAX-VMS
GKS implementation level 2b or above, or GHOST graphics with Tektronix
emulation
UNIX
GKS implementation level 2b or above, or GHOST graphics with Tektronix
emulation, or Gnuplot public domain graphic package version 3.0 and higher.
table
![]()
|
|
References |
|
1. |
Feigin L.A. & Svergun D.I. (1987). Structure Analysis by Small-Angle X-Ray and Neutron Scattering. NY: Plenum Press. |
|
2. |
Glatter O. (1977). J.Appl.Cryst., 10, 415-421 |
|
3. |
Moore P.B. (1980). J.Appl.Cryst., 13, 168-175 |
|
4. |
Provencher S.W.
(1982). Computer Phys.Commun., 27, 213-227, 229-242 |
|
5. |
Svergun D.I., Semenyuk A.V. (1987). Doklady AN SSSR, 297, 1373-1377 (in Russian) |
|
6. |
Svergun D.I., Semenyuk A.V., Feigin L.A. (1988). Acta Cryst., A44, 244-250 |
|
7. |
|
|
8. |
Tikhonov A.N., Arsenin V.Ya. (1977). Solution of Ill-Posed Problems. NY: Wiley |
|
9. |
Tikhonov A.N., Goncharsky A.V., Stepanov V.V., Yagola A.G. (1983). Regularizing Algorithms and a priory Information. Moscow: Nauka, (in Russian) |
|
10. |