Language Reference

PEAKS

Example

60

OUTPUT 723;"VARDEF WL1,0;"

De￿ne user-de￿ned variable ,

 

 

 

 

WL1, equal to 0.

 

 

70

OUTPUT 723;"CENTERWL 1000NM;SP 300NM;TS;"

Set the measurement range .

 

 

 

 

Sweep trace A.

 

 

80

OUTPUT 723;"TH -65DBM;MKPX 10DB;TS;"

Set the threshold to

065 dBm.

 

 

 

 

Set marker-peak excursion to

 

 

 

 

10 dB. Sweep trace A.

 

90

OUTPUT 723;"PEAKS TRB,TRA,WLN?;"

Sort signals by wavelength

 

 

 

 

and place results in trace B .

 

 

 

 

Trace B now contains posi-

 

 

 

 

tion information. Query num-

 

 

 

 

ber of peaks to computer .

 

100

ENTER 723;A

Assign number of peaks to

 

 

 

 

computer variable , A.

 

110

PRINT "SIGNALS ABOVE -65 DBM:";A

Print number of peaks.

 

120

OUTPUT

723;"MOV WL1,WLUNITS TRB[2],TRA;"

Move wavelength

of second

 

 

 

 

element in trace B to WL1.

 

130

OUTPUT

723;"WL1?;"

Query value of WL1.

 

140

ENTER

723;W

Assign value to computer variable.

 

150

PRINT

"THE WAVELENGTH OF POINT 2 IS ";W

 

 

Description The PEAKS command sorts signal peaks by wavelength or amplitude, stores in the destination trace the horizontal position of each peak in position units,

then computes the number of peaks found.

When sorting by wavelength, PEAKS ￿rst computes the horizontal position of all peaks. These positions are consecutively loaded into the destination trace, the lowest value occupying the ￿rst element. Thus, the destination trace from left to right corresponds to signal wavelengths from low to high.

When sorting by amplitude, PEAKS ￿rst computes the amplitudes of all peaks in the source trace in measurement units, and sorts these values from high to low. The horizontal positions of the peaks are then loaded into the destination trace, with the horizontal position of the highest value occupying the ￿rst element. Thus, the destination trace amplitude, from left to right, is proportional to signal amplitudes from high to low.

The destination trace values range from 1 to the length of the source trace. If necessary, the last sorted value is repeated to ￿ll the remaining elements of the destination trace.

PEAKS uses the current value set by the marker-peak-excursion command, MKPX, as the criterion for determining peaks.

7-375