Description: GSAS-II logoHelp for GSAS-II

This is where to find help on various GSAS-II windows and plots. Note that GSAS-II operates with three windows: the main GSAS-II data tree section, which provides a hierarchical view of the current project on the left and the GSAS-II data editing section, which shows the contents of a particular section of the project, where values can be examined and changed; The second is the GSAS-II Plots window, which shows graphical representations of the results. The third is a console window, which has printout information that can be selected, cut & pasted into a document.

Help Index

[see separate page]



Learning GSAS-II: Tutorials

The best way to learn about how different sections of GSAS-II is used is to work through tutorials. A list of available tutorial topics appears on a separate web page.

1. GSAS-II Data Tree

The data tree shows contents of a GSAS-II project (which can be read or saved as a .gpx file) in a hierarchical view. Clicking on any item in the tree opens that information on the right side of the window in the "Data Editing" section, where information in that item can be viewed or edited. For example, the "Sample Parameters" item under a ‘PWDR’ entry contains information about how data were collected, such as the sample temperature (see below). The arrow keys (up & down) move the selection to successive entries in the data tree; both the data window and the associated plot (if any) will change.

What can I do here?

The leftmost entries in the GSAS-II menu provide access to many features of GSAS-II. Other menu items will change depending on what type of entry is selected in the data tree. The menu commands that do not change and are described below in the main menu commands section.



2. GSAS-II Data Editing Window

Different information is displayed in the Data Editing Window, depending on which section of the data tree is selected. For example, clicking on the "Notebook" entry of the tree brings up the Notebook editing window, as described below in the data tree sections.



3. GSAS-II Plots Window

This window presents all the graphical material as a multipage tabbed set of plots utilizing the matplotlib python package. Each page containing a graph or plot has a tool bar with the controls

GSAS-II plots: NiTi-C.gpx

 

The first eight icons have the following functions: Home, Back, Forward, Pan, Zoom, Save, Key Press and Help, respectively and are described below. The remainder (yellow arrows) move or rescale the plot. The last “P” allows preparation of a publication quality plot. The meaning of these icons are as follows:

·         Home - returns the plot to the initial view/scaling

·         Back - returns the plot to the previous view/scaling

·         Forward - reverses the action in the previous press(es) of the Back button

·         Pan - allows you to control panning across the plot (press left mouse button & drag) and zooming (press right mouse button & drag),

·         Zoom - allows you to select a portion of the plot (press left mouse button & drag for zoom box) for the next plot.

·         Save - allows you to save the currently displayed plot in one of several graphical formats suitable for printing or insertion in a document.

·         Key Press - Shows a menu of key press commands that can be used to interact with the plot. These actions can be initiated from the menu.

·         Help - accesses GSASII help on the specific plot type.

·          - Shifts the plot to the left, relative to the axes

·          - Shifts the plot to the right, relative to the axes

·          - Shifts the plot up, relative to the axes

·          - Shifts the plot down, relative to the axes

·          - Zooms in on the plot (magnifies) along the horizontal (x) direction to show more details.

·          - Zooms out on the plot (demagnifies) along the horizontal (x) direction.

·          - Zooms in on the plot (magnifies) along the vertical (y) direction to show more details.

·          - Zooms out on the plot (demagnifies) along the vertical (y) direction.

·         P - prepare a fancy publishable version of the current plot (PWDR plots only)

For 3-dimensional structure drawings there will be below the toolbar may be a status bar that on the left may show either an instruction for a keyed input or a pull down selection of keyed input; on the right may be displayed position dependent information that is updated as the mouse is moved over the plot region.

 



4. Main GSAS-II menu commands

1.      File Menu

·         Open project… - Open a previously saved GSAS-II project file ({project}.gpx). If you currently have a project file open, you are asked if it is OK to overwrite it; Cancel will cancel the read process.

Note that as files are saved during a structure refinement, copies of the previous version are saved as backup files, named as {project}.bak{i}.gpx, where i starts as 0 and is increased after each save operation. NB: you may open a backup .gpx file (e.g. name.bak3.gpx) to return to a previous version of your project, but if you do so, it is best to immediately use the Save As... menu command (you may wish to use name.gpx to overwrite the current version or select a new name.) If you forget specify a project name, then name.bak3 will be considered the project name and backups will then be named name.bak3.bak0.gpx, etc.

·         Save project  - Save the current project. If this is a new project that has not yet been saved, you will be prompted for a new name in a file dialog (you may optionally change the directory in that dialog). If the file exists, you will be asked if it is OK to overwrite it. Once a file name has been used to read or save a project, the name is shown after ‘Loaded Data:’ in the first item in the data tree.

·         Save Project as...  - Save the current project in a specified project file. You will be prompted for a new name in a file dialog (you may optionally change the directory in that dialog). If the file exists, you will be asked if it is OK to overwrite it. The current project will be now named as the saved project name.

·         New Project  - Discards any changes made to the current project since the last save and creates a new empty project.

·         Preferences  - Provides access to GSAS-II configuration settings, as described in the Configuration Variables section.

·         Edit proxy… - Provides method for changing proxy address for GSAS-II (usually not required – see your computer administration if needed).

·         Ipython console - Debugging tool.

·         wx.inspection tool - Debugging tool.

·         Quit  - Exit the GSAS-II program. You will be asked if the project should be saved or not (Cancel aborts the quit). You can also exit GSAS-II by pressing the red X in the upper right (Windows) or left (Mac). Pressing the red X on the console will kill the GSAS-II run without any save.

2.      Data Menu

·         Read Powder Pattern Peaks…  - Read in a list of powder pattern peak positions as either a d-spacing or 2Q position table; these can be used in GSAS-II powder pattern indexing. They are distinguished by their order (highest d or smallest 2Q first in table).

·         Sum or average powder data - Form the sum of previously read powder patterns; each with a multiplier. Can be used to accumulate data, subtract background or empty container patterns, etc. Patterns used to form the sum must be of identical range and step size. Result is a new PWDR entry in the GSAS-II data tree.

·         Sum image data - Form the sum of previously read 2-D images; each with a multiplier. Can be used to accumulate data, subtract background or empty container patterns, etc. Images used to form the sum must be of identical size and source. Result is a new IMG entry in the GSAS-II data tree, and a GSAS-II image file is written for future use as a python pickle file.

·         Add new phase - This begins the creation of a new phase in the data tree (under Phases). You are first prompted in a dialog box for a name to be assigned to the new phase. Then the Phase/General tab is opened for this phase, where you should first select the phase type, the enter the space group symbol and then the lattice parameters.

Note that nonstandard space group symbols are permitted; space group names must have spaces between the axial fields (e.g. use ‘P n a 21’ not ‘Pna21’).

·         Delete phase entries - This will remove a phase from the data tree. A dialog box will present the list of phases; pick one (or more) to delete.

·         Rename tree entry - Rename a histogram entry. This should only be done before the histogram is used in any phases: e.g. only rename data immediately after reading.

·         Delete data entries - This will remove a data (e.g. PWDR) item from the data tree. A dialog box with a list of choices for histograms is presented; it has filter capability to ease this process. Be sure to remove histograms from all phases before deleting them from the tree.

·         Delete plots - This will remove plots from the plot window. A dialog box with a list of choices for plots is presented.

·         Delete sequential result entries - This will remove any sequential results from the tree. A dialog box with a list of choices for entries is presented.

·         Expand tree item - This will show child entries for specified type of items (IMG, PWDR, etc.)

·         Move tree item - Move classes of Tree items (IMG, PWDR, Phase, etc.) around in the tree. Individual top-level tree items can be moved using the right mouse button.

3.      Calculate Menu

·         Setup PDFs - This creates the pair distribution function (PDF) controls for each powder pattern selected in the dialog box, but does not compute the PDF, which must be done from PDF tree entries. See PDF Controls for information on the PDF input.

·         View LS parms - This shows a dialog box with all the parameters for your project; those to be refined are flagged ‘True’, otherwise ‘False’. Blanks indicate parameters that are not refinable. The total number of refined parameters is also shown at the top of the list. The value of each parameter is also given. The parameter names are of the form ‘p:h:name:id’ where ‘p’ is the phase index, ‘h’ is the histogram index and ‘id’ is the item index (if needed). Indexes all begin with ‘0’ (zero).

Note that for atom positions, the coordinate values (named as ‘p::Aw:n’, where p is the phase number, n is the atom number and w is x, y or z) is not a refinable parameter, but the shift in the value is. The refined parameters are ‘p::Aw:n’. The reason this is done is that by treating an atom position as x+dx,y+dy,z+dz where the “d” values indicate shifts from the starting position and the shifts are refined rather than the x,y, or z values is that this simplifies symmetry constraints. As an example, suppose we have an atom on a symmetry constrained site, x,1/2-x,z. The process needed to define this constraint, so that if x moves positively y has to move negatively by the same amount would be messy. With refinement of shifts, all we need to do is constrain dy (‘0::dAy:n’) to be equal to -dx (-1*‘0::dAx:n’).

Press the window exit button to exit this dialog box.

·         Refine/Sequential refine - This performs the refinement (Pawley/Rietveld or single crystal) according to the controls set in the Controls data tree item. This menu item name will reflect the choice of doing a sequential refinement selected in the Controls data tree item.

·         Compute partials - This runs a zero-cycle refinement where the contributions from each phase (phase partial intensities) are written for each histogram and each phase in that histogram into a single file named project.partials where project is the GSAS-II project (.gpx) name. This file is intended for internal use in GSAS-II and will be deleted if additional refinements are performed (making the information in them obsolete; use this menu command to recreate them if needed.) When the .partials file is created, the user can optionally choose to export the intensity information in a series of ASCII files named prefix_part_N.csv, which can be read by spreadsheets and most scientific software.

·         Run Fprime - This run the utility routine Fprime that displays real and imaginary components of the x-ray form factors for user selected elements as a function of wavelength/energy. Allows an informed choice of wavelength for resonant x-ray scattering experiments

·         Run Absorb - This runs the utility routine Absorb that displays the x-ray absorption for a user selected sample composition as a function of wavelength/energy.

·         Run PlotXNFF - This runs the utility routine PlotXNFF which displays resonant (if any) neutron scattering lengths for all isotopes of a selected element. It also displays the x-ray and magnetic neutron form factors for all valences (if any) for this element.

4.      Import Menu

GSAS-II uses separate routines to read in information from external files that can be created and customized easily. See the GSAS-II Import Modules section of the Programmers documentation for more information on this. Since it is easy to support new formats, the documentation below may not list all supported formats.

