Data
- The profile
- The Data table
- Argument axes and units
- Diffraction angles: Theta, 2 Theta and sin(Theta)/lambda
- Wavelength
- A custom argument axis
- Working on part of the profile
- Smoothing the profile
- Price data
The profile
This software's choice — A decision made by this software rather than by the field's sources; the explanation says why it was made.
The profile is the measured data a model is fitted to: a list of points, each an argument and the amplitude measured at it.
When you import a data file (File > Import Profile) or open a project, its points become the profile. Each point has two numbers: the argument, which runs along the horizontal axis - an angle, an energy, a time or any other position - and the amplitude, the value measured there.
The profile is drawn on the chart and listed in the Data tab on the left, beside the Tools tab. Everything the program proposes or fits is computed from it: the curve positions it finds, the fit intervals, the background, and the difference between the model and the data.
The argument is stored exactly as it was read. What the horizontal axis shows - its name, its unit and its numbers - is chosen separately under Data > Argument Transformation, and changing it never changes the stored values or the fit.
The Data menu works on the profile itself: it chooses how the argument is shown, narrows the work to a stretch of the profile (Data > Range) and smooths the amplitudes (Data > Smooth Profile). The tables at the bottom of the window - Background Points, Fit Intervals, Curve Positions and Curve Attributes - describe the model rather than the data.
Almost every command of the Data and Model menus is greyed until a profile is loaded, and while a fit or another calculation is running.
Limitations
- Smoothing, subtracting a background and editing a point all change the profile the program holds, not the data file. File > Reload Profile reads the file again, which is the way back to the data as measured.
See also: The Data table · Argument axes and units · Working on part of the profile · The model · Import Profile · Reload Profile
The Data table
This software's choice — A decision made by this software rather than by the field's sources; the explanation says why it was made.
The Data tab on the left lists every point of the profile, or of the data interval in force, and lets you correct a value by typing over it.
The table has two columns: Position, the argument, and Amplitude, the value measured there. While a data interval is selected (Data > Range) it lists only the points of that interval.
To correct a point, click its cell, type the new number and leave the cell. The point is replaced in the profile the engine fits, and the chart is redrawn from it.
The tab shares the left panel with the Tools tab; click its tab to bring it forward.
A cell holding anything that is not a number - a typo, a stray letter, a unit typed after the value - is refused: a message beside the table names what was typed, and the point stays where it was.
Limitations
- An edit changes the profile the program holds, not the data file. Save the project to keep it; File > Reload Profile discards it.
See also: The profile · Working on part of the profile
Argument axes and units
This software's choice — A decision made by this software rather than by the field's sources; the explanation says why it was made.
The horizontal axis can show the stored argument in several ways - as the curve type suggests, as a plain position, as a diffraction angle or through formulas of your own - without changing the data or the fit.
The program stores the argument of every point exactly as it was loaded. An axis rule is a display transform: it decides the name and unit written under the chart, the numbers along the axis, and how positions read in the Curve Attributes table. The stored data and the fit are the same whichever rule is in force.
Choose a rule under Data > Argument Transformation > Use Rule, or right-click the chart and choose it from the menu that opens there. Both offer the same six entries, and the one in force is ticked in both:
- Theta, 2 * Theta and Sin Theta / Lambda - the diffraction angles, for data recorded against the scattering angle 2 Theta.
- Data > Argument Transformation > Use Rule > From Curve Type - the axis the selected curve type defines. The peak shapes the program ships show 2*Theta [deg]; a user-defined curve, and a curve type that defines no axis of its own, show Position.
- Data > Argument Transformation > Use Rule > General Position - the argument as loaded, labelled Position, with no unit and no wavelength needed. Use it for any data that is not a diffraction pattern.
- Data > Argument Transformation > Use Rule > Custom Position - an axis defined by a formula of your own and its inverse.
Until you pick a rule yourself the program uses From Curve Type, so the axis follows the curve type you select. Once you pick any rule, the choice is yours: it is remembered between sessions and the curve type no longer changes it. Choose From Curve Type to hand the axis back to the model.
Use Rule is greyed while nothing is drawn on the chart. The axis label always reads as the name followed by the unit in square brackets, or the name alone when the rule has no unit.
Limitations
- A remembered rule that cannot be used when the program starts - Sin Theta / Lambda with no wavelength known, or a custom axis without both of its formulas - is replaced by From Curve Type for that session.
See also: Diffraction angles: Theta, 2 Theta and sin(Theta)/lambda · Wavelength · A custom argument axis · Choosing a curve type
Diffraction angles: Theta, 2 Theta and sin(Theta)/lambda
Convention — Common practice or a guideline in the field, not a rule its sources require.
For a diffraction pattern the stored argument is read as the scattering angle 2 Theta in degrees, and the axis can show it as 2 Theta, as Theta, or as sin(Theta)/lambda.
Diffraction patterns are usually recorded against the scattering angle 2 Theta, and the program takes the stored argument to be 2 Theta in degrees whenever one of these three rules is in force:
- Data > Argument Transformation > Use Rule > 2 * Theta - the stored value itself, labelled 2*Theta [deg].
- Data > Argument Transformation > Use Rule > Theta - half of it, labelled Theta [deg].
- Data > Argument Transformation > Use Rule > Sin Theta / Lambda - sin(Theta) divided by the wavelength lambda in angstrom, labelled Sin(Theta)/Lambda [1/A].
By Bragg's law, lambda = 2 d sin(Theta), the value sin(Theta)/lambda equals 1/(2d), where d is the spacing of the diffracting planes. Peaks recorded at different wavelengths therefore line up on this axis, which is why it is common in crystallography.
Only Sin Theta / Lambda needs a wavelength. The first time you choose it with no wavelength known, the program asks for one before switching; Theta and 2 * Theta need none.
Limitations
- The program cannot tell whether your argument really is 2 Theta in degrees. On data recorded against anything else these three rules show numbers that mean nothing; use General Position or From Curve Type instead.
See also: Argument axes and units · Wavelength
Wavelength
This software's choice — A decision made by this software rather than by the field's sources; the explanation says why it was made.
The wavelength of the radiation, in angstrom, is the number the Sin Theta / Lambda axis divides by.
Set it with Data > Argument Transformation > Set Rule Parameters > Wavelength. A dialog titled Wavelength asks for Wavelength (angstrom). It accepts only a positive number - 1.5406, for example - and keeps asking until it gets one or you cancel. On OK the wavelength is stored and the axis switches to Sin Theta / Lambda.
Set Rule Parameters is greyed unless the axis in force is a diffraction angle - Theta, 2 * Theta or Sin Theta / Lambda, or From Curve Type while the selected curve type defines one. To give a wavelength for the first time you can also choose Data > Argument Transformation > Use Rule > Sin Theta / Lambda: with none known, it asks for one first.
The wavelength is saved with the project.
Limitations
- Only what is shown depends on the wavelength. The fit works on the stored argument, so a wrong wavelength mislabels the axis without changing any fitted value.
See also: Diffraction angles: Theta, 2 Theta and sin(Theta)/lambda · Argument axes and units
A custom argument axis
This software's choice — A decision made by this software rather than by the field's sources; the explanation says why it was made.
Data > Argument Transformation > Use Rule > Custom Position shows the argument through a formula of your own, given together with its inverse.
The entry opens the Custom Argument Axis dialog, which has four fields:
- Display name and Unit - the label under the axis, written as the name followed by the unit in square brackets. The unit may be left empty.
- Displayed value f(x) - the value shown, as a formula of the stored value x.
- Inverse g(x) - the way back, from a shown value to the stored one. It is needed because the chart converts in both directions: reading a position off the axis is the inverse of drawing it.
For a natural-logarithm axis, write ln(x) as f(x) and exp(x) as g(x). The formulas are written as for a user-defined curve: ln is the natural logarithm, log is base 10, and exp, sqrt, abs, sin, cos and the operators + - * / ^ can be used with brackets.
The first time, the dialog is filled in with the name Custom, no unit, and x for both formulas - the axis you already have - so pressing OK unchanged changes nothing. After that it opens on the definition you last gave, which is remembered between sessions.
If either formula is left empty, a message says both are required and the axis stays as it was.
Limitations
- The program does not check that g(x) really is the inverse of f(x). If it is not, values read back from the chart land in the wrong place, and nothing warns you.
- Like every axis rule, a custom axis changes only what is shown; the fit works on the stored argument.
See also: Argument axes and units · User-defined curves
Working on part of the profile
This software's choice — A decision made by this software rather than by the field's sources; the explanation says why it was made.
Data > Range narrows the program's work to the stretch of the profile between two points you pick, and brings the whole profile back.
Choose Data > Range > Start Manual Selection and click two points of the profile on the chart, one at each end of the stretch you want. The entry is ticked while this picking mode runs, the status line says which click comes next, and the picks are drawn as the Area Limits series. Until the second pick, clicking the first again takes it back; once both are picked, further clicks are ignored.
Then choose Data > Range > Select Data Interval. It is greyed until exactly two points are picked. The profile is cut to the points between them, both ends included; the chart and the Data table show only that stretch, and the picking mode ends.
From then on the automatic commands - proposing curve positions, fit intervals and background points, and subtracting the background - work on that interval only, and so does the fit.
Data > Range > Select Entire Profile goes back to the whole profile. It is offered only while an interval is in force and no picking mode is running.
A selected interval is saved with the project, as the numbers of its first and last points.
Selecting another interval while one is in force replaces it: the fit runs over the new one.
See also: Picking points on the chart · Smoothing the profile · The profile
Smoothing the profile
This software's choice — A decision made by this software rather than by the field's sources; the explanation says why it was made.
Data > Smooth Profile replaces each amplitude by the mean of itself and its two neighbours, keeping the total of all amplitudes the same.
Each point's amplitude becomes the mean of three values: the point before it, the point itself and the point after it. At either end the missing neighbour is replaced by the end point itself. The smoothed amplitudes are then scaled so that their sum equals the sum before smoothing: the area under the profile is kept, and the highest peaks come down a little.
Use it on noisy data before the automatic commands, which look for local maxima and are easily misled by noise. It can be applied more than once; each application smooths further.
The entry is offered whenever a profile is loaded and no fit is running. The chart and the Data table show the smoothed profile at once.
Limitations
- Smoothing changes the data you fit, and a fit to a smoothed profile describes the smoothed data rather than the measurement. It cannot be undone except by File > Reload Profile.
- It smooths the whole profile. A data interval selected before smoothing keeps its values as they were, so smooth first and then select the interval.
See also: The profile · Working on part of the profile · Curve positions
Price data
This software's choice — A decision made by this software rather than by the field's sources; the explanation says why it was made.
Data > Price Data chooses which column of a price-data (.csv) file becomes the value, and what its argument is.
Under Value:
- Data > Price Data > Value > Close - the closing price, taken from an Adj Close column when the file has one. The default.
- Data > Price Data > Value > Open, Data > Price Data > Value > High and Data > Price Data > Value > Low - the other prices of each row.
Under Argument:
- Data > Price Data > Argument > Bar Number - the rows numbered 0, 1, 2 and so on, so that weekends and holidays leave no gaps and a pattern's length is counted in bars. The default.
- Data > Price Data > Argument > Date - each row at its date, keeping the calendar gaps. Dates written year first (2024-01-31) are read as they are; day-first and month-first dates are told apart from a day above 12 somewhere in the column.
The choice applies to the next File > Import Profile or File > Reload Profile of a price-data file - the profile already loaded is not read again by itself - and it is kept between sessions. It has no effect on .dat files.
Limitations
- With Date chosen, a file whose dates fit both day-first and month-first order in every row, or fit each in different rows, is refused rather than read in a guessed order; so is a file with no date column, or without the chosen price column. The message says which, and what to choose instead.
See also: The profile