Normalization of Spectroscopy Data

Normalization of spectroscopy data involves using the commands: NOrmalize, ZEro, SUm, RAtio, HYsterisis, and BRoaden. A typical command stream would be:
in		;input
13sep96.24	;input first file of conductance vs. voltage
su              ;initialize summing array
1
su              ;sum in the first file
2
in
13sep96.26      ;input second file
su              ;sum into the summing array
2
su              ;compute average of the summed data files
3
hy              ;correct hysterisis between up scan and down scan
7
av/b		;average together the 2 rows of data
1
2
norm		;subtract background of -.013 and
-.013,2.1	;   multiply by calibration scale factor of 2.1
ra		;store in numerator of ratio
1
in		;input
13sep96.23	;input first file of current vs. voltage
su              ;initialize summing array
1
su              ;sum in the first file
2
in
13sep96.25      ;input second file
su              ;sum into the summing array
2
su              ;compute average of the summed data files
3
av/b		;average together the two rows of data
1
2
ze		;subtract background formed by averaging data
-.1,.1		;   between voltages of -0.1 and 0.1 V, and zero data
1		;   lying between +/- 1 sigma of noise level in this region
br		;apply voltage broadening to the current
1.5
ra		;store in denominator of ratio
2
ra		;compute ratio
3
pl		;plot the result
These commands, and others, are described below:

BRoaden
arguments: delta_V (real)
Will broaden the data array by Fourier transforming and performing a 1-pole low-pass filter with cuttoff "frequency" of 1/delta_V (this is equivalent to convoluting with an exponential of the form exp(abs(V)/delta_V). This broadened quantity is then divided by V, thus forming (I/V)bar. When the broadening is performed, the data array is extended to negative and positive voltages by using the values of the endpoints of the array.

HYsterisis
arguments: x_shift (real)
Corrects hysterisis between odd and even rows of data by shifting the odd rows in the +x direction by x_shift/2 and the even rows in the -x direction by x_shift/2. Data values at the ends of the rows are either truncated or filled in with the same value as that at the original row end. Linear interpolation is used to compute the shifted data values.

NOrmalize
arguments: background (real), scale_factor (real)
Subtracts background from the data array, and multiplies the result by scale_factor. Used in the above example to subtract a known background level from the conductance data, and then to scale the result by a known amount. These known values would have been previously determined by a calibration run using constant tip-sample separation.

PROduct
arguments: action (integer)
For computing the product of two data arrays. For action=1 will store the numerator array, for action=2 will store the denominator array, and for action=4 will compute the product between the two and put that into the main data array.

RAtio
arguments: action (integer)
For computing the ratio of two data arrays. For action=1 will store the numerator array, for action=2 will store the denominator array, and for action=3 will compute the ratio between the two and put that into the main data array.

SUm
arguments: action (integer)
For computing the average of several data arrays. For action=1 will initialize an auxiliary array into which the subsequent values are summed (NOTE: this action=1 command must be issued after the first array is INput, since only then does the program know how large to make the auxiliary array). For action=2 will sum into the auxiliary array the contents of the data array, and for action=3 will compute the average of all the summed arrays (i.e. divide by the number of summed arrays) and that result is put back into the main data array.

WOrk function
arguments: min,max separation (reals)
Computes work function, given a specified region of a current vs. separation curve. The work function is computed by fitting a line to log of the data.

ZEro
arguments: min V, max V (real)
           cutoff multiplier (real)
Subtracts a constant from the data, with the constant given by the average of the data between min V and max V. In addition, the standard deviation (sigma) of the data in this range is computed. If the cutoff multiplier is zero then no further action is taken. If the cutoff multiplier is nonzero, then some data in a region close to zero volts is set identically equal to zero, with the extent of this region given by the minimum extent such that all data in the region has magnitude less then the product of cutoff multiplier time sigma.

ZEro/n
arguments: min V, max V (real)
           cutoff multiplier (real)
Subtracts a constant from the data, with the constant given by the average of the data between min V and max V. In addition, the standard deviation (sigma) of the data in this range is computed. If the cutoff multiplier is zero then no further action is taken. If the cutoff multiplier is nonzero, then all data values in the entire array that have magnitude less than the multiplier times the standard deviation (call this m*sigma) are set identically equal to m*sigma. (Positive data values are set to m*sigma, and negative data values are set to -m*sigma). The effect of this action is to eliminate data values that are very close to zero, i.e. by truncating them at the value of m*sigma (this "truncation" is done in an upwards sense, i.e. in the sense of a "ceiling" function). Thus, when plotting the data on a logarithmic scale, these truncated data values do not extend all the way down to the bottom of the plot (which would obscure any data curves lying, on the plot, below the one being considered). Rather, the truncated values appear on the plot all at the value of m*sigma.

ZNormalize
arguments: voltage constant (Vc) (real)
Scales spectroscopic data according to the function exp(-abs(V/Vc)) where V is the bias voltage.