GENERAL COMMANDS
Commands must be edited in an input file, by using free format. Commands are case insensitive and comments can be added starting with "!". An example of input file is given here. Other examples of input files are given as demo material. The commands listed in this page are not specific of a given analysis. They are:
Defines which type of analysis has to be performed.
0 First Sight analysis (default). Input profiles are plotted before and after pre-processing. In case of X-ray single-crystal data (datatype 3) diffraction patterns are compared via 3D histograms showing reciprocal space.
1 Qualitative analysis. Input profiles are grouped by using principal component analysis.
2 Correlation analysis. Input profiles are grouped by correlating their intensities.
3 Quantitative analysis. Weight fractions of pure phases in mixtures are determined by regression methods.
4 Supervised Quantitative analysis. The quantitative analysis is calibrated by using a subset of mixtures with known weight fractions.
5 Covariance analysis. Features of profiles taken by different experimental techniques on the same sample are correlated.
6 Size analysis. The average size of the microcrystalline domains in the sample is estimated.
7 Only clustering. Cluster analysis is performed on a user-supplied distance matrix. The input file should contain a single column, indicating the number of samples, followed by the distance values between unique pairs of samples.
8 Generation of profiles. Profiles are generated as a linear combination of single input profiles. Input profiles are included via the command file, linear combination coefficients via the command wgen.
9 Crystallinity analysis. The degree of crystallinity is assessed by fitting profiles with a series of gaussian curves superposed to background.
10 The distributions of each individual variable of the profiles, grouped based on a user-defined cluster definition, are studied.
11 PDF analysis. Unit cell parameters are extracted from a PDF profile. Only available starting from RootProf version n.18.
12 Kinetic analysis. Values of a coordinate reaction are interpreted in terms of kinetic models, and the related parameters are estimated. Only available starting from RootProf version n.18.
Defines the type of input data.
1 General (default). The corresponding files should contain two columns, a first column containing the values of the independent variable, the second column containing the values of the intensity, or in general the quantity to be monitored.
2 X-ray powder diffraction data. The corresponding files can contain one or two columns, depending on the command standardrx.
3 X-ray single-crystal diffraction data. The corresponding file should contain four columns: the Miller indices H, K, L and the value of the intensity.
4 Infrared spectroscopy data. The corresponding files should contain two columns, the first one representing wavenumbers sorted in decreasing order.
5 Data matrix. A single file is given in input, containing the full data matrix. It should be arranged so that variables are column-wise and samples row-wise. Comments can be included in the data matrix file, starting with "!". No values of the independent variable are given in this case.
6 Data matrix. A different type of data matrix is considered, where variables are row-wise and samples column-wise. The values of the independent variable are put as first values of each row.
7 The input file contains a single column of numbers. An automatic numbering starting from 0 is associated to these numbers as independent variable.
Number of lines to skip from the beginning of each input file. No line is skipped in default.
Defines the file containing a single input profile or the whole data matrix. The name of the file, with its path, has to be specified after the command: file <file path>/<file name>.
Example:
file /home/rocco/prot/compmod/alpha/paper/PADv3/0.dat
Defines the range of the independent variable for the input profile. More ranges, separated by each other, can be defined. In case of single-crystal X-ray diffraction patterns (datatype 8), three range intervals can be defined, referring to the Miller indices. This command cannot be used if a data matrix is given in input (datatype 6).
Examples:
range 10 60
the 2θ range from 10° to 60° is selected for an X-ray powder diffraction pattern
range 10 40 50 60
two 2
θ ranges are selected for an X-ray powder diffraction pattern: the first from 10° to 40°, the second from 50° to 60°.
Defines the type of pre-processing for input profiles. Four values should follow the command, each corresponding to one level of pre-processing. Less than four values can be given, provided the subsequent missed values are all zero. Level 1,2,3 operate on individual profiles taken one after the other, level 4 operates on the whole set of profiles at the same time.
Level 1: Modification. Defines operations on each input profile that modify its information content. If y is the original profile, the modified profile is y'=f(y).
0 no modification (default).
1 Smoothing, performed by using the SmoothMarkov function of the TSpectrum class of Root. Profiles are shifted to positive values if at least one of them has negative values.
2 Deconvolution, performed by using the deconvolution function of the TSpectrum class of Root. Profiles are shifted to positive values if at least one of them has negative values.
3 Log10 (Absorbance). Negative or null values are left unchanged.
4 powering to 0.8. Negative values are left unchanged.
5 powering to 1.2. Negative values are left unchanged.
6 Absolute value. Negative values are flipped to positive.
7 No negative value. Negative values are set to zero.
8 Change sign. The whole pattern is multiplied by -1.
9 Zero-shift correction. Profiles are shifted in the X axis in order to maximize the correlation with the first profile.
10 Interpolation. Profiles are interpolated by spline to increase sampling points. The new number of points is set through the interpolate command.
11 Wavelength shift. Powder diffraction profiles measured at a given wavelength are transformed to 2θ values calculated to the standard Cu wavelength. The modification is specified by the waveshift command. A spline interpolation is also performed prior to the wavelength shift. The corresponding number of sampling points can be set by using the interpolate command.
12 Savitzky-Golay filtering. Revelant parameters for this filtering can be set by the sgfilter command. Only available starting from RootProf version n.18.
Level 2: Rescaling. Rescaled profiles are produced by using linear operations of the type y'=A(y'-B) , where y' is the profile obtained after level 1 pre-processing.
0 no pre-processing (default).
1 Mean Centering (MC). Profiles are rescaled so that they all have null average: y'=y-<y>, with the value <y> calculated by averaging over the variable values of the same profile.
2 Normalization (NORM). Profiles are rescaled so that the area they subtend is equal to 1. This is usually used for X-ray powder diffraction data.
3 Standard Normal Variate (SNV). Profiles are rescaled by the following expression: y'=(y-<y>)/σ, where <y> is the average value of the same profile and σ is its standard deviation. This is usually used for IR data.
4 SNV applied on background. <y> and σ are estimated on background and applied on the full profile through the expression y'=(y-<y>)/σ. The background is estimated by using the SNIP algorithm. If a background subtraction is performed in Level 3 pre-processing, the clipping window is taken from this stage, otherwise it is set automatically.
5 NORM applied on a given peak. Profiles are rescaled so that the area under a specific peak is equal to 1. The "theta0" and "toltheta0" commands (see Size Analysis) are used to identify the region over which the are is calculated.
6 NORM applied on background. Profiles are rescaled so that of the are under the background is equal to 1. The background is estimated by the SNIP algorithm. If a background subtraction is performed in Level 3 pre-processing, the clipping window is taken from this stage, otherwise it is set automatically.
7 Profiles are rescaled so that their intensity is comprised between 0 and 1.
8 Mean Centering on profiles (MC). Profiles are rescaled so that they all have null average: y'=y-<y>, with the value <y> calculated by averaging over the same variable value in different profiles.
Level 3: Background subtraction. An estimate of the background b is made by means of the SNIP algorithm. New profiles are calculated as y'''=y''-b, where y'' are the profiles obtained after level 2 pre-processing.
0 no modification (default).
Level 4: Filtering, operating at the same time on the whole set of profiles.
0 no modification (default).
1 Multiplicative Scatter Correction (MSC). profiles are rescaled to an average profile <y'''>, according to the following expression: y''''=(y'''-a)/b, where a and b are fitting parameters obtained by fitting each input profile by the function a+b<y'''>, and y''' are the profiles obtained after level 3 pre-processing. The average profile is calculated by considering pure phase profiles, tagged by the command purephase in the input file. If no pure profile is present, the command value is changed from 1 (MSC) to 2 (MSCall).
2 Multiplicative Scatter Correction (MSCall). MSC pre-processing is performed, with the average profile calculated by considering all profiles.
3 Principal Component Filtering (PCF). profiles are subjected to principal component analysis and they are approximated by using the first m principal components. Several separate PCA analyses are performed, by considering pure phase profiles (those tagged through the command purephase) and one profile at the time, chosen from the remaining profiles. m is set as the number of pure phases -1. If no pure profile is present, the command value is changed from 3 (PCF) to 4 (PCFall).
4 Principal Component Filtering (PCFall). PCF pre-processing is performed through a unique PCA analysis, performed on all profiles together. In this case m is chosen by using the threshold command (see Qualitative analysis commands).
5 Peak alignment. The peaks of all profiles are aligned to those of the first profile. The method used is determined by the peakalign command.
Examples:
preprocessing 0 3
A standard normal variate rescaling is performed.
preprocessing 0 1 30
Mean centering rescaling is performed, followed by a background subtraction with Nclip parameter equal to 30.
Set the number of sampling points in case of Level 1, preprocessing 10 or 11. It is defined as a multiplicative factor of the original number of points. The default value is 4.
Defines the initial wavelength (in Angstrom) to be used for the wavelength shift (Level 1, preprocessing 11).
0: Q profiles are transformed to 2θ profiles at wavelength 1.540562 Å (default).
λ: 2θ profiles measured at wavelength λ (Å) are transformed in 2θ profiles at wavelength 1.540562 Å.
Examples:
waveshift 0.1664
2θ profiles measured at λ=0.1664 Å are transformed in 2θ profiles at λ=1.540562 Å
waveshift 0
Q profiles are transformed in 2θ profiles at λ=1.540562 Å
Sets the parameters for the Savizky-Golay filtering (Level 1, preprocessing 12). It requires three arguments, which specify the order of derivatives, the polynomial degree and the width of the window (number of profile points). Default values are respectively 1, 2 and 5.
Example:
sgfilter 2 5 10
Savizky-Golay filtering is applied by using second-order derivatives, a polynomial of 5th degree and a window of 10 points.
Defines the method used for peak alignment preprocessing (Level 4, preprocessing 5).
0: Peak Correspondence (default).
1: H
2: Peak Correspondence followed by Harmonic Time Stretch
3: Harmonic Time Stretch followed by Peak Correspondence
Defines the amount of text output.
0 standard output level (default)
1 more detailed prints added
Command for implementing background subtraction by using an external background file (for example an empty target measurement). It takes as arguments the scale factors that have to be applied to background before subtraction to each data file. The number of scale factors has be equal to the number of data files loaded through the command file. The background file has to be specified as an additional dummy data file through the command file. It should be the LAST data file!
Example:
file datafile1.dat
file datafile2.dat
file Experimentalbackground.dat
backscale 0.8 0.2
The background Experimentalbackground.dat is subtracted to patterns datafile1.dat and datafile2.dat, by using the scale factor 0.8 and 0.2, respectively. The background file is not processed further.
Defines how to store histograms generated run-time.
0 not saved (default)
1 saved as images, in png format
2 saved as root macros, in C format
Defines specific histogram layouts.
0 standard layout (default)
1 no histogram titles
2 no numbers identifying profiles reported on score plots and on "original data shifted" plots
3 no 95% confidence ellipses drawn on score plots
Defines the shift among profiles in the plot showing all the input profiles together. The shift is defined as the maximum intensity of the profiles multiplied by shiftfactor.
1 non overlapping profiles (default)
>1 more separated profiles
<1 overlapping profiles
Defines the way the profiles are numbered in the histograms and output text.
0 profiles are counted starting from 0 (default)
1 profiles are counted starting from 1
Add a number to the variable of each input profile. It does not applies if single-crystal datasets are given in input.
0 profiles variable is left unchanged (default)
num the number given after the command offsetvar is added to the variable of each input profile
Allows to skip some data points in each input profiles, to speed up calculations. A number should be specified, representing the number of data points to be skipped after reading a data point from an input profiles. This command is not applied in case of X-ray absorption data (datatype 4), because they are usually taken at a variable step.
1 no skipped data points (default)
>1 number of data points to be skipped
Defines the way the X-ray powder diffraction profiles are read.
0 two column reading (default). The first column contains the 2θ values, the second the intensity values
1 single column reading. The column is expected to contain the intensity values. The first line in the file defines the initial value and the step of the corresponding 2θ values
Allow to ignore the last column of the data file, which usually contains error values.
0 normal reading (default). All values of the data file are read.
1 values of the last column of the data file are not read.
Defines the minimum and maximum values of the independent variable which enclose the peaks to be ignored from a profile (up to 20 values).
Example:
nophase 31 35 54 57
2θ values comprised between 31° and 35°, and 54° and 57° from a X-ray powder diffraction pattern are not considered for further analysis.
Allows to manage profiles having different binning. When performing Quantitative analysis by MultiFit this option allows more precise fits in case of profiles with different binning.
0 profiles are transformed to have equal binning (default)
1 profiles are left unchanged. This option is only possible for First Sight and Quantitative analysis, and for certain pre-processing methods. In the other cases, the option is automatically changed into 0
2 individual profiles are re-binned to have equal binning. To write rebinned files this option should be used together with the whichanalysis 0 and writefiles 1 commands
Transform HKL files (single crystal diffraction patterns) in unidimensional profiles, which are written in output files having the same name of the input file, and extension .prof. This command is executed only if the datatype 3 and whichanalysis > 0 commands are given.
0 profiles are not written in output (default)
1 profiles are written in output
2 a unique file is written in output, named commonHKL.hklp, containing h k l Intensity of the common reflections in all the datasets. The format is (3i4,f8.2)
Each input files, after preprocessing, is written in output as a separate file, with extension .prof added. This command is executed only if the whichanalysis 0 command is given.
0 preprocessed profiles are not written in output (default)
1 preprocessed profiles are written in output
Define criteria to compare two profiles in case of correlation analysis (whichanalysis 2 command).
0 profiles are compared by the Pearson's correlation coefficients (default)
1 profiles are compared by the Kolmogorov-Smirnov test
2 profiles are compared by the quantity cos(j1-j2), where j1 and j1 are profiles composed of angular values expressed in degrees
Include the linear coefficients for profile generation. The command is followed by a series of numbers comprised in the range [0,1]. The numbers following the command should be as many as the number of profiles loaded thorugh the command file.
EXAMPLE of input file
datatype 6
threshold 0.25
sogdiff 0.8
! mean centering pre-processing
preprocess 0 1
! put my cluster definition
clusterswitch 2
file /home/rocco/prot/compmod/alpha/paper/PADv3/0.dat
myclust 0
file /home/rocco/prot/compmod/alpha/paper/PADv3/1.dat
myclust 1
file /home/rocco/prot/compmod/alpha/paper/PADv3/2.dat
myclust 0
file /home/rocco/prot/compmod/alpha/paper/PADv3/3.dat
myclust 1
file /home/rocco/prot/compmod/alpha/paper/PADv3/4.dat
myclust 0
file /home/rocco/prot/compmod/alpha/paper/PADv3/5.dat
myclust 0