Algorithms Index


Stretch

Author : Bernard Schutz
Date : 20 September 2000
Version: 2.0
 


Contents



Description of Stretch

Stretch increases the length of a data set by inserting zeroes between existing elements of any VectorType data set.  In the parameter window, the user can choose whether to insert zeros before or after the existing data elements and can give the number n of zeros to insert for each existing element. The final length of the data set will be (n + 1) times the input length. The default is to insert no elements. If n is zero or negative, then the unit outputs a copy of the input, not a reference to the input itself.

The way that this unit acts on VectorType inputs varies according to the type. A pure VectorType will be extended as described above.  If the data are irregularly sampled, the new zeros will be interpolated by each interval into equal parts. A SampleSet or a ComplexSampleSet will be extended as described above; moreover, its sampling rate will be multiplied by n + 1, and if zeros are added before elements the aquisition time will be adjusted appropriately, so that the sampling times of the existing data are not changed. A Spectrum or ComplexSpectrum will be extended as described above; its frequency resolution will be multiplied by n + 1, and the parameter nFull (the number of points in the full data set from which it might have been derived by a Fourier transform) is also increased by the same factor.  If the spectral data are narrow-band, the new length of the extended set is interpreted as the size of nFull, not the size of the bandwidth of the data held in the object. Note that Spectrum and ComplexSpectrum data sets cannot be extended by adding zeros before each element, since it does not make sense to add points below zero frequency. More details are given in the documentation for these spectral types. If the input set is a Histogram, then the data set will be extended as described above, except that no zeros are added below a negative-infinity delimiter or above a positive-infinity delimiter.
 


Using Stretch

The user makes the choices of how Stretch works in Stretch's parameter window. The first line is a choice box for adding zeros before each element of after. The second line is an integer slider where the user can set  the number of zeros to add for each existing data element.

The default choices are: add data after elements, and add 0 elements.  This does nothing, since the final length equals the initial one.