·         Image - Read in 2-D powder diffraction images (multiple patterns can be selected). A sub menu appears with choices for import of data. Each entry when selected with the mouse shows further submenus with specific imports that are available. Any of these files can be accessed from a zip file. GSAS-II can read many different image file formats including MAR345 files, Quantum ADSC files, and tiff files from Perkin-Elmer, Pilatus, and GE. Although many of these formats have data fields that should contain relevant information for the exposure (e.g. wavelength), these are rarely filled in correctly by the data acquisition software. Thus, you should have separately noted this information as it will be needed. In some cases, this information may be in a separate “metadata” file; GSAS-II will look for this and attempt to open it as well as the image file.
NB: gain maps can be imported but they must be 1000*the gain value (typically ~1) as integers; if used, GSAS-II will rescale the gain map by 1/1000 and apply it to the image.

·         Phase - Creates a new phase by reading unit cell/symmetry/atom coordinate information. GSAS-II can read information from several different format files including:

o   GSAS .EXP - This reads one phase from a (old) gsas experiment file (name.EXP). The file name is found in a directory dialog; you can change directories as needed. Only .EXP (or .exp) file names are shown. If the selected file has more than one phase, a dialog is shown with the choices; only one can be chosen. If you want more than one, redo this command. After selecting a phase, a dialog box is shown with the proposed phase name. You can change it if desired.

o   PDB file - This reads the macromolecular phase information from a Protein Data Base file (name.PDB or name.ENT). The file name is found in a directory dialog; you can change directories as needed. Only .PDB (or .pdb) or .ENT (or .ent) file names are shown. Be careful that the space group symbol on the ‘CRYST1’ record in the PDB file follows the GSAS-II conventions (e.g. with spaces between axial fields). A dialog box is shown with the proposed phase name. You can change it if desired.

