        Plot Program DMPLOT, version 3.2
        for viewing results of DBWS-9006PC
        Rietveld analysis programs 



                        Table of contents
                                               
         1. General information
         2. Input 
         3. Graphics 
         4. Commands
         5. General setup
         6. Differential plot setup
         7. DMPLOT-specific features: HKL's & peak intensities,
            refined background and singular phases patterns.
         8. Background evaluation
         9. Zoom
        10. Printing on matrix printers
        11. Plotting on pen plotters
        12. Postscript printing
        13. Labeling plots
        14. Glossary of commands
        15. User support
        Appendix A. Getting HKL's, I's etc.


1. General information

DMPLOT program is designed for viewing results of the Rietveld
refinement generated by the Rietveld Analysis Programs DBWS-PC,
distributed by Prof. R.A. Young from Georgia Institute of Technology.
DMPLOT produces on-screen plots of the observed and calculated
diffraction patterns as well as of the difference pattern. With
DMPLOT the user can also manually evaluate the background pattern and
prepare input background file for the Rietveld analysis.

For those willing to introduce some changes in the original DBWS code
DMPLOT version 3.00 offers additional capabilities, namely displaying
the refined background pattern, in multi-phase cases displaying each
of the refined phases separately and displaying the Miller indices or
calculated reflection intensities directly on the graphics screen.

DMPLOT supports and automatically recognizes the following
video-graphics adapters: CGA, EGA, VGA and Hercules. For a Hercules
graphics card you must run first MSHERC from DOS.

DMPLOT is a menu-driven program with full mouse support. The mouse
buttons work parallel to the <Enter> and the <Esc> keys. The mouse
may be set either right or left handed. Function are selected from
menus either with a mouse or with cursor-keys. Most frequently used
functions may be quickly called from the keyboard.

At any time the plot may be dumped either to a printer or to a pen
plotter. Most commonly used raster printers and plotters as well as
postscript printers are supported.


2. Input

DMPLOT accepts two kinds of input files:
 (i)  The raw data file in DBWS-format (unit4),
 (ii) The PLOTINFO file as created by DBWS-9006PC Program (Release
      12.8.91); additional information is read from PLOTINFO.BIN file,
      if exists.

The default input file name is PLOTINFO. If you start DMPLOT without 
specifying an input file the program will try to use PLOTINFO file
from the current directory. If you want to view a raw data file or a
file in a PLOTINFO-format stored under a different name the name must
be specified in a command line after the program name (e.g. DMPLOT
filename). DMPLOT automatically recognizes the format of the
PLOTINFO-type file. If it is not this one, DMPLOT tries to read in 
it as x-ray raw data file.

Multi-counter raw data file can be read in by using "neu' extension
for these files or typing "-n" in command line before file name as 
following:
		dmplot -n raw_data_file

DMPLOT can read in up to 4 raw data files (x-ray and multi-counter) 
by placing their names in the command line.

PLOTINFO.BIN file contains refined background and single
phase data written in binary format.

This abilities of DMPLOT program are accessible after few changes in
DBWS source file, described in Appendix. When PLOTINFO is
renamed the same name has to be given to PLOTINFO.BIN file keeping
the BIN extension.

Remember that you must set IPC flag ON (not 0) in the input control
file of DBWS program to get PLOTINFO files.

DMPLOT can handle up to 9600 data points and up to 2048 reflections.


3. Graphics 

DMPLOT creates plots in two windows. The experimental data and the
calculated diffraction pattern(s) in the upper window and the
difference curve in the lower one. In case that the raw data are fed
to the program, or the PLOTINFO file was created after the simulation
run of DBWS the differential plot is disabled.

Vertical bars indicate the positions of the Bragg reflections. Long
and short bars correspond to reflections for Kalpha1 and Kalpha2
wavelengths for the selected anode respectively. Reflection marks for
the first of the refined phases appear at the highest level, and 
those for next phases (if any) are lowered with respect to the 
previous ones.

