o — Operate on variables
Set or transform the variables of a file using expressions.
Set values
| Command | Action |
|---|---|
ox <expr> |
Set x values |
oy <expr> |
Set y values |
oz0 <expr>, … |
Set z0, z1, … values |
oz+ |
Add a new z coordinate (prompts for name and unit) |
or0 <expr>, … |
Set file constant r0, r1, … |
or+ |
Add a new file constant |
op0 <expr>, … |
Set fit parameter p0, p1, … |
op* <expr> |
Set all fit parameters to the same value |
opa |
Replace each parameter with its absolute value |
opc |
Copy parameters from another curve file |
Calculus
| Command | Action |
|---|---|
ofi |
Integrate (trapezoidal rule) |
ofs |
Cumulative sum up to the current point index |
ofd |
Differentiate (central differences) |
ofac |
Autocorrelate |
ofac — autocorrelation
ofac replaces each spectrum with its autocorrelation function
(discrete, unnormalized). The result has twice as many points and is
symmetric around x = 0. Useful for checking periodicity or computing
power spectra.
Rank-reducing operations
oi presents an interactive menu of operations that collapse each
spectrum to a single value, producing a new file with ni = 1:
| Option | Operation |
|---|---|
| 1 | One y per spectrum (first point) |
| 2 | One y total (all spectra → one value) |
| 3 | Mean ⟨y⟩ |
| 4 | Standard deviation of y |
| 5 | x at maximum y |
| 6 | y at maximum y |
| 7 | x at minimum y |
| 8 | y at minimum y |
| 9 | Sum of y |
| 10 | Integral (trapezoidal) |
| 11 | x where cumulative integral first exceeds argument |
| 13 | Maximum x where y > 0 |
| 15 | Center of gravity |
| 16 | Standard deviation of x |
| 17 | Correlation coefficient (x ↔ y) |
| Command | Action |
|---|---|
oixy |
Choose two columns and save as x and y |
oixyd |
Choose three columns and save as x, y, dy |
Example — normalize by total intensity
0 > oi # choose option 9 (sum) → result in file 1
1 > df # file 1 has one value per spectrum (ni = 1)
0 > oy y/y[1,0,j] # divide each spectrum by its integrated intensityy[1,0,j] means: workspace 1, point 0, spectrum j — one
normalisation factor per spectrum.