Waveforms

genalyzer.cos(nsamples, fs, ampl, freq, phase=0.0, td=0.0, tj=0.0)

Generate cosine waveform

Args:

nsamples (int) : Number of samples

fs (double) : Sample rate (S/s)

ampl (double) : Amplitude

freq (double) : Frequency (Hz)

phase (double) : Phase (rad)

td (double) : Time delay (s)

tj (double) : RMS Aperture jitter (s)

Returns:

out (ndarray) : float64 numpy array consisting of Cosine waveform

genalyzer.gaussian(nsamples, mean, sd)

Generate Gaussian random samples

Args:

nsamples (int) : Number of samples

mean (double) : Mean

sd (double) : Standard deviation

Returns:

out (ndarray) : float64 numpy array consisting of Gaussian random samples

genalyzer.ramp(nsamples, start, stop, noise)

Generate ramp waveform

Args:

nsamples (int) : Number of samples

start (double) : Start value

stop (double) : Stop value

noise (double) : RMS noise

Returns:

out (ndarray) : float64 numpy array consisting of ramp waveform

genalyzer.sin(nsamples, fs, ampl, freq, phase=0.0, td=0.0, tj=0.0)

Generate sine waveform

Args:

nsamples (int) : Number of samples

fs (double) : Sample rate (S/s)

ampl (double) : Amplitude

freq (double) : Frequency (Hz)

phase (double) : Phase (rad)

td (double) : Time delay (s)

tj (double) : RMS Aperture jitter (s)

Returns:

out (ndarray) : float64 numpy array consisting of Sine waveform

genalyzer.wf_analysis(a)

Run waveform analysis

Args:

a (ndarray) : Input array of type int16, int32, or int64

Returns:

Returns: results (dict) : Dictionary containing all waveform analysis results

Notes:

Every Key:Value pair in the dictionary is str:float.

The dictionary contains the following keys:

signaltype : Signal type: 0=Real, 1=Complex

min : Minumum value

max : Maximum value

mid : Middle value ((max + min) / 2)

range : Range (max - min)

avg : Average value

rms : RMS value

rmsac : RMS value with DC removed

min_index : Index of first occurence of minimum value

max_index : Index of first occurence of maximum value