The string identifying the data is displayed above the plot.

The field below the plot contains the information about the cursor 
position and Main Menu line with eleven commands.

The cursor appears as "+" mark while positioned in the data-window
and as "x" mark while in the difference-window. The position of the
cursor is displayed in terms of counts, 2theta and a corresponding
d-value. The d-value is calculated for the user-specified wavelength.

When a cursor is being moved with the cursor keys and a key remains
pressed the cursor movement is accelerated. Its ballistics is
adjustable. The movement is slower if <Shift> remains pressed while
the cursor is being moved with a mouse.


4. Commands

Moving the cursor to the very bottom of the screen or pressing <TAB>
key activates Main Menu. The selected item appears highlighted.
<Enter> or the left-button of the mouse runs the selected function.
Some of the menu items have their submenu lines. Subfunctions are
selected in the same way.

Many commands may also be called by pressing active keys. Help on the
active keys is available by pressing <F1> key.

If more than one keystroke is required to perform an operation a
request for another action appears above the menu-line.

You can abandon submenu function and return Main Menu at any time by
pressing <Esc> or right-button.

To leave the DMPLOT program press <Esc> key or right button when Main
Menu is present and confirm by <Enter> or left button on [Yes]
answer. Twice <Esc> or left button does not quit the program.


5. General setup

Bars indicating positions of the Bragg reflections may be placed at
top or bottom of plot windows or between observed and difference
pattern using [Setup]:[Marker]:[Top]/[Middle]/[Bottom] command.

Calculated and difference patterns are drawn as solid lines.
Experimental data may be represented by dots, squares, error bars or
a solid line. You can switch those by pressing <O> key or selecting 
[Setup]:[ObsDat] command from the menu.

The intensity scale can by toggled from linear to square-root with
<Y> key or [Setup]:[Yscale] command.

The wavelength is specified in terms of the anode material. After
pressing <X> key or selecting [Setup]:[Radiat]:[Anode] command either
Cu, Fe, Cr, Co, Ni or Mo may be chosen. Wavelength of Kalpha,
Kalpha1, Kalpha2 and Kbeta1 for the selected anode may be toggled in
[Line] submenu or any wavelength can be typed in after selecting
[Lambda] item (e.g. for neutron data). The corresponding symbol (i.e.
CuKa1) appears to the left of cursor position information.

The cursor can be turned into a full-screen cross-hair with <V> and
<H> keys (or [Setup]:[Cursor]:[Vertic]/[Horizo] commands) which
switch on or off the vertical and the horizontal line respectively.

Cursor movement is accelerated when arrow keys remains pressed. Its
ballistics (e.q. keystroke delay, cursor speed and acceleration) may
be adjusted by user in [Setup]:[Cursor] commands. Each of these
parameters may be set in range from 0 to 10.
 [Delay] corresponds to time after which two keystrokes are taken as
separate.
 [Speed] limits the maximum cursor speed in pixels per one repeated
keystroke.
 [Accel] sets cursor acceleration.
Magnitude of these parameter depends on clock frequency of computer
and video graphics adapters and should be matched by user especially
for slower computers with color graphics adapter.

Plot elements with user-defined color are shown by selecting 
[Setup]:[Colors] command. Clicking on highlighted item of menu line 
user can cycle all the available colors (usually 16). The selected
element (the list follows) changes its color immediately:
 [Screen] - Screen background color,
 [Calcul] - Calculated pattern curve,
 [Observ] - Observed pattern data,
 [Differ] - Difference curve,
 [Cursor] - Cursor pointer, (double 'click' required)
 [Menu  ] - Menu line,
 [Border] - Plot border and axes,
 [Title ] - Plot title,
 [Slider] - Slider on the scroll bar with 'Zoom' active.

Colors of refined background and singular phases patterns may be
changed by editing DMPLOT.CFG file. They are written in the 5. record
of this file using (9i2) format. First number denotes background, the
others singular phase (1-8) pattern.

