Navigation: Scripting Reference Manual > Functions & Subroutines > SpectrumGetSampledIthWavelength

 

SpectrumGetSampledIthWavelength

 

Contact Us: fredsupport@photonengr.com

 

Description

Gets the I'th sample point wavelength value in a sampled spectrum.  If the spectrum being queried is not a sampled spectrum, an error is set and the operation is halted.

 

 

Syntax

ithWavelength = SpectrumGetSampledIthWavelength( spectNode, ithSample )

 

 

Parameters

ithWavelength (Double)

Wavelength of the i'th sample point in the spectrum being queried.

 

spectNode As Long

Node number of the spectrum being queried.

 

ithSample As Long

Index of the sample point being queried.  Sample points are zero-based (i.e. 0, 1, 2, ....).

 

 

Example

The following example loops over all samples in a spectrum and prints the wavelength of the sample point.

 

Dim sampCount As Long

Dim ii As Long

Dim ithWavelength As Double

 

sampCount = SpectrumGetSampledEntryCount( spectNode )

For ii = 0 To sampCount - 1

          ithWavelength = SpectrumGetSampledIthValue( spectNode, ii )

          Print ii & "'th wavelength: " & ithWavelength

Next ii

 

 

See Also

SpectrumGetSampledEntries

SpectrumGetSampledEntryCount

SpectrumGetSampledIthValue

SpectrumSetSampledEntries

 

 

 

 

 

Copyright © Photon Engineering, LLC