6. Data Manipulation and Noise Reduction


6.1 1d Data Manipulation


6.1.1 Absolute Value of Data

To take the absolute value of a dataset, first select a Wavelet window containing some data. Then, choose the Absolute Value item from the Wavelets menu. The absolute value will be taken of all data points in the window, and the result plotted either in the current window, or in a new window, depending on the settings in the Settings... dialog of the Edit menu.


6.1.2 Adding Datasets

To add two 1d datasets together, first select a Wavelet window containing some data. Then, choose the Add Datasets... item from the Wavelets menu. You will see the following dialog:

From the pop-up menu, choose the window containing the dataset you wish to add to the current window. It may help to name the windows in your document first, so that you can tell them apart in the pop-up menu. The window you select in the menu will then be added to the current window's data, and the result plotted either in the current window, or in a new window, depending on the settings in the Settings... dialog of the Edit menu.


6.1.3 Subtracting Datasets

To subtract one 1d dataset from another, first select a Wavelet window containing some data. Then, choose the Subtract Datasets... item from the Wavelets menu. You will see the following dialog:

From the pop-up menu, choose the window containing the dataset you wish to subtract from the current window. It may help to name the windows in your document first, so that you can tell them apart in the pop-up menu. The window you select in the menu will then be subtracted from the current window's data, and the result plotted either in the current window, or in a new window, depending on the settings in the Settings... dialog of the Edit menu.


6.1.4 Multiplying Datasets

To multiply two 1d datasets together, first select a Wavelet window containing some data. Then, choose the Multiply Datasets... item from the Wavelets menu. You will see the following dialog:

From the pop-up menu, choose the window containing the dataset you wish to multiply by the current window. It may help to name the windows in your document first, so that you can tell them apart in the pop-up menu. The window you select in the menu will then be multiplied by the current window's data, and the result plotted either in the current window, or in a new window, depending on the settings in the Settings... dialog of the Edit menu.


6.1.5 Dividing Datasets

To divide one 1d dataset by another, first select a Wavelet window containing some data. Then, choose the Divide Datasets... item from the Wavelets menu. You will see the following dialog:

From the pop-up menu, choose the window containing the dataset you wish to divide into the current window. It may help to name the windows in your document first, so that you can tell them apart in the pop-up menu. The window you select in the menu will then be divided into the current window's data, and the result plotted either in the current window, or in a new window, depending on the settings in the Settings... dialog of the Edit menu.

During the divide, division by zero may occur. If so, you will be notified of this in an alert, and the offending point in the data will be set to zero.


6.1.6 Setting Data Length

You can change the number of points in a dataset by choosing the Set Data Length... item of the Edit menu. You will then see the following dialog:

Set the data points field to a number greater than or equal to zero. If the number you set is smaller than the current number of points in the dataset, the dataset will be truncated (or eliminated). If the number you set is larger than the current number of points, the dataset will be expanded, and the new points set based on the settings in the Settings... dialog of the Edit menu.


6.1.7 Extracting Data Subsets

To extract a subset of a dataset, select a window containing data and then choose the Data Subset... item of the Edit menu. You will see the following dialog:

Type in the numbers of the first and last points you would like in the subset. These points will be extracted from the current dataset and displayed in the current window or in a new window depending on the settings in the Settings... dialog of the Edit menu.

Here is an example of a dataset and a subset from point 250-749:


6.1.8 Inserting Data Subsets

To insert one dataset into another, select a window containing data and choose the Insert Data... item from the Edit menu. You will see the following dialog:

Select the window containing the data you wish to insert into the current dataset from the popup menu. It may help you to name your windows first, so you can tell them apart in the menu. Type in the number of the position at which you wish the first point of the subset to be inserted in the current data. The data will be inserted at this position, and will overwrite the existing dataset. The resulting data will be displayed in the current window or in a new window depending on the settings in the Settings... dialog of the Edit menu.

Here is an example of inserting the subset extracted from the previous example into the beginning of the original array:


6.1.9 Converting Data from 1d to 2d

To convert a 1d dataset to 2d, select a Wavelet window containing data and then choose the Convert 1d<-->2d item from the Edit menu. You will see the following dialog:

You can convert 1d data to 2d in 4 different ways:

  1. By raveling the data into rows. This takes the 1d array of data and wraps it into N rows of 2d data, padding zeros onto the end of the last row, if necessary. Each row of the 2d data has M / N elements, where M is the original length of the 1d data array.
  2. By raveling the data into columns. This takes the 1d array of data and wraps it into N columns of 2d data, padding zeros onto the end of the last column, if necessary. Each column of the 2d data has M / N elements, where M is the original length of the 1d data array.
  3. By copying the data into N rows. Each row of the 2d data contains a complete copy of the 1d array.
  4. By copying the data into N columns. Each column of the 2d data contains a complete copy of the 1d array.
A new 2d window will be created for the data.

Here is an exmaple of a 1d array and its 2d conversion by copying it into 128 rows:


6.1.10 Data Statistics

The Data Stats... item of the Edit menu provides basic statistics about a set of data: maximum value, minimum value, mean, variance, standard deviation, and average squared value. For example, the following dataset:

produces the following statistics:


6.1.11 Clipping Data

The results of other operations (e.g. noise-removal) can be clipped so that data values below zero (e.g.) are all set to zero. To clip data below or above a specific value, select the Clip Data... item from the Edit menu. You will see the following dialog:

Select the above or below button, fill in the clip value, and click OK. The data will then be clipped against the clip value, and all points which fall above/below the clip value will be set to that value.

Here is the result of clipping data produced during noise-reduction (see section 6.3 below) below 0:


6.1.12 Finding Peaks

The Find Peaks... item of the Edit menu will find the peaks or valleys in a dataset. This function presents the following dialog:

Set the find button to Peaks to find local maxima, or to Valleys to find local minima. Set the peak radius value to the number of neighboring points you wish to be compared to all potential peaks/valleys. Points which are peaks/valleys are set to the peak/valley value, while all other points in the dataset are set to zero.

The find peaks/valleys function is not very sophisticated: it simply looks for points which are greater than all other points within the peak radius, or for points which are smaller than all other points within the peak radius.

The result of finding peaks in the previous dataset looks like the following:

Note that attempting to find peaks in noisy datasets using a small peak radius will probably find many many peaks. Set the peak radius to something greater than 1 in order to reduce the number of peaks found.

You can also sort and then truncate the result of peak-finding, in order to obtain the locations of the N highest (e.g.) peaks in the data. Save or copy the sorted and truncated data to get the index array of peak locations.


Contents | Previous Section | Next Section


MacWavelets 2.00 User's Manual.
"MacWavelets" is a trademark of Intergalactic Reality.
© Copyright Intergalactic Reality, 1996.
All rights reserved.