The limits of the plot are matched to the input data. User may
change this values using [Setup]:[Limits] command. This may be
especially useful for printing a picture within a strictly selected 
range.

Function of left and right mouse button may be replaced by
[Setup]:[Mouse] command.

When you leave the DMPLOT the last used set-up parameters (including
printer and plotter parameters) are stored in the DMPLOT.CFG file in
directory where DMPLOT.EXE is located.


6. Differential plot setup

If the differential plot is available (PLOTINFO from refinement) it
is always plotted when DMPLOT starts. The portions of the screen
reserved for the data and for the difference plot are determined once
DMPLOT starts. Each of the two windows can be expanded at the expense
of the other one.

After selecting [Differ]:[Height] command one must show with the 
cursor the desired position of the border-line between the two
windows (0-level of the upper plot) and click the mouse button. In a
similar way the 0-level of the differential plot can be moved within
its window using [Differ]:[0level] command. [Differ]:[OFF] command
removes differential plot leaving full screen for the data plot,
whereas [Differ]:[ON] brings it back to the screen.

The two options of plotting of the differential curves are available.
The first one (default) shows the difference (Yio - Yic) in the lower
window in the same scale as the original data. The second option is a
weighted differential plot (Yio - Yic)/(e.s.d)i.  When this is
selected the ordinates of the difference window initially extend from
-3 to +3 and the levels -1 and +1 are marked. The scale may be
changed using [Differ]:[Scale] command by choosing the +1 level. This
command is active only for weighted plot.


7. DMPLOT-specific features: HKL's & peak intensities,
   refined background and singular phases patterns.

Version 3.00 of DMPLOT has some additional capabilities accessible
when changes in DBWS source file are made. With those changes DBWS
outputs some additional information into PLOTINFO file and creates
PLOTINFO.BIN file to hold still more information. Details are
described in Appendix A.

With the appropriate changes made the user can activate four commands
in Main Menu line: [H K L], [Intens], [RefBck] and [Phases]. The
functions may also be called by pressing <F3>, <F4>, F<5> or <F6>
keys, respectively. 

[H K L] and [Intens] commands are accessible when PLOTINFO file
contains information about Miller's indices and intensities of each
Bragg reflection.

[H K L] command or <F3> key displays Millers's indices starting from
the top of the plot. For each phase the hkl's are placed at a
separated level and a different color is used. In the case when the
distance between two adjacent reflections is so small that the hkl's
would overlap DMPLOT will try to displace them downwards. If the
indicies are still unreadable use zoom. Using [Setup]:[H K L]:[Ka1]/
/[Ka2]/[Both] command you can select which reflections will be
indexed.

In the way similar to hkl's you can display peak intensities
(normalized to 999) using [Intens] command or key <F4>.
  
[Intens] and [H K L] commands when used one after another first 
removes the previous information from the screen so that you cannot 
have both, intensities and hkl's on the screen at the same time.
The information always dissapears when the picture is reploted in
any way.  

Another two commands [RefBck] and [Phases] are accessible when
additional PLOTINFO.BIN file (or file named like input file with
extension BIN) exists (created by modified DBWS program). This file
contains data of refined background and singular phase patterns.
[RefBck] command or <F5> key cause the refined background pattern is
displayed on the plot, whereas [Phases] command or <F6> key display
singular phase plots. Both command may be called simultaneously.
These plot disappear when the the plot is renewed (e.g. [Replot]).

Background and singular phase data are read from disk file each time
they are plotted and therefore they are written in binary format to
speed up this process. Only data for actually displayed range are
read from this file so using this commands in 'zoom' takes less time.
                                        

 
8. Background evaluation

DMPLOT features a special procedure for establishing the best form of
the background and preparing input for DBWS. Background-setting mode
is activated by selecting [BckSet] command from menu line or pressing
<F7> key.

