
Section 3: LPTLib command reference
S530/S540 KTE Linear Parametric Test Library (LPTLib) User's Manual
3-66
S530-900-01 Rev. E / September 2017
scp_detect_peaks
This command returns frequencies in signal amplitude order.
Usage
int scp_detect_peaks(int
instr_id
, double
min_level
, double
lower_bound
, double
upper_bound
, double
*freq_array
, int
nPeaks
, double
*amp_array
, int
nPeak1
);
instr_id
The instrument identification code
min_level
The minimum amplitude in decibels (dB); the peak detected must be higher than
this parameter (input)
lower_bound
The measured peak is ignored if the ratio of measured frequencies versus returned
peaks is greater than or equal to this parameter (input)
upper_bound
The measured peak is ignored if the ratio of measured frequencies versus returned
peaks is less than or equal to this parameter (input)
freq_array
The array output of measured peak frequencies in Hertz (output)
nPeaks
The number of peak frequencies to return; zero (
0
) is returned to fill the output array
when the number of detected peaks is less than this parameter (input)
amp_array
The amplitude of the measured peak frequencies in dB (output)
nPeak1
This parameter must be the same as the
nPeaks
parameter (input)
Details
The spectrum analyzer must be initialized before using this command.
Use this command to return a specified number of frequencies in signal amplitude order (see the
following figure).
Figure 2: The scp_detect_peaks command upper and lower bounds