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);
The instrument identification code
The minimum amplitude in decibels (dB); the peak detected must be higher than
this parameter (input)
The measured peak is ignored if the ratio of measured frequencies versus returned
peaks is greater than or equal to this parameter (input)
The measured peak is ignored if the ratio of measured frequencies versus returned
peaks is less than or equal to this parameter (input)
The array output of measured peak frequencies in Hertz (output)
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)
The amplitude of the measured peak frequencies in dB (output)
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