beautypg.com

Peaks, Peakinfo, Overview – Teledyne LeCroy WaveExpert series Automation Manual User Manual

Page 55

background image

C

HAPTER

T

WO

Overview

BinWidth = app.Math.F1.Out.Result.BinWidth

For i = FirstPopulatedBin To LastPopulatedBin
Cells(i - FirstPopulatedBin + STARTROW + 1, 7) = i
'Calculate Bin Center
Cells(i - FirstPopulatedBin + STARTROW + 1, 8) = OffsetAtLeftEdge +
(BinWidth / 2) + BinWidth * i
Cells(i - FirstPopulatedBin + STARTROW + 1, 9) = BinPops(i)
Next

Peaks

Applies to: Histogram
Description: Number of peaks in the histogram.

Example:

Dim NumPeaks as Integer
NumPeaks = app.Math.F1.Out.Result.Peaks

PeakInfo

Applies to: Histogram
Description: VARIANT array returning information about the peak selected in the input argument. Sending 0

returns information for the entire histogram; input values from 1 to Peaks+1 returns information about the

requested peak.
Argument (Optional):

peakIndex

Selects the peak of interest. 0 requests information about the entire histogram; >0 requests information

about a single peak.
Default value: 0

Definition of output elements:

Index Description

0 Mean

1 Sigma

2 Unused

3 Unused

4 FirstPopulatedBin

5 LastPopulatedBin

6 MaxPopulationBin

7 MaxPopulation

8 PopulationInside

Example:

‘Reads out complete PeakInfo arrays for each peak.
Const STARTROW = 10
Const STARTCOL = 13
Dim PeakInfo
Dim i, j As Integer
Dim NumPeaks as Integer
NumPeaks = app.Math.F1.Out.Result.Peaks
For i = 0 To NumPeaks
‘Index out a peak (index 0 is the entire histogram)
PeakInfo = app.Math.F1.Out.Result.PeakInfo(i)
Cells(STARTROW, STARTCOL + i) = i

916435 RevA

2-19