discus   ! Switch to discus section
#
#@ HEADER
#@ NAME         pdf.mac
#@ 
#@ KEYWORD      powder, small cube shaped crystal, pdf
#@ 
#@ DESCRIPTION  reads a unit cell, expands it to a user defined size 
#@ DESCRIPTION  and calculates the powder pattern; 
#@ DESCRIPTION  output written as PDF; 
#@
#@ PARAMETER    $0, 1
#@ PARAMETER    $1, integer,  number of unit cells
#@
#@ USAGE        @pdf.mac <number> 
#@
#@ END
#
################################################################################
#
read                            # Switch to read menu
  cell CELL/znse.cell,$1,$1,$1    # read the unit cell expand to $1*$1*$1 cells 
do LOOP=1, n[2]
  b[LOOP] = 0.05
enddo
#
@powder_pdf.mac                 # Switch to powder menu
#
output                          # Switch to output menu
  outf  OVERVIEW/znse.inte      # Define output file name
  value inte                    # Select Powder intensity as output value
  form  powder, q               # Write output as powder PDF data
  run                           # Perform the actual output
  outf  OVERVIEW/znse.SQ        # Define output file name
  value S(Q)                    # Select Powder normalized intensity as output value
  form  powder, q               # Write output as powder PDF data
  run                           # Perform the actual output
  outf  OVERVIEW/znse.FQ        # Define output file name
  value F(Q)                    # Select Powder reduced normalized intensity as output value
  form  powder, q               # Write output as powder PDF data
  run                           # Perform the actual output
  outf  OVERVIEW/znse.grcalc    # Define output file name
  value PDF                     # Select Powder PDF as output value
  form  pdf,r,0.01,100.0,0.01   # Write output as powder PDF data
  run                           # Perform the actual output
exit                            # Go back to main DISCUS menu
#
exit   # Back to SUITE
#
@k_overview.mac znse
#