Having selected appropriate magnification one should move the cursor
along the pattern settingt the background points by clicking
the left-button of the mouse or pressing <Enter> key. These points
will appear as "x" marks on the plot. Up to 128 background points may
be added in any order. Actual number of background points is
displayed just above menu line.

For better accuracy the 'zoom' function may be used without
limitations while setting the background points.

The 2-theta position of a background point is assumed to be equal to
the position of the nearest data point. Adding new point in the same
position removes the previous one. Individual points may be removed
by placing the cursor at the X-position of the point (Y position is
irrelevant) followed by clicking right mouse button or pressing <Del>
key. <Alt_L> or [Clear] command removes all the background points.

Background points at the beginning and at the end of the full angular
range (if do not set) are assumed to be the same as the first and the
last selected point respectively. They are required by the background
interpolation routine.

<Alt_C> or [Calcul] command starts computation of the background
pattern by spline interpolation between the selected points. After
that the interpolated background curve is displayed instead of the
calculated pattern and can be viewed in an ordinary way.

The results of the background evaluation may be stored in two disk
files on <Alt_W> or [Write] command. The file BACK.INT contains the
selected background points in the format suitable to directly insert
that file into the parameter input file (tape 5). The file BACK.DAT
contains interpolated background pattern and can readily be used as
the input background file (tape 3).

Care should be taken to set the points dense enough to let the
interpolation procedure produce a curve without abrupt changes. 

At any time you can add new points and recalculate the background
pattern or delete all the background points and set the new ones.

To leave the background-setting mode press <Esc> key or click right
mouse button outside of plot window. Then Main Menu line will be
restored.


9. Zoom

The user can enlarge ('zoom') any section of the data-window. The
difference pattern is magnified to the same scale automatically.
After pressing <F10> or selecting [Zoom] command the pointer-cursor
turns into a slightly different zoom-cursor which can be moved to
select one corner of the magnified area. After pressing <Enter> the
opposite corner is selected in the same way (the rectangle framing
the magnified area appears on the screen) and after next <Enter> the
selected area is plotted.

The 'zooming' procedure may be repeated on magnified area many times.
The smallest portion of the pattern that can be displayed is 11 data
points.

There are several ways to speed up 'zooming' useful for those who do
not use a mouse.

If you only want to blow-up the picture along the intensity scale
press <F10>, move the cursor to the desired intensity level, press
<Enter>, select another intensity level (do not move along angular
axis) and again press <Enter>. The picture will show points falling
between the two selected values of intensity without changing the
angular range. 

If you do not select the second intensity value but just strike
<Enter> twice the intensity scale will start at 0.

If magnification of both scales is needed, but the intensity is to
begin at 0 you first select the top intensity and the first 2-theta
bound and after pressing <Enter> move the cursor in the horizontal
direction o n l y towards the other 2-theta position and press
<Enter> again.

You can abandon 'zooming' procedure at any time by pressing <Esc> or
right-button.

A fast 'zoom' is obtained by pressing <Alt_1>,< Alt_2> ..., <Alt_0>.
1/n-th portion (0 corresponds to n=10) of the entire angular range is
then displayed beginning at the actual angular position of the
cursor. The intensity scale remains unchanged. Hint: <Alt_1> returns
the pattern to the original angular scale without changing intensity
scale.

At the very bottom of the plot there is a 'scroll bar' with a
'slider' which shows currently displayed portion of the data with
respect to the full angular range. The plot can be scrolled along
angular axis with <PgUp>/<PgDn> keys. Equivalently you may position
the cursor at either left or right border of the picture (you will
see a small arrow mark pointing in the direction of scrolling) and
press <Enter> or left-button. If the arrow disappears there are no
more data to see. <Home> and <End> keys instantaneously bring the
cursor to the right/left picture border. When the cursor is
positioned at the 'scroll bar' it turns into an arrow pointing
downwards. With that arrow you can show which part of the full
angular range you want to see. After pressing <Enter> the picture
will be replotted, without changing the magnification, beginning at
the specified angle.

