Initiates a spectrum acquisition and returns power spectrum data, and provides additional spectrum information.

Syntax

Namespace: NationalInstruments.ModularInstruments.NIRfsa

public float[] MemoryOptimizedReadPowerSpectrum(PrecisionTimeSpan timeout, ref float[] data, out RfsaSpectrumInfo spectrumInfo)

Remarks

Memory reallocation does not happen every time a call is made to this method. Memory allocation is done only if the size of data is different from the data array passed in.
Note

Memory optimization is not guaranteed.

Parameters

NameTypeDescription
timeoutPrecisionTimeSpan

The time allotted for the method to complete before returning a timeout error. Using NationalInstruments.PrecisionTimeSpan.MaxValue specifies that the method waits until all data is available.

dataref float[]

The power spectrum data.

spectrumInfoout RfsaSpectrumInfo

Additional information about the power spectrum data array, including the frequency, in hertz (Hz), corresponding to the first element in the array; the frequency increment, in Hz, between adjacent array elements; and the number of spectral lines the method returned

Returns

The power spectrum data.

Exceptions

TypeDescription
System.ObjectDisposedException

The MemoryOptimizedReadPowerSpectrum method was accessed after the associated NIRfsa object was disposed.