o   CIF file - This reads one phase from a Crystallographic Information File ({name}.CIF (or .cif). The file name is found in a directory dialog; you can change directories as needed. If the selected file has more than one phase, a dialog is shown with the choices; only one can be chosen. If you want more than one, redo this command. After selecting a phase, a dialog box is shown with the proposed phase name. You can change it if desired.

o   GSAS-II .gpx file - This reads one phase from a GSAS-II project file ({name}.gpx). The file name is found in a directory dialog; you can change directories as needed. If the selected file has more than one phase, a dialog is shown with the choices; If you want more than one, redo this command. After selecting a phase, a dialog box is shown with the proposed phase name. You can change it if desired.

o   guess format from file - This attempts to read one phase from a file trying the formats as described above. On occasion, this command may not succeed in correctly determining a file format. If it fails, retry by selecting the correct format from the list.

Other formats currently available for import include JANA m50, ICDD str, SHELX ins & res (NB: SHELX files do not contain the space group symbol; you must set it after import), & RMCProfile rmc6f files.

·         Powder Data - Reads a powder diffraction data set in a variety of formats. Results are placed in the GSAS-II data tree as ‘PWDR file name'. Information needed for processing a powder diffraction data set, such as data type, calibration constants (such as wavelength) and default profile parameters are read from a separate file, either a (old) GSAS instrument parameter file (usually .prm, .ins or .inst extension) or a new GSAS-II .instparm file.

Note that it is possible to apply corrections to the 2-theta, intensity or weight values by adding a Python command(s) to the instrument (.instprm) parameter with a variable named CorrectionCode. See the CorrectionCode.instprm.sample file provided in the GSAS-II source directory for an example of how this is done.

o   CIF file - This reads one powder pattern (histogram) from a Crystallographic Information File ({name}.CIF). The file name is found in a directory dialog; you can change directories as needed. Only one .cif can be chosen. If you want more than one, redo this command.

o   GSAS-II .gpx file - This reads powder patterns from a previously created GSAS-II gpx project file. If the selected file has more than one powder pattern, a dialog is shown with the choices; one or more can be selected. It will ask for an appropriate instrument parameter file to go with the selected powder data sets.

o   GSAS .fxye files - This reads powder patterns (histograms) from the defined GSAS format powder data files. GSAS file types STD, ESD, FXY and FXYE are recognized. Neutron TOF data with a ‘TIME-MAP’ are also recognized. The file names are found in a directory dialog; you can change directories as needed. If the selected files have more than one powder pattern, a dialog is shown with the choice(s).

o   TOPAS .xye files - This format is a simple 3-column (2-theta, intensity & sig) text file. The file names are found in a directory dialog; you can change directories as needed.

o   guess format from file - This attempts to read one data set from a file trying the formats as described above. On occasion, this command may not succeed in correctly determining a file format. If it fails, retry by selecting the correct format from the list.

o   other supported formatsBruker .RAW; FullProf .dat; Panalytical .xrdml; Comma-separated .csv; Rigaku .ras & .txt

Other formats that are supported, but are only documented in the Powder Data Imports section of the Programmers documentation.

Note that there are also three separate "special" import items, as documented below:

o   Simulate a dataset - This creates a histogram with all zero intensity values in it using a set of instrument parameters that are read in from a file or one of the default sets provided when Cancel is pressed at the prompt to select a file. The user is able to specify the data range and step size. One or more crystalline phases must also be provided to perform a crystallographic simulation. When the "Refine" menu command is initially used, the intensities are computed from these phases and the "observed" intensity values are set from these computed values, with superimposed "random" noise added based on the calculated values as σ=sqrt(I) (increase the histogram scale factor to change this, if desired). Further refinements can then be used to fit to these simulated data. To reset the "observed" intensity values back to zero, to recompute them, use the "Edit range" button on the "PWDR" tree item that is created by this option.

o   Auto Import - This brings up a window that reads in powder diffraction files as they are added to a directory. The file extension must determine the importer that will be used and a filter pattern is specified to determine which files will be read (e.g. use "*June23*.fxye" so that only files that contain the string "June23" will be read.

o   Fit Instr. profile from fundamental parms... - This option is used to compute instrument parameters from a set of fundamental parameters that describe a constant wavelength (most likely Bragg-Brentano) powder diffraction instrument. The user must first specify the data range to be used and then a set of FP (fundamental parameter) values. The FP values and a source spectrum can be supplied using a nomenclature similar to Topas (described further below). They will then be converted to the SI units and parameter names used in the NIST FPA code. Alternately a file can be supplied with the parameter values used directly in that program. With this input, a series of peaks are computed across the specified data range and the Instrumental Parameters that determine the instrumental profile (U, V, W, X, Y and SH/L) are determined from those peaks. These values are then saved in an instrument parameter file that can be used when reading in new datasets or for pattern simulation.

 

Description of the Topas-style fundamental parameters used as FPA input for GSAS-II

Parameter name

Units

Description

Basic Bragg-Brentano parameters

divergence

degrees

Angle in equatorial plane describing the sample illumination for a Bragg-Brentano instrument

soller_angle

degrees

Angular limit for divergence in equatorial plane as limited by Soller collimator(s)

Rs

mm

Diffractometer radius: source to sample and sample to detector distance

filament_length

mm

Length of x-ray filament when used in “line-focus” (filament oriented along the axial direction)

sample_length

mm

Illuminated sample length in axial direction. Typically the same as filament_length.

receiving_slit_length

mm

Length of the receiving slit in axial direction. Typically the same as filament_length.

LAC_cm

cm-1

The linear absorption coefficient adjusted for the sample packing density.

sample_thickness

mm

Thickness of sample measured along the radial direction in the equatorial plane

convolution_steps

(none)

The number of steps used for convolution for each step in the diffraction pattern. This results in more smooth convolutions. 

source_width

mm

Width of x-ray filament in projection in the equatorial plane.

tube-tails_L-tail

mm

Width for x-ray intensity occurring beyond the Wehnelt shadow as a projection in the axial direction and measured in the positive two-theta direction.

tube-tails_R-tail

mm

Width for x-ray intensity occurring beyond the Wehnelt shadow as a projection in the axial direction and measured in the negative two-theta direction.

tube-tails_rel-I

(none)

Fractional of x-ray intensity found in the tube tails vs. the main peak. Note that tube tails are modeled as a step function.

Point detector parameter

receiving_slit_width

mm

Width of receiving slit placed in front of detector or possibly the diffracted beam monochromator (analyzer) measured in the equatorial plane

Linear position-sensitive detector parameter

SiPSD_th2_angular_range

degrees

Angular (two-theta) range in equatorial plane that the entire Si PSD subtends (not implemented in Topas)

Incident-beam monochromator (IBM) parameters

src_mono_mm

mm

Distance between the x-ray source (filament) and the monochromator, measured in the equatorial plane

focus_mono_mm

mm

Distance from monochromator crystal to focus slit, measured in the equatorial plane

passband_mistune

(none)

Offset for the tuning of the IBM to the center of the reference line of the spectrum, as a fraction of the IBM bandwidth

mono_src_proj_mn

μm (micron)

Bandwidth setting for the monochromator as set by the projection width of the xray source on the monochromator along beam direction and in the equatorial plane

passband_shoulder

(none)

Width of transition region from high-intensity, roughly flat region of the x-ray tube output to the to the tube tails region as a fraction of the IBM bandwidth

two_theta_mono

degrees

The full diffraction angle of the IBM crystal. This will be double the Bragg two-theta angle for the monochromator

mono_slit_attenuation

(none)

The attenuation of the Cu K alpha 2 source lines relative to the K alpha 1 lines as determined by the focal slit

If you use this, please cite M.H. Mendenhall, K. Mullen & J.P. Cline (2015), J. Res. of NIST, 120, p223. DOI: 10.6028/jres.120.014. If the incident beam monochromator model is used, please also cite: M.H. Mendenhall, D. Black & J.P. Cline (2019), J. Appl. Cryst., 52, p1087. DOI: 10.1107/S1600576719010951.

 

·         Structure Factor - Reads single crystal input from a variety of file types. Results are placed in the GSAS-II data tree as ‘HKLF file name’

o   F**2 HKL file - This reads squared structure factors (as F**2) and sig(F**2) from a SHELX format .hkl file. The file names are found in a directory dialog; you can change directories as needed. You must know the file contains structure factors (as F**2) as the file itself has no internal indication of this.

o   F HKL file - This reads structure factors (as F) and sig(F) from a SHELX format .hkl file. The file names are found in a directory dialog; you can change directories as needed. You must know the file contains structure factors (as F values) as the file itself has no internal indication of this.

o   CIF file - This reads structure factors (as F**2 or F) and sig(F**2 or F) from a .CIF (or .cif) or .FCF (or .fcf) format file. The file names are found in a directory dialog; you can change directories as needed. The internal structure of this file indicates in which form the structure factors are used.

o   guess format from file - This attempts to read one data set from a file trying the formats as described above. However, since it cannot be determined if SHELX format .hkl contains F or F**2 values, do not use this command for those files. On occasion, this command may not succeed in correctly determining a file format. If it fails, retry by selecting the correct format from the list.

There are specific importers for incommensurate or twinned single crystal data as well as data from specific neutron diffractometers.

·         Small Angle Data - Reads small angle scattering data from files. Results are placed in the GSAS-II data tree as ‘SASD file name’. The data are in ‘QIE’ form as q-stepped data of intensities and optional sig(I) as 3 (or) 2 columns. Data may be preceded by comment records. Importers are for x-ray or neutron data with q in Å-1 or nm-1; data will be stored in Å-1. The data type is either ‘LXC’ or ‘LNC’

·         Reflectometry Data - Reads x-ray or neutron reflectometry data from files. Results are placed in the GSAS-II data tree as ‘REFD file name’. The data are in ‘QIE’ form as q-stepped data of intensities and optional sig(I) as 3 (or) 2 columns. Data may be preceded by comment records. The data type is either ‘RXC’ or ‘RNC’.

·         Powder Peak Position Data - Reads ordered peak positions as 2Q or d-spacing from .txt files. Results are placed in the GSAS-II data tree as ‘PKS file name’. The data format consists of optional comments (each line starts with ‘#’) followed by positions in a single column. If 1st position is larger than last, they are interpreted as d-spacings, otherwise as 2Q. A second column of intensities is optional.

·         PDF G(R) Data - Reads pair distribution data for possible analysis by PDFfit from within GSAS-II.

5.      Export Menu

GSAS-II uses separate routines to write out files with information inside GSAS-II. These routines can be created and customized easily. See the GSAS-II Export Modules section of the Programmers documentation for more information on this. Since it is easy to support new formats, the documentation below may not list all supported formats.

·         Entire project as - At present there are two supported formats for a project. One is a Full CIF file, which brings up a separate window where information such as ranges for bond distances and angles can be selected. The other is a 2-column text file of parameter name and value(esd), suitable for cutting/pasting into manuscripts.

·         Phase as - Phases can be exported in a variety of formats including a simplified CIF file that contains only the unit cell, symmetry and coordinates.

·         Powder data as - Powder data can be exported in number of formats. Note that this menu can also be used to export reflection lists from Rietveld and Pawley fits.

·         Small angle data - This is exported only as a csv text file.

·         Reflectometry data - This is exported only as a csv text file.

·         Single crystal data as - Single crystal reflection lists can be exported as text files or as a simplified CIF file that contains only structure factors.

·         Image data - This exports selected images as a portable networks graphics format (PNG) file. Alternately, the image controls and masks can be written for selected images. If strain analysis has been performed on images, the results can also be exported here as a spreadsheet (.csv file).

·         Maps as - Fourier maps can be exported here.

·         Export all Peak Lists... - This allows peak lists from selected powder histograms to be written to a simple text file. There will be a heading for each PWDR GSAS-II tree item and columns of values for position, intensity, sigma and gamma follow.

·         Export HKLs - This allows single crystal reflection lists from selected histograms to be written to a file.

·         Export MTZ file - This exports macromolecular structure information in a commonly recognized format for input to other macromolecular packages.

·         Export PDF... - This allows computed PDFs peak lists from selected histograms to be written as two simple text files, {name}.gr and {name}.sq, containing g(r) and s(q), respectively as 2 columns of data; a header on each indicated the source file name and the column headings. The file name comes from the PDF entry in the GSAS-II data tree.



5. GSAS-II data tree items

Notebook

This window provides a place for you to enter whatever text commentary you wish. Each time you enter this window, a date/time entry is provided for you. A possibly useful technique is to select a portion of the project.lst file after a refinement completes (it will contain refinement results with residuals, new values & esds) and paste it into this Notebook window so it becomes a part of your project file. Some GSAS-II operations (e.g., structure refinement & fourier map calculation) will add entries to the notebook.

What can I do here?

Use the notebook to keep track of information related to how you use GSAS-II.

Controls

This window provides access to the controls that determine how GSAS-II performs minimizations as well as few global parameters for GSAS-II. Note that many other customization settings are set as configuration variables in the Preferences menu. (See the Programmer's documentation for a description of those.)

1.      Refinement Controls: These controls determine how refinements are performed. The first determines the computational engine used to minimize the structure.

·         Refinement type - This determines how structure refinements are performed. The choices are:

o    analytic Hessian: This is the default option and is usually the most useful. It uses a custom-developed least-squares minimizer that uses singular-value decomposition (SVD) to reduce the errors caused by correlated variables and the Levenberg-Marquardt algorithm to up-weight diagonal Hessian terms when a refinement step fails to lower χ2.

o    analytic Jacobian: This uses a numpy-provided leastsq minimizer, which not applicable for problem with a large number of histograms as it requires much more memory than the Hessian routines. This because it creates a Jacobian matrix (J) that is shaped N x M (N parameters x M observations) while the Hessian method create a Jacobian matrix only for each histogram; the N x N Hessian is the made from summing the J x JT products across the histograms

o    numeric: This also uses the numpy leastsq minimizer and is also not applicable for larger problems. Unlike, the "analytic Jacobian", numerical derivatives are computed rather than use the analytical derivatives that are coded directly into GSAS-II. This will be slower than the analytical derivatives and will is often less accurate which results in slower convergence. It is typically used for code development to check the accuracy of the analytical derivative formulations.

o    Hessian SVD: This is very similar to analytic Hessian but does not include the Levenberg-Marquardt algorithm. It can be faster but is more prone to diverge when severe correlation is present. It is possible that it might be better for single-crystal refinements.

Note that the Jacobian refinement tools are the Fortran MINPACK lmdif and lmder algorithms wrapped in python as provided in the numpy/Scipy package. The Hessian routines were developed for GSAS-II based on routines in numpy and scipy and used material from Numerical Recipes (Press, Flannery, Teulosky & Vetterling) for the Levenberg-Marquardt algorithm. The lmdif and lmder routines were written by Burton S. Garbow, Kenneth E. Hillstrom, Jorge J. More (Argonne National Laboratory, 1980).

·         Min delta-M/M - A refinement will stop when the change in the minimization function (M=Σ[w(Io-Ic)2]) is less than this value. The allowed range is 10-9 to 1.0, with a default of 0.001. A value of 1.0 stops the refinement after a single cycle. Values less than 10-4 cause refinements to continue even if there is no meaningful improvement.

·         Max cycles - This determines the maximum number of refinement cycles that will be performed. This is used only with the "analytical Hessian" and "Hessian SVD" minimizers.

·         Initial lambda - Note that here λ is the Marquardt coefficient, where a weight of 1+λ is applied to the diagonal elements of the Hessian. When λ is large, this down-weights the significance of the off-diagonal terms in the Hessian. Thus, when λ is large, the refinement is effectively one of steepest-descents, where correlation between variables is ignored. Note that steepest-descents minimization is typically slow and may not always find the local minimum. This is only used when with the "analytical Hessian" minimizer is selected.

·         SVD zero tolerance - This determines the level where SVD considers values to be the same. Default is 10-6. Make larger to where problems occur due to correlation. This is used only with the "analytical Hessian" and "Hessian SVD" minimizers.

·         Initial shift factor - This provides an initial scaling (“damping”) for the first cycle of refinement. Only available for “analytic Jacobian” and “numeric” minimizers.

2.      Single Crystal Refinement Settings: A set of controls is provided for control of single-crystal refinements. These only appear when single crystal (HKLF) histograms are present in the project.

·         Refine HKLF as F^2? - When checked, refinements are against F2 rather than |F|.

·         Min obs/sig - Conventional cutoff for single crystal refinements as to what reflections should be considered observed, typical values are 2.0 (2σ) or 3.0 (3σ).

·         Min extinct. – Reflections with extinction corrections larger than this value are ignored.

·         Max delt-F/sig - Removes reflections that are very poorly fit. Should be used only with extreme care, since poorly-fit reflections could be an indication that the structure is wrong.

·         Max d-spacing - Reflections with d-space values larger than this value are ignored.

·         Min d-spacing - Reflections with d-space values smaller than this value are ignored.

3.      Sequential Settings: A set of controls is for sequential refinement. Settings here determine if a "normal" or "sequential" refinement is performed. If no datasets are selected here, then all histograms linked to phases in the project and that are flagged as "used" are included in one potentially large (combined) refinement. However, if any number of histograms are selected here, then a sequential refinement is performed, where a fit is made to the structural model(s) fitting each selected histogram in turn. Only the first item below is shown in "normal" mode.

·         Select datasets/Reselect Datasets - This brings up a menu where histograms can be selected, which potentially switches between a normal and a sequential refinement. If one or more histograms are selected, a sequential refinement is used. If none are selected, then the refinement be set as "normal". The button is labeled "Select" when in normal refinement mode and "Reselect" in sequential refinement mode.

·         Reverse order? - Normally, in a sequential refinement histograms are fit in the order they are in the data tree (which can be reordered by dragging tree items), but when this option is selected, the sequential fit is performed with the last tree entry first.

·         Copy results to next histogram? - When this option is selected, the fitted parameters from each refinement are copied to the next histogram, so that the starting point for each refinement will be the results from fitting the previous. This works well for parametric experiments where parameters such as the lattice parameters change gradually over the course of successive measurements. This option is usually used only for the initial refinement after a sequential fit is started and the setting is cleared once that refinement is completed. For subsequent refinements, it is usually better to start with the results from the previous fit.

·         Clear previous seq. results - When this button is pressed, the "Sequential Results" entry with the results from the last sequential fit is deleted from the tree.

4.      Global Settings: This is a location for parameters that apply to an entire project. At present there is only one.

·         CIF Author - The value provided here is used when creating a CIF of an entire project.

What can I do here?

This offers a place to change how GSAS-II performs refinements but has no specific menu commands or graphics.

Covariance

This window contains final residual information; the GSASII Plots window ‘Covariance’ shows a graphical representation of the variance-covariance matrix. A text window is displayed with statistical values and goodness of fit parameters. At the bottom of this list is a button to display a horizontal bar chart of the shift in each parameter value between the beginning of the refinement and the end divided by the standard uncertainty from the last refinement cycle.

What is plotted here?

The variance-covariance matrix as a color-coded array is shown on this page. The color bar to the right shows the range of covariances (-1 to 1) and corresponding colors. The parameter names are to the right and the parameter numbers are below the plot.

What can I do with the plot?

·         Move the mouse cursor across the plot. If on a diagonal cell, the parameter name, value and esd is shown both as a tool tip and in the right-hand portion of the status bar. If the cursor is off the diagonal, the two parameter names and their covariance are shown in the tool tip and the status bar.

·         Use the Zoom and Pan buttons to focus on some section of the variance-covariance matrix.

·         Press ‘s’ – A color scheme selection dialog is shown. Select a color scheme and press OK, the new color scheme will be plotted. The default is ‘RdYlGn’.

·         Press ‘p’ – Saves the covariance values in a text file.

Constraints

This window shows the constraints to be used in a refinement. Constraints are divided with a tab for each type: Phase, Histogram/Phase, Histogram, Global and Sym-Generated. Note that the standard parameters in GSAS-II are divided into three classes and appear respectively on the Phase, Histogram and Histogram/Phase tabs:

·         those pertaining to quantities in each phase (naming pattern "p::name"); examples include atom coordinates, thermal motion and site fraction parameters;

·         those pertaining to quantities in each histogram (naming pattern ":h:name"); such parameters are those that depend only on the data set: the scale factor and profile coefficients (e.g. U, V, W, X and Y);

·         and those pertaining to quantities defined for each histogram in each phase (naming pattern "p:h:name"); these parameters are quantities that can be dependent on both the phase properties and the sample or dataset used for the measurement. Examples include phase fractions and sample-broadening coefficients such as microstrain and crystallite size; they are found in the Data tab for each phase.

The following types of constraints may be specified by users:

·         Holds - Use this to prevent a parameter from being refined. Most valuable when refinement of a parameter is selected in a group for refinement (such as x, y & z for an atom or unit cell parameters) and one must be fixed. For example, if the space group for a phase has a polar axis (e.g., the b-axis in P21), then the origin with respect to b is arbitrary and it is not possible to refine the y coordinates for all atoms. Place a Hold on any one atom y coordinate to keep the structure from drifting up or down the y-axis during refinement.

·         Equivalence assignments - Determines a set of parameters that should have values with a specified ratio (except for atom coordinates, where the ratios are specified for the applied shifts, not the actual coordinate values) Examples for typical use are sets of atoms that should be constrained to have the same displacement parameters (aka thermal motion, Uiso, etc.) or sets of profile coefficients U,V,W across multiple data sets. Note that the first selected parameter is treated as independent, and the remainder are "slaved" to that parameter as "dependent parameters." All parameters in an equivalence must be varied. If any parameter is not varied or is given a "hold," a warning is displayed and none of the parameters are refined.

·         Constraint Equations - Defines a set of parameters whose sum (with possible non-unitary multipliers) will be equal to a constant. For example, a common use for this is to specify the sum of occupancies for atoms sharing a site have a sum fixed to unity or so that the sum of occupancies for an atom type that is occurs on several sites is fixed to match a composition-determined value. Note that all parameters in the equation are considered as "dependent parameters." If a parameter in a constraint equation is held or is not varied, that parameter is removed from the equation (the sum value is modified accordingly). If no parameters remain the equation is ignored.

·         New Var assignment - These are similar to constraint equations in that they define a set of parameters and multipliers, but rather than specifying a value for the expression, a new parameter is assigned to that sum and these constraints have a very different function. This replaces a degree of freedom from the original variables with a new one that modifies the parameters where the shift is applied according to the ratio specified in the expression. This can be used to create new parameters that redefine the relationships between items such as coordinates or magnetic moments. The new parameter may optionally be named by the user. The new var expression creates a new global parameter, where that new parameter is independent, while all the parameters in the expression are considered as dependent. The setting of the refine flags for the dependent parameters is not used. Only if the new var parameter is marked as refine then it will be refined. However, if any dependent variable is set as "hold," the new var parameter will not be refined.

Note that when new var and constraint equation constraints are defined, they create new global parameters. Constraints on these will be rare, but can be managed on the Globals tab. Finally, some constraints are defined automatically based on restrictions determined by space group symmetry. These constraints can be seen, but not changed, using the Sym-Generated tab. Other constraints (holds) will be created when rigid bodies are specified.

New Var constraints are generated when ISODISTORT is used to develop mode distortions from a comparison of a high symmetry parent structure (e.g. cubic perovskite) with a distorted child substructure. They are developed for the phase imported from the special cif file produced by ISODISTORT from a mode distortion analysis.

What can I do here?

Select the tab for the parameter type(s) you wish to constrain then create new parameters using the "Edit Constr." menu commands:

·         Add Hold - Select a parameter that you wish to remain fixed. If selected, a dialog box will appear showing the list of available parameters; select one and then OK to implement it, Cancel will cancel the operation. The held parameter will be shown in the constraint window with the keyword ‘FIXED’.

·         Add equivalence - Select the independent parameters and press OK; a second dialog box will appear with only those parameters that can be made equivalent to the first one. Choose those and press OK. Cancel in either dialog will cancel the operation. The equivalenced parameters will show as an equation of the form M1*P1+M2*P2=0; usually M1=1.0 and M2=-1.0 but can be changed via the ‘Edit’ button. The equation(s) are shown in the window tagged by ‘EQUIV’ to mark it as an equivalence assignment.

·         Add constraint - If selected, a dialog box will appear with a list of the available parameters. Select one and press OK; a second dialog box will appear with only those parameters that can be used in a constraint with the first one. Choose those and press OK. Cancel in either dialog will cancel the operation. The equivalenced parameters will show as an equation of the form M1*P1+M2*P2+…=C; the multipliers M1, M2, … and C can be changed via the ‘Edit’ button. The equation is shown in the window tagged by ‘CONSTR’ to mark it as a constraint equation assignment.

·         Add New Var - This behaves very much like the “Add constraint” menu command except that it defines a new parameter rather than define a value for the expression. That new var parameter can optionally have a named assigned. The expression is displayed with the keyword ‘New Var’ to mark its type. Note that a ‘Refine?’ box is included for this type of constraint.

·         Make atoms equivalent - This provides a shortcut for establishing constraints when two share a single site. Coordinates and Uiso values are constrained to be the same and site fractions are constrained to add to 1.

·         Show ISODISTORT modes - Used after a CIF from the ISODISTORT web site is read, which will display the values for the normal modes from representational analysis from the coordinates.

In addition to menu commands, this window also offer the following actions by pressing buttons:

·         Show Errors - this button will be active if serious errors -- that would prevent a refinement from being performed -- are encountered processing the constraints.

·         Show Warnings - this button will be active if correctable problems are encountered in processing the constraints, such as a constraint being rejected because a parameter is not varied. These warning may indicate that the choice of which parameters will be refined is not what was planned.

·         Show Generated Constraints - After constraints have been processed, a series of relationships are developed to determine new variables from the current parameters and "inverse" equations that determine dependent parameters from the new variables and independent parameters. This shows the resulting relationships, as well as any "Hold" variables.

·         Delete Selected - This button will cause all the selected constraints on the current tab to be deleted.

Sequential Refinement Constraints

While all the general information on constraints (above) applies to sequential refinements, the sequential refinement is performed by fitting each histogram individually and this affects how constraints are defined and processed for parameters keyed to a particular constraint number. When sequential refinement is selected (via the Controls tree item), it becomes possible to define constraints of form "p:*:name" and ":*:name" (where "p" is a phase number and name is a parameter name). The "*" here is called a wildcard, and in a constraint or equivalence will cause that to be used for every histogram in turn.

 

In sequential refinement mode, two additional controls are shown in the Constraints window. The first, which is labeled wildcard use, specifies what is done when a specific histogram is referenced by number in a constraint or equivalence by number rather than by wildcard. This offers three modes:

·         Set hist # to * - Any constraints previously specified with a specific histogram number will be changed to apply to all histograms. This is the default for new projects.

·         Ignore unless hist=* - Any constraints previously specified with a specific histogram number will be ignored and constraints with a "*" where for a histogram number will be used. Note that constraints on phase parameters (of form "p::name" -- without a histogram number specified) will be used normally. Note that this was the normal operating mode for GSAS-II in earlier versions.

·         Use as supplied - If different constraints are to be applied to different histograms, it becomes necessary to create constraints with specific histogram numbers. In this mode, constraints specified with a specific histogram are applied only to that histogram while wildcarded ones are applied to all histograms. Note that one should not specify two constraints on a single parameter, one with a wildcard and one with a specific histogram number as both will be applied to the specified histogram which will result in an unsatisfiable conflict.

Also included when sequential refinement is selected is a menu button labeled "Selected histogram." With this it is possible to look at constraint problems when processing a specific histogram.

Restraints

This window shows the restraints to be used in a refinement for each phase (if more than one). It is organized into several tabbed pages, one page for each type of restraint. Restraints are developed for an individual phase and act as additional observations to be “fitted” during the refinement.

What can I do here?

·         Select the tab for the restraint type you wish to use. Each will have the same possibilities in the ‘Edit’ menu.

·         You can change the Restraint weight factor – this is used to scale the weights for the entire set of restraints of this type. Default value for the weight factor is 1.0.

·         You can choose to use or not use the restraints in subsequent refinements. Default is to use the restraints.

·         You can change the search range used to find the bonds/angles that meet your criteria for restraint.

·         You can examine the table of restraints and change individual values; grayed out regions cannot be changed. The ‘calc’ values are determined from the atom positions in your structure, ‘obs’ values are the target values for the restraint and ‘esd’ is the uncertainty used to weight the restraint in the refinement (multiplied by the weight factor).

·         Menu ‘Edit’ – some entries may be grayed out if not appropriate for your phase or for the selected restraint.

o   Add restraints – this takes you through a sequence of dialog boxes which ask for the identities of the atoms involved in the restraint and the value to be assigned to the restraint. The esd is given a default value which can be changed after the restraints are created.

o   Add residue restraints – if the phase is a ‘macromolecule’ then develop the restraints from a selected ‘macro’ file based on those used in GSAS for this purpose. A file dialog box is shown directed to /GSASIImacros; be sure to select the correct file.

o   Add MOGUL restraints – add restraints in the style of the MOGUL program

o   Plot residue restraints – if the phase is a ‘macromolecule’ and the restraint type is either ‘Torsion restraints’ or ‘Ramachandran restraints’, then a plot will be made of the restraint distribution; torsions as 1-D plots of angle vs. pseudopotential energy and Ramachandran ones as 2-D plot of psi vs phi. In each case a dialog box will appear asking for the residue types or specific torsion angles to plot. Each plot will show the observed distribution (blue) obtained from a wide variety of high-resolution protein structures and those found (red dots) for your structure. The restraints are based on a pseudopotential (red curve or contours – favorable values at the peaks) which has been developed from the observed distributions for each residue type.

o   Change value – this changes the ‘obsd’ value for selected restraints; a dialog box will appear asking for the new value.

o   Change esd – this changes the ‘esd’ value for selected restraints; a dialog box will appear asking for the new value.

o   Delete restraints – this deletes selected restraints from the list. A single click in the blank box in the upper left corner of the table will select/deselect all restraints.

Rigid bodies

This window shows the rigid body models that have been entered into GSAS-II for this project. There are two tabs; one is for vector style rigid bodies and the other is for flexible “Residue” rigid bodies. Note that these rigid bodies must be inserted into one of the phases before it can take effect in the crystal structure description.

What can I do here?

·         Select the tab for the rigid body type you wish to use. Each will have the different possibilities in the ‘Edit’ menu depending on whether a rigid body has been defined.

·         Menu ‘Edit Vector Body’ or ‘Edit Residue Body’ – the entries listed below depend on which type of rigid body is selected.

o   Add rigid body – (Vector rigid bodies) this creates a vector description of a rigid body. A dialog box asks the number of atoms (>2) and the number of vectors required to create the rigid body. An entry will be created showing a magnitude with the vector set to be applied for each vector needed to develop the rigid body.

o   Import XYZ – (Residue rigid bodies) this reads a text file containing a set of Cartesian coordinates describing a rigid body model. Each line has atom type (e.g. C, Na, etc.) and Cartesian X, Y and Z.

o   Define sequence – (Residue rigid bodies) this defines a variable torsion angle in a sequence of dialog boxes. The first one asks for the origin and the second asks for the pivot atom for the torsion from the nearest neighbors to the origin atom; the atoms that ride on the selected torsion are automatically found from their bond lengths.

o   Import residues – (Residue rigid bodies) this reads a predetermined macro file that contains standard (Engh & Huber) coordinates for the amino acids found in natural proteins along with predetermined variable torsion angle definitions.

·         Once a rigid body is defined you can plot it, change its name or manipulate any torsion angle to see the effect on the plot.

·         The translation magnitudes in a vector rigid body can be refined.

Sequential refinement results

This tree entry is available after a sequential refinement has been run. (See the Controls tree item to set the histograms to be used in a sequential refinement and use the Calculate/Sequential refine menu command to run the refinement.) A number of other fitting processes within GSAS-II can be done sequentially, each will have its own differently named set of sequential results When any one is selected, the window tabulates the sequential refinement results. The columns are the parameter names; the naming convention is generally ‘p:h:name:n’ where ‘p’ is the phase number,’ h’ is the histogram number, ‘name’ is the parameter name, and ‘n’ (if needed) is the item number (e.g. atom number). The rows are the data sets used in the sequential refinement.

What can I do here?

·         Select a row – a right mouse button will display the variance-covariance matrix for the refinement with that data set; a left mouse button will display its powder data fit.

·         Select a column – this will display a plot of that parameter across the sequence of data sets. Error bars for each value are also shown. Selecting multiple columns (hold Ctrl key down for subsequent picks) will plot all as individual curves.

·         Menu ‘Columns/Rows’ –

o   Set used – this allows you to select in a dialog which entries to use; those not used are not plotted or used in further processing.

o   Update phase from row – this updates the phase parameters from the entries in the selected row. Normally the phase parameters at the end of a sequential fit are those obtained from the last histogram.

o   Set phase vals – same as previous except you can pick which parameters to update.

o   Plot selected cols – plots the selected columns (redundant as selecting the columns automatically plots them)

o   Rename selected cols – can change column names with this

o   Save selected as text – gives a txt file with columns of data from those selected.

o   Save selected as CSV – gives a comma separated values (CSV) file of selected columns.

o   Compute average – gives average(esd) for selected column values.

o   Hide columns – you can select/deselect columns to not show in table.

o   Save all as CSV – gives a CSV file for all table entries.

·         MenuPseudo Vars’ – this is used to create derived results from sequentially refined parameters; new columns are the result.

o   Add Formula – create a formula used to make a derived result.

o   Add Distance – adds a new column for a specific interatomic distance.

o   Add Angle – adds a new column for a specific 3-atom angle.

o   Delete – to remove a pseudo variable formula.

o   Edit – to change a selected formula.

·         Menu Parametric Fit - this is used to create fitting models for any column of sequential results.

o   Add equation – add a parametric fitting equation. At the end of this step, it will be used to give refined values of the coefficients with esds based of a full error propagation from the variance-covariance matrices from the individual refinements.

o   Copy equation – make a copy of a parametric equation.

o   Delete equation – to remove a parametric equation.

o   Edit equation – to edit an equation.

o   Fit to equation(s) – do the fitting of the parametric equations to the data.

·         MenuSeq export’ –

o   Project asonly choice is as a full cif file.

o   Phase as – either a “quick’ cif or a CSV file

o   Powder as – either a powder pattern cif, a histogram CSV file or a reflection list CSV file.

o   Save table as CSV – same as Save all as CSV above.

What can I do with the plot?

By default, the plot shows the variation of the selected parameters across the sequence of histograms used in the sequential fit. Each point that was fitted shows as an x with a vertical bar indicating the standard error from the fit for that value. There are some key commands:

·         Press ‘l’ – this toggles display of connecting lines between the data points

·         Press ‘s’ – this presents a choice of parameters from the table columns to be used for the x-axis. Typically, this is used to show parameter variation with e.g. temperature.

·         Press ‘t’ – this provides access to all three titles of the plot.



6. Histogram data tree items

These are shown in the data tree with a prefix of ‘PWDR’, ’HKLF’, ‘PDF’, ‘IMG’, ‘PKS’, ‘SASD’, ‘REFD’ or and usually a file name. These constitute the data sets (‘Histograms’) to be used by GSAS-II for analysis. Selection of these items does not produce much information in the data window but does display the data in the Plots Window. They are described below.

6A. Powder Histograms - type PWDR

[see separate page]

6B. Single Crystal Histograms – type HKLF

What can I do here?

You can change the weight factor. This is a multiplier on all of the reflection weights in this histogram. Rarely needs to be changed.

Menu Commands

·         Error Analysis – this produces a ‘normal probability’ plot for the refinement result as bounded by the limits. The slope and intercept of the curve in the central region (-1 < / < 1) are shown on the plot status line. The slope is the GOF for the best fit set of data points (~68% of the data).

·         Merge HKLs – this combines equivalent/duplicate reflections according to space group and some options to make a unique and averaged set of structure factors.

·         Plot 1D HKLs – shows a stick diagram scaled to Fc2 for the reflection for the selected phase

·         Plot HKLs (the default plot)– shows a HKL layer with rings scaled to F or F2 for Fo and Fc. +/- steps through the layers and h,k or l selects the orientation – see K box for all the possible commands.

·         Plot 3D HKLs – shows a 3D representation of the unique part reciprocal space points for this phase. The save as/key item in the plot status bar shows the various commands for modifying this plot.

Instrument Parameters

This window shows the histogram type (SXC or SNC) and the wavelength. You may change the wavelength or source type but rarely will need to do so.

Reflection List

This window shows the reflections for this single crystal data set.

What can I do here?

·         Menu ‘Reflection List’ – some items are useful for SHKL (single crystal) histograms.

o   Select phase – if there is more than one phase; you can select another phase; the window title will show which phase is shown. You can also simply select the tab for the desired phase.

o   Plot 1D HKLs – shows a stick diagram scaled to Fc2 for the reflection for the selected phase

o   Plot HKLs (the default plot)– shows a HKL layer with rings scaled to F or F2 for Fo and Fc. +/- steps through the layers and h,k or l selects the orientation – see K box for all the possible commands.

o   Plot 3D HKLs – shows a 3D representation of the unique part reciprocal space points for this phase. The save as/key item in the plot status bar shows the various commands for modifying this plot.

o   Wilson statistics – displays a Wilson plot for the intensities.

o   Show/hide extinct reflections – can exclude space group extinctions from the list (not valid for PWDR data).

What is plotted here?

By default, the plot will show a l=0 layer of reflections on a square grid as rings proportional to Fo (blue), Fc (green) and a central dot (green or red) proportional to Fo-Fc.

What can I do with the plot?

The “K” box in the plot controls shows the 14 keystroke controls for the plot – they are generally self-explanatory.

6C. Pair Distribution Functions - type PDF

A PDF entry is created from a powder histogram (PWDR entry) using the Setup PDFs entry in the Calculate menu. The main PDF data tree item displays the same window as the PDF Controls, below. A PDF entry can also be imported as G(R) from a file. When this item is selected, the S(Q) function or G(R) function (if imported) is plotted, see below.

PDF Controls

This window provides parameters for computing the pair distribution function [PDF, G(r)] from the I(Q) function. This can only be done when a chemical formula and appropriate control values are provided. If so, clicking on this menu item causes the I(Q), S(Q), F(Q) and G(R) functions to be plotted, as described below.

The Optimize PDF button can be used to refine the values of the "Flat Bkg", "Background ratio" and "Ruland width" parameters to best agree with the -4*pi*r line that is plotted for r < Rmin. Rmin should be set to a distance below the shortest expected interatomic distance for the material.

What can I do here?

The PDF parameters can be changed, triggering recomputation of the I(Q), S(Q), F(Q) and G(R) functions.

Available menu commands are:

·         Add element - Adds a new element to the chemical formula by clicking on a periodic table. Note that the number of atoms of this type in the empirical formula must still be entered.

·         Delete element - Removes a previously-entered element from the chemical formula.

·         Copy Controls - Copies the current PDF control values to other PDF data entries

·         Load Controls - Replaces the current PDF control values with values read from a file (see Save controls).

·         Save Controls - Saves the current PDF control values into a file.

·         Compute PDF - Recomputes the PDF for the current entry. This is usually done automatically when values are changed, but if not, this can be forced with this menu item.

·         Compute all PDFs - Recomputes the PDFs for all selected PDF entries. This is usually done after Copy Controls is used. By default, PDFs are optimized to reduce the low G(r) region, but this can be turned off.

What is plotted here?

When a chemical formula and appropriate control values are provided, clicking on this menu item causes the I(Q), S(Q), F(Q) and G(R) functions to be plotted, as described separately, below.

What can I do with the plot?

For each of the plots, the following keyboard shortcuts are available:

·         c: contour on/off - if multiple PDFs are available, then a contour plot is shown for the displayed function. All data sets must be the same length as the first one to be included in the contour plot.

·         m: toggle multiple plot - for multiple PDFs, this will show only the one selected from the data tree. The offset options are not active. Or all selected items will be plotted on a single axis.

·         s: toggle single plot - for multiple PDFs, this will show only the one selected from the data tree. The offset options are not active. Or all selected items will be plotted on a single axis.

·         f: select data - Allows only some PDFs to be plotted, rather than all.

·         t: toggle legend - provides a legend with the line type and name for each PDF.

·         l: offset left - for a waterfall plot of multiple powder profiles, increase the offset so that later plots are shifted more to the left relative to previous plots.

·         r: offset right - for a waterfall plot of multiple powder profiles, increase the offset to the right (or decrease the left offset.)

·         d: offset down - for a waterfall plot of multiple powder profiles, increase the offset down.

·         u: offset up - for a waterfall plot of multiple powder profiles, increase the offset up.

·         o: reset offset - for a waterfall plot of multiple powder profiles, reset to no offset.

I(Q) Function

This shows the I(Q) function. See the PDF Controls for information on menu commands and plot options,

S(Q) Function

This shows the S(Q) function. See the PDF Controls for information on menu commands and plot options,

F(Q) Function

This shows the F(Q) function. See the PDF Controls for information on menu commands and plot options,

G(r) Function

This shows the PDF, G(r) function. See the PDF Controls for information on menu commands and plot options,

6D. 2-D Images – type IMG

When a 2D diffraction image (prefix ‘IMG’) is selected from the data tree, the image is displayed as a color contoured picture. At a minimum, a small ‘X’ shows the currently defined location of the incident beam on the image plane (NB: it could off to one side or the other depending on detector location). Optionally, the integration limits are shown as an interior arc, an outer arc and green (beginning 2Q limit) and red (ending 2Q limit) as well as “cake” section limits (dashed lines) connecting the two. These are set in Image Controls. There may be a frame mask (green) that encloses the area used for subsequent integration or other analysis. Red outlines and pixels indicated selected areas/pixels that are excluded (masked) from further use; the settings for these are found in Masks. The data window for IMG shows some controls, most of which are rarely modified (e.g., pixel dimensions) and are usually obtained via the image importer from either the image header or a metadata file associated with the image. It is the user’s/instrument scientist’s responsibility to ensure the accuracy of these values.

What can I do here?

Apart from changing one of the listed values (caution: you do need to know what their true value is), you can determine the x-ray bean polarization and create a gain map for your detector. Both require this image to from a purely isotropic amorphous sample (a glass slide mounted perpendicular to the incident beam is recommended) with the detector close to the sample so that the scattering angle at the edge of the detector is at least 35° 2Q; better is > 40° 2Q. A frame mask is recommended to remove detector edge effects. The image should be as free as possible (except for beam stop) from shadows and obstructions and normal to the incident beam. The detector orientation should have been previously calibrated with a known reference material (e.g., LaB6 or Si).

 

·         Polarization – Calibrate? - This begins the calibration procedure (Von Dreele & Xi, 2021) for the x-ray beam polarization which integrates a 4° 2Q wide ring sampling area with and without an arc mask positioned about 90° azimuth (top of image) with selected polarization values. The integrations match with the correct polarization. You will be asked for a 2Q position for the sampling mask; choose a value at least 2° 2Q less than the maximum 2Q seen for all edges inside the frame mask. The process takes about 5min, so be patient.

·         Make gain map … - This uses the same image (from a glass slide) used for polarization analysis to determine a gain map for the detector. The process uses the result of an integration of the glass pattern to normalize the entire detector pixel array. The result (~1.0 for all pixels) is the scaled by 1000, converted to integers and stored as a GSAS-II image file (NB: this is a python pickle file and thus not usable by other programs) and entered in the GSAS-II data tree. You can view it to see what the map looks like (select its IMG entry). The gain map file can be imported into other projects using the same detector. If selected in Image Controls, the image is immediately corrected for the gain map.

Comments

This window shows whatever comment lines found in a “metadata” file when the image data file was read by GSAS-II. If you are lucky, there will be useful information here (e.g., sample name, date collected, wavelength used, etc.). If not, this window will be blank. The text is read-only.

Image Controls

This window displays calibration values needed to convert pixel locations to two-theta and azimuth. Also shown are controls that determine how integration is performed.

Menu commands for this window are used to perform calibration (fitting the calibration values from a diffraction pattern image taken with a calibrant) and for integration. Other menu commands allow the values on the window to be saved to a file, read from a file or copied to other images. The "Xfer Angles" menu command scales the current integration range for other images located at different detector distances.

Masks

Image masks are used designate areas of an image that should not be included in the integration, typically used due to detector irregularities, shadows of the beam stop, single-crystal peaks from a mounting, etc. Masks can be created with a menu command or with keyboard/mouse shortcuts. There are five types of masks:

·         Spot masks: occlude a circle with a selected center and diameter in image coordinates (mm).

·         Ring masks: occludes a specific Bragg reflection (a ring placed relative to the image center). The location and thickness of the ring are specified in degrees 2-theta.

·         Arc masks: occlude a section of a Bragg reflection, similar to a ring mask, except that in addition to the location and thickness of the ring, the mask has a starting and ending azimuthal angle.

·         Polygon masks: occlude an arbitrary region created by line segments joining a series of points specified in image coordinates (mm). Pixels inside the polygon mask are not used for integration.

·         Frame mask: occludes an arbitrary region created by line segments joining a series of points specified in image coordinates (mm). Typically, a point is placed near each corner of the image. Only pixels inside the frame mask are used for integration. Only one frame mask can be defined.

What can I do here?

Masks of each type are created using the appropriate menu commands and then clicking as described in the section on "What can I do with the plot?" below, or by using keyboard shortcuts, also described in that section.

What is plotted here?

The image is shown, as described above. Note that The frame mask, if defined, is displayed in green, while the other types of masks are shown in red.

What can I do with the plot?

There are menu commands to create masks as well as keyboard shortcuts. If a menu command is used, then use left and right mouse clicks as described below.

1.      Spot masks: occludes inside a circular region of the image.

Create Spot masks after a menu command by clicking on the location on the image that should be masked. There are also two ways to create spot masks with the keyboard:

·         Press the 's' key and then left-click successively on multiple locations for spot masks. Press the 's' key again or right-click* to stop adding spot masks.

·         Alternately, move the mouse to the position for a new spot mask and press the 't' key. (Note that this can be used while the plot is in Zoom or Pan mode.)

The default size for newly-created spot masks is determined by the Spot_mask_diameter configuration variable or 1.0 mm, if not specified.

Edit Spot mask location by left-clicking inside or on the edge the of the mask and then drag the spot mask to a new location.

Edit Spot mask radius by right-clicking* inside the mask and then dragging to change the mask size.

2.      Ring masks: occludes inside a ring of selected width that follows constant 2Q as determined by the calibration (e.g. a Bragg diffraction ring).

Create Ring masks with a menu command and then by left-clicking on the mask center; Or, by pressing the 'r' key and then left-clicking. (Right-click* to cancel.)

The default thickness for newly-created ring masks is determined by the Ring_mask_thickness configuration variable or 0.1 degrees (2theta) if not specified.

Edit Ring mask location by left-clicking on either the inner or outer circle and drag the circle to the new radius.

Edit Ring mask thickness by right-clicking* either on the inner or outer circle and drag the the circle change spacing between the inner and outer circle.

3.      Arc masks: occludes inside an arc of constant 2Q, similar to a ring mask, except that in addition to the location and thickness of the ring, the mask has a starting and ending azimuthal angle.

Create Arc masks with a menu command and then by left-clicking on at the mask center; Or, by pressing the 'a' key and then left-clicking. (Right-click* to cancel.)

The default size for newly-created ring masks is determined by configuration variables
thickness: Ring_mask_thickness (0.1 degrees 2theta if not specified) and
azimuthal range: Arc_mask_azimuth (10.0 degrees if not specified.)

Edit Arc mask location by left-clicking on either the inner or outer circle and drag the circle to the new radius. Alternately, left-click on the upper or lower arc limit (the straight lines) and drag them to rotate the center of the arc azimuthal range to a new position.

Edit Arc mask thickness or range by right-clicking* either on the inner or outer circle and drag the the circle change spacing between the inner and outer circle. Alternately, right-click* on the upper or lower arc limit (the straight lines) and drag them to change the arc azimuthal range.

4.      Polygon masks: occludes inside an arbitrary region created by line segments joining a series of points specified in image coordinates (mm). Pixels inside the polygon mask are not used for integration.

Create Polygon masks with a menu command and then by left-clicking successively on the vertices of the polygon shape surrounding pixels to be excluded. After the last point is defined, right-click* anywhere to close the mask. Alternately, press the 'p' key and then left-click, as before, to define the mask and right-click* anywhere to close the mask.

Edit Polygon mask by left-clicking on any point at a vertex in the polygon mask and drag that point to a new position. If the vertex is dragged to the same position as any other vertex in the mask the dragged point is deleted.

Add a point to Polygon mask by right-clicking* on any vertex and dragging. A new point is added to the mask immediately after the selected point at the position where the mouse is released.

5.      Frame mask: occludes outside an arbitrary region created by line segments joining a series of points specified in image coordinates (mm). Typically, a point is placed near each corner of the image. Only pixels inside the frame mask are used for integration. Only one frame mask can be defined.

Create a Frame mask with a menu command and then by left-clicking successively on the vertices of a polygon. After the last point is defined, right-click* anywhere to close the frame mask. Alternately, press the 'f' key and then left-click, as before, to define the mask and right-click* anywhere to close the mask. Note that if a Frame mask already exists, using the 'f' key or the "Create Frame" menu item causes the existing frame mask to be deleted.

Edit the Frame mask by left-clicking on any point at a vertex in the frame mask and drag that point to a new position. If the vertex is dragged to the same position as any other vertex in the mask the dragged point is deleted.

Add a point to the Frame mask by right-clicking* on any vertex and dragging. A new point is added to the mask immediately after the selected point at the position where the mouse is released.

* Note that on a Mac with a one-button mouse, a right-click is generated by pressing the control button while clicking the mouse.

Stress/Strain

This allows one to evaluate strain typically induced by a pure axial load (e.g. no shear) on a polycrystalline sample (e.g. a steel bar). This strain will distort the Bragg diffraction rings seen by the 2D detector. This follows the method of He & Smith (Baoping Bob He & Kingsley Smith, (1997). Adv. in X-Ray Anal. 41, 501.) to determine the 3 unique terms of the axial strain tensor. One can examine the results as a series of diffraction line d-spacings vs azimuth angle; if no strain these are straight, otherwise they will show a single sinusoidal variation with maxima at the maximum strain direction (90° & 270°) for a tension load. The signs are reversed for a compression load. One can also examine the local intensity variation as multiples of a random distribution (MRD) due to texture. Before embarking on this analysis be sure that your detector is carefully calibrated for orientation and position; you are looking for very slight variations in ring shape which may be biased by inadequate detector calibration. Commonly, the calibrant (typically CeO2) is painted on one sample surface (be sure to note if in front or back of sample!) and the sample ½ thickness is used in the Sample delta-z box (significant only for residual stress analysis).

What can I do here?

Menu Operations -

·         Append d-zero – this adds a d-spacing value to the stress strain ring list; this also can be done by picking a ring from the plot.

·         Fit stress/strain – this fits the three unique axial strain tensor elements (ε11, ε22 & ε12) for each ring to the local ring maxima at 1mm intervals about each ring. Results display on console and table. The fitted d-zero is calculated from the mean d-spacings found for the ring & given as d-zero ave and can be compared to the d-zero value for any residual stress/strain.

·         Plot intensity distribution – this makes an MRD plot with azimuth for each ring.

·         Save intensity distribution – this saves the intensity distribution curves as a simple text file

·         Update d-zero – this updates the d-zero values with the d-zero ave ones thus removing any effect of residual stress/strain.

·         All image fit – this performs the Fit stress/strain operation for a selected sequence of images. NB: the stress/strain data should be copied to all other images before doing this. Results are reported in Sequential strain fit results.

·         Copy stress/strain – this copies the stress/strain data from the current image to other selected images in preparation for doing an All image fit.

·         Save stress/strain – this saves the current stress/strain data to a file with .strsta extension.

·         Load stress/strain – this loads previously saved stress/strain data from a file with .strsta extension.

·         Load sample data – this opens a metadata file containing sample load data.

What is plotted here?

The Strain plot shows the variation of d-spacing for each selected ring with azimuth angle. If there is no strain the points will scatter about a straight line. If there is strain, the points will describe a negative “cosine” curve if the sample is under tension or a positive “cosine” curve if the sample is under compression. If the fit has been done, a calculated curve will be shown along with a dashed black line for the fitted average d-spacing of the calculated curve. This average is either the mean (“Poisson mean” = False) or the Poisson mean which is ¼ or ¾ of the interval from d-min to d-max depending on the comparison between ε11 & ε22. Detector calibration errors will distort these curves.

The Ring intensities plot shows the local intensities as MRD taken at 1mm intervals about the circumference of each ring.

What can I do with the plots?

The Strain plot is best examined line by line by zooming in on each. The deviations are quite small and can not be discerned over the full d-spacing range. You should examine the calibration lines to ensure they are straight.

The Ring intensities plot will respond to the following key strokes:

·         Key ‘l’ – this progressively shifts the RMD lines to the left

·         Key ‘r’ – this progressively shifts the RMD lines to the right

·         Key ‘u’ – this progressively shifts the RMD lines up

·         Key ‘d’ – this progressively shifts the RMD lines down

·         Key ‘o’ – this resets the shifts to zero

·         Key ‘g’ – this toggles display of a grid on the plot

·         Key ‘s’ – this saves all the plot data as a CSV file.

6E. Powder Peaks – type PKS

Powder peaks can only be used for indexing of the peak positions for possible unit cells.

Comments

This window shows whatever comment lines (preceded by “#”) found when the peaks data file was read by GSAS-II. If you are lucky, there will be useful information here (e.g. sample name, date collected, wavelength used, etc.). If not, this window will be blank. The text is read-only.

Limits

This window shows the limits in position to be used in indexing from these peak positions. The ‘original’ values are obtained from the minimum & maximum 1st & last position. The ‘new’ values determine the range of data that will be used in fitting. Units are 2Q.

What can I do here?

You can change the "new" values for Tmin and Tmax as needed. Change the upper and lower Tmin values by clicking on the appropriate vertical line and dragging it to the right or left or by typing values into the data window.

Menu ‘Edit Limits

·         Copy - this copies the limits shown to other selected powder patterns. If used, a dialog box (Copy Parameters) will appear showing the list of available peaks list patterns, you can copy the limits parameters to any or all of them; select ‘All’ to copy them to all patterns. Then select ‘OK’ to do the copy; ‘Cancel’ to cancel the operation.

Instrument Parameters

This window shows the relevant instrument parameters for a peaks list; namely a wavelength and zero needed to relate d-spacing to 2Q. Neither are refinable.

What can I do here?

1.      Menu ‘Operations’ – (many are irrelevant & will probably be removed at some point; only useful ones will be mentioned below).

·         Reset profile – resets the values for the instrument parameters to the default values shown in parentheses for each entry.

·         Load profile… - loads a GSAS-II instrument parameter file (name.instprm), replacing the existing instrument parameter values. All refinement flags are unset.

·         Save profile… - saves the current instrument parameter values in a simple text file (name.instprm); you will be prompted for the file name – do not change the extension. This file may be edited but heed the warning to not change the parameter names, the order of the parameter records or add new parameter records as this will invalidate the file. You may only change the numeric values if necessary. You can change or add comment records (begin with ‘#’).

·         Copy – this copies the instrument parameters shown to other selected powder patterns. If used, a dialog box (Copy parameters) will appear showing the list of available powder patterns, you can copy the instrument parameters to any or all of them; select ‘All’ to copy them to all patterns. Then select ‘OK’ to do the copy; ‘Cancel’ to cancel the operation.

2.      You can change any of the instrument coefficients

Index Peak List

This window shows the list of peaks that will be used for indexing (see Unit Cells List). It was filled when the import of the peaks list was done. It shows 2Q position as input or calculated from provided d-spacing and wavelength given in Instrument Parameters. Note that peaks from a neutron TOF pattern could be entered here as d-spacings in descending order and a suitable wavelength used in the Instrument Parameters. When indexing is completed, this display will show the resulting hkl values for every indexed reflection along with the calculated d-spacing (‘d-calc’) for the selected unit cell in Unit Cells List. .

What can I do here?

1.      You may deselect individual peaks from indexing by unchecking the corresponding ‘use’ box.

Unit Cells List

This tree item has several purposes, it can be used to perform autoindexing and it can be used to show the positions of peaks from unit cells which may be results from autoindexing or may be entered from a phase or manually. It can be used to refine unit cell parameters. It can also be used to search for cells/symmetry settings related to a specified unit cell & space group.

What can I do here?

For autoindexing, the peaks in the Index Peak List are used. Select one or more Bravais lattice types to use and use the "Cell Index/Refine"/"Index Cell" menu command to start indexing. Output will appear on the console and a progress bar dialog will appear which tracks trial volume. A Cancel button will terminate indexing; it may need to be pressed more than once to fully terminate the indexing process. Console output shows possible solutions with a computed M20 for each; good solutions are indicated by high M20 values. X20 gives number of unindexed lines out of the 1st 20 lines and Nc gives total number of reflections generated for each solution.

The "Copy Cell" menu command copies a selected solution to the Unit cell values; the Bravais lattice shown for the choice is copied. Press Show hkl positions to generate the allowed reflection positions, which are visually superimposed on the displayed powder pattern to visually confirm the indexing. Pay particular attention to any unmatched peaks in the pattern. A Space group can be selected from the pulldown box to remove reflections based on space group extinctions and visually eliminate possibilities.

·         Max Nc/Nobs: – this controls the extent of the search for the correct indexing. This may need to be increased if an indexing trial terminates too quickly. It rarely needs to be changed.

·         Start Volume: – this sets an initial unit cell volume for the indexing. It rarely needs to be changed.

·         Select "keep" in the table for a cell that should be preserved when an additional indexing run is tried; all without that are erased before the indexing trial begins.

To display a unit cell, optionally with space group extinctions, set a Bravais class to determine a unit cell type (see list below), optionally select a space group (by default the highest symmetry space group for the class is selected) and enter the unit cell parameters. Or use the "Cell Index/Refine"/"Load Phase" menu command to read this information from a phase that has been read into a project or from a file (such as a CIF) using the "Cell Index/Refine"/"Import Cell" menu command.

For symmetry exploration, once a phase/cell has been loaded, use the "Run SUBGROUPS", "Cell Symmetry Search" or "Run k-SUBGROUPSMAG" commands from the "Cell Index/Refine" menu. These commands look for: subgroups, lower symmetry cells or magnetic subgroups, respectively. Also note the "Transform Cell" command in that menu that can perform many common lattice transformations, apply a user-supplied cell transformation or create a magnetic phase.

To optimize a cell, to fit the peaks in the Index Peak List, use the "Cell Index/Refine"/"Refine Cell" menu command. The results will be placed in the Indexing Result table with ‘use’ selected.

Other: The "Make new phase" command creates a new phase from the selected unit cell and chosen space group. A dialog box will appear asking for a name for this phase. See the new entry under Phases and the new lattice parameters will be in the General window for that phase.

GSAS-II Laue classes (note that some redundant entries are included for convenience.)

·         Cubic: Fm3m, Im3m & Pm3m

·         Rhombohedral: R3-H (hexagonal axes)

·         Hexagonal: P6/mmm

·         Tetragonal: I4/mmm, P4/mmm

·         Orthorhombic: Fmmm, Immm, Ammm, Bmmm, Cmmm, Pmmm

·         Monoclinic: I2/m, A2/m, C2/m, P2/m (b-unique)

·         Triclinic: P1, C1

6F. Small Angle Scattering – type SASD

Comments

This window shows whatever comment lines found above the QIE table when the small angle data file was read by GSAS-II. If you are lucky, there will be useful information here (e.g. sample name, date collected, wavelength used, etc.). If not, this window will be blank. The text is read-only.

Limits

This window shows the limits in position to be used in any fitting for this small angle scattering data. The ‘original’ values are obtained from the minimum & maximum values in the data. The ‘new’ values determine the range of data that will be used in fitting. Units are in Q (Å-1).

What can I do here?

You can change the "new" values for Tmin and Tmax as needed. Change the upper and lower Tmin values by clicking on the appropriate vertical line and dragging it to the right or left or by typing values into the data window.

Menu ‘Edit Limits

·         Copy - this copies the limits shown to other selected small angle patterns. If used, a dialog box (Copy Parameters) will appear showing the list of available small angle patterns, you can copy the limits parameters to any or all of them; select ‘All’ to copy them to all patterns. Then select ‘OK’ to do the copy; ‘Cancel’ to cancel the operation.

Instrument Parameters

This window shows the relevant instrument parameter for small angle data; namely a wavelength to relate Q to scattering angle (2Q). It is not refinable.

What can I do here?

1. Menu ‘Operations’ –

·         Copy – this copies the instrument parameter shown to other selected small angle data. If used, a dialog box (Copy parameters) will appear showing the list of available small angle data, you can copy the wavelength to any or all of them; select ‘All’ to copy them to all patterns. Then select ‘OK’ to do the copy; ‘Cancel’ to cancel the operation.

2. You can change the wavelength.

Substances

This window shows the substances that make up the small angle scattering sample. By default, “vacuum” and “unit scatterer” are included; others can be added as needed. The desired substances must be added to Sample Parameters (below) before their use in constructing scattering models for small angle data analysis.

What can I do here?

1.      Menu ‘Edit substance’ –

·         Load substance – select from a suite of various substance predefined by GSAS-II as defined in GSASII/Substances.py. You may add to this list by adding a file, UserSubstances.py, by following the substance format as described in Substances.py. Place your UserSubstances.py in the GSAS-II directory.

·         Reload substances – this recomputes the scattering contrast data for the substances.

·         Add substance – this allows one to enter a new substance that is not among the previously defined ones. Give it a name, element composition and volume/density; GSAS-II will compute the scattering contrast data for it.

·         Copy substances – this allows one to copy these defined substances to other small angle data histograms.

·         Delete substance – this allows one to remove any substance but not vacuum or unit scatterer.

·         Add elements – this allows one to add new element types to a selected substance.

·         Delete elements – this allows one to remove elements from a substance.

2.      You can edit the composition by changing the number of each kind of element and change the sum of atomic volumes or the material density.

Sample Parameters

This window shows the various sample-dependent parameters for the selected small angle pattern. All values shown in this window can be edited. Note that the last three parameters (named FreePrmX, X=1,2,3) have labels that can be changed. If changed in one histogram, the same label is used for all histograms. When a label is changed, the Comments tree item for each SASD histogram is searched for a matching "Label=value" pair (differences in letter case between the two label strings is ignored). When found, the value is converted to a float and saved as the appropriate Sample Parameter. The last two items define the two components of a small angle scattering sample. One comprises the objects of interest while the other is the marix they are embedded in. The small angle pattern then results from the shape and scattering contrast between the two materials.

What can I do here?

Command Menu  - In this window you can change parameters associated with a histogram. This histogram scale factor is ignored for SASD. Remaining parameters are of use for parametric studies and may be changed with the menu commands described here.

·         Set scale - Rescales a pattern by multiplying by the current scale factor. Scale factor is then set = 1.0. Useful for stitching together partial SASD scans

·         Load - This loads sample parameters from a previously saved .samprm file.

·         Save - This saves the sample parameters to a file with the extension ’.samprm’. A file dialog box will appear to ask for the name of the file to be written.

·         Copy  This copies the sample parameters shown to other selected SASD patterns. If used, a dialog box (Copy parameters) will appear showing the list of available SASD patterns, you can copy the sample parameters to any or all of them; select ‘All’ to copy them to all patterns. Then select ‘OK’ to do the copy; ‘Cancel’ to cancel the operation.

·         Copy selected... - This copies only the sample parameter that are selected to other selected SASD patterns but is otherwise similar to "Copy".

·         Copy flags - (Not valid for SASD).

·         Set one value - This is used to set a single selected sample parameter for a selected set of SASD histograms. The same value can be used for all histograms or a dialog can be used to provide a table where you can set the values differently for each of selected histograms.

·         Load all - Reads a file containing a table of sample parameters and copies them to matching SASD entries. The file will look something like the example here:

#filename       temperature pressure ignore-me  humidity
LaB6_dc250.tif      100          1      test       .2
LaB6_dc300.tif      150          1      test       .25

Note that the first line(s) in the file can be a header, but each header line must start marked with a hash (#). A header is not required. "Columns" in the table are separated by one or more delimiters (which may be a comma, tab or space). Note that columns do not need to be aligned, as long as each entry is spaced by at least one delimiter. The first column in the table is used to look up SASD entries where the initial space-delimited string after the SASD tag ("myfile" in "SASD myfile AZM=180...") must match the table. Subsequent columns can then be mapped to sample parameters or can be ignored, using a dialog window.

·         Rescale all - Allows a series of selected SASD histograms to be put on a common scale by integrating them over a specific Q region and then scaling them so that the integration range will match the first pattern. (May not be valid for SASD)

Models

Small angle scattering models in GSAS-II have four different forms:

·         Size Dist. – this represents the size distribution for particles of a selected shape (usually “spheroid”, but others possible) via maximum entropy or the Interior-Point Gradient (IPG) method. The result is a volume distribution of particle diameters in Å.

·         Particle Fit – this gives the best fit of a suite of models for each component of the sample. Each model is chosen from a suite of possible descriptions, each with parameters that describe the shape, size (as a radius, Å) and magnitude.

·         Pair Distance – this is used as the preliminary step in creating a “beads” model for the shape of a protein and gives the distribution of all interatomic vectors within the protein.

·         Shapes – after a Pairs Distance distribution has been obtained, this develops a bead model for the protein shape that best satisfies the pair distance distribution using the SHAPES python algorithm developed by J. Badger.

What can I do here?

Menu Models

·         Add – this adds a distribution to a Particle Fit model

·         Fit – this does the fitting of the model to the small angle data or bead model to the Pair Distance distribution (Shapes only).

·         Undo – reverses the last fit operation. Can only be done once for a given fit result.

·         Sequential Fit – does the fit to a sequence of SAD data. All must have the same model description.

·         Copy – this copies the current model description to other SASD histograms

·         Copy flags – this copies refinement flags from the current model to other SASD histograms with the same model.

6G. Reflectometry Data – type REFD

Comments

This window shows whatever comment lines found above the QIE table when the reflectometry data file was read by GSAS-II. If you are lucky, there will be useful information here (e.g. sample name, date collected, wavelength used, etc.). If not, this window will be blank. The text is read-only.

Limits

This window shows the limits in position to be used in any fitting for this reflectivity pattern. The ‘original’ values are obtained from the minimum & maximum values in the reflectivity pattern. The ‘new’ values determine the range of data that will be used in fitting. Units are Q(Å-1) for CW data.

What can I do here?

You can change the "new" values for Tmin and Tmax as needed. Change the upper and lower Tmin values by clicking on the appropriate vertical line and dragging it to the right or left or by typing values into the data window.

Menu ‘Edit Limits

·         Copy - this copies the limits shown to other selected powder patterns. If used, a dialog box (Copy Parameters) will appear showing the list of available powder patterns, you can copy the limits parameters to any or all of them; select ‘All’ to copy them to all patterns. Then select ‘OK’ to do the copy; ‘Cancel’ to cancel the operation.

Instrument Parameters

This window shows the relevant instrument parameter for reflectivity data; namely a wavelength needed to properly calculate resonant scattering factors for x-rays or neutrons for the substances used in the reflectometry sample. It is not refinable.

What can I do here?

1. Menu ‘Operations’ –

·         Copy – this copies the wavelength shown to other selected reflectivity data. If used, a dialog box (Copy parameters) will appear showing the list of available reflectivity data, you can copy the wavelength to any or all of them; select ‘All’ to copy them to all patterns. Then select ‘OK’ to do the copy; ‘Cancel’ to cancel the operation.

2. You can change the wavelength.

Substances

This window shows the substances that make up the reflectometry sample. By default, “vacuum” and “unit scatterer” are included; others can be added as needed. The reflectometry model is then constructed from layers of these substances.

What can I do here?

1.      Menu ‘Edit substance’ –

·         Load substance – select from a suite of various substance predefined by GSAS-II as defined in GSASII/Substances.py. You may add to this list by adding a file, UserSubstances.py, by following the substance format as described in Substances.py. Place your UserSubstances.py in the GSAS-II directory.

·         Reload substances – this recomputes the scattering contrast data for the substances.

·         Add substance – this allows one to enter a new substance that is not among the previously defined ones. Give it a name, element composition and volume/density; GSAS-II will compute the scattering contrast data for it.

·         Copy substances – this allows one to copy these defined substances to other small angle data histograms.

·         Delete substance – this allows one to remove any substance but not vacuum or unit scatterer.

·         Add elements – this allows one to add new element types to a selected substance.

·         Delete elements – this allows one to remove elements from a substance.

2.      You can edit the composition by changing the number of each kind of element and change the sum of atomic volumes or the material density.

Sample Parameters

This window shows the various sample-dependent parameters for the selected reflectometry pattern. All values shown in this window can be edited. Note that the last three parameters (named FreePrmX, X=1,2,3) have labels that can be changed. If changed in one histogram, the same label is used for all histograms. When a label is changed, the Comments tree item for each REFD histogram is searched for a matching "Label=value" pair (differences in letter case between the two label strings is ignored). When found, the value is converted to a float and saved as the appropriate Sample Parameter.

What can I do here?

Command Menu - In this window you can change parameters associated with a histogram. This histogram scale factor is ignored for REFD. Remaining parameters are of use for parametric studies and may be changed with the menu commands described here.

·         Set scale - Rescales a pattern by multiplying by the current scale factor. Scale factor is then set = 1.0. Useful for stitching together partial REFD scans

·         Load - This loads sample parameters from a previously saved .samprm file.

·         Save - This saves the sample parameters to a file with the extension ’.samprm’. A file dialog box will appear to ask for the name of the file to be written.

·         Copy - This copies the sample parameters shown to other selected REFD patterns. If used, a dialog box (Copy parameters) will appear showing the list of available powder patterns, you can copy the sample parameters to any or all of them; select ‘All’ to copy them to all patterns. Then select ‘OK’ to do the copy; ‘Cancel’ to cancel the operation.

·         Copy selected... - This copies only the sample parameter that are selected to other selected REFD patterns but is otherwise similar to "Copy".

·         Copy flags - (Not valid for REFD).

·         Set one value - This is used to set a single selected sample parameter for a selected set of REFD histograms. The same value can be used for all histograms or a dialog can be used to provide a table where you can set the values differently for each of selected histograms.

·         Load all - Reads a file containing a table of sample parameters and copies them to matching REFD entries. The file will look something like the example here:

 
#filename       temperature pressure ignore-me  humidity
LaB6_dc250.tif      100          1      test       .2
LaB6_dc300.tif      150          1      test       .25

Note that the first line(s) in the file can be a header, but each header line must start marked with a hash (#). A header is not required. "Columns" in the table are separated by one or more delimiters (which may be a comma, tab or space). Note that columns do not need to be aligned, as long as each entry is spaced by at least one delimiter. The first column in the table is used to look up REFD entries where the initial space-delimited string after the REFD tag ("myfile" in " REFD myfile AZM=180...") must match the table. Subsequent columns can then be mapped to sample parameters or can be ignored, using a dialog window.

·         Rescale all - Allows a series of selected REFD histograms to be put on a common scale by integrating them over a specific Q region and then scaling them so that the integration range will match the first pattern. (May not be valid for REFD)

Models

A reflectometry model is composed of a sequence of layers beginning with the medium (“superphase”) as the top layer in which the incident and scattered radiation paths are located (usually “vacuum” = air or other gasses) and ending with the bottom layer (“substrate”) upon which the sample layers have been deposited. The substrate is considered to be “infinite” in thickness. The sample layers in between are each defined as a particular substance with a thickness and upper surface “roughness”. The surface roughness describes the possibility of an interlayer mixing with the previous layer. Their scattering density can also be scaled and could include polarized magnetic neutron scatterers. The layer sequence is defined so that complex or multiple layers can be defined.

What can I do here?

Command Menu  

·         Fit – This attempts a refinement by one of 4 different methods of the reflectometry model to the data.

·         Undo – This reverses the result of a bad refinement; can only be done once.

·         Sequential fit – This attempts a fit for a sequence of REFD patterns; each has their own model description so one should ensure they are all similar.

·         Copy – Copy the present model to other REFD patterns.

·         Plot – Plot the scattering length density (SLD) with respect to the distance from the top surface in Å. Results from multiple REFD fits can be superimposed



7. Phase data tree items

[see separate page]



Macintosh notes:

GSAS-II can be run on Windows, Linux and Macintosh/OS X computers, but the GUI follows the native style of Mac OS X. On Windows and some versions of Linux, the menu bars appears on top of the main window. On the Mac, the menu appears at the location that has been configured for menus (usually at the top of the screen). GSAS-II defines actions for both the left and right buttons on a two-button mouse, If a two or three-button mouse is used with a Mac, these mouse buttons will work as intended. If using a Mac touchpad or single-button mouse, clicking the touchpad or mouse button will generate a "left button" click. Hold down the control-key to generate a "right button" click.

Configuration Variables:

GSAS-II provides a number of configuration settings that can be changed via variables that can be set and saved. These are controlled in the File/Preferences menu item (on Mac the Preferences menu is found in the usual place on Macs, in the main application menu). These settings are optionally saved from for subsequent runs in a file named config.py. More information about this can be found in the appropriate section of the Programmer's documentation.

Programmers’ documentation

The routines and classes used within GSAS-II are documented in a set of web pages and in a PDF document. This documentation is created from the Python source code files using Sphinx.



Last modified: Wed Jul 27 14:40:38 CDT 2022