<F9> key or [Replot] command returns the pattern to its original size.

Pressing <Alt_F9> increases the intensity scale by factor three
without changing the current x range.  Using it several times returns
the picture to the full y scale. Equivalent action is moving the
cursor to the very top of the plot. The arrow pointing upwards
appears, indicating that by pressing <Enter> you may increase the
intensity scale.

<F8> key refreshes actually displayed area of the plot by removing
hkl's, background plot etc.


10. Printing on matrix printers

The plot as it is seen on the screen may be dumped to a printer at
any time by [Print] command or <P> key followed by selecting
appropriate submenu item. First three subfunctions [PrintA], [PrintB]
and [Config] service screen dumping. The routine copies the screen
pixel-by-pixel so that the quality of the hardcopy depends primarily
on the screen resolution.

[PrintA] or [PrintB] command starts screen dumping according to 
printer parameters written in the config file.

Before first using this option the user should choose the right
printer and printing parameters using [Config] subcommand. A
panel is displayed offering choise of printer parameters.

Supported printer-types are listed on the screen in the left column.
The three special printers, namely IBM Color Jet printer, HP PaintJet
and HP LaserJetII are also supported. Selected printer is marked by
an asterisk to the left of the printer name. You can change this by
highlighting desired name with cursor and pressing <Enter> or left
button.

Please note that for one physical printer you may select several
printing parameters resulting in different quality, size and/or the
orientation of the hardcopy. Selectable printing parameters are
displayed in the right column. One of them appears highlighted. In
order to set another parameter move to the corresponding field with
the cursor keys or using a mouse.

Screen may be printed directly to the hardware device using LPT# or
COM# output port or written to the disk FILE. You can switch between
them by clicking on the <Output> field. Using LPT# or COM# output
port be sure that the printer is attached to the specified port. When
you chose the FILE as an output the plot will be written into the
disk file named DMPLOT??.PRN in the current directory (?? is a 
two-digit number that is incremented every time the new picture is
written into the disk). This file may be next copied to the printer
using DOS command: COPY /B DMPLOT??.PRN LPT#.

User can define two sets ( A and B ) of printing parameters which are
toggled by clicking on <Configuration> field.  These parameters
control screen dumping procedure started with [PrintA] or [PrintB]
command respectively. 

Several horizontal and vertical printing density are availible for
most printers. You can toggle between them by clicking on <DPI> field.
Screen resolution, printing density and resulting plot size are
listed in the table below and change respectively when you click on
<DPI> or <Orientation> field. 

For a dot matrix printer with the color ribbon (i.e. LC24-200) color
printing can be selected. 

Additional margins, either left or top margin can be added. These
parameters may be incremented or decremented with <+>/<-> keys or
mouse buttons after selecting <... margin> fields.

To leave printer configuration panel click on <Exit> field or press
<Esc> key.

Printing may be interrupted at any time by pressing <Esc> key.


11. Plotting on pen plotters
 
To create plots using a pen plotter you can select [Print]:[Plotter]
command. The plotting procedure uses the base command of HP-GL
language which are recognized by most of HP plotters and compatibles
as well as the HP  L a s e r   J e t 3 (!), so no plotter-type
selection is available.

After selecting [Print]:[Plotter] command plotter configuration panel
is displayed. Range of the plot will be the same as it is on the
screen and is shown at left top.

Selectable plot parameters may be changed by highlighting appropriate
field and clicking the button or typing new value. Plotter commands
may send directly to the output port (LPT# or COM#) or to a disk file
just like for the printer plots. Sending directly to the hardware
device be sure that the printer is connected to the specified port.
Otherwise the program may hang up or display writing error message.
DMPLOT??.PLT is the default name of output file for the plotter
commands.

Two different sets of plotting parameters may be defined, separate
for Landscape and Portrait orientations. By clicking on the field
<Orientation> default parameters are displayed. User can change them
by highlighting adequate fields and typing in new values.

Following parameters may be adjusted by user for each orientation:
 - length of X and Y axis of the plot (in cm)
 - left and bottom margins (in cm),
 - pen width - only for HP LaserJet3 (in mm)
 - character height of plot description (in mm)
 - distance between 2-theta marks (in degrees)
 - distance between intensity marks (in counts)

Default values for two last parameters depend on axes lengths, plot
ranges and character height, and are recalculated each time any of
this parameters is changed.

To start plotting you must just choose desired orientation (and
adequate set of parameters), move cursor on <Start> field and press
<Enter>. The message <Sending to 'device'...> starts to blink then.
Program returns to graphics when all HP-GL commands are sent to the
output device.


12. Postscript printing

The third printing utility of DMPLOT enables creating plots in
Postscript language.

Postscript configuration panel displayed after selecting
[Print]:[PScript] command is very similar to the plotter
configuration panel described in the previous chapter. The same
parameters may be adjustable by user.  Instead of centy- and
millimeters used for plotters, Postscript units are inches and points
(1/72 inch).

The default name for the output Postscript file is DMPLOT??.PS.


13. Labeling plots

Any text can be written on the plot i.e. phase names etc. After
selecting <L> or [Print]:[Label] command one can choose between 
[Add], [Write], [Read], [DelOne] or [DelAll] items.
 [Add] allows placing a new label on the plot.
 [Write] stores all currently present labels together with their
screen coordinates in a specified disc file (default: DMPLOT.LEG). 
 On the [Read] command previously defined labels are red from the
file and replayed on the picture.
 [DelOne] removes last label and
 [DelAll] all labels from the plot. 

After selecting [Add] item the orientation of the text is selected
from [Right], [Up] or [Down]. A rectangle 8x8 pixels marking the
position of the first character of the intended text appears and can
be moved to a desired position which is confirmed by pressing <Enter>
or clicking left button. After that up to 16 characters may be typed
in from the keyboard terminated with <Enter>. Up to 64 different
labels may be placed on the plot. 

The labels are anchored to 2-theta of the first character, so in
'zoomed' plot only some of them may be displayed.


14. Glossary of commands

Menu command	 - Function				    Hot key     

[ Help ] 	 - Hot key assignment table			F1     
[Setup ]	 - Plot configuration setup			S      
    [Marker]	 - Bragg position markers: Top/Middle/Bottom	       
    [ H K L]	 - HKL's & I's for: Ka1/Ka2/Both		       
    [ObsDat]	 - Observed data: Dots/Line/Squares/Error Bars	O      
    [Yscale]	 - Intensity scale: Linear/Root			Y      
    [Radiat]	 - Wavelength setting				X      
        [Anode ] - X-ray tube: Cu Cr Fe Co Mo Ni		       
        [ Line ] - Wavelength for: K/K1/K2/K1 		
        [Lambda] - User specified wavelength		       
    [Limits]	 - Plot limits					       
        [2-Min] - X-axis low limit				       
        [2-Max] - X-axis up limit				       
        [Y-Max ] - Y axis up limit				       
    [Cursor]	 - Cursor shape and ballistics 			       
        [Horizo] - Horizontal line at cursor position		H      
        [Vertic] - Vertical line at cursor position		V      
        [Delay ] - Delay between keystrokes			       
        [Speed ] - Maximum cursor speed			       
        [Accel ] - Cursor acceleration			       
    [Colors]	 - Plot elements color				       
    [Mouse ]	 - Mouse buttons: Normal/Reverse		       
[Differ]	 - Differential plot setup			F2     
    [OFF]/[ON]	 - Differential plot OFF/ON 			       
    [Height]	 - Set height of differential plot windows	       
    [0level]	 - Move 0-level of the differential plot	       
    [Normal]	 - Switch to normal differential plot		       
    [Weight]	 - Switch to weighted differential plot		       
    [Scale ]	 - Set scale for weighted differential plot	       
[H K L ]         - Display Miller indices			F3     
[Intens]         - Display peak intensities			F4     
[Refbck]         - Plot refined background pattern		F5     
[Phases]         - Plot single phase patterns			F6     
[BckSet]         - Background setting mode			F7     
   [left_button] - Set background point at cursor position 	<CR>   
  [right_button] - Delete background point at cursor position 	<Del>  
    [Calcul]     - Interpolate background points 		Alt_C  
    [Clear ]     - Clear background pattern			Alt_L  
    [ Read ]     - Read background points from file 		Alt_R  
    [Write ]     - Write background pattern to files 		Alt_W  
[Print ]         - Printer and plotter service			P      
    [PrintA]     - Screen dumping - configuration A		       
    [PrintB]     - Screen dumping - configuration B		       
    [Config]     - Printing parameters				       
    [Plotter]    - Plotting on pen plotters			       
    [PScript]    - Postscript printing				       
    [Label ]     - Plot labeling				L      
[Replot]         - Replot in the original size			F9     
    [Total ]     - Replot in the original size			F9     
    [Window]     - Replot actuall range				F8     
    [Yscale]	 - Restore Y-scale [cursor up & left-button]	Alt_F9 
[ Zoom ]         - Zoom						F10    
[ Quit ]         - Quit DMPLOT 					Esc
      - Divide angular scale into (1-10) subranges 		Alt_1-Alt_0
      - Next subrange     [cursor to the right & left-button]	PgUp
      - Previous subrange [cursor to the left & left-button]	PgDn
      - Switch cursor between plot window and menu line 	Tab 	


15. User support

The author welcome any comments or reports on detected bugs from the
users and promise a quick response. Requests for modifications i.e.
other input file format may also be considered.


Dr. H. Marciniak
High Pressure Research Center UNIPRESS
Sokolowska 29/37, 00-142 Warsaw, Poland

E-mail: marcin@iris.unipress.waw.pl



Appendix A.

Modification of DBWS source file needed to access Additional Features
of DMPLOT.

All changes concern of subroutine EXPUT in DB2.FOR file. Original
code is written in upper-case, suggested changes in lower-case.



A.1. Changes needed to access to [H K L] and [Intens] commands.

Three following lines must be updated to output the HKL's,
Kalpha1/alpha2 codes and peak intensities into PLOTINFO file:

Lines 260 and 281:
      WRITE (9,8147) REFS(IX,2)+ZER+SHIFT,irc,irh,irk,irl,ff(ix)

Lines 282:
either:
8147  FORMAT (1X,F8.3,2x,i1,3i4,g10.4)
or (to keep compatibility with Sakthevil's PLOT program):
8147  FORMAT (1X,F8.3,2h K,i1,sp,3i4.3,g10.4,s)


A.2. Changes needed to access to [RefBck] and [Phases] commands.

Following lines must be added (after specified one) to write
additional PLOTINFO.BIN file containing background and singular
phases data: 

(i) to declare array phs(idsz):

Line 111:
     LOGICAL VERT
     dimension phs(idsz)
     equivalence (phs(1),kr(1))

(ii) to open new file and to write background data:

Line 147:
        OPEN(9,FILE='PLOTINFO')
        open(10,file='plotinfo.bin',form='binary')
        write(10) (bk(i),i=1,npts)

(iii) to clear phs(idsz) array for each phase:

Line 155:
      DO 400 K=1,NPHASE
      do 401 i=1,npts
401     phs(i) = 0.

(iv) to store calculated intensity :

Line 226:
5           OMEGA= Z*PROFIL(NPROF+1,DELT/BB)
      phs(is) = phs(is) + omega*ff(ix)/tl

(v)  to write data into PLOTINFO.BIN file:

Line 283:
481       CONTINUE
      write(10) (phs(i),i=1,npts)

(vi)  to close PLOTINFO.BIN file:

Line 303:
      CLOSE (9)
      close (10)

=============================================================================

